textmate / yaml.tmbundle

TextMate support for YAML
17 stars 17 forks source link

YAML code folding isn't working in TextMate 2 #2

Closed m5o closed 10 years ago

m5o commented 10 years ago

Code folding isn't working with TextMate 2

Fetch for example a yml-file with lot of hierarchy (rails-i18n en locale)

The problem seems to be in the foldingStopMarker regex which is located in Preferences/Folding.tmPreferences around Line 13-14

<key>foldingStopMarker</key>
<string>^\s*$|^\s*\}|^\s*\]|^\s*\)</string>

Resources to play with Regular Expressions:

I couldn't get the folding working, so maybe someone find a solution.

torumori commented 10 years ago

I've created a pull request for a fix for this issue. Please see https://github.com/textmate/yaml.tmbundle/pull/3

I'm not sure that is the best way to address this, but it works for me at least.

sanssecours commented 10 years ago

Hi m5o and Toru,

I just created a pull request that should improve things. The folding in the file m5o mentioned should work correctly, except for the keys where no indentation is used: abbr_day_names, abbr_month_names, day_names, month_names and order. If we indent the list items contained in these mappings then they should work fine too. It would be nice if we could also fold them correctly without changing the “botched” indentation, but I guess that would require changes to the folding system used inside TextMate...

Kind regards, René

infininight commented 10 years ago

Improved in e0e6ff0b7f10f618a3a4b2f09c58d7ad67c695cd, post here if there any linger issues. Closing this for now though.