[TextMate] Add More Folds for HTML

Eric Curtis ecurtis at rgbdesignstudio.com
Wed Oct 6 19:56:14 UTC 2004


I was poking around in the HTMl bundles and found an easy way to add  
more elements that would fold (Marc asked about this).
Go to and edit:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/ 
HTML.tmbundle/Syntaxes/HTML.plist

Line 34 and 35 are:
	foldingStartMarker =  
"(<(?i:(head|table|div|style|script|ul|ol|form|dl|p|li|a|select))\\>.*? 
 >|\\{)";
	foldingStopMarker =  
"(</(?i: 
(head|table|div|style|script|ul|ol|form|dl|p|li|a|select))>|\\})";

I added the p,li,a, and select.

One thing to note is that a fold will only occur if an element takes up  
multiple lines (one line wrapped will not fold).

Have Fun,

Eric Curtis




More information about the textmate mailing list