Visual Studio CodeHotkey Cheatsheet
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.
A visual cheat-sheet for the 234 keyboard shortcuts found in Visual Studio Code
Basic editing
Ctrl Shift [ | Fold (collapse) region |
Ctrl K Ctrl 0 | Fold (collapse) all regions |
Shift Alt A | Toggle block comment |
Ctrl ] Ctrl [ | Indent/outdent line |
Home End | Go to beginning/end of line |
Ctrl / | Toggle line comment |
Ctrl Shift enter | Insert line above |
Ctrl Shift \ | Jump to matching bracket |
Ctrl K Ctrl U | Remove line comment |
Ctrl Shift K | Delete line |
Ctrl Home | Go to beginning of file |
Ctrl Shift ] | Unfold (uncollapse) region |
Alt Z | Toggle word wrap |
Ctrl K Ctrl J | Unfold (uncollapse) all regions |
Alt ↑ Alt ↓ | Move line up/down |
Shift Alt + ↓ Shift Alt + ↑ | Copy line up/down |
Ctrl End | Go to end of file |
Ctrl K Ctrl C | Add line comment |
Ctrl K Ctrl ] | Unfold (uncollapse) all subregions |
Ctrl enter | Insert line below |
Ctrl C | Copy line (empty selection) |
Alt Pgup Alt PgDn | Scroll page up/down |
Ctrl ↑ Ctrl ↓ | Scroll line up/down |
Ctrl X | Cut line (empty selection) |
Ctrl K Ctrl [ | Fold (collapse) all subregions |
Display
Ctrl Shift J | Toggle Search details |
Ctrl Shift D | Show Debug |
Ctrl Shift F | Show Search |
Ctrl Shift H | Replace in files |
Ctrl Shift X | Show Extensions |
Ctrl K Z | Zen Mode (Esc Esc to exit) |
Ctrl = Ctrl - | Zoom in/out |
Ctrl Shift E | Show Explorer / Toggle focus |
Ctrl Shift G | Show Source Control |
Ctrl Shift V | Open Markdown preview |
Ctrl B | Toggle Sidebar visibility |
Ctrl Shift U | Show Output panel |
Shift Alt 0 | Toggle editor layout (horizontal/vertical) |
Ctrl K V | Open Markdown preview to the side |
F11 | Toggle full screen |
File management
Ctrl Shift Tab | Open previous |
Ctrl K R | Reveal active file in Explorer |
Ctrl O | Open File... |
Ctrl F4 | Close |
Ctrl N | New File |
Ctrl S | Save |
Ctrl Shift T | Reopen closed editor |
Ctrl K enter | Keep preview mode editor open |
Ctrl Shift S | Save As... |
Ctrl K O | Show active file in new window/instance |
Ctrl K Ctrl W | Close All |
Ctrl K P | Copy path of active file |
Ctrl K S | Save All |
Ctrl Tab | Open next |
Navigation
Ctrl Shift M | Show Problems panel |
Ctrl T | Show all Symbols |
Shift F8 | Go to previous error or warning |
Ctrl G | Go to Line... |
Ctrl P | Go to File... |
F8 | Go to next error or warning |
Ctrl Shift O | Go to Symbol... |
Ctrl M | Toggle Tab moves focus |
Ctrl Shift Tab | Navigate editor group history |
Alt ← Alt → | Go back / forward |
Multi-cursor and selection
Ctrl Alt ↑ Ctrl Alt ↓ | Insert cursor above / below |
Shift Alt ( drag mouse | Column (box) selection |
Ctrl F2 | Select all occurrences of current word |
Shift Alt → | Expand selection |
Ctrl Shift Alt Pgup Ctrl Shift Alt PgDn | Column (box) selection page up/down |
Shift Alt I | Insert cursor at end of each line selected |
Ctrl Shift L | Select all occurrences of current selection |
Ctrl U | Undo last cursor operation |
Ctrl L | Select current line |
Shift Alt ← | Shrink selection |
Alt Click | Insert cursor |
Rich languages editing
Ctrl Shift space | Trigger parameter hints |
Ctrl K F12 | Open Definition to the side |
F12 | Go to Definition |
Ctrl . | Quick Fix |
Ctrl space Ctrl I | Trigger suggestion |
Ctrl K Ctrl F | Format selection |
F2 | Rename Symbol |
Shift Alt F | Format document |
Alt F12 | Peek Definition |
Ctrl K Ctrl X | Trim trailing whitespace |
Ctrl K M | Change file language |
Shift F12 | Show References |
Integrated terminal
Shift Pgup Shift PgDn | Scroll page up/down |
Ctrl C | Copy selection |
Ctrl ↑ Ctrl ↓ | Scroll up/down |
Ctrl Home Ctrl End | Scroll to top/bottom |
Ctrl Shift ` | Create new terminal |
Ctrl V | Paste into active terminal |
Ctrl ` | Show integrated terminal |
Search and replace
F3 Shift F3 | Find next/previous |
Alt enter | Select all occurences of Find match |
Ctrl F | Find |
Ctrl K Ctrl D | Move last selection to next Find match |
Ctrl D | Add selection to next Find match |
Alt C Alt R Alt W | Toggle case-sensitive / regex / whole word |
Ctrl H | Replace |
General
Ctrl Shift W | Close window/instance |
Ctrl , | User Settings |
Ctrl K Ctrl S | Keyboard Shortcuts |
Ctrl Shift N | New window/instance |
Ctrl P | Quick Open, Go to File… |
Ctrl Shift P F1 | Show Command Palette |
Debug
F10 | Step over |
F9 | Toggle breakpoint |
F5 | Start/Continue |
Shift F5 | Stop |
F11 Shift F11 | Step into/out |
Ctrl K Ctrl I | Show hover |
Editor management
Ctrl F4 Ctrl W | Close editor |
Ctrl \ | Split editor |
Ctrl K Ctrl ← Ctrl K Ctrl → | Focus into previous/next editor group |
Ctrl K ← Ctrl K → | Move active editor group |
Ctrl Shift Pgup Ctrl Shift PgDn | Move editor left/right |
Ctrl K F | Close folder |
Ctrl 1 Ctrl 2 Ctrl 3 | Focus into 1st, 2nd or 3rd editor group |