[TxMt] Re: YAML bundle doesn't work for fold/unfold

Allan Odgaard mailinglist at textmate.org
Sat Sep 20 08:26:18 UTC 2014


On 19 Sep 2014, at 23:08, Toru Mori wrote:

> Simply, it doesn't fold/unfold for YAML file. In 'Edit Bundles', 
> 'Settings'
> doesn't include 'Folding' while other bundles such as XML does.
> I guess foldingStopMarker might be wrong, but don't know if it's 
> really
> used since it doesn't show up in 'Edit Budles / Settings'.

The TextMate 1.x folding system requires an explicit start and stop 
marker for foldings. The system is documented here: 
http://manual.macromates.com/en/navigation_overview#customizing_foldings

I believe that YAML is based entirely on indent, so this system cannot 
work with YAML.

In TextMate 2.0 an indented folding system was introduced, this is used 
for foldings in Python, Markdown headings, and C++ accessor keywords, 
not sure if it’s used elsewhere.

It is mentioned in the “Fold on the Dotted Line” section here 
http://blog.macromates.com/2012/the-layout-engine/

If you can come up with a pattern to use for foldingIndentedBlockStart 
then we’ll gladly add it to the YAML bundle.


More information about the textmate mailing list