[Vim-latex-cvs] vimfiles/ftplugin/latex-suite templates.vim,1.16,1.17
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-12-19 03:06:29
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv11801 Modified Files: templates.vim Log Message: Bug: When the user's 'fo' setting had 'ro' included in it, then inserting templates would result in strange leading indentation (it would be doubled etc). Why: IMAP_PutTextWithMovement simulates key-presses. Therefore if 2 successive lines in the template begin with ``%`` and ``'fo'`` has ``ro``, then the second line will have an extra ``%`` character. Fix: Set ``'fo'`` temporarily to an empty string. Index: templates.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/templates.vim,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** templates.vim 16 Dec 2003 20:29:25 -0000 1.16 --- templates.vim 19 Dec 2003 03:06:26 -0000 1.17 *************** *** 70,76 **** --- 70,84 ---- normal! ggVG"ax + let _fo = &fo + " Since IMAP_PutTextWithMovement simulates the key-presses, leading + " indendatation can get duplicated in strange ways if ``fo`` is non-empty. + " NOTE: the indentexpr thingie is still respected with an empty fo so that + " environments etc are properly indented. + set fo= + call Tex_Debug("normal! i\<C-r>=IMAP_PutTextWithMovement(@a, '".s:phsTemp."', '".s:pheTemp."')\<CR>", 'templates') exec "normal! i\<C-r>=IMAP_PutTextWithMovement(@a, '".s:phsTemp."', '".s:pheTemp."')\<CR>" + let &fo = _fo let @a = _a |