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

CtrlShift[Fold (collapse) region
CtrlKCtrl0Fold (collapse) all regions
ShiftAltAToggle block comment
Ctrl]
Ctrl[
Indent/outdent line
Home
End
Go to beginning/end of line
Ctrl/Toggle line comment
CtrlShiftenterInsert line above
CtrlShift\Jump to matching bracket
CtrlKCtrlURemove line comment
CtrlShiftKDelete line
CtrlHomeGo to beginning of file
CtrlShift]Unfold (uncollapse) region
AltZToggle word wrap
CtrlKCtrlJUnfold (uncollapse) all regions
Alt
Alt
Move line up/down
ShiftAlt+
ShiftAlt+
Copy line up/down
CtrlEndGo to end of file
CtrlKCtrlCAdd line comment
CtrlKCtrl]Unfold (uncollapse) all subregions
CtrlenterInsert line below
CtrlCCopy line (empty selection)
AltPgup
AltPgDn
Scroll page up/down
Ctrl
Ctrl
Scroll line up/down
CtrlXCut line (empty selection)
CtrlKCtrl[Fold (collapse) all subregions

Display

CtrlShiftJToggle Search details
CtrlShiftDShow Debug
CtrlShiftFShow Search
CtrlShiftHReplace in files
CtrlShiftXShow Extensions
CtrlKZZen Mode (Esc Esc to exit)
Ctrl=
Ctrl-
Zoom in/out
CtrlShiftEShow Explorer / Toggle focus
CtrlShiftGShow Source Control
CtrlShiftVOpen Markdown preview
CtrlBToggle Sidebar visibility
CtrlShiftUShow Output panel
ShiftAlt0Toggle editor layout (horizontal/vertical)
CtrlKVOpen Markdown preview to the side
F11Toggle full screen

File management

CtrlShiftTabOpen previous
CtrlKRReveal active file in Explorer
CtrlOOpen File...
CtrlF4Close
CtrlNNew File
CtrlSSave
CtrlShiftTReopen closed editor
CtrlKenterKeep preview mode editor open
CtrlShiftSSave As...
CtrlKOShow active file in new window/instance
CtrlKCtrlWClose All
CtrlKPCopy path of active file
CtrlKSSave All
CtrlTabOpen next

Navigation

CtrlShiftMShow Problems panel
CtrlTShow all Symbols
ShiftF8Go to previous error or warning
CtrlGGo to Line...
CtrlPGo to File...
F8Go to next error or warning
CtrlShiftOGo to Symbol...
CtrlMToggle Tab moves focus
CtrlShiftTabNavigate editor group history
Alt
Alt
Go back / forward

Multi-cursor and selection

CtrlAlt
CtrlAlt
Insert cursor above / below
ShiftAlt(dragmouseColumn (box) selection
CtrlF2Select all occurrences of current word
ShiftAltExpand selection
CtrlShiftAltPgup
CtrlShiftAltPgDn
Column (box) selection page up/down
ShiftAltIInsert cursor at end of each line selected
CtrlShiftLSelect all occurrences of current selection
CtrlUUndo last cursor operation
CtrlLSelect current line
ShiftAltShrink selection
AltClickInsert cursor

Rich languages editing

CtrlShiftspaceTrigger parameter hints
CtrlKF12Open Definition to the side
F12Go to Definition
Ctrl.Quick Fix
Ctrlspace
CtrlI
Trigger suggestion
CtrlKCtrlFFormat selection
F2Rename Symbol
ShiftAltFFormat document
AltF12Peek Definition
CtrlKCtrlXTrim trailing whitespace
CtrlKMChange file language
ShiftF12Show References

Integrated terminal

ShiftPgup
ShiftPgDn
Scroll page up/down
CtrlCCopy selection
Ctrl
Ctrl
Scroll up/down
CtrlHome
CtrlEnd
Scroll to top/bottom
CtrlShift`Create new terminal
CtrlVPaste into active terminal
Ctrl`Show integrated terminal

Search and replace

F3
ShiftF3
Find next/previous
AltenterSelect all occurences of Find match
CtrlFFind
CtrlKCtrlDMove last selection to next Find match
CtrlDAdd selection to next Find match
AltC
AltR
AltW
Toggle case-sensitive / regex / whole word
CtrlHReplace

General

CtrlShiftWClose window/instance
Ctrl,User Settings
CtrlKCtrlSKeyboard Shortcuts
CtrlShiftNNew window/instance
CtrlPQuick Open, Go to File…
CtrlShiftP
F1
Show Command Palette

Debug

F10Step over
F9Toggle breakpoint
F5Start/Continue
ShiftF5Stop
F11
ShiftF11
Step into/out
CtrlKCtrlIShow hover

Editor management

CtrlF4
CtrlW
Close editor
Ctrl\Split editor
CtrlKCtrl
CtrlKCtrl
Focus into previous/next editor group
CtrlK
CtrlK
Move active editor group
CtrlShiftPgup
CtrlShiftPgDn
Move editor left/right
CtrlKFClose folder
Ctrl1
Ctrl2
Ctrl3
Focus into 1st, 2nd or 3rd editor group

FAQ