Cheat sheetDev
VS Code shortcuts
The VS Code keyboard shortcuts that actually change how fast you work — editing, navigation and multi-cursor — for Windows and macOS side by side.
Last updated
The big three
| Action | Windows / Linux | macOS |
|---|---|---|
| Command palette (every command lives here) | Ctrl+Shift+P | Cmd+Shift+P |
| Go to file by name | Ctrl+P | Cmd+P |
| Toggle integrated terminal | Ctrl+` | Cmd+` |
Editing
| Action | Windows / Linux | macOS |
|---|---|---|
| Move line up / down | Alt+↑ / Alt+↓ | Opt+↑ / Opt+↓ |
| Copy line up / down | Shift+Alt+↑ / ↓ | Shift+Opt+↑ / ↓ |
| Delete whole line | Ctrl+Shift+K | Cmd+Shift+K |
| Toggle line comment | Ctrl+/ | Cmd+/ |
| Rename symbol everywhere | F2 | F2 |
| Format document | Shift+Alt+F | Shift+Opt+F |
| Quick fix / code action | Ctrl+. | Cmd+. |
Multi-cursor & selection
| Action | Windows / Linux | macOS |
|---|---|---|
| Select next occurrence of selection | Ctrl+D | Cmd+D |
| Select ALL occurrences | Ctrl+Shift+L | Cmd+Shift+L |
| Add cursor above / below | Ctrl+Alt+↑ / ↓ | Cmd+Opt+↑ / ↓ |
| Add cursor by clicking | Alt+Click | Opt+Click |
| Expand selection by scope | Shift+Alt+→ | Ctrl+Shift+→ |
Navigation
| Action | Windows / Linux | macOS |
|---|---|---|
| Go to definition | F12 | F12 |
| Peek definition inline | Alt+F12 | Opt+F12 |
| Find all references | Shift+F12 | Shift+F12 |
| Go to line number | Ctrl+G | Ctrl+G |
| Go to symbol in file | Ctrl+Shift+O | Cmd+Shift+O |
| Go back / forward | Alt+← / Alt+→ | Ctrl+- / Ctrl+Shift+- |
Search & files
| Action | Windows / Linux | macOS |
|---|---|---|
| Search across the whole project | Ctrl+Shift+F | Cmd+Shift+F |
| Replace in file | Ctrl+H | Opt+Cmd+F |
| Split editor | Ctrl+\ | Cmd+\ |
| Reopen closed editor | Ctrl+Shift+T | Cmd+Shift+T |
Worth remembering
- →If you memorise nothing else: Ctrl/Cmd+Shift+P reaches every command in the editor by typing its name — the rest of this sheet is shortcuts for what you do hourly.
- →Ctrl/Cmd+D then repeated presses is the gateway to multi-cursor editing: select a word, press again for the next occurrence, edit them all at once.