| Command | Windows | macOS |
|---|---|---|
| General | ||
| Show Command Palette | Ctrl+Shift+PF1 | ⇧⌘PF1 |
| Quick Open, Go to File… | Ctrl+P | ⌘P |
| New window/instance | Ctrl+Shift+N | ⇧⌘N |
| Close window/instance | Ctrl+Shift+W | ⌘W |
| User Settings | Ctrl+, | ⌘, |
| Keyboard Shortcuts | Ctrl+KCtrl+S | ⌘K⌘S |
| Basic editing | ||
| Cut line (empty selection) | Ctrl+X | ⌘X |
| Copy line (empty selection) | Ctrl+C | ⌘C |
| Move line up/down | Alt+↑Alt+↓ | ⌥↓⌥↑ |
| Copy line up/down | Shift+Alt+↓Shift+Alt+↑ | ⇧⌥↓⇧⌥↑ |
| Delete line | Ctrl+Shift+K | ⇧⌘K |
| Insert line below | Ctrl+Enter | ⌘Enter |
| Insert line above | Ctrl+Shift+Enter | ⇧⌘Enter |
| Jump to matching bracket | Ctrl+Shift+\ | ⇧⌘\ |
| Indent/outdent line | Ctrl+]Ctrl+[ | ⌘]⌘[ |
| Go to beginning/end of line | HomeEnd | HomeEnd |
| Go to beginning of file | Ctrl+Home | ⌘↑ |
| Go to end of file | Ctrl+End | ⌘↓ |
| Scroll line up/down | Ctrl+↑Ctrl+↓ | ⌃PgUp⌃PgDn |
| Scroll page up/down | Alt+PgUpAlt+PgDn | ⌘PgUp⌘PgDn |
| Fold (collapse) region | Ctrl+Shift+[ | ⌥⌘[ |
| Unfold (uncollapse) region | Ctrl+Shift+] | ⌥⌘] |
| Fold (collapse) all subregions | Ctrl+KCtrl+[ | ⌘K⌘[ |
| Unfold (uncollapse) all subregions | Ctrl+KCtrl+] | ⌘K⌘] |
| Fold (collapse) all regions | Ctrl+KCtrl+0 | ⌘K⌘0 |
| Unfold (uncollapse) all regions | Ctrl+KCtrl+J | ⌘K⌘J |
| Add line comment | Ctrl+KCtrl+C | ⌘K⌘C |
| Remove line comment | Ctrl+KCtrl+U | ⌘K⌘U |
| Toggle line comment | Ctrl+/ | ⌘/ |
| Toggle block comment | Shift+Alt+A | ⇧⌥A |
| Toggle word wrap | Alt+Z | ⌥Z |
| Navigation | ||
| Show all Symbols | Ctrl+T | ⌘T |
| Go to Line... | Ctrl+G | ⌃G |
| Go to File... | Ctrl+P | ⌘P |
| Go to Symbol... | Ctrl+Shift+O | ⇧⌘O |
| Show Problems panel | Ctrl+Shift+M | ⇧⌘M |
| Go to next error or warning | F8 | F8 |
| Go to previous error or warning | Shift+F8 | ⇧F8 |
| Navigate editor group history | Ctrl+Shift+Tab | ⌃⇧Tab |
| Go back / forward | Alt+←Alt+→ | ⌃-⌃⇧- |
| Toggle Tab moves focus | Ctrl+M | ⌃⇧M |
| Search and replace | ||
| Find | Ctrl+F | ⌘F |
| Replace | Ctrl+H | ⌥⌘F |
| Find next/previous | F3Shift+F3 | ⌘G⇧⌘G |
| Select all occurrences of Find match | Alt+Enter | ⌥Enter |
| Add selection to next Find match | Ctrl+D | ⌘D |
| Move last selection to next Find match | Ctrl+KCtrl+D | ⌘K⌘D |
| Toggle case-sensitive / regex / whole wordWhile the find box is focused. macOS chord is the editor default; the macOS cheat sheet omits it. | Alt+CAlt+RAlt+W | ⌥⌘C⌥⌘R⌥⌘W |
| Multi-cursor and selection | ||
| Insert cursor | Alt+Click | ⌥+click |
| Insert cursor above / below | Ctrl+Alt+↑Ctrl+Alt+↓ | ⌥⌘↑⌥⌘↓ |
| Undo last cursor operation | Ctrl+U | ⌘U |
| Insert cursor at end of each line selected | Shift+Alt+I | ⇧⌥I |
| Select current line | Ctrl+L | ⌘L |
| Select all occurrences of current selection | Ctrl+Shift+L | ⇧⌘L |
| Select all occurrences of current word | Ctrl+F2 | ⌘F2 |
| Expand selection | Shift+Alt+→ | ⌃⇧⌘→ |
| Shrink selection | Shift+Alt+← | ⌃⇧⌘← |
| Column (box) selection | Shift+Alt+drag | ⇧⌥+drag |
| Column (box) selection with arrow keys | Ctrl+Shift+Alt+arrow | ⇧⌥⌘+arrow |
| Column (box) selection page up/down | Ctrl+Shift+Alt+PgUpCtrl+Shift+Alt+PgDn | ⇧⌥⌘PgUp⇧⌥⌘PgDn |
| Rich languages editing | ||
| Trigger suggestion | Ctrl+SpaceCtrl+I | ⌃Space⌘I |
| Trigger parameter hints | Ctrl+Shift+Space | ⇧⌘Space |
| Format document | Shift+Alt+F | ⇧⌥F |
| Format selection | Ctrl+KCtrl+F | ⌘K⌘F |
| Go to Definition | F12 | F12 |
| Peek Definition | Alt+F12 | ⌥F12 |
| Open Definition to the side | Ctrl+KF12 | ⌘KF12 |
| Quick Fix | Ctrl+. | ⌘. |
| Show References | Shift+F12 | ⇧F12 |
| Rename Symbol | F2 | F2 |
| Trim trailing whitespace | Ctrl+KCtrl+X | ⌘K⌘X |
| Change file language | Ctrl+KM | ⌘KM |
| Editor management | ||
| Close editor | Ctrl+F4Ctrl+W | ⌘W |
| Close folder | Ctrl+KF | ⌘KF |
| Split editor | Ctrl+\ | ⌘\ |
| Focus into 1st, 2nd or 3rd editor group | Ctrl+1Ctrl+2Ctrl+3 | ⌘1⌘2⌘3 |
| Focus into previous/next editor group | Ctrl+KCtrl+←Ctrl+KCtrl+→ | ⌘K⌘←⌘K⌘→ |
| Move editor left/right | Ctrl+Shift+PgUpCtrl+Shift+PgDn | ⌘K⇧⌘←⌘K⇧⌘→ |
| Move active editor group | Ctrl+K←Ctrl+K→ | ⌘K←⌘K→ |
| File management | ||
| New File | Ctrl+N | ⌘N |
| Open File... | Ctrl+O | ⌘O |
| Save | Ctrl+S | ⌘S |
| Save As... | Ctrl+Shift+S | ⇧⌘S |
| Save All | Ctrl+KS | ⌥⌘S |
| Close | Ctrl+F4 | ⌘W |
| Close All | Ctrl+KCtrl+W | ⌘K⌘W |
| Reopen closed editor | Ctrl+Shift+T | ⇧⌘T |
| Keep preview mode editor open | Ctrl+KEnter | ⌘KEnter |
| Open next | Ctrl+Tab | ⌃Tab |
| Open previous | Ctrl+Shift+Tab | ⌃⇧Tab |
| Copy path of active file | Ctrl+KP | ⌘KP |
| Reveal active file in Explorer / Finder | Ctrl+KR | ⌘KR |
| Show active file in new window/instance | Ctrl+KO | ⌘KO |
| Display | ||
| Toggle full screen | F11 | ⌃⌘F |
| Toggle editor layout (horizontal/vertical) | Shift+Alt+0 | ⌥⌘0 |
| Zoom in/out | Ctrl+=Ctrl+- | ⌘=⇧⌘- |
| Toggle Sidebar visibility | Ctrl+B | ⌘B |
| Show Explorer / Toggle focus | Ctrl+Shift+E | ⇧⌘E |
| Show Search | Ctrl+Shift+F | ⇧⌘F |
| Show Source Control | Ctrl+Shift+G | ⌃⇧G |
| Show Debug | Ctrl+Shift+D | ⇧⌘D |
| Show Extensions | Ctrl+Shift+X | ⇧⌘X |
| Replace in files | Ctrl+Shift+H | ⇧⌘H |
| Toggle Search details | Ctrl+Shift+J | ⇧⌘J |
| Show Output panel | Ctrl+Shift+U | ⇧⌘U |
| Open Markdown preview | Ctrl+Shift+V | ⇧⌘V |
| Open Markdown preview to the side | Ctrl+KV | ⌘KV |
| Zen Mode (Esc Esc to exit) | Ctrl+KZ | ⌘KZ |
| Debug | ||
| Toggle breakpoint | F9 | F9 |
| Start/Continue | F5 | F5 |
| Stop | Shift+F5 | ⇧F5 |
| Step into/out | F11Shift+F11 | F11⇧F11 |
| Step over | F10 | F10 |
| Show hover | Ctrl+KCtrl+I | ⌘K⌘I |
| Integrated terminal | ||
| Show integrated terminal | Ctrl+` | ⌃` |
| Create new terminal | Ctrl+Shift+` | ⌃⇧` |
| Copy selection | Ctrl+C | ⌘C |
| Paste into active terminalmacOS chord is the editor default; the macOS cheat sheet omits it. | Ctrl+V | ⌘V |
| Scroll up/down | Ctrl+↑Ctrl+↓ | ⌘↑⌘↓ |
| Scroll page up/down | Shift+PgUpShift+PgDn | PgUpPgDn |
| Scroll to top/bottom | Ctrl+HomeCtrl+End | ⌘Home⌘End |
Defaults from the official Visual Studio Code cheat sheets. Your own keybindings are not listed. Windows PDF · macOS PDF