Sublime Text Keyboard Shortcuts
Complete keyboard shortcut reference for Sublime Text on MacWindowsLinux.
General
| Action | Shortcut |
|---|---|
| Open Command Palette | CmdShiftPCtrlShiftPCtrlShiftP |
| Open File | CmdOCtrlOCtrlO |
| New File | CmdNCtrlNCtrlN |
| Save File | CmdSCtrlSCtrlS |
| Save As | CmdShiftSCtrlShiftSCtrlShiftS |
| Close File | CmdWCtrlWCtrlW |
| Reopen Closed File | CmdShiftTCtrlShiftTCtrlShiftT |
| New Window | CmdShiftNCtrlShiftNCtrlShiftN |
| Close Window | CmdShiftWCtrlShiftWCtrlShiftW |
| Open Preferences | Cmd,Ctrl,Ctrl, |
Editing
| Action | Shortcut |
|---|---|
| Cut line | CmdXCtrlXCtrlX |
| Copy line | CmdCCtrlCCtrlC |
| Paste and indent | CmdShiftVCtrlShiftVCtrlShiftV |
| Delete line | CtrlShiftKCtrlShiftKCtrlShiftK |
| Insert line after | CmdEnterCtrlEnterCtrlEnter |
| Insert line before | CmdShiftEnterCtrlShiftEnterCtrlShiftEnter |
| Move line up | CmdCtrlUpCtrlShiftUpCtrlShiftUp |
| Move line down | CmdCtrlDownCtrlShiftDownCtrlShiftDown |
| Duplicate line | CmdShiftDCtrlShiftDCtrlShiftD |
| Join lines | CmdJCtrlJCtrlJ |
| Toggle comment | Cmd/Ctrl/Ctrl/ |
| Toggle block comment | CmdAlt/CtrlShift/CtrlShift/ |
Selection
| Action | Shortcut |
|---|---|
| Select all | CmdACtrlACtrlA |
| Select line | CmdLCtrlLCtrlL |
| Select word | CmdDCtrlDCtrlD |
| Skip selection | CmdKCmdDCtrlKCtrlDCtrlKCtrlD |
| Select all occurrences | CmdCtrlGAltF3AltF3 |
| Expand selection to scope | CmdShiftSpaceCtrlShiftSpaceCtrlShiftSpace |
| Expand selection to brackets | CtrlShiftMCtrlShiftMCtrlShiftM |
| Expand selection to indentation | CmdShiftJCtrlShiftJCtrlShiftJ |
| Add cursor above | CtrlShiftUpCtrlAltUpCtrlAltUp |
| Add cursor below | CtrlShiftDownCtrlAltDownCtrlAltDown |
| Split selection into lines | CmdShiftLCtrlShiftLCtrlShiftL |
| Column selection | AltDragShiftRight ClickDragShiftRight ClickDrag |
Find & Replace
| Action | Shortcut |
|---|---|
| Find | CmdFCtrlFCtrlF |
| Find next | CmdGF3F3 |
| Find previous | CmdShiftGShiftF3ShiftF3 |
| Find and replace | CmdAltFCtrlHCtrlH |
| Replace next | CmdAltECtrlShiftECtrlShiftE |
| Find in files | CmdShiftFCtrlShiftFCtrlShiftF |
| Use selection for find | CmdECtrlECtrlE |
| Incremental find | CmdICtrlICtrlI |
| Toggle regex in find | CmdAltRAltRAltR |
| Toggle case sensitive | CmdAltCAltCAltC |
View & Layout
| Action | Shortcut |
|---|---|
| Toggle full screen | CmdCtrlFF11F11 |
| Toggle distraction-free mode | CmdCtrlShiftFShiftF11ShiftF11 |
| Toggle sidebar | CmdKCmdBCtrlKCtrlBCtrlKCtrlB |
| Toggle minimap | CmdKCmdMCtrlKCtrlMCtrlKCtrlM |
| Single column layout | CmdAlt1AltShift1AltShift1 |
| Two column layout | CmdAlt2AltShift2AltShift2 |
| Three column layout | CmdAlt3AltShift3AltShift3 |
| Four column layout | CmdAlt4AltShift4AltShift4 |
| Two row layout | CmdAltShift2AltShift8AltShift8 |
| Grid layout (2x2) | CmdAlt5AltShift5AltShift5 |
| Focus group 1 | Ctrl1Ctrl1Ctrl1 |
| Focus group 2 | Ctrl2Ctrl2Ctrl2 |
Build & Tools
| Action | Shortcut |
|---|---|
| Build | CmdBCtrlBCtrlB |
| Build with... | CmdShiftBCtrlShiftBCtrlShiftB |
| Open console | Ctrl`Ctrl`Ctrl` |
| Undo | CmdZCtrlZCtrlZ |
| Redo | CmdShiftZCtrlYCtrlY |
| Soft undo | CmdUCtrlUCtrlU |
| Soft redo | CmdShiftUCtrlShiftUCtrlShiftU |
| Sort lines | F9F9F9 |
| Sort lines (case sensitive) | CtrlF9CtrlF9CtrlF9 |
| Indent | Cmd]Ctrl]Ctrl] |
| Unindent | Cmd[Ctrl[Ctrl[ |
| Uppercase | CmdKCmdUCtrlKCtrlUCtrlKCtrlU |
Bookmarks & Macros
| Action | Shortcut |
|---|---|
| Toggle bookmark | CmdF2CtrlF2CtrlF2 |
| Next bookmark | F2F2F2 |
| Previous bookmark | ShiftF2ShiftF2ShiftF2 |
| Clear all bookmarks | CmdShiftF2CtrlShiftF2CtrlShiftF2 |
| Select all bookmarks | AltF2AltF2AltF2 |
| Record macro | CtrlQCtrlQCtrlQ |
| Playback macro | CtrlShiftQCtrlShiftQCtrlShiftQ |
| Save macro | CmdAltQCtrlAltQCtrlAltQ |
| Fold code | CmdAlt[CtrlShift[CtrlShift[ |
| Unfold code | CmdAlt]CtrlShift]CtrlShift] |
| Fold all | CmdKCmd1CtrlKCtrl1CtrlKCtrl1 |
| Unfold all | CmdKCmdJCtrlKCtrlJCtrlKCtrlJ |
No shortcuts found. Try a different search term.
Frequently Asked Questions
How do I open the Command Palette in Sublime Text?
Press Cmd+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux. The Command Palette provides quick access to all Sublime Text commands, settings, and installed package features.
How do I select multiple occurrences of a word in Sublime Text?
Place your cursor on the word and press Cmd+D (Mac) or Ctrl+D (Windows/Linux) repeatedly to select the next occurrence each time. Press Cmd+Ctrl+G (Mac) or Alt+F3 (Windows/Linux) to select all occurrences at once.
How do I customize keyboard shortcuts in Sublime Text?
Go to Preferences > Key Bindings to open the key bindings file. The left pane shows default bindings and the right pane is for your custom overrides. Add JSON entries with keys and command fields to create or override shortcuts.
What is the Go to Anything feature in Sublime Text?
Press Cmd+P (Mac) or Ctrl+P (Windows/Linux) to open Go to Anything. Type a filename to open it, use @ to jump to a symbol, # to search within the file, or : to go to a line number. You can combine these, such as filename@symbol.
How do I use multiple cursors in Sublime Text?
Hold Ctrl+Shift and press Up or Down (Mac) or Ctrl+Alt+Up/Down (Windows/Linux) to add cursors on adjacent lines. You can also hold Alt (Mac) or Shift+Right Click (Windows/Linux) and drag to create a column selection with multiple cursors.