coderef

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.

  • Command Palette
    Windows / Linux
    CtrlShiftP
    F1
    macOS
    ⇧⌘P
  • Quick Open (go to file)
    Windows / Linux
    CtrlP
    macOS
    ⌘P
  • Settings
    Windows / Linux
    Ctrl,
    macOS
    ⌘,
  • Keyboard Shortcuts editor
    Windows / Linux
    CtrlKCtrlS
    macOS
    ⌘K⌘S
  • Toggle sidebar
    Windows / Linux
    CtrlB
    macOS
    ⌘B
  • Toggle terminal
    Windows / Linux
    Ctrl`
    macOS
    ⌃`
  • New terminal
    Windows / Linux
    CtrlShift`
    macOS
    ⌃⇧`
  • Toggle bottom panel
    Windows / Linux
    CtrlJ
    macOS
    ⌘J
  • Zen mode
    Windows / Linux
    CtrlKZ
    macOS
    ⌘KZ
  • New window
    Windows / Linux
    CtrlShiftN
    macOS
    ⇧⌘N

Basic editing

Lines, comments and indentation.

  • Cut / copy line (no selection)
    Windows / Linux
    CtrlX
    CtrlC
    macOS
    ⌘X
    ⌘C
  • Delete line
    Windows / Linux
    CtrlShiftK
    macOS
    ⇧⌘K
  • Move line up / down
    Windows / Linux
    Alt↑
    Alt↓
    macOS
    ⌥↑
    ⌥↓
  • Copy line up / down
    Windows / Linux
    ShiftAlt↑
    ShiftAlt↓
    macOS
    ⇧⌥↑
    ⇧⌥↓
  • Insert line below / above
    Windows / Linux
    CtrlEnter
    CtrlShiftEnter
    macOS
    ⌘Enter
    ⇧⌘Enter
  • Toggle line comment
    Windows / Linux
    Ctrl/
    macOS
    ⌘/
  • Toggle block comment
    Windows / Linux
    ShiftAltA
    macOS
    ⇧⌥A
  • Indent / outdent line
    Windows / Linux
    Ctrl]
    Ctrl[
    macOS
    ⌘]
    ⌘[
  • Jump to matching bracket
    Windows / Linux
    CtrlShift\
    macOS
    ⇧⌘\
  • Fold / unfold region
    Windows / Linux
    CtrlShift[
    CtrlShift]
    macOS
    ⌥⌘[
    ⌥⌘]
  • Fold all / unfold all
    Windows / Linux
    CtrlKCtrl0
    CtrlKCtrlJ
    macOS
    ⌘K⌘0
    ⌘K⌘J
  • Undo / redo
    Windows / Linux
    CtrlZ
    CtrlY
    macOS
    ⌘Z
    ⇧⌘Z
  • Toggle word wrap
    Windows / Linux
    AltZ
    macOS
    ⌥Z

Multi-cursor & selection

Edit many places at once.

  • Add cursor at click
    Windows / Linux
    AltClick
    macOS
    ⌥Click
  • Add cursor above / below
    Windows / Linux
    CtrlAlt↑
    CtrlAlt↓
    macOS
    ⌥⌘↑
    ⌥⌘↓
  • Select next occurrence
    Windows / Linux
    CtrlD
    macOS
    ⌘D
  • Select all occurrences
    Windows / Linux
    CtrlShiftL
    macOS
    ⇧⌘L
  • Skip this occurrence
    Windows / Linux
    CtrlKCtrlD
    macOS
    ⌘K⌘D
  • Undo last cursor
    Windows / Linux
    CtrlU
    macOS
    ⌘U
  • Cursor at end of each selected line
    Windows / Linux
    ShiftAltI
    macOS
    ⇧⌥I
  • Select current line
    Windows / Linux
    CtrlL
    macOS
    ⌘L
  • Column (box) selection
    Windows / Linux
    ShiftAltDrag
    macOS
    ⇧⌥Drag
  • Expand / shrink selection
    Windows / Linux
    ShiftAlt→
    ShiftAlt←
    macOS
    ⌃⇧⌘→
    ⌃⇧⌘←

Search & replace

In a file and across the project.

  • Find
    Windows / Linux
    CtrlF
    macOS
    ⌘F
  • Replace
    Windows / Linux
    CtrlH
    macOS
    ⌥⌘F
  • Find next / previous
    Windows / Linux
    F3
    ShiftF3
    macOS
    ⌘G
    ⇧⌘G
  • Select all matches of Find
    Windows / Linux
    AltEnter
    macOS
    ⌥Enter
  • Search in files
    Windows / Linux
    CtrlShiftF
    macOS
    ⇧⌘F
  • Replace in files
    Windows / Linux
    CtrlShiftH
    macOS
    ⇧⌘H

Code intelligence

Suggestions, formatting and refactoring.

  • Trigger suggestions
    Windows / Linux
    CtrlSpace
    macOS
    ⌃Space
  • Parameter hints
    Windows / Linux
    CtrlShiftSpace
    macOS
    ⇧⌘Space
  • Quick fix / code actions
    Windows / Linux
    Ctrl.
    macOS
    ⌘.
  • Rename symbol
    Windows / Linux
    F2
    macOS
    F2
  • Format document
    Windows / Linux
    ShiftAltF
    CtrlShiftI(Linux)
    macOS
    ⇧⌥F
  • Format selection
    Windows / Linux
    CtrlKCtrlF
    macOS
    ⌘K⌘F
  • Show hover info
    Windows / Linux
    CtrlKCtrlI
    macOS
    ⌘K⌘I
  • Trim trailing whitespace
    Windows / Linux
    CtrlKCtrlX
    macOS
    ⌘K⌘X

Editors & files

Tabs, splits and saving.

  • Save / save all
    Windows / Linux
    CtrlS
    CtrlKS
    macOS
    ⌘S
    ⌥⌘S
  • Close editor
    Windows / Linux
    CtrlW
    macOS
    ⌘W
  • Reopen closed editor
    Windows / Linux
    CtrlShiftT
    macOS
    ⇧⌘T
  • Split editor
    Windows / Linux
    Ctrl\
    macOS
    ⌘\
  • Focus editor group 1 / 2 / 3
    Windows / Linux
    Ctrl1
    Ctrl2
    Ctrl3
    macOS
    ⌘1
    ⌘2
    ⌘3
  • Next / previous tab
    Windows / Linux
    CtrlPageDown
    CtrlPageUp
    macOS
    ⌥⌘→
    ⌥⌘←
  • Keep preview tab open
    Windows / Linux
    CtrlKEnter
    macOS
    ⌘KEnter
  • New file
    Windows / Linux
    CtrlN
    macOS
    ⌘N
  • Markdown preview to the side
    Windows / Linux
    CtrlKV
    macOS
    ⌘KV

Views

Open sidebar views and panels.

  • Explorer
    Windows / Linux
    CtrlShiftE
    macOS
    ⇧⌘E
  • Search
    Windows / Linux
    CtrlShiftF
    macOS
    ⇧⌘F
  • Source Control
    Windows / Linux
    CtrlShiftG
    macOS
    ⌃⇧G
  • Run and Debug
    Windows / Linux
    CtrlShiftD
    macOS
    ⇧⌘D
  • Extensions
    Windows / Linux
    CtrlShiftX
    macOS
    ⇧⌘X
  • Problems
    Windows / Linux
    CtrlShiftM
    macOS
    ⇧⌘M
  • Output
    Windows / Linux
    CtrlShiftU
    macOS
    ⇧⌘U

Debugging

Run, step and inspect.

  • Start / continue
    Windows / Linux
    F5
    macOS
    F5
  • Run without debugging
    Windows / Linux
    CtrlF5
    macOS
    ⌃F5
  • Stop
    Windows / Linux
    ShiftF5
    macOS
    ⇧F5
  • Toggle breakpoint
    Windows / Linux
    F9
    macOS
    F9
  • Step over
    Windows / Linux
    F10
    macOS
    F10
  • Step into / out
    Windows / Linux
    F11
    ShiftF11
    macOS
    F11
    ⇧F11

← All quick references