VS Code Shortcuts Cheat Sheet
Essential keyboard shortcuts for Visual Studio Code. Editing, navigation, search, terminal, debugging, and Git integration.
General
| Mac | Windows / Linux | Description |
|---|---|---|
Cmd+Shift+P | Ctrl+Shift+P | Command Palette |
Cmd+P | Ctrl+P | Quick Open file |
Cmd+Shift+N | Ctrl+Shift+N | New window |
Cmd+W | Ctrl+W | Close editor tab |
Cmd+, | Ctrl+, | Open Settings |
Cmd+K Cmd+S | Ctrl+K Ctrl+S | Keyboard Shortcuts |
Cmd+S | Ctrl+S | Save file |
Cmd+Z | Ctrl+Z | Undo |
Cmd+Shift+Z | Ctrl+Shift+Z | Redo |
Editing
| Mac | Windows / Linux | Description |
|---|---|---|
Cmd+X | Ctrl+X | Cut line (no selection needed) |
Cmd+C | Ctrl+C | Copy line (no selection needed) |
Option+Up/Down | Alt+Up/Down | Move line up/down |
Shift+Option+Up/Down | Shift+Alt+Up/Down | Copy line up/down |
Cmd+Shift+K | Ctrl+Shift+K | Delete line |
Cmd+Enter | Ctrl+Enter | Insert line below |
Cmd+Shift+Enter | Ctrl+Shift+Enter | Insert line above |
Cmd+Shift+\ | Ctrl+Shift+\ | Jump to matching bracket |
Cmd+] / Cmd+[ | Ctrl+] / Ctrl+[ | Indent / outdent line |
Cmd+/ | Ctrl+/ | Toggle line comment |
Shift+Option+A | Shift+Alt+A | Toggle block comment |
Cmd+D | Ctrl+D | Select word (repeat for next occurrence) |
Cmd+L | Ctrl+L | Select current line |
Shift+Option+F | Shift+Alt+F | Format document |
Cmd+K Cmd+F | Ctrl+K Ctrl+F | Format selection |
F2 | F2 | Rename symbol |
Search & Replace
| Mac | Windows / Linux | Description |
|---|---|---|
Cmd+F | Ctrl+F | Find in file |
Cmd+Option+F | Ctrl+H | Replace in file |
Cmd+Shift+F | Ctrl+Shift+F | Search across files |
Cmd+Shift+H | Ctrl+Shift+H | Replace across files |
Cmd+G | F3 | Find next match |
Cmd+Shift+G | Shift+F3 | Find previous match |
Option+Enter | Alt+Enter | Select all matches (in find) |
Multi-Cursor
| Mac | Windows / Linux | Description |
|---|---|---|
Option+Click | Alt+Click | Add cursor at click position |
Cmd+Option+Up/Down | Ctrl+Alt+Up/Down | Add cursor above/below |
Cmd+D | Ctrl+D | Select next occurrence of word |
Cmd+Shift+L | Ctrl+Shift+L | Select all occurrences of word |
Cmd+K Cmd+D | Ctrl+K Ctrl+D | Skip current and select next occurrence |
Esc | Esc | Cancel multi-cursor |
Terminal
| Mac | Windows / Linux | Description |
|---|---|---|
Ctrl+` | Ctrl+` | Toggle terminal panel |
Ctrl+Shift+` | Ctrl+Shift+` | Create new terminal |
Cmd+\ | Ctrl+\ | Split terminal |
Cmd+Up/Down | Ctrl+Up/Down | Scroll terminal |
Debugging
| Mac | Windows / Linux | Description |
|---|---|---|
F5 | F5 | Start / continue debugging |
Shift+F5 | Shift+F5 | Stop debugging |
F9 | F9 | Toggle breakpoint |
F10 | F10 | Step over |
F11 | F11 | Step into |
Shift+F11 | Shift+F11 | Step out |
Sidebar & Panels
| Mac | Windows / Linux | Description |
|---|---|---|
Cmd+B | Ctrl+B | Toggle sidebar |
Cmd+Shift+E | Ctrl+Shift+E | Explorer |
Cmd+Shift+F | Ctrl+Shift+F | Search |
Ctrl+Shift+G | Ctrl+Shift+G | Source Control (Git) |
Cmd+Shift+D | Ctrl+Shift+D | Debug |
Cmd+Shift+X | Ctrl+Shift+X | Extensions |
Cmd+J | Ctrl+J | Toggle bottom panel |
Cmd+K Z | Ctrl+K Z | Zen mode |