VS Code
VS Code Keyboard Shortcuts
Complete VS Code keyboard shortcuts reference - editing, navigation, search, debugging, terminal, and multi-cursor shortcuts.
General
| Shortcut | Action |
|---|---|
Ctrl+Shift+P / Cmd+Shift+P | Command Palette |
Ctrl+P / Cmd+P | Quick Open file |
Ctrl+Shift+N / Cmd+Shift+N | New window |
Ctrl+W / Cmd+W | Close editor |
Ctrl+Shift+W / Cmd+Shift+W | Close window |
Ctrl+, / Cmd+, | Open Settings |
Ctrl+K Ctrl+S / Cmd+K Cmd+S | Keyboard Shortcuts editor |
Ctrl+Shift+X / Cmd+Shift+X | Extensions panel |
Ctrl+B / Cmd+B | Toggle sidebar |
Ctrl+J / Cmd+J | Toggle panel (terminal/output) |
Ctrl+Shift+E / Cmd+Shift+E | Explorer panel |
Ctrl+K Z / Cmd+K Z | Zen Mode |
Ctrl+\ / Cmd+\ | Split editor |
Editing
| Shortcut | Action |
|---|---|
Ctrl+X / Cmd+X | Cut line (empty selection) |
Ctrl+C / Cmd+C | Copy line (empty selection) |
Ctrl+Shift+K / Cmd+Shift+K | Delete line |
Alt+Up / Opt+Up | Move line up |
Alt+Down / Opt+Down | Move line down |
Shift+Alt+Up / Shift+Opt+Up | Copy line up |
Shift+Alt+Down / Shift+Opt+Down | Copy line down |
Ctrl+Enter / Cmd+Enter | Insert line below |
Ctrl+Shift+Enter / Cmd+Shift+Enter | Insert line above |
Ctrl+] / Cmd+] | Indent line |
Ctrl+[ / Cmd+[ | Outdent line |
Ctrl+/ / Cmd+/ | Toggle line comment |
Shift+Alt+A / Shift+Opt+A | Toggle block comment |
Ctrl+Shift+\ / Cmd+Shift+\ | Jump to matching bracket |
Ctrl+D / Cmd+D | Select next occurrence |
Ctrl+Shift+L / Cmd+Shift+L | Select all occurrences |
Ctrl+H / Cmd+H | Find and replace |
Ctrl+Z / Cmd+Z | Undo |
Ctrl+Shift+Z / Cmd+Shift+Z | Redo |
Alt+Z / Opt+Z | Toggle word wrap |
Navigation
| Shortcut | Action |
|---|---|
Ctrl+G / Cmd+G | Go to line |
Ctrl+P / Cmd+P | Go to file |
Ctrl+Shift+O / Cmd+Shift+O | Go to symbol in file |
Ctrl+T / Cmd+T | Go to symbol in workspace |
F12 | Go to definition |
Alt+F12 / Opt+F12 | Peek definition |
Shift+F12 | Find all references |
Ctrl+Shift+F12 / Cmd+Shift+F12 | Peek references |
Ctrl+Tab / Ctrl+Tab | Switch between open editors |
Ctrl+- / Cmd+- | Navigate back |
Ctrl+Shift+- / Cmd+Shift+- | Navigate forward |
Ctrl+Home / Cmd+Up | Go to beginning of file |
Ctrl+End / Cmd+Down | Go to end of file |
Ctrl+Shift+M / Cmd+Shift+M | Show Problems panel |
F8 | Go to next error/warning |
Ctrl+K Ctrl+Q / Cmd+K Cmd+Q | Go to last edit location |
Search
| Shortcut | Action |
|---|---|
Ctrl+F / Cmd+F | Find in file |
Ctrl+H / Cmd+H | Replace in file |
Ctrl+Shift+F / Cmd+Shift+F | Search across files |
Ctrl+Shift+H / Cmd+Shift+H | Replace across files |
F3 / Cmd+G | Find next |
Shift+F3 / Cmd+Shift+G | Find previous |
Alt+Enter / Opt+Enter | Select all matches |
Alt+C / Opt+C | Toggle case-sensitive |
Alt+R / Opt+R | Toggle regex |
Alt+W / Opt+W | Toggle whole word |
Debug
| Shortcut | Action |
|---|---|
F5 | Start / Continue debugging |
Shift+F5 | Stop debugging |
Ctrl+Shift+F5 / Cmd+Shift+F5 | Restart debugging |
F9 | Toggle breakpoint |
F10 | Step over |
F11 | Step into |
Shift+F11 | Step out |
Ctrl+Shift+D / Cmd+Shift+D | Debug panel |
Ctrl+K Ctrl+I / Cmd+K Cmd+I | Show hover (debug info) |
Terminal
| Shortcut | Action |
|---|---|
Ctrl+` / Cmd+` | Toggle integrated terminal |
Ctrl+Shift+` / Cmd+Shift+` | Create new terminal |
Ctrl+Shift+5 / Cmd+Shift+5 | Split terminal |
Ctrl+PgUp / Cmd+Shift+[ | Previous terminal |
Ctrl+PgDn / Cmd+Shift+] | Next terminal |
Ctrl+C / Cmd+C | Copy (or kill process) |
Ctrl+V / Cmd+V | Paste into terminal |
Ctrl+Up / Cmd+Up | Scroll up |
Ctrl+Down / Cmd+Down | Scroll down |
Multi-Cursor
| Shortcut | Action |
|---|---|
Alt+Click / Opt+Click | Add cursor at click position |
Ctrl+Alt+Up / Cmd+Opt+Up | Add cursor above |
Ctrl+Alt+Down / Cmd+Opt+Down | Add cursor below |
Ctrl+D / Cmd+D | Add selection to next find match |
Ctrl+Shift+L / Cmd+Shift+L | Add cursors to all occurrences |
Ctrl+U / Cmd+U | Undo last cursor operation |
Shift+Alt+I / Shift+Opt+I | Add cursors to end of each selected line |
Ctrl+K Ctrl+D / Cmd+K Cmd+D | Skip current and select next match |