Sublime Forum

Let Sublime know region is foldable?

#1

I know the API implements region folding/unfolding, but I would like to let the user control when the region is folded through the default interface. How is this achieved? I assume some specific region or scope name is used.

0 Likes

#2

Do you just want to be able to fold arbitrary segments of the code? (In this case you can just select the region and press alt+super+ (on mac: option+command+ ).) Or do you want to change the way that your files are parsed, so that you can define certain patterns to be recognized as foldable? In the latter case, unless I’m mistakne, you’ll have to tweak the syntax definition you’re working with.

0 Likes

#3

ATM the “foldingStartMarker” and “foldingStopMarker” keys in syntax files are ignored.

0 Likes

#4

Yes, I was hoping to make Sublime aware that a region is foldable. I was hoping to use this for variable display (writing a xdebug plugin), so that I could hide child properties in a fold and let the user expand them to “dive down”.

0 Likes