Allan Odgaard-4 wrote
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.
textmate mailing list
textmate@.macromates
Hi Allan and Toru,
could it be that the current system for matching the end marker of foldings has problems with matching “empty” lines? The folding marker used in the YAML bundle seems to work fine in TextMate 1 but not in TextMate 2. I attached two screenshots showing the different behaviour.
http://textmate.1073791.n5.nabble.com/file/n28270/YAML_TextMate_1.png http://textmate.1073791.n5.nabble.com/file/n28270/YAML_TextMate_2.png
Implementing the TextMate 1 behaviour inside TextMate 2 might fix the problem described by Toru.
Kind regards, René
-- View this message in context: http://textmate.1073791.n5.nabble.com/YAML-bundle-doesn-t-work-for-fold-unfo... Sent from the textmate users mailing list archive at Nabble.com.