VS Code

VS Code Keyboard Shortcuts

Complete VS Code keyboard shortcuts reference - editing, navigation, search, debugging, terminal, and multi-cursor shortcuts.

General

ShortcutAction
Ctrl+Shift+P / Cmd+Shift+PCommand Palette
Ctrl+P / Cmd+PQuick Open file
Ctrl+Shift+N / Cmd+Shift+NNew window
Ctrl+W / Cmd+WClose editor
Ctrl+Shift+W / Cmd+Shift+WClose window
Ctrl+, / Cmd+,Open Settings
Ctrl+K Ctrl+S / Cmd+K Cmd+SKeyboard Shortcuts editor
Ctrl+Shift+X / Cmd+Shift+XExtensions panel
Ctrl+B / Cmd+BToggle sidebar
Ctrl+J / Cmd+JToggle panel (terminal/output)
Ctrl+Shift+E / Cmd+Shift+EExplorer panel
Ctrl+K Z / Cmd+K ZZen Mode
Ctrl+\ / Cmd+\Split editor

Editing

ShortcutAction
Ctrl+X / Cmd+XCut line (empty selection)
Ctrl+C / Cmd+CCopy line (empty selection)
Ctrl+Shift+K / Cmd+Shift+KDelete line
Alt+Up / Opt+UpMove line up
Alt+Down / Opt+DownMove line down
Shift+Alt+Up / Shift+Opt+UpCopy line up
Shift+Alt+Down / Shift+Opt+DownCopy line down
Ctrl+Enter / Cmd+EnterInsert line below
Ctrl+Shift+Enter / Cmd+Shift+EnterInsert line above
Ctrl+] / Cmd+]Indent line
Ctrl+[ / Cmd+[Outdent line
Ctrl+/ / Cmd+/Toggle line comment
Shift+Alt+A / Shift+Opt+AToggle block comment
Ctrl+Shift+\ / Cmd+Shift+\Jump to matching bracket
Ctrl+D / Cmd+DSelect next occurrence
Ctrl+Shift+L / Cmd+Shift+LSelect all occurrences
Ctrl+H / Cmd+HFind and replace
Ctrl+Z / Cmd+ZUndo
Ctrl+Shift+Z / Cmd+Shift+ZRedo
Alt+Z / Opt+ZToggle word wrap
ShortcutAction
Ctrl+G / Cmd+GGo to line
Ctrl+P / Cmd+PGo to file
Ctrl+Shift+O / Cmd+Shift+OGo to symbol in file
Ctrl+T / Cmd+TGo to symbol in workspace
F12Go to definition
Alt+F12 / Opt+F12Peek definition
Shift+F12Find all references
Ctrl+Shift+F12 / Cmd+Shift+F12Peek references
Ctrl+Tab / Ctrl+TabSwitch between open editors
Ctrl+- / Cmd+-Navigate back
Ctrl+Shift+- / Cmd+Shift+-Navigate forward
Ctrl+Home / Cmd+UpGo to beginning of file
Ctrl+End / Cmd+DownGo to end of file
Ctrl+Shift+M / Cmd+Shift+MShow Problems panel
F8Go to next error/warning
Ctrl+K Ctrl+Q / Cmd+K Cmd+QGo to last edit location
ShortcutAction
Ctrl+F / Cmd+FFind in file
Ctrl+H / Cmd+HReplace in file
Ctrl+Shift+F / Cmd+Shift+FSearch across files
Ctrl+Shift+H / Cmd+Shift+HReplace across files
F3 / Cmd+GFind next
Shift+F3 / Cmd+Shift+GFind previous
Alt+Enter / Opt+EnterSelect all matches
Alt+C / Opt+CToggle case-sensitive
Alt+R / Opt+RToggle regex
Alt+W / Opt+WToggle whole word

Debug

ShortcutAction
F5Start / Continue debugging
Shift+F5Stop debugging
Ctrl+Shift+F5 / Cmd+Shift+F5Restart debugging
F9Toggle breakpoint
F10Step over
F11Step into
Shift+F11Step out
Ctrl+Shift+D / Cmd+Shift+DDebug panel
Ctrl+K Ctrl+I / Cmd+K Cmd+IShow hover (debug info)

Terminal

ShortcutAction
Ctrl+` / Cmd+`Toggle integrated terminal
Ctrl+Shift+` / Cmd+Shift+`Create new terminal
Ctrl+Shift+5 / Cmd+Shift+5Split terminal
Ctrl+PgUp / Cmd+Shift+[Previous terminal
Ctrl+PgDn / Cmd+Shift+]Next terminal
Ctrl+C / Cmd+CCopy (or kill process)
Ctrl+V / Cmd+VPaste into terminal
Ctrl+Up / Cmd+UpScroll up
Ctrl+Down / Cmd+DownScroll down

Multi-Cursor

ShortcutAction
Alt+Click / Opt+ClickAdd cursor at click position
Ctrl+Alt+Up / Cmd+Opt+UpAdd cursor above
Ctrl+Alt+Down / Cmd+Opt+DownAdd cursor below
Ctrl+D / Cmd+DAdd selection to next find match
Ctrl+Shift+L / Cmd+Shift+LAdd cursors to all occurrences
Ctrl+U / Cmd+UUndo last cursor operation
Shift+Alt+I / Shift+Opt+IAdd cursors to end of each selected line
Ctrl+K Ctrl+D / Cmd+K Cmd+DSkip current and select next match