If you are just starting with Sublime or are a long-time user, you can still benefit hugely from getting to know the shortcuts. For me Photoshop is a software I cannot use without a keyboard, and Sublime being a text editor can be deceivingly simple. The interface is extremely clean but it has incredibly powerful hidden functionalities and they are available through shortcuts.
To go through an interactive course and upgrade your Sublime skills download the Sublimetutor. It is:
An interactive in-editor keyboard shortcuts tutorial for Sublime Text 3
Install
Open Sublime, press CTRL + CMD + P, type “Install Package”, and then choose “Sublime Tutor”.
Favourite shortcuts
After doing the tutorial, these are my favourite shortcuts that I will be implementing in my workflow:
Editing
Go to anything – open files in your project
- Cmd + P
- Cmd + G (go to line)
Go to/switch project
- Cmd + Ctrl + P
User settings
- Cmd + ,
Duplicate a line
- Cmd + Shift + D
Comment / uncomment code
- Cmd + /
Delete words
- Delete the word backward – Option + Delete
- Delete the word forward – fn + Option + Delete
Soft Undo / Redo
- Soft undo – Cmd + U
- Soft redo – Cmd + Shift + U
Move a line up/down
- Move the line up – Ctrl + Cmd + up
- Move the line down – Ctrl + Cmd + down
Selection
Multiple cursors
- Cmd key with left mouse button
Select word with multiple occurrences – this must be my most favourite one!
- Cmd + D (keep pressing it for multiple words)
- Cmd + K and then Cmd + D (to skip a word)
- Cmd + L
- I often use Cmd + Shift + Left/Right Arrow as well for this.
- Ctrl + Shift + M
- Cmd + Shift + Space
Other
Goto matching bracket- Ctrl + M
- Ctrl + –
Jump forward in history
- Ctrl + Shift + –
- Fold one level – Cmd + Option + [
- Unfold code one level – Cmd + Option + ]
Find / Replace
Find
- Double-click a word to select it and it will be highlighted everywhere in the document
- Find next – Cmd + G
- Find previous – Cmd + Shift + G
- Find all – Alt + Return (when find panel is open)
- Cmd + E (use selection for finding)
- Quick find – Cmd + Option + G (with selected word)
- Quick find all occurrences – Cmd + Ctrl + G
- Search within all projects/folders – Cmd + Shift + F
Replace
- Replace panel – Cmd + Option + F
- Replace next – Cmd + Option + E
- Cmd + Shift + E (use selection for replacing)