[TxMt] YAML Folding Markers

Paul Mucur mudge at waferbaby.com
Fri May 5 22:38:42 UTC 2006


I'm observing some strange behaviour with the YAML folding markers:  
the folding stop marker does not appear when there is some whitespace  
on the closing line this despite of the regex matching \s*. It works  
fine if the line is completely empty, however.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextMateScreenSnapz001.gif
Type: application/applefile
Size: 34771 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060505/d8d7f994/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextMateScreenSnapz001.gif
Type: image/gif
Size: 2203 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060505/d8d7f994/attachment-0001.gif>
-------------- next part --------------

I also thought it helpful to add [^#] after the initial ^ in the  
folding start marker regexp so that comments containing words  
followed by colons do not appear as folding markers (as with the  
default database.yml that Rails 1.1.2 generates).

foldingStartMarker = '^[^#]\s*.*:(\s*\[?| &.+)?$';

-- Paul


More information about the textmate mailing list