jamalsenouci / sublimetext-syntaxfold

Sublime Text Plugin that provides a configurable command and popup for folding code based on syntax
MIT License
40 stars 6 forks source link

[Feature Request] Toggle Folding #17

Closed tmueller closed 7 years ago

tmueller commented 8 years ago

Hi,

I am using your Plugin and it works really well. It would be nice to have a toggle folding command, so one has to rememeber only a single keyboard shortcut.

jamalsenouci commented 8 years ago

I agree. This should be an easy one as well, unfortunately I haven't got any time to work on enhancements for this plugin

Armfoot commented 7 years ago

Hi Jamal, thank you for this plugin. It is one of the most useful ones I have installed (I actually found it due to my usage of Visual Studio regions).

27 It was easy to modify as you wrote, I just needed to add a condition in your fold command based on:

self.view.is_folded(self.view.sel()[0])

I renamed the FoldCurrentCommand to ToggleFoldCurrentCommand and removed the unfold command. I also left the (un)fold all commands untouched, since people may still use them without wanting them all to be toggled.

jamalsenouci commented 7 years ago

Thanks for working on this, I have merged this into master so this closing this issue