[TxMt] Folding Question

Simon Gregory simon.textmate.list at helvector.org
Sat Feb 12 00:51:10 UTC 2005


> I don't know if this has been aswered or not, but is it possible to  
> set multiple folding starts and stops in a syntax file? Like can I  
> edit the Java syntax to fold { } *and* /** */?

Not that I know a lot about regular expressions but taking a look in  
~/Library/Application  
Support/TextMate/Bundles/XML.tmbundle/Syntaxes/XML.plist I found:

<key>foldingStartMarker</key>
<string>^\s*(<[^!?/]+(?!.+?/>)|(<!--(?!.*?-->))\s*$)</ 
string>
<key>foldingStopMarker</key>
<string>(</[^?]+?>|/>|-->)\s*$</string>

Although things are in a different format when looking in  
/Applications/TextMate.app/Contents/SharedSupport/Bundles/ 
ActionScript.tmbundle/Syntaxes/ActionScript.plist they're still there:

foldingStartMarker = "(/\\*\\*|\\{\\s*$)";
foldingStopMarker = "(\\*\\*/|^\\s*\\})";

Which would suggest there's a way to add them as there's pipes in there  
which I'd imagine act as logical OR's.

Simon




More information about the textmate mailing list