Visual Studio Code keyboard shortcuts
Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux and macOS.
You can also download the official PDF shortcut reference for Windows, macOS, Linux.
Editing | |
---|---|
Ctrl X | Cut line |
Ctrl ↩ | Insert line bellow |
Ctrl ⇧ ↩ | Insert line above |
Alt ↑ | Move line/selection up |
Alt ↓ | Move line/selection down |
Ctrl D | Select word - Repeat select others occurrences |
Ctrl ⇧ K | Delete Line |
Ctrl ] | Indent current line(s) |
Ctrl [ | Un-indent current line(s) |
Alt ⇧ ↑/↓ | Duplicate line(s) up/down |
Home | Go to the begining of line |
End | Go to the end of line |
Ctrl ↑ | Scroll line up |
Ctrl ↓ | Scroll line down |
Ctrl Home | Go to the begining of file |
Ctrl End | Go to the end of file |
Ctrl ⇧ [ | Collapse region |
Ctrl ⇧ ] | Uncollapse region |
Ctrl K Ctrl 0 | Collapse all regions |
Ctrl K Ctrl J | Uncoollapse all regions |
Ctrl / | Toggle line comment |
Alt Z | Toggle word wrap |
Navigation / Goto Anywhere | |
Ctrl G | Goto line in current file |
Ctrl P | Quick-open files by name |
Ctrl ⇧ O | Goto symbol |
Ctrl ⇧ M | Show Problems panel |
/ F8 | Go to next error warning |
⇧ F8 | Go to previous error warning |
Ctrl ⇧ Tab | Navigate editor group history |
Alt ← / → | Go back / forward |
General | |
Ctrl ⇧ P | Command prompt |
Ctrl KB | Toggle side bar |
Ctrl ⇧ Alt P | Show scope in status bar |
Find/Replace | |
Ctrl F | Find |
Ctrl H | Replace |
F3 ⇧ / F3 | Find next / previous |
Alt ↩ | Select all occurrences of Find match |
Ctrl ⇧ F | Find in files |
Ctrl D | Add selection to the next Find match |
Multi-cursor and selection | |
Alt Click | Insert cursor |
Ctrl U | Undo last cursor operation |
⇧ Alt I | Insert cursor at end of each line selected |
Ctrl I | Select current line |
Ctrl ⇧ L | Select all occurrences of current selection |
Ctrl F2 | Select all occurrences of current word |
⇧ Alt → | Expand selection |
⇧ Alt ← | Shrink selection |
⇧ Alt (drag mouse) | Column (box) selection |
Rich languages editing | |
Ctrl Space | Trigger suggestion |
Ctrl ⇧ Space | Trigger parameter hints |
⇧ Alt F | Format document |
Ctrl K Ctrl F | Format selection |
/ F12 | Go to definition |
Alt F12 | Peek definition |
Ctrl K F12 | Open Definition to the side |
Ctrl K Ctrl X | Trim trailing whitespace |
Ctrl K M | Change file language |
Editor management | |
Ctrl F4 | Close editor |
Ctrl K F | Close folder |
Ctrl 1 / 2 / 3 | Split editor in 1 / 2 / 3 parts |
Alt ⇧ 2 | Split view into two columns |
Alt ⇧ 1 | Revert view to single column |
Ctrl ⇧ PgUp / PgDn | Move editor left/right |
⇧ Alt 0 | Toggle editor layout (horizontal/vertical) |
File management | |
Ctrl N | New file |
Ctrl O | Open file... |
Ctrl W | Close current tab |
Ctrl S | Save |
Ctrl ⇧ S | Save as... |
Ctrl K S | Save all |
Ctrl ⇧ T | Reopen closed editor |
Ctrl Tab | Toggle tabs |
Alt [NUM] | Switch to tab number [NUM] where [NUM] <= number of tabs |
Ctrl K R | Reveal active file in Explorer |
Ctrl K O | Show active file in new window/instance |
Display | |
F11 | Toggle full screen |
Ctrl = / - | Zoom in/out |
Ctrl B | Toggle Sidebar visibility |
Ctrl ⇧ E | Show Explorer / Toggle focus |
Ctrl ⇧ F | Show Search |
Ctrl ⇧ G | Show Source Control |
Ctrl ⇧ D | Show Debug |
Ctrl ⇧ E | Show Extensions |
Ctrl ⇧ H | Replace in files |
Ctrl ⇧ J | Toggle Search details |
Ctrl ⇧ U | Toggle Output panel |
Ctrl ⇧ V | Open Markdown preview |
Ctrl K V | Open Markdown preview to the side |
Ctrl K Z | Zen Mode (Esc Esc to exit) |
Debug | |
F9 | Toggle breakpoint |
F5 | Start/Continue |
⇧ F5 | Stop |
F11 ⇧ / F11 | Step into/out |
F10 | Step over |
Ctrl K Ctrl I | Show hover |
Integrated terminal | |
Ctrl ` | Show integrated terminal |
Ctrl ⇧ ` | Create new terminal |
Ctrl C | Copy selection |
Ctrl V | Paste into active terminal |
Ctrl ↑ / ↓ | Scroll up/down |
⇧ PgUp / PgDn | Scroll page up/down |
Ctrl Home / End | Scroll to top/bottom |