Essential VS Code Shortcuts You Should Know
Mastering VS Code shortcuts is the fastest way to boost your coding speed. Here are the ones worth memorizing.
The Essentials
| Shortcut | Action |
|---|---|
Ctrl+P | Quick open file |
Ctrl+Shift+P | Command palette |
Ctrl+ ` | Toggle terminal |
Ctrl+B | Toggle sidebar |
Ctrl+J | Toggle panel |
Multi-Cursor (Game Changer)
| Shortcut | Action |
|---|---|
Ctrl+D | Select next occurrence |
Ctrl+Shift+L | Select all occurrences |
Alt+Click | Add cursor |
Ctrl+Alt+↑/↓ | Add cursor above/below |
Shift+Alt+I | Add cursor to end of each selected line |
Multi-cursor lets you edit multiple lines simultaneously. Select a word, spam Ctrl+D to select each occurrence, and type to change them all at once.
Editing
| Shortcut | Action |
|---|---|
Alt+↑/↓ | Move line up/down |
Shift+Alt+↑/↓ | Copy line up/down |
Ctrl+Shift+K | Delete line |
Ctrl+/ | Toggle line comment |
Shift+Alt+F | Format document |
Ctrl+[ / Ctrl+] | Indent / Outdent |
Navigation
| Shortcut | Action |
|---|---|
Ctrl+T | Show all symbols |
Ctrl+Shift+O | Go to symbol in file |
F12 | Go to definition |
Alt+F12 | Peek definition |
Ctrl+G | Go to line |
Ctrl+- / Ctrl+Shift+- | Navigate back / forward |
Search and Replace
| Shortcut | Action |
|---|---|
Ctrl+F | Find in file |
Ctrl+H | Find and replace in file |
Ctrl+Shift+F | Find in files |
Ctrl+Shift+H | Find and replace in files |
Integrated Terminal
| Shortcut | Action |
|---|---|
Ctrl+ ` | Toggle terminal |
Ctrl+Shift+ ` | Create new terminal |
Ctrl+W | Close terminal |
Ctrl+C | Cancel running command |
Sidebar
| Shortcut | Action |
|---|---|
Ctrl+B | Toggle sidebar |
Ctrl+Shift+E | Explorer |
Ctrl+Shift+F | Search |
Ctrl+Shift+G | Source control |
Ctrl+Shift+D | Debug |
Snippets and Emmet
| Shortcut | Action |
|---|---|
Tab | Expand Emmet abbreviation |
Ctrl+Space | Trigger suggestion |
Tab / Shift+Tab | Navigate snippet fields |
Emmet example: type div.container>ul.list>li.item*5 then press Tab to generate the full HTML structure.
More developer tips: See our Git undo guide for fixing Git mistakes.