Skip to main content

Sublime Text keyboard shortcut cheatsheet.

-----------------------------------------------------------------------------
General
-----------------------------------------------------------------------------

Command palette:
cmd + shift + p

Go to method:
cmd + r

Go to line:
ctrl + g

Go to file:
cmd + g

Go to anything:
cmd + p

Toggle side bar:
cmd + kb

Python console:
ctrl + ` (backtick)

New window:
cmd + shift + n

-----------------------------------------------------------------------------
Editing
-----------------------------------------------------------------------------

Insert line before:
cmd + shift + enter

Insert line after:
cmd + enter

Delete line:
ctrl + shift + k

Delete from cursor to end of line:
cmd + kk

Delete from cursor to start of line:
cmd + k + DEL

Duplicate line(s):
cmd + shift + d

Join lines:
cmd + j

Upper case:
cmd + KU

Lower case:
cmd + kl

Comment:
cmd + /

Block comment:
cmd + alt + /

Redo or repeat:
cmd + y

Paste and ident:
cmd + shift + v

Autocomplete (repeat to select next suggestion):
ctrl + space

Jump to matching brackets:
ctrl + m

Soft undo (movement undo):
cmd + u

Soft redo (movement redo):
cmd + shift + u

-----------------------------------------------------------------------------
Selections
-----------------------------------------------------------------------------

Select line (repeat select next lines):
cmd + l

Select word (repeat to select others occurrences in context):
cmd + d

Skip over selected match:
cmd + k, cmd + d

Select line (repeat select next lines):
cmd + l

Split each line into its own selection:
cmd + shift + l

Expand selection to tag:
cmd + shift + a

Select content into brackets:
ctrl + shift + m

You can also just hold cmd and click around your file to add more cursors.
Or you can hold ctrl + shift and tap either the up or down arrows to add a new
cursor in that direction.

-----------------------------------------------------------------------------
Bookmarks
-----------------------------------------------------------------------------

Toggle bookmark:
cmd + F2

Next bookmark:
F2

Previous bookmark:
shift + F2

Clear bookmarks:
cmd + shift + F2

-----------------------------------------------------------------------------
Layout
-----------------------------------------------------------------------------

Single column:
cmd + alt + 1

Two columns:
cmd + alt + 2

Grid (4-groups):
cmd + alt + 5

Focus group:
ctrl + [1,2,3,4]

Move file to group:
ctrl + shift + [1,2,3,4]

Select tab:
cmd + [1,2,3...]

-----------------------------------------------------------------------------
Duplicate a block of code
-----------------------------------------------------------------------------

1. Highlight the block and hit: cmd + l
2. Select the new line and hit: cmd + shift + d

---

References

- http://robdodson.me/blog/2012/06/23/sublime-text-2-tips-and-shortcuts
- https://gist.github.com/lucasfais/1207002