Visual Studio Code | IDE |Keyboard Shortcuts | for Windows

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+SKeyboard Shortcuts
ctrl+,User Settings
ctrl+shift+P or F1Show Command Palette
ctrl+POpen, Go to File…
ctrl+shift+NNew window/instance
ctrl+shift+W Close window/instance

Search and Replace

ctrl+F Find
ctrl+H Replace
F3 Find next
shift+F3Find Previous
ctrl+K ctrl+DMove 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+XCut entire line
ctrl+CCopy entire line
ctrl+shift+KDelete line
ctrl+EnterInsert line below
ctrl+shift+EnterInsert 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

HomeGo to beginning of line
End Go to end of line
ctrl+HomeGo to beginning of file
ctrl+End Go to end of file
ctrl+T Show all Symbols
ctrl+G Go to Line…
ctrl+PGo 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+SSave 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+TabOpen 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+ClickInsert 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+F2Select 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/PgDnColumn (box) selection page up/down

Leave a Reply

Your email address will not be published. Required fields are marked *