Mastering text selection with keyboard in Sublime Text

Here's a list of handy keyboard shortcuts for selecting, copying, cutting, and pasting text is Sublime Text.

Select word, next word, and next occurrence of a word

You know the thing where you press Cmd + D to select the next occurrence of a word? But what if you want to skip a word? Or go back one step. Here’s how to master the multiple selection in Sublime Text.

Start by having a cursor on a word. If you’re on Windows or Linux just replace Cmd with Ctrl.

Shortcut What it does
Cmd + D Selects a word, press again: select next occurrence
Cmd + K, Cmd + D Skip the current occurrence
Cmd + U Go back to the previous occurrence

Also, the more universal text selection works:

Shortcut What it does
Alt Shift + arrows Selects the word next to cursor

Select line

Shortcut What it does
Cmd + L Selects line
Cmd Shift + arrows Select to end/front of line or to end/front of document

Moving lines

Shortcut What it does
Ctrl Cmd + up/down arrows Moves line up and down
(fn) + F5 Alphabetises lines

Moving cursor in the document

Shortcut What it does
Alt + left/right arrow Move cursor to next or previous word

Copying and duplicating lines

If you just do Cmd + C, without any text selected, it will copy the whole line of text.

Shortcut What it does
Cmd + C Copy whole line
Cmd + X Cut whole line
Cmd Shift + D Duplicates line

Vintage mode

This means that all the Vim commands will work, enable if from the settings by commenting this line out:

"ignored_packages": ["Vintage"]

Club-Mate, the beverage →