Home Download Buy Blog Forum Support

Free Select Mode

Free Select Mode

Postby Allen on Wed Dec 08, 2010 2:31 pm

I love the way Sublime handles selections, it's incredibly powerful. I've always wished it were possible to have the same selective agility with the keyboard as with the mouse, though. I'm not looking for a full vim clone/command mode, just some way to emulate the ctrl+click to add another carat without the mouse. Is this something presently possible I've overlooked, or maybe a request for Sublime X?
Allen
 
Posts: 43
Joined: Sun Jan 24, 2010 2:50 pm

Re: Free Select Mode

Postby gpfsmurf on Wed Dec 08, 2010 5:46 pm

You have Ctrl+Alt+Up and Ctrl+Alt+Down

If you already have a selection, Ctrl+Shift+K and Ctrl+Shift+L can be useful as well
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Free Select Mode

Postby Allen on Wed Dec 08, 2010 9:25 pm

I am familiar with those (pre-X, still waiting for up/down in X), but they are not even similar to ctrl+click. I'm talking about free cursor placement.
Allen
 
Posts: 43
Joined: Sun Jan 24, 2010 2:50 pm

Re: Free Select Mode

Postby gpfsmurf on Thu Dec 09, 2010 12:05 am

But if you press the arrow keys, the carets will move (which is a good thing)

So how would this work?
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Free Select Mode

Postby adzenith on Thu Dec 09, 2010 12:40 am

I think the idea is that you could press some button that makes the arrows move a "potential insertion point" (for lack of a better term) around instead of all the current insertion points.
Windows Explorer has something similar to this idea. If you hold the ctrl key and press up and down, it moves a dashed box from item to item. If (still holding control) you press space, it toggles the selection for that item.
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

Re: Free Select Mode

Postby Allen on Thu Dec 09, 2010 4:04 pm

Exactly -- the idea is to have some way for the carat to not move (at my command), so that I can insert multiple carats. You just -cannot- do this without the mouse

Image

Once I've got my selection points, then I want the carats to move about.
Allen
 
Posts: 43
Joined: Sun Jan 24, 2010 2:50 pm

Re: Free Select Mode

Postby willi297 on Thu Dec 09, 2010 6:29 pm

I added alt+f3 to my bag of multi-select tricks a while ago, and it accomplishes most of what you are trying to get at. Just select a phrase, press alt+f3, and then all copies in the current buffer are selected.

I would like it if this could be done from the Find dialog, which would also allow regular expressions for selecting.
Greg Williams
Atomic Embedded, USA
http://atomicembedded.com
willi297
 
Posts: 121
Joined: Wed Nov 18, 2009 8:29 pm
Location: Grand Rapids, MI, USA

Re: Free Select Mode

Postby adzenith on Thu Dec 09, 2010 7:07 pm

The find panel has a find all button (though the incremental find dialog does not).
In either case, you can map the command "findAll"--I've mapped it to ctrl+shift+a--in order to select all copies in the current buffer.
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

Re: Free Select Mode

Postby gpfsmurf on Thu Dec 09, 2010 7:19 pm

I'm pretty sure there's no way to do that currently in either Sublime or X.

But if you provide a good use case (what key to press, how it'd work, etc), maybe Jon will have a look at it; it could be useful.

I currently use the bookmarks to achieve something similar: move your caret around, press Ctrl+F2 to set a caret/selection bookmark, and when you're done, click Alt-F2 to select all the bookmarks.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Free Select Mode

Postby jps on Thu Dec 09, 2010 11:02 pm

As mentioned above, you can go a long way with Alt+F3.

There are a few commands that exist that you may find interesting, but they're aren't bound to anything by default:

markSelection: Pushes the current selection onto the selection stack
prevInSelectionHistory: Changes the current selection to the previous one on the stack
nextInSelectionHistory: Changes the current selection to the next one on the stack
clearSelectionHistory
mergeSelection: Combines the current and previous entries on the selection stack
conflateSelection: Combines the current and previous entries on the stack by selecting everything in between them

I personally haven't ever found these to be terribly useful, which is why they aren't bound to anything, but I'd be happy if someone did find a use for them.
jps
Site Admin
 
Posts: 3062
Joined: Wed Mar 19, 2008 12:33 pm

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Exabot [Bot] and 9 guests