[Vim-latex-cvs] vimfiles/ftplugin/latex-suite folding.vim,1.24,1.25
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-12-14 08:32:51
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv8493 Modified Files: folding.vim Log Message: New: The fold text is now also "indented". in other words, the fold text is now prepended with the whitespace of the current line so that nested-ness is more apparent. Index: folding.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/folding.vim,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** folding.vim 4 Dec 2003 00:10:18 -0000 1.24 --- folding.vim 14 Dec 2003 07:20:26 -0000 1.25 *************** *** 342,345 **** --- 342,346 ---- " TexFoldTextFunction: create fold text for folds {{{ function! TexFoldTextFunction() + let leadingSpace = matchstr(' ', ' \{,'.indent(v:foldstart).'}') if getline(v:foldstart) =~ '^\s*\\begin{' let header = matchstr(getline(v:foldstart), *************** *** 368,380 **** let retText = matchstr(ftxto, '^[^:]*').': '.header. \ ' ('.label.') : '.caption ! return retText elseif getline(v:foldstart) =~ '^%' && getline(v:foldstart) !~ '^%%fake' let ftxto = foldtext() ! return substitute(ftxto, ':', ': % ', '') elseif getline(v:foldstart) =~ '^\s*\\document\(class\|style\).*{' ! let ftxto = foldtext() return substitute(ftxto, ':', ': Preamble: ', '') else ! return foldtext() end endfunction --- 369,382 ---- let retText = matchstr(ftxto, '^[^:]*').': '.header. \ ' ('.label.') : '.caption ! return leadingSpace.retText ! elseif getline(v:foldstart) =~ '^%' && getline(v:foldstart) !~ '^%%fake' let ftxto = foldtext() ! return leadingSpace.substitute(ftxto, ':', ': % ', '') elseif getline(v:foldstart) =~ '^\s*\\document\(class\|style\).*{' ! let ftxto = leadingSpace.foldtext() return substitute(ftxto, ':', ': Preamble: ', '') else ! return leadingSpace.foldtext() end endfunction |