[Vim-latex-cvs] vimfiles/plugin imaps.vim,1.39,1.40
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2006-03-19 04:29:52
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19268 Modified Files: imaps.vim Log Message: Bug: If there is an abbreviation like this: :iab zzz whatever then typing 'z<space>' triggers the abbreviation in the presence of latex-suite. (Cristian Rigamonti) Why: The reg-exp used to find out if a iab existed was faulty. Fix: Fix the regexp to use an exact match of the previous word. Index: imaps.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** imaps.vim 30 May 2004 07:35:40 -0000 1.39 --- imaps.vim 19 Mar 2006 04:29:47 -0000 1.40 *************** *** 96,99 **** --- 96,103 ---- " }}} + " line continuation used here. + let s:save_cpo = &cpo + set cpo&vim + " ============================================================================== " Script Options / Variables *************** *** 234,237 **** --- 238,242 ---- if a:char !~ '\k' let lastword = matchstr(getline('.'), '\k\+$', '') + call IMAP_Debug('getting lastword = ['.lastword.']', 'imap') if lastword != '' " An extremeley wierd way to get around the fact that vim *************** *** 240,244 **** let _a = @a exec "redir @a | silent! iab ".lastword." | redir END" ! let abbreviationRHS = matchstr(@a."\n", "\n".'i\s\+'.lastword.'\+\s\+@\?\zs.*\ze'."\n") if @a =~ "No abbreviation found" || abbreviationRHS == "" --- 245,251 ---- let _a = @a exec "redir @a | silent! iab ".lastword." | redir END" ! let abbreviationRHS = matchstr(@a."\n", "\n".'i\s\+'.lastword.'\s\+@\?\zs.*\ze'."\n") ! ! call IMAP_Debug('getting abbreviationRHS = ['.abbreviationRHS.']', 'imap') if @a =~ "No abbreviation found" || abbreviationRHS == "" *************** *** 820,822 **** --- 827,831 ---- " }}} + let &cpo = s:save_cpo + " vim:ft=vim:ts=4:sw=4:noet:fdm=marker:commentstring=\"\ %s:nowrap |