sponsor Vim development Vim logo Vim Book Ad

basic Tip #661: LaTeX: Addition to latex-suite: folds the preamble

 tip karma   Rating 2/2, Viewed by 1064 

created:   February 24, 2004 13:36      complexity:   basic
author:   Christian      as of Vim:   5.7

In /ftplugin/latex-suite/folding.vim I added the lines you see below, so that the latex-suite folding \rf also folds the preamble (the part between \documentclass and \begin{document}.

" {{{ Preamble
call AddSyntaxFoldItem (
\ '^\s*\\documentclass',
\ '^\s*\\begin{document}',
\ 0,
\ 0
\ )
" }}}

happy LaTeXing


 rate this tip  Life Changing Helpful Unfulfilling 

<< Comment lines in different filetypes | Quote unquoted HTML attributes >>

Additional Notes

hermitte {at} free {dot} fr, February 25, 2004 13:18
If you have a patch or an enhancement for a script (plugin, ftplugin, ...) contact its mantainers.
Regarding vim-latex, there is a mailing-list check on http://vim-latex.sourceforge.net/
christian, February 26, 2004 14:46
thank you - i am a rookie, so i didn´t know
anonymous, May 9, 2004 2:01
Is it possible to fold

using \rf key also.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to vim@vim.org after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge.net Logo