Sublime Text Shortcuts

Sublime Text keyboard shortcuts.

The Sublime Text shortcuts that matter — Go to Anything, multiple selections, find & replace. Mac and Windows.

Editing
Cut (line)+XCtrl+XCtrl+X
Copy+CCtrl+CCtrl+C
Paste+VCtrl+VCtrl+V
Undo+ZCtrl+ZCtrl+Z
Redo++ZCtrl+YCtrl+Y
Duplicate line++DCtrl+Shift+DCtrl+Shift+D
Delete line++KCtrl+Shift+KCtrl+Shift+K
Move line up/down++↑/↓Ctrl+Shift+↑/↓Ctrl+Shift+↑/↓
Join lines+JCtrl+JCtrl+J
Indent+]Ctrl+]Ctrl+]
Unindent+[Ctrl+[Ctrl+[
Selection
Select all+ACtrl+ACtrl+A
Expand selection to word+DCtrl+DCtrl+D
Select all occurrences++GAlt+F3Alt+F3
Add cursor above/below++↑/↓Ctrl+Alt+↑/↓Ctrl+Alt+↑/↓
Select line+LCtrl+LCtrl+L
Navigation
Go to Anything+PCtrl+PCtrl+P
Go to symbol+RCtrl+RCtrl+R
Go to line+GCtrl+GCtrl+G
Command palette++PCtrl+Shift+PCtrl+Shift+P
Jump to matching bracket+MCtrl+MCtrl+M
Find & replace
Find+FCtrl+FCtrl+F
Replace++FCtrl+HCtrl+H
Find in files++FCtrl+Shift+FCtrl+Shift+F
Find next+GF3F3
Find previous++GShift+F3Shift+F3
Files & view
New file+NCtrl+NCtrl+N
Save+SCtrl+SCtrl+S
Toggle sidebar+K++BCtrl+K+Ctrl+BCtrl+K+Ctrl+B
Split into two columns++2Alt+Shift+2Alt+Shift+2
Close tab+WCtrl+WCtrl+W
Reopen closed tab++TCtrl+Shift+TCtrl+Shift+T
On Linux, Sublime Text uses the same shortcuts as Windows (Ctrl-based). Redo is Ctrl + Y, and Select all occurrences is Alt + F3 on both.

Go to Anything is the master key

If you learn one Sublime Text shortcut, make it Go to Anything (⌘/Ctrl + P). Start typing a file name and it fuzzy-matches across the whole project in a couple of keystrokes — no clicking through the sidebar. The same box doubles as a symbol jumper and a line jumper: add @ to leap to a function or class, : to jump to a line number, and # to search for text. Many experienced Sublime users navigate an entire codebase without ever touching the mouse.

The Command Palette runs everything else

Where Go to Anything moves you around, the Command Palette (⌘/Ctrl + Shift + P) runs commands. Setting the syntax, changing indentation, sorting lines, installing a package — anything the editor can do is reachable by typing a few letters, so you never have to remember which menu it lives in. Pair it with Go to symbol (⌘/Ctrl + R) for large files and Go to line (⌃G / Ctrl + G) to land on an exact spot from a stack trace.

Multiple selections are the superpower

Sublime Text's multiple selections are what make people who use it look impossibly fast. Press ⌘/Ctrl + D to add the next occurrence of the current word to the selection and you can rename five instances of a variable at once; ⌃⌘G (Alt + F3) grabs every occurrence in one shot. Combine that with line actions — duplicate a line with ⌘⇧D / Ctrl + Shift + D, delete it with ⌘⇧K / Ctrl + Shift + K, move it with ⌘⌃↑/↓ (Ctrl + Shift + ↑/↓), and join lines with ⌘/Ctrl + J — and routine edits that would take a dozen mouse moves collapse into a single gesture.

How to adopt them

Add one shortcut at a time. Start with Go to Anything and the Command Palette this week; bring in multiple selections next. Press / to search this page when you forget one. Since Sublime Text shares its clipboard and editing keys with the rest of your system, the general shortcuts reinforce each other, and the Git commands pair naturally with editing code in Sublime.

FAQ

What is the Go to Anything shortcut in Sublime Text?
Press Command + P on Mac or Ctrl + P on Windows to open Go to Anything, then fuzzy-type to jump to any file, or add @ for a symbol and : for a line number.
How do I select multiple occurrences in Sublime Text?
Press Command/Ctrl + D to add the next match of the current word to the selection, giving you a cursor at each. Use Ctrl + Command + G on Mac or Alt + F3 on Windows to select every occurrence at once.
How do I open the Command Palette in Sublime Text?
Press Command + Shift + P on Mac or Ctrl + Shift + P on Windows to open the Command Palette and run any command by name.

Related