Overview
Defaults below come from VS Code’s official keyboard shortcut reference for macOS and Windows. Open the full list with ⌘K ⌘S (Ctrl+K Ctrl+S) and remap any binding in keybindings.json. Terminal-first editing is in vim-commands.
Files, panels, and windows
Learn the command palette and quick open first; they replace menus.
| Action | macOS | Windows |
|---|---|---|
| Command palette | ⇧⌘P or F1 | Ctrl+Shift+P or F1 |
| Open file by name | ⌘P | Ctrl+P |
| Settings | ⌘, | Ctrl+, |
| Toggle sidebar | ⌘B | Ctrl+B |
| Explorer / Search / Source Control | ⇧⌘E / ⇧⌘F / ⌃⇧G | Ctrl+Shift+E / F / G |
| Split editor | ⌘\ | Ctrl+\ |
| Focus editor group 1 / 2 / 3 | ⌘1 / ⌘2 / ⌘3 | Ctrl+1 / 2 / 3 |
| Next / previous editor | ⌃Tab / ⌃⇧Tab | Ctrl+Tab / Ctrl+Shift+Tab |
| Close editor | ⌘W | Ctrl+W or Ctrl+F4 |
| Reopen closed editor | ⇧⌘T | Ctrl+Shift+T |
| Save all | ⌥⌘S | Ctrl+K S |
| Zen mode | ⌘K Z | Ctrl+K Z |
Navigate
Navigate by symbol and definition instead of scrolling.
| Action | macOS | Windows |
|---|---|---|
| Go to line | ⌃G | Ctrl+G |
| Symbol in file / in workspace | ⇧⌘O / ⌘T | Ctrl+Shift+O / Ctrl+T |
| Definition / peek / references | F12 / ⌥F12 / ⇧F12 | F12 / Alt+F12 / Shift+F12 |
| Back / forward | ⌃- / ⌃⇧- | Alt+← / Alt+→ |
| Problems panel / next error | ⇧⌘M / F8 | Ctrl+Shift+M / F8 |
Edit and multi-cursor
Use multi-cursor for repeated edits and column selection for aligned ones.
| Action | macOS | Windows |
|---|---|---|
| Move line up / down | ⌥↑ / ⌥↓ | Alt+↑ / Alt+↓ |
| Copy line up / down | ⇧⌥↑ / ⇧⌥↓ | Shift+Alt+↑ / ↓ |
| Delete line | ⇧⌘K | Ctrl+Shift+K |
| Insert line below / above | ⌘Enter / ⇧⌘Enter | Ctrl+Enter / Ctrl+Shift+Enter |
| Toggle line / block comment | ⌘/ / ⇧⌥A | Ctrl+/ / Shift+Alt+A |
| Select line | ⌘L | Ctrl+L |
| Add next occurrence / skip it | ⌘D / ⌘K ⌘D | Ctrl+D / Ctrl+K Ctrl+D |
| Select all occurrences | ⇧⌘L | Ctrl+Shift+L |
| Add cursor above / below | ⌥⌘↑ / ⌥⌘↓ | Ctrl+Alt+↑ / ↓ |
| Add cursor by click | ⌥+click | Alt+click |
| Column selection | ⇧⌥+drag | Shift+Alt+drag |
| Expand / shrink selection | ⌃⇧⌘→ / ← | Shift+Alt+→ / ← |
| Fold / unfold region | ⌥⌘[ / ⌥⌘] | Ctrl+Shift+[ / ] |
| Fold all / unfold all | ⌘K ⌘0 / ⌘K ⌘J | Ctrl+K Ctrl+0 / Ctrl+K Ctrl+J |
Search and refactor
Rename with F2 rather than find and replace.
| Action | macOS | Windows |
|---|---|---|
| Find / replace in file | ⌘F / ⌥⌘F | Ctrl+F / Ctrl+H |
| Find / replace in files | ⇧⌘F / ⇧⌘H | Ctrl+Shift+F / Ctrl+Shift+H |
| Rename symbol | F2 | F2 |
| Quick fix | ⌘. | Ctrl+. |
| Format document / selection | ⇧⌥F / ⌘K ⌘F | Shift+Alt+F / Ctrl+K Ctrl+F |
Terminal and debug
Keep the terminal and debugger on the keyboard.
| Action | macOS | Windows |
|---|---|---|
| Show terminal / new terminal | ⌃` / ⌃⇧` | Ctrl+` / Ctrl+Shift+` |
| Start or continue / stop | F5 / ⇧F5 | F5 / Shift+F5 |
| Step over / into / out | F10 / F11 / ⇧F11 | F10 / F11 / Shift+F11 |
| Toggle breakpoint | F9 | F9 |
Linux differences
Check these before copying Windows shortcuts to Linux.
| Action | Linux |
|---|---|
| Add cursor above / below | Shift+Alt+↑ / ↓ |
| Format document | Ctrl+Shift+I |
| Peek definition | Ctrl+Shift+F10 |
| Back / forward | Ctrl+Alt+- / Ctrl+Shift+- |
| Close editor / toggle block comment | Ctrl+W / Ctrl+Shift+A |
Gotchas
Avoid these; each is a common surprise in multi-cursor editing or formatting.
| Gotcha | Fix |
|---|---|
⌘D adds one more occurrence, not all. | ⇧⌘L selects every occurrence at once. |
| Alt+click multi-cursor may not work on some Linux desktops. | Set editor.multiCursorModifier to ctrlCmd. |
| Several formatters prompt on every format. | Set editor.defaultFormatter in settings.json. |