[Vim-latex-cvs] vimfiles/ftplugin/latex-suite envmacros.vim,1.7,1.8
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2002-11-17 03:40:10
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory usw-pr-cvs1:/tmp/cvs-serv11884 Modified Files: envmacros.vim Log Message: In Tex_DoEnvironment, only use the current line if it is of the form word or word* i.e, ignore lines which contain non word characters. Index: envmacros.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** envmacros.vim 17 Nov 2002 00:43:27 -0000 1.7 --- envmacros.vim 17 Nov 2002 03:40:07 -0000 1.8 *************** *** 3,7 **** " Author: Mikolaj Machowski " Created: Tue Apr 23 08:00 PM 2002 PST ! " Last Change: Sat Nov 16 04:00 PM 2002 PST " " Description: mappings/menus for environments. --- 3,7 ---- " Author: Mikolaj Machowski " Created: Tue Apr 23 08:00 PM 2002 PST ! " Last Change: Sat Nov 16 07:00 PM 2002 PST " " Description: mappings/menus for environments. *************** *** 495,501 **** " that as the name of a new environment. function! Tex_DoEnvironment(...) - let l = getline('.') if a:0 < 1 ! let env = matchstr(l, '^\s*\zs.*') if env == '' let env = PromptForEnvironment('Choose which environment to insert :') --- 495,500 ---- " that as the name of a new environment. function! Tex_DoEnvironment(...) if a:0 < 1 ! let env = matchstr(getline('.'), '^\s*\zs\w*\*\=\ze\s*$') if env == '' let env = PromptForEnvironment('Choose which environment to insert :') *************** *** 504,510 **** endif else ! let ind = matchstr(l, '^\s*\ze') ! normal 0D ! return Tex_PutEnvironment(ind, env) endif else --- 503,508 ---- endif else ! normal! 0D ! return Tex_PutEnvironment(env) endif else *************** *** 526,529 **** --- 524,531 ---- elseif exists('*Tex_'.a:env) exe 'return Tex_'.a:env.'(a:env)' + elseif a:env == '$$' + return IMAP_PutTextWithMovement('$$«»$$') + elseif a:env == '[' + return IMAP_PutTextWithMovement("\\[\<CR>«»\<CR>\\]«»") else return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>«»\<cr>\\end{".a:env."}«»") |