Visual Studio Code keyboard shortcuts
Windows · version 1.96 · 138 shortcuts
Hotkeypediahotkeypedia.com
General
- Show Command PaletteShiftCmdPorF1CtrlShiftPorF1CtrlShiftPorF1
- Quick Open, go to fileCmdPCtrlPCtrlP
- New windowShiftCmdNCtrlShiftNCtrlShiftN
- Close windowShiftCmdWCtrlShiftWCtrlShiftW
- Open User SettingsCmd,Ctrl,Ctrl,
- Open the keybindings editorCmdK,CmdSCtrlK,CtrlSCtrlK,CtrlS
- Open Microsoft's shortcut referenceCmdK,CmdRCtrlK,CtrlRCtrlK,CtrlR
Basic editing
- Cut line (empty selection)CmdXCtrlXCtrlX
- Copy line (empty selection)CmdCCtrlCCtrlC
- Move line downOption↓Alt↓Alt↓
- Move line upOption↑Alt↑Alt↑
- Copy line downOptionShift↓AltShift↓CtrlAltShift↓
- Copy line upOptionShift↑AltShift↑CtrlAltShift↑
- Delete lineShiftCmdKCtrlShiftKCtrlShiftK
- Insert line belowCmdEnterCtrlEnterCtrlEnter
- Insert line aboveShiftCmdEnterCtrlShiftEnterCtrlShiftEnter
- Jump to matching bracketShiftCmd\CtrlShift\CtrlShift\
- Indent lineCmd]Ctrl]Ctrl]
- Outdent lineCmd[Ctrl[Ctrl[
- Go to beginning of lineHomeorCmd←HomeHome
- Go to end of lineEndorCmd→EndEnd
- Go to beginning of fileCmd↑CtrlHomeCtrlHome
- Go to end of fileCmd↓CtrlEndCtrlEnd
- Scroll line upCtrlPageUpCtrl↑Ctrl↑
- Scroll line downCtrlPageDownCtrl↓Ctrl↓
- Scroll page upCmdPageUpAltPageUpAltPageUp
- Scroll page downCmdPageDownAltPageDownAltPageDown
- Fold (collapse) regionOptionCmd[CtrlShift[CtrlShift[
- Unfold (uncollapse) regionOptionCmd]CtrlShift]CtrlShift]
- Toggle foldCmdK,CmdLCtrlK,CtrlLCtrlK,CtrlL
- Fold all subregionsCmdK,Cmd[CtrlK,Ctrl[CtrlK,Ctrl[
- Unfold all subregionsCmdK,Cmd]CtrlK,Ctrl]CtrlK,Ctrl]
- Fold all regionsCmdK,Cmd0CtrlK,Ctrl0CtrlK,Ctrl0
- Unfold all regionsCmdK,CmdJCtrlK,CtrlJCtrlK,CtrlJ
- Fold all block commentsCmdK,Cmd/CtrlK,Ctrl/CtrlK,Ctrl/
- Add line commentCmdK,CmdCCtrlK,CtrlCCtrlK,CtrlC
- Remove line commentCmdK,CmdUCtrlK,CtrlUCtrlK,CtrlU
- Toggle line commentCmd/Ctrl/Ctrl/
- Toggle block commentOptionShiftAAltShiftACtrlShiftA
- Toggle word wrapOptionZAltZAltZ
Navigation
- Show all symbolsCmdTCtrlTCtrlT
- Go to lineCtrlGCtrlGCtrlG
- Go to symbol in fileShiftCmdOCtrlShiftOCtrlShiftO
- Show Problems panelShiftCmdMCtrlShiftMCtrlShiftM
- Go to next error or warningF8F8F8
- Go to previous error or warningShiftF8ShiftF8ShiftF8
- Navigate editor group historyCtrlShiftTabCtrlShiftTabCtrlShiftTab
- Go backCtrl-Alt←CtrlAlt-
- Go forwardCtrlShift-Alt→CtrlShift-
- Toggle Tab moves focusCtrlShiftMCtrlMCtrlM
Search and replace
- FindCmdFCtrlFCtrlF
- ReplaceOptionCmdFCtrlHCtrlH
- Find nextEnterorCmdGEnterorF3EnterorF3
- Find previousShiftEnterorShiftCmdGShiftEnterorShiftF3ShiftEnterorShiftF3
- Select all occurrences of find matchOptionEnterAltEnterAltEnter
- Toggle case-sensitiveOptionCmdCAltCAltC
- Toggle regexOptionCmdRAltRAltR
- Toggle whole wordOptionCmdWAltWAltW
Multi-cursor and selection
- Insert cursor aboveOptionCmd↑CtrlAlt↑AltShift↑
- Insert cursor belowOptionCmd↓CtrlAlt↓AltShift↓
- Undo last cursor operationCmdUCtrlUCtrlU
- Insert cursor at end of each selected lineOptionShiftIAltShiftIAltShiftI
- Select current lineCmdLCtrlLCtrlL
- Select all occurrences of current selectionShiftCmdLCtrlShiftLCtrlShiftL
- Add selection to next find matchCmdDCtrlDCtrlD
- Select allCmdACtrlACtrlA
- Expand selectionCtrlShiftCmd→AltShift→AltShift→
- Shrink selectionCtrlShiftCmd←AltShift←AltShift←
- Column (box) selection downOptionShiftCmd↓CtrlAltShift↓CtrlAltShift↓
Rich languages editing
- Trigger suggestionCtrlSpaceorCmdICtrlSpaceorCtrlICtrlSpaceorCtrlI
- Trigger parameter hintsShiftCmdSpaceCtrlShiftSpaceCtrlShiftSpace
- Format documentOptionShiftFAltShiftFCtrlShiftI
- Format selectionCmdK,CmdFCtrlK,CtrlFCtrlK,CtrlF
- Go to definitionF12F12F12
- Peek definitionOptionF12AltF12CtrlShiftF10
- Open definition to the sideCmdK,F12CtrlK,F12CtrlK,F12
- Quick FixCmd.Ctrl.Ctrl.
- Show referencesShiftF12ShiftF12ShiftF12
- Rename symbolF2F2F2
- Trim trailing whitespaceCmdK,CmdXCtrlK,CtrlXCtrlK,CtrlX
- Change file languageCmdK,MCtrlK,MCtrlK,M
Editor management
- Close editorCmdWCtrlWorCtrlF4CtrlW
- Close folderCmdK,FCtrlK,FCtrlK,F
- Split editorCmd\Ctrl\Ctrl\
- Focus into 1st, 2nd or 3rd editor groupCmd1Ctrl1Ctrl1
- Focus into previous editor groupCmdK,Cmd←CtrlK,Ctrl←CtrlK,Ctrl←
- Focus into next editor groupCmdK,Cmd→CtrlK,Ctrl→CtrlK,Ctrl→
- Move editor leftCmdK,ShiftCmd←CtrlShiftPageUpCtrlShiftPageUp
- Move editor rightCmdK,ShiftCmd→CtrlShiftPageDownCtrlShiftPageDown
- Move active editor group leftCmdK,←CtrlK,←CtrlK,←
- Move active editor group rightCmdK,→CtrlK,→CtrlK,→
File management
- Open folderCmdOCtrlK,CtrlOCtrlK,CtrlO
- New fileCmdNCtrlNCtrlN
- Open fileCmdOCtrlOCtrlO
- SaveCmdSCtrlSCtrlS
- Save asShiftCmdSCtrlShiftSCtrlShiftS
- Save allOptionCmdSCtrlK,SCtrlK,S
- Close all editorsCmdK,CmdWCtrlK,CtrlWCtrlK,CtrlW
- Reopen closed editorShiftCmdTCtrlShiftTCtrlShiftT
- Keep preview mode editor openCmdK,EnterCtrlK,EnterCtrlK,Enter
- Open next editorCtrlTabCtrlTabCtrlTab
- Open previous editorCtrlShiftTabCtrlShiftTabCtrlShiftTab
- Copy path of active fileCmdK,PCtrlK,PCtrlK,P
- Reveal active file in Explorer or FinderCmdK,RCtrlK,RCtrlK,R
- Show active file in new windowCmdK,OCtrlK,OCtrlK,O
Display
- Toggle full screenCtrlCmdFF11F11
- Toggle Zen ModeCmdK,ZCtrlK,ZCtrlK,Z
- Zoom inCmd=Ctrl=Ctrl=
- Zoom outCmd-Ctrl-Ctrl-
- Toggle Sidebar visibilityCmdBCtrlBCtrlB
- Show ExplorerShiftCmdECtrlShiftECtrlShiftE
- Show SearchShiftCmdFCtrlShiftFCtrlShiftF
- Show Source ControlCtrlShiftGCtrlShiftGCtrlShiftG
- Show Run and DebugShiftCmdDCtrlShiftDCtrlShiftD
- Show ExtensionsShiftCmdXCtrlShiftXCtrlShiftX
- Replace in filesShiftCmdHCtrlShiftHCtrlShiftH
- Toggle Search detailsShiftCmdJCtrlShiftJCtrlShiftJ
- Show Output panelShiftCmdUCtrlShiftUCtrlK,CtrlH
- Toggle panelCmdJCtrlJCtrlJ
- Show Debug ConsoleShiftCmdYCtrlShiftYCtrlShiftY
- Open Markdown previewShiftCmdVCtrlShiftVCtrlShiftV
- Open Markdown preview to the sideCmdK,VCtrlK,VCtrlK,V
Debug
- Toggle breakpointF9F9F9
- Start or continue debuggingF5F5F5
- Start without debuggingCtrlF5CtrlF5CtrlF5
- Stop debuggingShiftF5ShiftF5ShiftF5
- Step intoF11F11F11
- Step outShiftF11ShiftF11ShiftF11
- Step overF10F10F10
- Show hoverCmdK,CmdICtrlK,CtrlICtrlK,CtrlI
Integrated terminal
- Toggle integrated terminalCtrl`Ctrl`Ctrl`
- Create new terminalCtrlShift`CtrlShift`CtrlShift`
- Scroll up (terminal)Cmd↑CtrlShift↑CtrlShift↑
- Scroll down (terminal)Cmd↓CtrlShift↓CtrlShift↓
- Scroll page up (terminal)PageUpShiftPageUpShiftPageUp
- Scroll page down (terminal)PageDownShiftPageDownShiftPageDown
- Scroll to top (terminal)CmdHomeCtrlHomeCtrlHome
- Scroll to bottom (terminal)CmdEndCtrlEndCtrlEnd