Sublime Text 4 is a powerful text editor with built-in features to supercharge your productivity.
This guide is dedicated to developers who prioritize velocity and efficiency, focusing exclusively on keyboard shortcuts (no mouse required).
Every tip here highlights native features, so you can start using them immediately without installing plugins.
Note: Since I exclusively use macOS, all shortcuts are macOS-specific.
Navigation
Goto Anything
Quickly open files, navigate to specific lines, or locate symbols in your project.
- Open
app.js
:Cmd + P
, typeapp.js
. - Jump to line 45:
Cmd + P
, type:45
. - Locate
render
method in the current file:Cmd + P
, type@render
.
Goto Symbol
Jump directly to a symbol in the current file.
To navigate to the render
method, press Cmd + R
and type render
.
Goto Symbol in Project
Search for symbols across all files in your project.
To find the calculateTotal
function across your project, press Cmd + Shift + R
and type calculateTotal
.
Navigate Modifications
Easily jump between your modifications.
- Jump to the next modification:
Ctrl + .
. - Jump to the previous modification:
Ctrl + ,
.
Navigate Cursor Positions
Switch between your recent cursor positions to streamline code navigation.
- Previous cursor position:
Ctrl + -
. - Next cursor position:
Ctrl + Shift + -
.
Selection Tips
Select a Word
Select the word under the cursor for quick edits.
Press Cmd + D
to highlight the current word.
Select All Matching Words
Highlight every occurrence of a word in your file.
Place the cursor on a word and press Cmd + Ctrl + G
to edit all instances simultaneously.
Select Entire Line
Quickly highlight the entire line for editing or copying.
Press Cmd + L
to select the entire line.
Expand Selection to Block
Select the surrounding block of code with ease.
Place the cursor inside a block and press Cmd + Shift + M
to highlight the entire block.
Editing Tips
Duplicate Line
Duplicate the current line or selection for quick edits.
Press Cmd + Shift + D
to duplicate the current line.
Join Lines
Combine two lines into one for cleaner code.
Place the cursor at the end of a line and press Cmd + Shift + J
to join the next line.
Edit Multiple Lines
Simultaneously edit multiple lines with multi-cursor mode.
- Select a block of lines, and then split it into many selections, one per line:
Cmd + Shift + L
. - Move cursors to the beginning of each line:
Cmd + Left
.
Git Tips
View Inline Modifications
Quickly review inline diffs for modified lines directly in the editor. This feature highlights changes without switching to another tool or tab.
Press Cmd + K
, then Cmd + .
to toggle inline diffs for the current file.
Revert Hunk (Undo Changes for a Section)
Discard modifications for a specific section (or "hunk") of code in your file. This is especially useful when you want to revert a set of changes without affecting the rest of the file.
Press Cmd + K
, then Cmd + Z
to revert the changes in the current hunk.
Revert Modification (Undo Changes for a Line)
Undo modifications to a specific line in your file without impacting surrounding lines. This is ideal for fine-grained control over discarding edits.
Press Cmd + K
, then Cmd + Shift + Z
to revert changes to the current line.
Conclusion
Sublime Text 4 is a treasure trove of native features designed to help you code faster and smarter.
By leveraging these keyboard shortcuts, you’ll minimize distractions, maximize velocity, and optimize productivity—all without ever reaching for the mouse.
Happy coding! 🚀