[TxMt] Folding in LaTeX

Allan Odgaard throw-away-1 at macromates.com
Thu Apr 6 19:12:15 UTC 2006


On 6/4/2006, at 17:50, Daniel Käsmayr wrote:

> 	foldingStartMarker = '(?x)
> 	(\\(chapter|section)\{.*\}
> 	|\\begin\{.*\}
> 	)';
> 	foldingStopMarker = '(?x)
> 	(\%end(chapter|section)\{.*\}
> 	|\\end\{.*\}
> 	)';
>
> Works only if the indentation is correct. (Which might get  
> annoyingly deep if this is done in depth).
>
> \chapter{chapter}
> 	\section{section}
> 	%endsection{}
> %endchapter{}

I tried that without the indent, and it worked fine.

> Is there a way to get folding to recognize the foldingStopMarker as  
> "the line before it hits a certain pattern"? So I can fold (marked  
> with *)

No

> PS: btw, when editing this email in Txtmate and returning to  
> Mail.app the indentations were all gone.

I think there is a problem with Mail losing leading tabs. I have my  
Mail mode use soft tabs (as spaces are correctly “converted” to  
 ), but I will check it out so it works with tabs.

Btw: for people who do regularly use the ctrl-cmd-E shortcut (to Edit  
in TM) then there is a Mail bundle on the repos. which will give nice  
syntax highlight for quoted text and such. I will add this bundle to  
the list of what should be included in future builds.





More information about the textmate mailing list