Shortcuts & Productivity54 entries
VS Code Shortcuts
Essential VS Code keyboard shortcuts for editing, navigation, debugging, and extensions
1General
Ctrl+Shift+P / Cmd+Shift+P | Command Palette |
Ctrl+P / Cmd+P | Quick Open file |
Ctrl+, / Cmd+, | Open Settings |
Ctrl+` / Cmd+` | Toggle terminal |
Ctrl+B / Cmd+B | Toggle sidebar |
Ctrl+Shift+E / Cmd+Shift+E | Open Explorer |
Ctrl+Shift+F / Cmd+Shift+F | Search across files |
Ctrl+Shift+G / Cmd+Shift+G | Open Source Control |
2Editing
Ctrl+D / Cmd+D | Select next occurrence of word |
Ctrl+Shift+L / Cmd+Shift+L | Select all occurrences |
Alt+Up / Option+Up | Move line up |
Alt+Down / Option+Down | Move line down |
Shift+Alt+Up / Shift+Option+Up | Copy line up |
Shift+Alt+Down / Shift+Option+Down | Copy line down |
Ctrl+Shift+K / Cmd+Shift+K | Delete entire line |
Ctrl+Enter / Cmd+Enter | Insert line below |
Ctrl+Shift+Enter / Cmd+Shift+Enter | Insert line above |
Ctrl+/ / Cmd+/ | Toggle line comment |
Shift+Alt+A / Shift+Option+A | Toggle block comment |
Ctrl+] / Cmd+] | Indent line |
Ctrl+[ / Cmd+[ | Outdent line |
3Multi-Cursor
Alt+Click / Option+Click | Add cursor at position |
Ctrl+Alt+Up / Cmd+Option+Up | Add cursor above |
Ctrl+Alt+Down / Cmd+Option+Down | Add cursor below |
Ctrl+D / Cmd+D | Add cursor at next match |
Ctrl+U / Cmd+U | Undo last cursor operation |
4Navigation
Ctrl+G / Cmd+G | Go to line number |
Ctrl+T / Cmd+T | Go to symbol in workspace |
Ctrl+Shift+O / Cmd+Shift+O | Go to symbol in file |
F12 | Go to definition |
Alt+F12 / Option+F12 | Peek definition |
Shift+F12 | Find all references |
Ctrl+Tab | Switch between open files |
Alt+Left / Ctrl+- (Mac) | Navigate back |
Alt+Right / Ctrl+Shift+- (Mac) | Navigate forward |
5Find & Replace
Ctrl+F / Cmd+F | Find in file |
Ctrl+H / Cmd+Option+F | Find and replace |
F3 / Cmd+G | Find next match |
Shift+F3 / Cmd+Shift+G | Find previous match |
Alt+Enter | Select all matches |
6Terminal & Debug
Ctrl+` / Cmd+` | Toggle integrated terminal |
Ctrl+Shift+` / Cmd+Shift+` | Create new terminal |
F5 | Start/continue debugging |
F9 | Toggle breakpoint |
F10 | Step over |
F11 | Step into |
Shift+F11 | Step out |
Shift+F5 | Stop debugging |
7Panels & Layout
Ctrl+\ / Cmd+\ | Split editor |
Ctrl+1/2/3 / Cmd+1/2/3 | Focus editor group 1/2/3 |
Ctrl+W / Cmd+W | Close current tab |
Ctrl+K Ctrl+W / Cmd+K Cmd+W | Close all tabs |
Ctrl+Shift+V / Cmd+Shift+V | Markdown preview |
Ctrl+K V / Cmd+K V | Markdown preview side-by-side |