[Vim-latex-devel] packages.vim
Brought to you by:
srinathava,
tmaas
From: Diego C. <die...@pg...> - 2003-01-20 18:28:39
|
I checked out LaTeX-Suite and I think it is really great, but when i tried to insert the \includegraphics command from the menu' it was like this \includegraphics[]{}{} but this syntax refers to the graphics package, while this command has only one mandatory argument in the package graphicx \includegraphics[]{} (check this url http://www.mathstat.dal.ca/~clyde/latex.html for a brief manual of both ) In the end I tracked the origin of this to be in the following line of file packages.vim let s:CommandSpec_nob = '\<+replace+>[<++>]{<++>}{<++>}<++>' which defines the nob prefix as the keyword followed by 1 optional and 2 mandatory arguments and as long as I can see it is not envisaged the possibility of only one mandatory arg. If I am right this can generate inconsistencies, so why not using let s:CommandSpec_nob = '\<+replace+>[<++>]{<++>}<++>' and let s:CommandSpec_nobb = '\<+replace+>[<++>]{<++>}{<++>}<++>' with the number of 'b' matching the number of mandatory arguments? or alternatively you can quote the number of arguments like this let s:CommandSpec_no2b2 = '\<+replace+>[<++>][<++>]{<++>}{<++>}<++>' so that you do not end up with increasing length command specifications (ex. CommandSpec_noobbb). I hope this can be useful. By the way if one loads a package then it is likely to use its commands, so I am wondering if it is feasible to make the three letter shortcuts sensitive to the loaded packages in such a way that after loading for example \usepackage[options]{graphicx} EFI will use the \includegraphics command instead of the default \psfig ? Or it is alredy possible? If not I think it would be a big enhancement. Thanks for your time. -- Diego Caraffini <die...@pg...> |