Sunday, December 4, 2016

Basic Sublime Selection Shortcuts

Here's are a few basic selection shortcuts that I think every sublime user should know.

Select characters
SHIFT + LEFT / RIGHT / TOP / DOWN

Useful if you want to be much more specific about what you want to select. For example, maybe you want to cut out half of a word so you'll go to the beginning of the word and use SHIFT + LEFT to highlight up to the character that marks the end of the text you want to delete.

Select word
CMD + D (repeat to select more instances)

Convenient shortcut for not having to do SHIFT + RIGHT / LEFT multiple times if you just want the whole word.

Select all instances of word in file
CMD + CTRL + G

Very useful for finding where a variable is referenced. Also useful if you want to do a name refactor of a variable in the current file.

Select line
CMD + L

I usually use this when I want to delete or comment out an entire line of code.

Select everything inside current parenthesis
CTRL + SHIFT + M

Very useful if you need to copy or modify the parameters of a function.

Select everything inside file
CMD + A

Delete and start over!

De-selection: UNDO
CMD + U to de-select the most recently selected

Sometimes you'll accidentally select more than you wanted!

No comments:

Post a Comment