Re: [Vim-latex-devel] Nested manual folding
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sri...@gm...> - 2006-02-03 03:19:40
|
Hi, upon reading the latter part of your email, I think there might be better ways to accomplish what you wish... Unfortunately, what you need is not really supported by latex-suite OOTB, but the modification is not that hard... I am still not quire sure why what you did is making latex-suite hang... Thats a bug for another day. On 2/2/06, Cristian Rigamonti <cr...@li...> wrote: [snip] > > For the curious, the reason why I'm looking for nested manual folds lies = in the > fact that I'd like to define "arbitrary" manual foldings in the preamble > (possibly containing blocks of comments) but "comment" folds seem to inte= ract > badly with "manual" folds; again, I tried various settings of g:Tex_Folde= dMisc > (e.g. exchanging the order of "<<<" and "comments") but I didn't find the > right one; so that's why I turned to nested manual folding: if I could ma= ke > them work, I would use only manual folding, dropping "comment" and "pream= ble" > (which don't seem to work the way I expect together with manual folds). > > (I can elaborate on that and provide some examples if you are interested) > > Well, thanks for reading (and of course, thanks for this great project)! > Can you try opening the following file and then opening it after applying the patch (also attached) to folding.vim? Is something like this what you want? Srinath \documentclass[a4paper]{report} %{{{ Packages %{{{ Math Packages \usepackage[sumlimits]{amsmath} \usepackage[sumlimits]{float} %}}} %{{{ Some other Packages \usepackage[sumlimits]{amsmath} \usepackage[sumlimits]{float} %}}} %}}} %{{{ Commands %{{{ Math commands \renewcommand{trivial}{trivial} \renewcommand{trivial}{trivial} %}}} %{{{ Some other commands \renewcommand{trivial}{trivial} \renewcommand{trivial}{trivial} %}}} %}}} \begin{document} %<<< A region of text \section{A section} This is a block This is a block \section{Another section} This is a block This is a block %>>> %<<< Another region of stuff \section{A third section} This is a block This is a block %>>> \end{document} Index: folding.vim =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/folding.vim,v retrieving revision 1.26 diff -u -r1.26 folding.vim --- folding.vim=093 Jan 2006 08:40:39 -0000=091.26 +++ folding.vim=093 Feb 2006 02:48:29 -0000 @@ -219,11 +219,24 @@ =09" =09" }}} =09" =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +=09" Manually folded regions {{{ +=09if g:Tex_FoldedMisc =3D~ '\(^\|,\)<<<\(,\|$\)' +=09=09call AddSyntaxFoldItem ( +=09=09=09\ '%{{'.'{', +=09=09=09\ '%}}'.'}', +=09=09=09\ 0, +=09=09=09\ 0, +=09=09=09\ '%{{'.'{', +=09=09=09\ '%}}'.'}' +=09=09=09\ ) +=09endif +=09" }}} =09 =09" {{{ comment lines =09if g:Tex_FoldedMisc =3D~ '\<comments\>' =09=09call AddSyntaxFoldItem ( -=09=09=09\ '^%\([^%]\|[^f]\|[^a]\|[^k]\|[^e]\)', +=09=09=09\ '^% ', =09=09=09\ '^[^%]', =09=09=09\ 0, =09=09=09\ -1 @@ -326,8 +339,8 @@ =09" Manually folded regions {{{ =09if g:Tex_FoldedMisc =3D~ '\(^\|,\)<<<\(,\|$\)' =09=09call AddSyntaxFoldItem ( -=09=09=09\ '<<<', -=09=09=09\ '>>>', +=09=09=09\ '^%<<<', +=09=09=09\ '^%>>>', =09=09=09\ 0, =09=09=09\ 0 =09=09=09\ ) |