Reputation: 1993
In Sublime Text 2, you can multiselect the next occurrence of a word with Command+D (on Macs, Ctrl+D on Windows). Is there a way to explicitly deselect an occurrence of a word?
Note: I know you can use Command+K, Command+D to skip an occurrence of a multiselect. The problem is that this command automatically still highlights the next occurrence of the word. I'm looking for a shortcut that simply deselects the last selection.
Upvotes: 17
Views: 4036
Reputation: 1564
To deselect the last occurrence selected with ⌘ + D try using:
On Mac: ⌘ + U
On Windows: Control + U
Update: Confirmed this works on Sublime v3 & v4+
Upvotes: 23
Reputation: 4474
On Linux and Windows, using the mouse:
To remove a selection from the multiple selection: Shift+Alt+RIGHT Mouse Button
To add a new selection to the multiple selection: Shift+Ctrl+RIGHT Mouse Button
To add a new cursor to multiple selection: Ctrl+LEFT Mouse Button
You may drag the mouse over what you need to deselect.
If you drag in the middle of a longer selection, you may end up with two new fragments of it selected that are separated by the area that you dragged the mouse over. Thus, sometimes by removing a selection you may create two new ones before and after.
Works in Sublime Text 3 as well.
Upvotes: 0
Reputation: 21
On Mac you can deselect any occurrence by using cmd+alt+shift+left mouse button
I have not found the similar shortcut for Windows yet.
Upvotes: 2
Reputation: 14789
Try the following keyboard shortcut:
Ctrl+u
...or you can go the Edit -> Undo Selection -> Soft Undo
Upvotes: 2