Sublime Text is a popular cross-platform source code editor used by developers for writing codes in different languages. The code editor supports several programming languages and markup languages. It supports syntax highlighting, auto-indentation, macros, and plugins. This tool also shows a sidebar with all files and directories. You can open several files in different tabs to keep working on them at the same time. It also supports auto-completion, color coding elements, and error messages. If you use Sublime Text for writing codes, you need to learn keyboard shortcuts of Sublime Text to perform several tasks faster. In this article, I am listing Sublime Text keyboard shortcuts.
Sublime Text keyboard shortcuts for Windows and Linux
Editing
Keypress | Command |
---|---|
Ctrl X | Cut line |
Ctrl ⏎ | Insert line after |
Ctrl ⇧ ⏎ | Insert line before |
Ctrl ⇧ ↑ | Move line/selection up |
Ctrl ⇧ ↓ | Move line/selection down |
Ctrl L | Select line – Repeat to select next lines |
Ctrl D | Select word – Repeat select others occurrences |
Ctrl M | Jump to closing parentheses Repeat to jump to opening parentheses |
Ctrl ⇧ M | Select all contents of the current parentheses |
Ctrl ⇧ K | Delete Line |
Ctrl K, Ctrl K | Delete from cursor to end of line |
Ctrl K, Ctrl ⌫ | Delete from cursor to start of line |
Ctrl ] | Indent current line(s) |
Ctrl [ | Un-indent current line(s) |
Ctrl ⇧ D | Duplicate line(s) |
Ctrl J | Join line below to the end of the current line |
Ctrl / | Comment/un-comment current line |
Ctrl ⇧ / | Block comment current selection |
Ctrl Y | Redo, or repeat last keyboard shortcut command |
Ctrl ⇧ V | Paste and indent correctly |
Ctrl ␣ | Select next auto-complete suggestion |
Ctrl U | soft undo; jumps to your last change before undoing change when repeated |
Alt ⇧ W | Wrap Selection in html tag |
Alt . | Close current html tag |
Windows
Keypress | Command |
---|---|
Ctrl Alt ↑ | Column selection up |
Ctrl Alt ↓ | Column selection down |
Linux
Keypress | Command |
---|---|
Alt ⇧ ↑ | Column selection up |
Alt ⇧ ↓ | Column selection down |
Navigation/Goto Anywhere
Keypress | Command |
---|---|
Ctrl P | Quick-open files by name |
Ctrl R | Goto symbol |
Ctrl ; | Goto word in current file |
Ctrl G | Goto line in current file |
General
Keypress | Command |
---|---|
Ctrl ⇧ P | Command prompt |
Ctrl K, Ctrl B | Toggle side bar |
Ctrl Alt ⇧ P | Show scope in status bar |
Find/Replace
Keypress | Command |
---|---|
Ctrl F | Find |
Ctrl H | Replace |
Ctrl ⇧ F | Find in files |
Tabs
Keypress | Command |
---|---|
Ctrl ⇧ T | Open last closed tab |
Ctrl Page Up | Cycle up through tabs |
Ctrl Page Up | Cycle down through tabs |
Ctrl ⭾ | Switch to a previous tab, hold ⭾ and repeat ⭾ to cycle through previous tabs |
Ctrl ⇧ ⭾ | Switch in reverse order to a previous tab, hold Ctrl ⇧ and repeat ⭾ to cycle through previous tabs in reverse |
Ctrl W | Close current tab |
Alt [1-9] | Switch to tab number |
Split window
Keypress | Command |
---|---|
Alt ⇧ 1 | Revert view to single column |
Alt ⇧ 2 | Split view into two columns |
Alt ⇧ 3 | Split view into three columns |
Alt ⇧ 4 | Split view into four columns |
Alt ⇧ 5 | Set view to grid (4 groups) |
Alt ⇧ 8 | Split view into two rows |
Ctrl [1-4] | Jump to group |
Ctrl ⇧ [1-4] | Move file to specified group |
Bookmarks
Keypress | Command |
---|---|
Ctrl F2 | Toggle bookmark |
F2 | Next bookmark |
⇧ F2 | Previous bookmark |
Ctrl ⇧ F2 | Clear bookmarks |
Text manipulation
Keypress | Command |
---|---|
Ctrl K, Ctrl U | Transform to upper case |
Ctrl K, Ctrl L | Transform to lower case |
Sublime Text keyboard shortcuts for macOS
Editing
Keypress | Command |
---|---|
⌘ X | Cut line |
⌘ ⏎ | Insert line after |
⇧ ⌘ ⏎ | Insert line before |
Ctrl ⌘ ↑ | Move line/selection up |
Ctrl ⌘ ↓ | Move line/selection down |
⌘ L | Select line – Repeat to select next lines |
⌘ D | Select word – Repeat to select next occurrence |
Ctrl ⌘ G | Select all occurrences of current selection |
Ctrl ⇧ ↑ | Extra cursor on the line above |
Ctrl ⇧ ↓ | Extra cursor on the line below |
Ctrl M | Jump to closing parentheses Repeat to jump to opening parentheses |
Ctrl ⇧ M | Select all contents of the current parentheses |
Ctrl A | Move to beginning of line |
⌘ ← | Move to beginning of text on line |
Ctrl E, ⌘ → | Move to the end of line |
⌘ K, ⌘ K | Delete from cursor to end of line |
⌘ K, ⌘ ⌫ | Delete from cursor to start of line |
⌘ ] | Indent current line(s) |
⌘ [ | Un-indent current line(s) |
⇧ ⌘ D | Duplicate line(s) |
⌘ J | Join line below to the end of the current line |
⌘ / | Comment/un-comment current line |
⌥ ⌘ / | Block comment on current selection |
⌘ Y | Redo, or repeat the last keyboard shortcut command |
⇧ ⌘ V | Paste and indent correctly |
Ctrl ␣ | Select next auto-complete suggestion |
⌘ U | Soft undo; jumps to your last change before undoing change when repeated |
Ctrl ⇧ ↑ | Column selection up |
Ctrl ⇧ ↓ | Column selection down |
Ctrl ⇧ W | Wrap Selection in html tag |
Ctrl ⇧ K | Delete current line of cursor |
Navigation/Goto Anywhere
Keypress | Command |
---|---|
⌘ P, ⌘ T | Quick-open files by name |
⌘ R | Goto symbol |
Goto word in the current file | |
Ctrl G | Goto line in the current file |
General
Keypress | Command |
---|---|
⇧ ⌘ P | Command Palette |
Ctrl ` | Python Console |
Ctrl ⌘ F | Toggle fullscreen mode |
Ctrl ⇧ ⌘ F | Toggle distraction-free mode |
⌘ K, ⌘ B | Toggle sidebar |
Ctrl ⇧ P | Show scope in the status bar |
Find/Replace
Keypress | Command |
---|---|
⌘ F | Find |
⌥ ⌘ F | Replace |
⇧ ⌘ F | Find in files |
⌘ I | Incremental Find |
Scrolling
Keypress | Command |
---|---|
Ctrl V | Scroll down one page |
Ctrl L | Center current line vertically in the page |
⌘ ↓ | Scroll to the end of file |
⌘ ↑ | Scroll to the start of file |
Tabs
Keypress | Command |
---|---|
⇧ ⌘ T | Open last closed tab |
⌘ [1-9] | Jump to tab in the current group |
⌘ 0 | Jump to the 10th tab in the current group |
⇧ ⌘ [ | Cycle left through tabs |
⇧ ⌘ ] | Cycle right through tabs |
Ctrl ⭾ | Cycle up through recent tabs |
Ctrl ⇧ ⭾ | Cycle down through recent tabs |
Find in files |
Split window
Keypress | Command |
---|---|
⌥ ⌘ 1 | Revert view to a single column |
⌥ ⌘ 2 | Split view into two columns |
⌥ ⌘ 3 | Split view into three columns |
⌥ ⌘ 4 | Split view into four columns |
⌥ ⌘ 5 | Set view to the grid (4 groups) |
Ctrl [1-4] | Jump to group |
Ctrl ⇧ [1-4] | Move the file to a specified group |
Bookmarks
Keypress | Command |
---|---|
⌘ F2 | Toggle bookmark |
F2 | Next bookmark |
⇧ F2 | Previous bookmark |
⇧ ⌘ F2 | Clear bookmarks |
Text manipulation
Keypress | Command |
---|---|
⌘ K, ⌘ U | Transform to Uppercase |
⌘ K, ⌘ L | Transform to Lowercase |
Ctrl ⌘ ↑, Ctrl ⌘ ↓ | Clip text upwards / downwards |