Re: [Vim-latex-devel] Nested manual folding
Brought to you by:
srinathava,
tmaas
From: Cristian R. <cr...@li...> - 2006-02-03 15:33:13
|
On Thu, Feb 02, 2006 at 06:50:17PM -0800, Srinath Avadhanula wrote: > I am still not quire sure why what you did is > making latex-suite hang... Thats a bug for another day. Thank you very much for your quick and valuable answer. Well, I found out that substituting '<<<' patterns with '^%<<<' (see attached patch) makes the "hang" problem disappear, and I got the nested manual folds to work as I wanted, although with the following caveats: - A) To avoid that a comment fold "eats up" any subsequent manual folds separated by empty lines, like in the following situation... % Comment block % ... % End comment block %<<< Manual fold ... %>>> ...you must include the empty line (i.e. the '^$' pattern) in the comment folds endpattern (as I've done in my patch). Note that this problem affects also your proposed patch. - B) If you want things to work nicely in the preamble too, you have to switch off the 'preamble' value from g:Tex_FoldedMisc (e.g. setting it to 'item,<<<,comments'), otherwise folds inside the preamble won't work anymore (you can only choose between a completely folded preamble or a completely unfolded one). Although this is not a major limitation (since you can always enclose the whole preamble in a big manual fold and retain nested manual folds), I tried to fix it by adding startskip and endskip pattern for the "preamble" folds, but without success (it seems that whatever skip pattern I add, the preamble doesn't get folded anymore, but I admit that I didn't play too much with that). > 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? I tried your patch and it works nicely, it does not suffer from the "preamble" bug as mine, although it suffers from the "empty line" bug I mentioned above. I tried fiddling with it a bit in order to see if we can avoid to use two different kinds of manual folding markers ("{{{" and "<<<"), but I couldn't achieve any better results than those of my patch. So, for now I'm quite satisfied with my patch, but I admit it could be interesting to work on the B) problem, in order to restore "normal" preamble folding working... Thanks again for your reply! Cri -- GPG/PGP Key-Id 0x943A5F0E - http://www.linux.it/~cri/cri.asc |