Re: [Vim-latex-devel] bug in \cite-completion of 1.5
Brought to you by:
srinathava,
tmaas
From: Lasse K. <las...@gm...> - 2003-12-17 00:52:39
|
* I wrote: > ... but the insertion of the completed word still did not work for me. > I could fix it by a similar measure as before, patch is attached. It > must be something with that regexp, and since I am no expert on these, > I can only offer a likely temporary fix. I attached the following patch: > --- /home/snyder/tmp/ftplugin/tex/texviewer.vim 2003-12-17 00:42:47.000000000 +0100 > +++ ftplugin/tex/texviewer.vim 2003-12-17 02:37:52.000000000 +0100 > @@ -332,7 +332,8 @@ > if getline('.') =~ '\\bibitem{' > let bibkey = matchstr(getline('.'), '\\bibitem{\zs.\{-}\ze}') > else > - let bibkey = matchstr(getline('.'), '{\zs.\{-}\ze,') > + " let bibkey = matchstr(getline('.'), '{\zs.\{-}\ze,') > + let bibkey = matchstr(getline('.'), '{\(.*$\)') > endif > let completeword = strpart(bibkey, strlen(s:prefix)) To make that really work, change that last line to: let completeword = strpart(bibkey, strlen(s:prefix)+1) But I am sure, there is a better solution to this all. -- Lasse Kliemann <http://plastictree.net> |