Tabs and panes 17
Sublime HQ writes the tab multi-select keys with a "Primary" modifier, which is Ctrl on Windows and Linux and Cmd on a Mac. Ctrl + J (Cmd + J) only starts a sequence, like Ctrl + K.
| Action | Windows / Linux | Mac |
|---|---|---|
| Cycle through open filesCycles only among the files of the group that has focus. | Ctrl+Tab | Ctrl+Tab |
| Switch to tab by numberNumber keys pick the tab at that position; a Mac uses Cmd with the number instead. | Alt+Number | — |
| Select last tabJumps to the final tab of the group however many tabs are open. | Alt+9 | Cmd+9 |
| Change pane layoutWindows and Linux binding for switching between split-pane arrangements. | Alt+Shift+Number | — |
| Add left tab to selectionShows the neighbouring tab on the left beside the current one in a split view. | Ctrl+JthenCtrl+Shift+Left | Cmd+JthenCmd+Shift+Left |
| Add right tab to selectionShows the neighbouring tab on the right beside the current one in a split view. | Ctrl+JthenCtrl+Shift+Right | Cmd+JthenCmd+Shift+Right |
| Focus selected tab on leftMoves input focus to the selected tab on the left without changing the selection. | Ctrl+JthenCtrl+Page Up | Cmd+JthenCmd+Shift+[ |
| Focus selected tab on rightMoves input focus to the selected tab on the right without changing the selection. | Ctrl+JthenCtrl+Page Down | Cmd+JthenCmd+Shift+] |
| Keep only focused tabEnds the split view by dropping every other tab from the selection. | Ctrl+JthenCtrl+Up | Cmd+JthenCmd+Up |
| Deselect tabs on leftRemoves the selected tabs that sit left of the focused one. | Ctrl+JthenCtrl+Left | Cmd+JthenCmd+Left |
| Deselect tabs on rightRemoves the selected tabs that sit right of the focused one. | Ctrl+JthenCtrl+Right | Cmd+JthenCmd+Right |
| Add or remove tabOn an unselected tab this adds it to the split view; on a selected one it removes it. | Ctrl+Click | Cmd+Click |
| Replace focused tabSwaps the clicked tab into the focused pane and keeps the rest of the selection. | Alt+Click | Option+Click |
| Open file as added tabIn Goto Anything, opens the chosen file next to the tabs already selected. | Shift+Enter | Shift+Return |
| Open file replacing focused tabIn Goto Anything, puts the chosen file in place of the tab that has focus. | Alt+Enter | Option+Return |
| New tab from tab barUse it on an empty part of the tab header. | Double-click | Double-click |
| Close file in Open FilesApplies to entries under Open Files in the side bar. | Middle-click | Middle-click |
Editing 12
Expand Selection to Indentation has no default key binding in Sublime Text 4.
| Action | Windows / Linux | Mac |
|---|---|---|
| Delete LineUses the same keys on Windows, Linux and Mac. | Ctrl+Shift+K | Ctrl+Shift+K |
| Join LinesMoved to this binding in Sublime Text 4; Expand Selection to Indentation, which used it before, is now unbound. | Ctrl+Shift+J | Cmd+Shift+J |
| IndentShifts the current line or the selected lines one level to the right. | Ctrl+] | — |
| UnindentShifts the current line or the selected lines one level to the left. | Ctrl+[ | — |
| Unindent at line startUnindents whenever the caret sits at the start of a line, even without a multi-line selection. | Shift+Tab | Shift+Tab |
| Wrap Paragraph at RulerRe-flows the paragraph at the caret so its lines break at the ruler. | Alt+Q | Cmd+Option+Q |
| Expand Selection to TagSelects the contents of the enclosing tag; pressing again widens the selection step by step. | Ctrl+Shift+A | Cmd+Shift+A |
| Close TagInserts the closing tag for the nearest tag that is still open. | Alt+. | Cmd+Option+. |
| Wrap selection in tagOn a Mac this is a Ctrl chord, since the Cmd version of it closes the window. | Alt+Shift+W | Ctrl+Shift+W |
| Move left by subwordMoves back by parts of a word rather than whole words; the Mac binding uses Ctrl. | Alt+Left | Ctrl+Left |
| Move right by subwordAdvances the caret one part of a word at a time. | Alt+Right | Ctrl+Right |
| Center on selectionScrolls the view so that the selection sits in the middle of the window. | Ctrl+KthenCtrl+C | Ctrl+L |
Completions 5
| Action | Windows / Linux | Mac |
|---|---|---|
| Show completions popupOpens the suggestion list by hand when it has not appeared automatically. | Ctrl+Space | Ctrl+Space |
| Hide completions popupDismisses the suggestion list without inserting anything. | Esc | Esc |
| Insert best completionNeeds the tab_completion setting; with it off the key only triggers snippets or types a tab. | Tab | Tab |
| Insert literal tabTypes a real tab character instead of completing the word. | Shift+Tab | Shift+Tab |
| Commit selected completionChanges to Tab when the auto_complete_commit_on_tab setting is enabled. | Enter | Return |
Multi-cursor 8
On Linux the add-line keys are Alt + Shift + Up and Alt + Shift + Down; the documentation prints the arrows as symbols.
Column selection with the mouse uses a different button on each platform: the right button with Shift on Windows and Linux, the left button with Option on a Mac. Windows and Mac also accept the middle button.
| Action | Windows / Linux | Mac |
|---|---|---|
| Quick Add NextSelects the word at the caret, then adds its next occurrence with each further press. | Ctrl+D | Cmd+D |
| Quick Skip NextPasses over the current match and moves the newest selection to the following one. | Ctrl+KthenCtrl+D | Cmd+KthenCmd+D |
| Undo SelectionTakes back the last selection move, handy after adding one occurrence or line too many. | Ctrl+U | Cmd+U |
| Split into LinesTurns a multi-line selection into a separate selection on every line. | Ctrl+Shift+L | Cmd+Shift+L |
| Select all occurrencesSelects every occurrence of the word at the caret at once instead of stepping through them. | Alt+F3 | Ctrl+Cmd+G |
| Add line above to selectionWindows key; Linux uses Alt + Shift + Up. Repeating it builds a column selection. | Ctrl+Alt+Up | Ctrl+Shift+Up |
| Add line below to selectionWindows key; Linux uses Alt + Shift + Down for the same command. | Ctrl+Alt+Down | Ctrl+Shift+Down |
| Return to single selectionCollapses multiple selections back to one caret. | Esc | Esc |
Search 4
| Action | Windows / Linux | Mac |
|---|---|---|
| FindOpens the find panel; pressed again while the panel is showing, it selects the search pattern. | Ctrl+F | — |
| Quick FindLooks for the word at the caret, matching whole words when nothing is selected. | Ctrl+F3 | Option+Cmd+G |
| Find All from find panelSelects every match of the search so they can all be edited at once. | Alt+Enter | Option+Return |
| Replace AllWorks while the replace panel has focus and changes every match in one step. | Ctrl+Alt+Enter | Ctrl+Option+Return |
Tracked changes 5
| Action | Windows / Linux | Mac |
|---|---|---|
| Next ModificationMoves the caret to the following changed region tracked by incremental diff. | Ctrl+. | Ctrl+. |
| Previous ModificationMoves the caret back to the preceding changed region in the file. | Ctrl+, | Ctrl+, |
| Toggle Hunk DiffShows or hides the earlier text inline beneath a modified region. | Ctrl+KthenCtrl+/ | Cmd+KthenCmd+/ |
| Toggle diff, hide othersToggles the inline diff at the caret and closes any other open inline diffs. | Ctrl+KthenCtrl+; | Cmd+KthenCmd+; |
| Revert ModificationPuts the changed region at the caret back to the version on disk. | Ctrl+KthenCtrl+Z | Cmd+KthenCmd+Z |
Build systems 6
| Action | Windows / Linux | Mac |
|---|---|---|
| BuildRuns the build system for the current file and shows its output in a panel at the bottom. | Ctrl+B | Cmd+B |
| Build, alternate keyRuns the same Build command from a function key that is identical on every platform. | F7 | F7 |
| Build WithLets you pick among the build systems and variants that match the current file. | Ctrl+Shift+B | Cmd+Shift+B |
| Next ResultJumps to the next file location named in the build output, typically an error. | F4 | F4 |
| Previous ResultSteps back to the preceding location listed in the build output. | Shift+F4 | Shift+F4 |
| Cancel BuildStops a build that is still running. | Ctrl+Break | Ctrl+C |
View 8
| Action | Windows / Linux | Mac |
|---|---|---|
| Toggle Side BarShows or hides the side bar; the two chords are pressed one after the other. | Ctrl+KthenCtrl+B | Cmd+KthenCmd+B |
| Focus side barHands keyboard input to the file tree so it can be driven without the mouse. | Ctrl+0 | Ctrl+0 |
| Distraction Free ModeShows the file full screen with only the centered text; side bar, minimap and status bar are hidden. | Shift+F11 | — |
| Change font sizeTurn the mouse wheel with the key held; listed for Windows and Linux. | Ctrl+Scroll | — |
| Scroll horizontallyTurns the mouse wheel into a sideways scroll, useful for long lines. | Shift+Scroll | Shift+Scroll |
| Reveal hidden menuApplies when the menu bar is hidden; the reveal_menu setting turns this off. | Alt | — |
| Open context menuKeyboard alternative to right-clicking, added for Linux and Windows. | Shift+F10 | — |
| Expand folder recursivelyOpens the clicked side bar folder together with all of its subfolders. | Alt+Click | Option+Click |
Mac-specific bindings Mac only 8
| Action | Windows / Linux | Mac |
|---|---|---|
| Save AsSaves the current file under a new name. | — | Cmd+Shift+S |
| Save AllSaves every open file in one step. | — | Cmd+Option+S |
| Toggle overwrite modeSwitches between inserting text and typing over existing characters. | — | Cmd+Option+O |
| Open settingsThe standard Mac preferences key; the changelog describes it as opening the user file settings. | — | Cmd+, |
| Minimize windowBracket matching moved to a Ctrl chord to free this key. | — | Cmd+M |
| Jump to matching bracketUses Ctrl on a Mac because the Cmd version minimizes the window. | — | Ctrl+M |
| Select first tabHigher numbers pick the following tabs in order; Windows and Linux use Alt with the number. | — | Cmd+1 |
| Open tab context menuWorks like a right-click on the tab. | — | Ctrl+Click |
No row on this page matches that filter.
Notes
Multiple cursors change how you edit
Sublime's signature move is Ctrl + D (Quick Add Next): it selects the word under the cursor, and each further press adds the next occurrence as another cursor — type once and the change lands everywhere. Ctrl + K, Ctrl + D skips an occurrence you do not want, Ctrl + U takes back the last selection step, Alt + F3 selects every occurrence at once, Ctrl + Shift + L turns a block selection into one cursor per line, and Esc collapses everything back to a single cursor. Renaming a variable, editing a column of values, wrapping a list in quotes — all become a single pass instead of a find-and-replace ritual.
Navigation runs through one overlay. Ctrl + P opens Goto Anything for fuzzy file names; Ctrl + R is the same overlay pre-filled for symbols in the current file, and typing a colon followed by a number in it jumps to that line. Learn Ctrl + P and the rest comes free.
Line edits and two-step key sequences
The line-level verbs pay for themselves within a day: Ctrl + Shift + K deletes the current line on every platform, Ctrl + Shift + J joins lines, and Ctrl + ] / Ctrl + [ shift indentation. Note the two-step notation in Ctrl + K, Ctrl + B for the sidebar: press Ctrl + K, then Ctrl + B. Sublime HQ calls these sequential key bindings; many commands live behind the Ctrl + K prefix, and Sublime Text 4 added Ctrl + J as a second prefix, used by tab multi-select commands such as Ctrl + J, Ctrl + Shift + Right. For focus, Shift + F11 enters Distraction Free mode, which hides the side bar, minimap and status bar and centers the text.
Questions
What does the comma in Ctrl + K, Ctrl + B mean?
It marks a sequence: two key presses made one after the other. Press Ctrl + K, then Ctrl + B. Sublime Text reserves the Ctrl + K prefix for a whole family of second-step commands, and Sublime Text 4 uses Ctrl + J the same way, so if the editor seems to pause after Ctrl + K, it is waiting for the rest of the sequence.
Ctrl + D grabbed an occurrence I didn't want. Now what?
Press Ctrl + U (Undo Selection) to step back one selection, then Ctrl + K, Ctrl + D (Quick Skip Next) to pass over that occurrence and carry on with the next one. Esc drops back to a single cursor if you would rather start the selection again.
How do I select every match instead of stepping through them?
Alt + F3 selects all occurrences of the word under the cursor straight from the editor. With the find panel open (Ctrl + F), Alt + Enter does the same as the Find All button, and in the replace panel Ctrl + Alt + Enter replaces every match. Ctrl + F3 searches for the current word, matching whole words when nothing is selected.
Is there a Vim mode?
Yes — Vintage, Sublime's built-in vi mode package, ships disabled. Remove Vintage from the ignored_packages list in your settings to enable it. Insert mode keeps the usual Sublime Text key bindings; Vintage's own Ctrl keys stay off on Windows and Linux unless you set vintage_ctrl_keys, because they conflict with the regular bindings.
Do these shortcuts work on macOS?
Yes, and the Mac column gives the binding wherever Sublime HQ documents one. For most commands Cmd replaces Ctrl — Cmd + P for Goto Anything, Cmd + D for Quick Add Next — but several differ outright: adding a line to the selection is Ctrl + Shift + Up, selecting all occurrences is Ctrl + Cmd + G and Jump Back is Ctrl + -. An empty Mac cell means Sublime HQ prints that binding only for Windows and Linux; check Preferences → Key Bindings for the Mac default.
Where is the full list of default key bindings?
Inside the application. The defaults live in the Default (Windows), Default (Linux) and Default (OSX) .sublime-keymap files of the Default package, reachable through Preferences → Key Bindings. Sublime HQ does not publish that keymap as a document, so this page lists only the bindings found in its documentation, changelogs and release announcements.
Sources and checks
- Sublime Text Documentation — Multiple Selection with the Keyboard Multiple selection keys for Windows / Linux and Mac
- Sublime Text Documentation — Column Selection Mouse buttons and keys for column selection on each platform
- Sublime Text Documentation — Tab Multi-Select Tab multi-select sequences and click modifiers (Sublime Text 4)
- Sublime Text Documentation — Incremental Diff Keys for moving between, showing and reverting tracked changes
- Sublime Text Documentation — Build Systems Build, Build With, result navigation and Cancel Build keys
- Sublime Text Documentation — Indexing Goto Definition, Goto Reference and Goto Symbol in Project
8 more source pages
- Sublime Text Documentation — Completions Keys for the completions popup
- Sublime Text 4 download page — changelog (stable channel, Build 4215) Bindings added or changed in Sublime Text 4 builds
- Sublime Text 2 download page — changelog Bindings announced in Sublime Text 2 release notes that are still current
- Sublime Text 2 Documentation — Multiple Selection with the Keyboard Add-line keys written out as Up and Down for Windows and Mac
- Sublime HQ blog — Sublime Text 2: Public Alpha Goto Anything, Goto Symbol and the find panel Find All key
- Sublime HQ blog — Sublime Text 3 Beta 3019 Jump Back binding
- Sublime HQ blog — Sublime Text 2 Build 2139 Side bar keyboard focus
- Sublime HQ blog — Distraction Free Editing Distraction Free Mode key
Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.
10 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.