Home Download Buy Blog Forum Support

Let Sublime know region is foldable?

Let Sublime know region is foldable?

Postby kindari on Mon Mar 26, 2012 9:20 pm

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.
kindari
 
Posts: 6
Joined: Wed Feb 29, 2012 11:58 pm

Re: Let Sublime know region is foldable?

Postby abathologist on Wed Mar 28, 2012 7:09 am

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.
Last edited by abathologist on Wed Mar 28, 2012 9:46 pm, edited 1 time in total.
abathologist
 
Posts: 18
Joined: Thu Mar 15, 2012 1:29 am

Re: Let Sublime know region is foldable?

Postby nick. on Wed Mar 28, 2012 1:24 pm

abathologist wrote:Or do you want to change the way that your files are parsed, so that you can define certain patterns to recognized as foldable? In the latter case, unless I'm mistakne, you'll have to tweak the syntax definition you're working with.


ATM the "foldingStartMarker" and "foldingStopMarker" keys in syntax files are ignored.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Let Sublime know region is foldable?

Postby kindari on Thu Apr 05, 2012 5:31 pm

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".
kindari
 
Posts: 6
Joined: Wed Feb 29, 2012 11:58 pm


Return to Plugin Development

Who is online

Users browsing this forum: buzzsawddog and 5 guests