Home Download Buy Blog Forum Support

Fold/Unfold selects text

Fold/Unfold selects text

Postby S0und on Sat Jan 05, 2013 7:02 pm

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?
S0und
 
Posts: 70
Joined: Wed Oct 28, 2009 4:12 pm

Re: Fold/Unfold selects text

Postby S0und on Mon Jan 14, 2013 9:27 pm

bump
S0und
 
Posts: 70
Joined: Wed Oct 28, 2009 4:12 pm

Re: Fold/Unfold selects text

Postby imaginicky on Thu Mar 07, 2013 2:02 pm

I'm also very interested in this! Anybody have insights?
imaginicky
 
Posts: 1
Joined: Thu Mar 07, 2013 1:44 pm

Re: Fold/Unfold selects text

Postby adzenith on Thu Mar 07, 2013 4:25 pm

I assume it happens so that you can easily refold the text, but I can see why it would be annoying.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Fold/Unfold selects text

Postby katylava on Sat Oct 18, 2014 12:11 am

This is terribly frustrating... is there an option to turn this off?
katylava
 
Posts: 1
Joined: Sat Oct 18, 2014 12:08 am

Re: Fold/Unfold selects text

Postby qgates on Sun Oct 19, 2014 12:04 am

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:

Code: Select all
[
   {
      "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.

:)
qgates
 
Posts: 223
Joined: Mon Nov 05, 2012 4:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], jbjornson, waffl and 23 guests