Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explicit Deselect in Sublime Text 2's Multiselect

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.

like image 469
mralexlau Avatar asked May 01 '13 14:05

mralexlau


People also ask

What is Ctrl D in sublime?

Ctrl + D in SublimeText is "Quick Add Next." This appears to be equivalent to Ctrl + B in Brackets, which is "Add next match to Selection" on the Find menu.

How do I select all words in Sublime Text?

As per "Sublime Text: Select all instances of a variable and edit variable name" and the answer in "Sublime Text: Select all instances of a variable and edit variable name", we have to start with a empty selection. That is, start using the shortcut Alt + F3 which would help selecting only the whole words.

What does Ctrl B do in sublime?

In Sublime Text 3,when we press Ctrl+Shift+B, we are given the option to either do "Build and Run" or "only Build", whereas Ctrl+B executes the previously chosen operation among the two.

How do I get multiple cursors in Sublime Text?

While you can place multiple text cursors in Sublime Text with Cmd–Click (Mac) or Ctrl–Click (Windows), here's another technique that comes in handy. Hold Ctrl–Shift (Mac) or Ctrl–Alt (Windows) and hit Up or Down Arrow to place an additional text cursor above or below the current cursor.

How do I select multiple lines in Sublime Text?

Multiple Selection with the Keyboard WARNING! This documentation is for an old, unsupported version of Sublime Text. Please check out the current docs. Adding a Line To add the line above or below to the selection, use Ctl+Alt+Upand Ctrl+Alt+down(OS X: Ctrl+Shift+Upand Ctrl+Shift+Down).

How do I split the editor pane in Sublime Text?

When multiple tabs are selected, Sublime Text will automatically split the editor pane to display the tabs horizontally. Note: in the following key bindings, Primaryrefers to the Ctrlkey on Windows and Linux, and the Cmdkey on Mac.

Should Sublime Text use Shift-arrow-up?

Sidenote: also, in Sublime Text, when selecting in the opposite direction (Shift-Arrow Up) it doesn't leave the cursor alone on the line above the selection. I think this holds some ground for my proposal to adapt Sublime to a more consistent behavior.

How do I view multiple tabs in Sublime Text?

Tab multi-select is an easy-to-use, lightweight and quick way to view multiple tabs at once. It is distinct from the functionality found in the View Layoutmenu. When multiple tabs are selected, Sublime Text will automatically split the editor pane to display the tabs horizontally.


2 Answers

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+

like image 182
Matt Jensen Avatar answered Oct 06 '22 20:10

Matt Jensen


Try the following keyboard shortcut:

Ctrl+u

...or you can go the Edit -> Undo Selection -> Soft Undo

like image 22
Hugo Corrá Avatar answered Oct 06 '22 18:10

Hugo Corrá