If i fold or unfold a region (zc/zo || Ctrl+Shift+/]) it also selects the folded/unfolded text. How can i get rid of this behavior? Moreover, why this is useful at the first place?
Fold/Unfold selects text
adzenith
#4
I assume it happens so that you can easily refold the text, but I can see why it would be annoying.
0 Likes
qgates
#6
The default behaviour is what it is (and doesn’t bother me personally).
One can work around this behaviour with a macro. For example, to unfold without leaving a selection, create a .sublime-macro file in your User folder and paste the following into it:
{
"args": null,
"command": "unfold"
},
{
"args":
{
"by": "characters",
"forward": false
},
"command": "move"
}
]
Something similar can be done for folding as well. Rebind your Ctrl+Shift+ key to the above macro and you should have what you want.
0 Likes