Some useful keyboard shortcuts for power users of Visual Studio Code IDE to increase productivity and save time and effort.
General Command
ctrl+K ctrl+S | Keyboard Shortcuts |
ctrl+, | User Settings |
ctrl+shift+P or F1 | Show Command Palette |
ctrl+P | Open, Go to File… |
ctrl+shift+N | New window/instance |
ctrl+shift+W | Close window/instance |
Search and Replace
ctrl+F | Find |
ctrl+H | Replace |
F3 | Find next |
shift+F3 | Find Previous |
ctrl+K ctrl+D | Move last selection to next Find match |
ctrl+D | Add selection to next Find match |
alt+C / R / W | Toggle case-sensitive / regex / whole word |
alt+Enter | Select all occurrences of Find match |
Editing
ctrl+X | Cut entire line |
ctrl+C | Copy entire line |
ctrl+shift+K | Delete line |
ctrl+Enter | Insert line below |
ctrl+shift+Enter | Insert line above |
alt+↑ | Move line up |
alt+↓ | Move line down |
shift+alt+↑ | Copy line up |
shift+alt+↓ | Copy line down |
ctrl+shift+\ | Jump to matching bracket |
ctrl+] / [ | Indent / out-dent line |
ctrl+shift+[ | Fold or collapse region |
ctrl+shift+] | Unfold or un-collapse region |
ctrl+K ctrl+[ | Fold or collapse all sub-regions |
ctrl+K ctrl+] | Unfold or un-collapse all sub-regions |
ctrl+K ctrl+0 | Fold or collapse all regions |
ctrl+K ctrl+J | Unfold or un-collapse all regions |
ctrl+K ctrl+C | Add line comment |
ctrl+K ctrl+U | Remove line comment |
ctrl+/ | Toggle line comment |
shift+alt+A | Toggle block comment |
alt+Z | Toggle word wrap |
Navigation
Home | Go to beginning of line |
End | Go to end of line |
ctrl+Home | Go to beginning of file |
ctrl+End | Go to end of file |
ctrl+T | Show all Symbols |
ctrl+G | Go to Line… |
ctrl+P | Go to File… |
ctrl+shift+O | Go to Symbol… |
ctrl+shift+M | Show Problems panel |
alt+ ← | Go back |
alt+ → | Go forward |
ctrl+shift+Tab | Navigate editor group history |
ctrl+M | Toggle Tab moves focus |
F8 | Go to next error or warning |
shift+F8 | Go to previous error or warning |
File Management
ctrl+N | New File |
ctrl+O | Open File… |
ctrl+S | Save |
ctrl+shift+S | Save As… |
ctrl+K S | Save All |
ctrl+F4 | Close |
ctrl+K or ctrl+W | Close All |
ctrl+shift+T | Reopen closed editor |
ctrl+K | Enter Keep preview mode editor open |
ctrl+Tab | Open next |
ctrl+shift+Tab | Open previous |
ctrl+K P | Copy path of active file |
ctrl+K R | Reveal active file in Explorer |
ctrl+K O | Show active file in new window/instance |
Multiple Cursor and Selection
alt+Click | Insert cursor |
ctrl+alt+↑ | Insert cursor above |
ctrl+alt+↓ | Insert cursor below |
ctrl+U | Undo last cursor operation |
shift+alt+I | Insert cursor at end of each line selected |
ctrl+L | Select current line |
ctrl+shift+L | Select all occurrences of current selection |
ctrl+F2 | Select all occurrences of current word |
shift+alt+→ | Expand selection |
shift+alt+← | Shrink selection |
shift+alt+(drag mouse) | Column (box) selection |
ctrl+shift+alt+(arrow key) | Column (box) selection |
ctrl+shift+alt+PgUp/PgDn | Column (box) selection page up/down |