VS Code Shortcuts Quick Reference
Default Visual Studio Code keyboard shortcuts for Windows/Linux and macOS: editing, multi-cursor, navigation, search, panels and debugging.
Linux uses the Windows keys except where noted. Ctrl+K Ctrl+S opens the shortcut editor, where you can search and rebind anything.
9 sections · 79 shortcuts · updated Oct 14, 2026
Click any snippet to copy it.
Essentials
The few shortcuts that unlock everything else.
ActionWindows / LinuxmacOS
- Command PaletteWindows / LinuxCtrlShiftPF1macOS⇧⌘P
- Quick Open (go to file)Windows / LinuxCtrlPmacOS⌘P
- SettingsWindows / LinuxCtrl,macOS⌘,
- Keyboard Shortcuts editorWindows / LinuxCtrlKCtrlSmacOS⌘K⌘S
- Toggle sidebarWindows / LinuxCtrlBmacOS⌘B
- Toggle terminalWindows / LinuxCtrl`macOS⌃`
- New terminalWindows / LinuxCtrlShift`macOS⌃⇧`
- Toggle bottom panelWindows / LinuxCtrlJmacOS⌘J
- Zen modeWindows / LinuxCtrlKZmacOS⌘KZ
- New windowWindows / LinuxCtrlShiftNmacOS⇧⌘N
Basic editing
Lines, comments and indentation.
ActionWindows / LinuxmacOS
- Cut / copy line (no selection)Windows / LinuxCtrlXCtrlCmacOS⌘X⌘C
- Delete lineWindows / LinuxCtrlShiftKmacOS⇧⌘K
- Move line up / downWindows / LinuxAlt↑Alt↓macOS⌥↑⌥↓
- Copy line up / downWindows / LinuxShiftAlt↑ShiftAlt↓macOS⇧⌥↑⇧⌥↓
- Insert line below / aboveWindows / LinuxCtrlEnterCtrlShiftEntermacOS⌘Enter⇧⌘Enter
- Toggle line commentWindows / LinuxCtrl/macOS⌘/
- Toggle block commentWindows / LinuxShiftAltAmacOS⇧⌥A
- Indent / outdent lineWindows / LinuxCtrl]Ctrl[macOS⌘]⌘[
- Jump to matching bracketWindows / LinuxCtrlShift\macOS⇧⌘\
- Fold / unfold regionWindows / LinuxCtrlShift[CtrlShift]macOS⌥⌘[⌥⌘]
- Fold all / unfold allWindows / LinuxCtrlKCtrl0CtrlKCtrlJmacOS⌘K⌘0⌘K⌘J
- Undo / redoWindows / LinuxCtrlZCtrlYmacOS⌘Z⇧⌘Z
- Toggle word wrapWindows / LinuxAltZmacOS⌥Z
Multi-cursor & selection
Edit many places at once.
ActionWindows / LinuxmacOS
- Add cursor at clickWindows / LinuxAltClickmacOS⌥Click
- Add cursor above / belowWindows / LinuxCtrlAlt↑CtrlAlt↓macOS⌥⌘↑⌥⌘↓
- Select next occurrenceWindows / LinuxCtrlDmacOS⌘D
- Select all occurrencesWindows / LinuxCtrlShiftLmacOS⇧⌘L
- Skip this occurrenceWindows / LinuxCtrlKCtrlDmacOS⌘K⌘D
- Undo last cursorWindows / LinuxCtrlUmacOS⌘U
- Cursor at end of each selected lineWindows / LinuxShiftAltImacOS⇧⌥I
- Select current lineWindows / LinuxCtrlLmacOS⌘L
- Column (box) selectionWindows / LinuxShiftAltDragmacOS⇧⌥Drag
- Expand / shrink selectionWindows / LinuxShiftAlt→ShiftAlt←macOS⌃⇧⌘→⌃⇧⌘←
Search & replace
In a file and across the project.
ActionWindows / LinuxmacOS
- FindWindows / LinuxCtrlFmacOS⌘F
- ReplaceWindows / LinuxCtrlHmacOS⌥⌘F
- Find next / previousWindows / LinuxF3ShiftF3macOS⌘G⇧⌘G
- Select all matches of FindWindows / LinuxAltEntermacOS⌥Enter
- Search in filesWindows / LinuxCtrlShiftFmacOS⇧⌘F
- Replace in filesWindows / LinuxCtrlShiftHmacOS⇧⌘H
Code intelligence
Suggestions, formatting and refactoring.
ActionWindows / LinuxmacOS
- Trigger suggestionsWindows / LinuxCtrlSpacemacOS⌃Space
- Parameter hintsWindows / LinuxCtrlShiftSpacemacOS⇧⌘Space
- Quick fix / code actionsWindows / LinuxCtrl.macOS⌘.
- Rename symbolWindows / LinuxF2macOSF2
- Format documentWindows / LinuxShiftAltFCtrlShiftI(Linux)macOS⇧⌥F
- Format selectionWindows / LinuxCtrlKCtrlFmacOS⌘K⌘F
- Show hover infoWindows / LinuxCtrlKCtrlImacOS⌘K⌘I
- Trim trailing whitespaceWindows / LinuxCtrlKCtrlXmacOS⌘K⌘X
Editors & files
Tabs, splits and saving.
ActionWindows / LinuxmacOS
- Save / save allWindows / LinuxCtrlSCtrlKSmacOS⌘S⌥⌘S
- Close editorWindows / LinuxCtrlWmacOS⌘W
- Reopen closed editorWindows / LinuxCtrlShiftTmacOS⇧⌘T
- Split editorWindows / LinuxCtrl\macOS⌘\
- Focus editor group 1 / 2 / 3Windows / LinuxCtrl1Ctrl2Ctrl3macOS⌘1⌘2⌘3
- Next / previous tabWindows / LinuxCtrlPageDownCtrlPageUpmacOS⌥⌘→⌥⌘←
- Keep preview tab openWindows / LinuxCtrlKEntermacOS⌘KEnter
- New fileWindows / LinuxCtrlNmacOS⌘N
- Markdown preview to the sideWindows / LinuxCtrlKVmacOS⌘KV
Views
Open sidebar views and panels.
ActionWindows / LinuxmacOS
- ExplorerWindows / LinuxCtrlShiftEmacOS⇧⌘E
- SearchWindows / LinuxCtrlShiftFmacOS⇧⌘F
- Source ControlWindows / LinuxCtrlShiftGmacOS⌃⇧G
- Run and DebugWindows / LinuxCtrlShiftDmacOS⇧⌘D
- ExtensionsWindows / LinuxCtrlShiftXmacOS⇧⌘X
- ProblemsWindows / LinuxCtrlShiftMmacOS⇧⌘M
- OutputWindows / LinuxCtrlShiftUmacOS⇧⌘U
Debugging
Run, step and inspect.
ActionWindows / LinuxmacOS
- Start / continueWindows / LinuxF5macOSF5
- Run without debuggingWindows / LinuxCtrlF5macOS⌃F5
- StopWindows / LinuxShiftF5macOS⇧F5
- Toggle breakpointWindows / LinuxF9macOSF9
- Step overWindows / LinuxF10macOSF10
- Step into / outWindows / LinuxF11ShiftF11macOSF11⇧F11