Home Download Buy Blog Forum Support

Code Folding and Selection

Code Folding and Selection

Postby Kensai on Mon Jan 16, 2012 10:17 pm

Is there a way, when code folding based on ST2's default indentation method, to select a folded section rather than just the head line of the section?

I'm looking to be able to "fold all", then be able to select whole sections by their head lines then cut/paste them about, quickly and easily.

Thanks,
Kensai
Kensai
 
Posts: 33
Joined: Mon Aug 24, 2009 8:19 pm

Re: Code Folding and Selection

Postby jps on Mon Jan 16, 2012 10:36 pm

The head line of the selection will only be selected if you use a shortcut that operates on lines like shift+end or ctrl+l: if you select the fold marker using the mouse, or shift+arrow keys, the entire folded text will be selected.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Re: Code Folding and Selection

Postby Kensai on Mon Jan 16, 2012 11:53 pm

Okay, shift+end helped me out there, thanks. Just wasn't getting the fold marker for some reason.

Cut/Paste works fine. I don't suppose there's any way to change ST2's behavior to let ctrl+shift+up/down to function as expected, i.e. move the selected head line + folded section up and down among the other folded head lines and their attached folded sections without them passing through the folded content? Barring that, is there any way to change the paste behavior to where it simply pastes as it was copied, i.e. folded, rather than unfolded with caret at the end of the pasted selection?
Kensai
 
Posts: 33
Joined: Mon Aug 24, 2009 8:19 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 30 guests