Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing a cursor in Sublime Text after Ctrl+click

Tags:

sublimetext2

In Sublime Text, you can add a cursor to multiple arbitrary locations using Ctrl+click. However, using the mouse is often imprecise, so I sometimes encounter the need to undo a click (having already selected multiple locations in the text), but haven't found a way to do it so I have to start all over.

Is there a way to 'remove' a cursor after specifying it using the mouse?

Note: I'm aware of multiple cursor usage with the keyboard, this question is specifically about mouse usage.

like image 945
Elise Avatar asked Apr 21 '13 15:04

Elise


2 Answers

Don't mean to graveyard post on this subject, but I found this to be exactly what I was looking for:

Ctrl + U (Cmd + U on Mac) seems to remove the last placed caret.

Found here: https://www.sublimetext.com/forum/viewtopic.php?f=4&t=5091

Digging through Sublime's Default Key Bindings files, the command name for this is soft_undo

So by modifying your user-defined key bindings, you can set any key/mouse combination you want to trigger soft_undo

like image 98
Austin Dean Avatar answered Oct 25 '22 02:10

Austin Dean


You can use the alt modifier on windows and linux and shift+cmd modifier on OS X while selecting to use "subtractive" mode. You could also use a simple plugin to remove the first or last cursor in the view (not first or last added, first or last overall) and tie it to a key command.

like image 37
skuroda Avatar answered Oct 25 '22 02:10

skuroda