› VS Code

VS Code Shortcuts

Visual Studio Code keyboard shortcuts for Windows, macOS and Linux. v1.88

Source: Official documentation · Dataset date 2026-06

Default keymap on a US keyboard. Editor, terminal and Chat commands depend on focus. Chat features must be enabled.

169
Shortcuts
10
Categories

Cheat sheet guide

VS Code shortcuts worth learning first

This page collects 170 searchable VS Code keyboard shortcuts across 10 categories. Start with the shortcuts for General, Editing, Multi-cursor & Selection, Search & Replace, then print the cheat sheet once the important ones are worth keeping nearby.

  • Show Command PaletteCtrlShiftP
  • Cut line (empty selection)CtrlX
  • Insert cursor above/belowAltCtrl↑/↓
  • FindCtrlF
  • Go to lineCtrlG
  • Close editorCtrlW

General

16 shortcuts
Show Command Palette
CtrlShiftP
Ctrl+Shift+P · Cmd+Shift+P
Quick Open / Go to File
CtrlP
Ctrl+P · Cmd+P
New Window
CtrlShiftN
Ctrl+Shift+N · Cmd+Shift+N
Close Window
CtrlShiftW
Ctrl+Shift+W · Cmd+Shift+W
User Settings
Ctrl,
Ctrl+, · Cmd+,
Keyboard Shortcuts
CtrlKCtrlS
Ctrl+K Ctrl+S · Cmd+K Cmd+S
Select color theme
CtrlKCtrlT
Ctrl+K Ctrl+T · Cmd+K Cmd+T
Open Chat view
CtrlAltI
Ctrl+Alt+I · Cmd+Ctrl+I
Open Chat in agent mode
CtrlShiftI
Ctrl+Shift+I · Cmd+Shift+I · Ctrl+Alt+Shift+I
Open Quick Chat
CtrlAltShiftL
Ctrl+Alt+Shift+L · Cmd+Opt+Shift+L
Open language model picker
CtrlAlt.
Ctrl+Alt+. · Cmd+Opt+.
Accept inline suggestion
—
Tab
Run build task
CtrlShiftB
Ctrl+Shift+B · Cmd+Shift+B
Open inline chat in editor
CtrlI
Ctrl+I · Cmd+I
Open chat agent picker
Ctrl.
Ctrl+. · Cmd+.
Start a new chat session
CtrlN
Ctrl+N · Cmd+N

Editing

51 shortcuts
Cut line (empty selection)
CtrlX
Ctrl+X · Cmd+X
Copy line (empty selection)
CtrlC
Ctrl+C · Cmd+C
Move line up/down
Alt↑/↓
Alt+↑ · Alt+↓ · Opt+↑ · Opt+↓
Copy line up/down
AltShift↑/↓
Alt+Shift+↑ · Alt+Shift+↓ · Opt+Shift+↑ · Opt+Shift+↓ · Ctrl+Shift+Alt+↑ · Ctrl+Shift+Alt+↓
Delete line
CtrlShiftK
Ctrl+Shift+K · Cmd+Shift+K
Insert line below
CtrlEnter
Ctrl+Enter · Cmd+Enter
Insert line above
CtrlShiftEnter
Ctrl+Shift+Enter · Cmd+Shift+Enter
Jump to matching bracket
CtrlShift\
Ctrl+Shift+\ · Cmd+Shift+\
Indent / outdent line
Ctrl]Ctrl[
Ctrl+] · Ctrl+[ · Cmd+] · Cmd+[
Go to beginning of line
Home
Home
Go to end of line
End
End
Go to beginning of file
CtrlHome
Ctrl+Home · Cmd+↑
Go to end of file
CtrlEnd
Ctrl+End · Cmd+↓
Toggle line comment
Ctrl/
Ctrl+/ · Cmd+/
Toggle block comment
AltShiftA
Alt+Shift+A · Shift+Opt+A · Ctrl+Shift+A
Undo
CtrlZ
Ctrl+Z · Cmd+Z
Redo
CtrlY
Ctrl+Y · Cmd+Shift+Z
Format document
AltShiftF
Alt+Shift+F · Opt+Shift+F · Ctrl+Shift+I
Format selection
CtrlKCtrlF
Ctrl+K Ctrl+F · Cmd+K Cmd+F
Toggle word wrap
AltZ
Alt+Z · Opt+Z
Show parameter hints
CtrlShiftSpace
Ctrl+Shift+Space · Cmd+Shift+Space
Select all occurrences of find match
AltEnter
Alt+Enter · Opt+Enter
Move line up
Alt↑
Alt+↑ · Opt+↑
Move line down
Alt↓
Alt+↓ · Opt+↓
Copy line down
AltShift↓
Alt+Shift+↓ · Opt+Shift+↓ · Ctrl+Alt+Shift+↓
Paste
CtrlV
Ctrl+V · Cmd+V
Copy line up
AltShift↑
Alt+Shift+↑ · Opt+Shift+↑ · Ctrl+Alt+Shift+↑
Move last selection to next find match
CtrlKCtrlD
Ctrl+K Ctrl+D · Cmd+K Cmd+D
Scroll one line down
Ctrl↓
Ctrl+↓ · Ctrl+PageDown
Scroll one line up
Ctrl↑
Ctrl+↑ · Ctrl+PageUp
Scroll one page down
AltPageDown
Alt+PageDown · Cmd+PageDown
Scroll one page up
AltPageUp
Alt+PageUp · Cmd+PageUp
Toggle folding of current region
CtrlKCtrlL
Ctrl+K Ctrl+L · Cmd+K Cmd+L
Fold all nested regions
CtrlKCtrl[
Ctrl+K Ctrl+[ · Cmd+K Cmd+[
Unfold all nested regions
CtrlKCtrl]
Ctrl+K Ctrl+] · Cmd+K Cmd+]
Fold all regions
CtrlKCtrl0
Ctrl+K Ctrl+0 · Cmd+K Cmd+0
Unfold all regions
CtrlKCtrlJ
Ctrl+K Ctrl+J · Cmd+K Cmd+J
Add line comment
CtrlKCtrlC
Ctrl+K Ctrl+C · Cmd+K Cmd+C
Remove line comment
CtrlKCtrlU
Ctrl+K Ctrl+U · Cmd+K Cmd+U
Replace with previous value
CtrlShift,
Ctrl+Shift+, · Cmd+Shift+,
Expand syntax selection
AltShift→
Alt+Shift+→ · Cmd+Ctrl+Shift+→
Shrink syntax selection
AltShift←
Alt+Shift+← · Cmd+Ctrl+Shift+←
Trim trailing whitespace
CtrlKCtrlX
Ctrl+K Ctrl+X · Cmd+K Cmd+X
Change file language mode
CtrlKM
Ctrl+K M · Cmd+K M
Fold current region
CtrlShift[
Ctrl+Shift+[ · Opt+Cmd+[
Unfold current region
CtrlShift]
Ctrl+Shift+] · Opt+Cmd+]
Toggle Tab focus mode
CtrlM
Ctrl+M · Ctrl+Shift+M
Trigger suggestions
CtrlSpace
Ctrl+Space
Show quick fixes
Ctrl.
Ctrl+. · Cmd+.
Rename symbol
F2
F2
Replace with next value
CtrlShift.
Ctrl+Shift+. · Shift+Cmd+.

Multi-cursor & Selection

9 shortcuts
Insert cursor above/below
AltCtrl↑/↓
Alt+Ctrl+↑ · Alt+Ctrl+↓ · Opt+Cmd+↑ · Opt+Cmd+↓ · Shift+Alt+↑ · Shift+Alt+↓
Undo last cursor
CtrlU
Ctrl+U · Cmd+U
Select all occurrences of current selection
CtrlShiftL
Ctrl+Shift+L · Cmd+Shift+L
Select all occurrences of current word
CtrlF2
Ctrl+F2 · Cmd+F2
Add selection to next find match
CtrlD
Ctrl+D · Cmd+D
Select current line
CtrlL
Ctrl+L · Cmd+L
Column (box) selection
ShiftAltdrag
Insert cursor above
CtrlAlt↑
Ctrl+Alt+↑ · Cmd+Opt+↑ · Alt+Shift+↑
Insert cursors at selected line ends
AltShiftI
Alt+Shift+I · Opt+Shift+I

Search & Replace

19 shortcuts
Find
CtrlF
Ctrl+F · Cmd+F
Replace
CtrlH
Ctrl+H · Opt+Cmd+F
Find next/previous
F3ShiftF3
F3 · Shift+F3 · Cmd+G · Cmd+Shift+G
Toggle case-sensitive
AltC
Alt+C · Opt+Cmd+C
Toggle regex
AltR
Alt+R · Opt+Cmd+R
Toggle whole word
AltW
Alt+W · Opt+Cmd+W
Search across files
CtrlShiftF
Ctrl+Shift+F · Cmd+Shift+F
Replace across files
CtrlShiftH
Ctrl+Shift+H · Cmd+Shift+H
Toggle search details
CtrlShiftJ
Ctrl+Shift+J · Cmd+Shift+J
Find next match in find widget
—
Enter
Find previous match in find widget
ShiftEnter
Shift+Enter
Focus next search result
—
F4
Focus previous search result
ShiftF4
Shift+F4
Next search term in Search view
↓
Previous search term in Search view
↑
Focus Search Editor input
—
Esc
Search again in Search Editor
CtrlShiftR
Ctrl+Shift+R · Cmd+Shift+R
Delete file results from Search Editor
CtrlShiftBackspace
Ctrl+Shift+Backspace · Cmd+Shift+Backspace
Open search results in Search Editor
AltEnter
Alt+Enter · Cmd+Enter

Navigation

14 shortcuts
Go to line
CtrlG
Ctrl+G
Go to symbol in file
CtrlShiftO
Ctrl+Shift+O · Cmd+Shift+O
Go to symbol in workspace
CtrlT
Ctrl+T · Cmd+T
Go to definition
F12
F12
Peek definition
AltF12
Alt+F12 · Opt+F12 · Ctrl+Shift+F10
Open definition to side
CtrlKF12
Ctrl+K F12 · Cmd+K F12
Go back / forward
Alt←Alt→
Alt+← · Alt+→ · Ctrl+- · Ctrl+Shift+- · Ctrl+Alt+- · Ctrl+Shift+Alt+-
Go to next error/warning
F8
F8
Show all references
AltShiftF12
Alt+Shift+F12 · Shift+F12
Navigate editor group history
CtrlTab
Ctrl+Tab
Go to previous error or warning
ShiftF8
Shift+F8
Focus breadcrumbs
CtrlShift;
Ctrl+Shift+; · Cmd+Shift+;
Go back in Quick Input
Alt←
Alt+← · Ctrl+- · Ctrl+Alt+-
Focus and select breadcrumbs
CtrlShift.
Ctrl+Shift+. · Shift+Cmd+.

Editor Management

17 shortcuts
Close editor
CtrlW
Ctrl+W · Cmd+W
Close folder
CtrlKF
Ctrl+K F · Cmd+K F
Split editor
Ctrl\
Ctrl+\ · Cmd+\
Focus 1st/2nd/3rd editor group
Ctrl1/2/3
Ctrl+1 · Ctrl+2 · Ctrl+3 · Cmd+1 · Cmd+2 · Cmd+3
Move editor left/right
CtrlShiftPgUp/PgDn
Ctrl+Shift+PgUp · Ctrl+Shift+PgDn · Cmd+Shift+PgUp · Cmd+Shift+PgDn
New editor group to the left/right
CtrlK←/→
Ctrl+K ← · Ctrl+K → · Cmd+K ← · Cmd+K →
Focus first editor group
Ctrl1
Ctrl+1 · Cmd+1
Focus second editor group
Ctrl2
Ctrl+2 · Cmd+2
Focus third editor group
Ctrl3
Ctrl+3 · Cmd+3
Focus editor group on the left
CtrlKCtrl←
Ctrl+K Ctrl+← · Cmd+K Cmd+←
Focus editor group on the right
CtrlKCtrl→
Ctrl+K Ctrl+→ · Cmd+K Cmd+→
Move editor left
CtrlShiftPageUp
Ctrl+Shift+PageUp · Cmd+K Cmd+Shift+←
Move editor right
CtrlShiftPageDown
Ctrl+Shift+PageDown · Cmd+K Cmd+Shift+→
Move active editor group left
CtrlK←
Ctrl+K ← · Cmd+K ←
Move active editor group right
CtrlK→
Ctrl+K → · Cmd+K →
Move editor into next group
CtrlAlt→
Ctrl+Alt+→ · Cmd+Ctrl+→
Move editor into previous group
CtrlAlt←
Ctrl+Alt+← · Cmd+Ctrl+←

File Management

11 shortcuts
New file
CtrlN
Ctrl+N · Cmd+N
Open file
CtrlO
Ctrl+O · Cmd+O
Save
CtrlS
Ctrl+S · Cmd+S
Save as
CtrlShiftS
Ctrl+Shift+S · Cmd+Shift+S
Save all
CtrlKS
Ctrl+K S · Cmd+Opt+S
Revert file
No default shortcut
Close all editors
CtrlKCtrlW
Ctrl+K Ctrl+W · Cmd+K Cmd+W
Reopen closed editor
CtrlShiftT
Ctrl+Shift+T · Cmd+Shift+T
Close editor group
CtrlKW
Ctrl+K W · Cmd+K W
Keep preview editor open
CtrlKEnter
Ctrl+K Enter · Cmd+K Enter
Copy active file path
CtrlKP
Ctrl+K P · Cmd+K P
Reveal active file in system file manager
CtrlKR
Ctrl+K R · Cmd+K R

Display

16 shortcuts
Toggle full screen
F11
F11 · Ctrl+Cmd+F
Toggle sidebar
CtrlB
Ctrl+B · Cmd+B
Toggle terminal
Ctrl`
Ctrl+`
Toggle problems panel
CtrlShiftM
Ctrl+Shift+M · Cmd+Shift+M
Zoom in/out
Ctrl=Ctrl-
Ctrl+= · Ctrl+- · Cmd+= · Cmd+-
Reset zoom
CtrlNumpad0(numerickeypad)
Ctrl+Numpad0 · Cmd+Numpad0
Zen mode
CtrlKZ
Ctrl+K Z · Cmd+K Z
Show Source Control view
CtrlShiftG
Ctrl+Shift+G
Show Extensions view
CtrlShiftX
Ctrl+Shift+X · Cmd+Shift+X
Leave Zen Mode
—
Esc Esc
Quickly open a view
CtrlQ
Ctrl+Q
Open preview to the side
CtrlKV
Ctrl+K V · Cmd+K V
Show or focus Explorer
CtrlShiftE
Ctrl+Shift+E · Shift+Cmd+E
Show Run view
CtrlShiftD
Ctrl+Shift+D · Shift+Cmd+D
Show Output panel
CtrlShiftU
Ctrl+Shift+U · Shift+Cmd+U · Ctrl+K Ctrl+H
Toggle Markdown preview
CtrlShiftV
Ctrl+Shift+V · Shift+Cmd+V

Debug

9 shortcuts
Toggle breakpoint
F9
F9
Start / continue debug
F5
F5
Stop debug
ShiftF5
Shift+F5
Step over
F10
F10
Step into
F11
F11
Step out
ShiftF11
Shift+F11
Show hover
CtrlKCtrlI
Ctrl+K Ctrl+I · Cmd+K Cmd+I
Start without debugging
CtrlF5
Ctrl+F5
Pause debugger
—
F6

Integrated Terminal

7 shortcuts
Create new terminal
CtrlShift`
Ctrl+Shift+`
Copy selection
CtrlC
Ctrl+C · Cmd+C
Scroll up/down
Ctrl↑/↓
Ctrl+↑ · Ctrl+↓ · Cmd+↑ · Cmd+↓
Scroll page up/down
ShiftPgUp/PgDn
Shift+PgUp · Shift+PgDn
Scroll to top/bottom
CtrlHome/End
Ctrl+Home · Ctrl+End · Cmd+Home · Cmd+End
Open external terminal
CtrlShiftC
Ctrl+Shift+C · Cmd+Shift+C
Open inline chat in terminal
CtrlI
Ctrl+I · Cmd+I

Documentation check for this addition

89 additional actions were checked against the official documentation on 2026-11-02, 2026-11-06. Existing actions were retained. These are documentary checks, not tests in installed applications. A dash means this batch does not provide a verified binding for that system. Context such as PDF viewer, text field or address bar is part of the action.

VS Code

Frequently asked questions

What is the fastest way to find VS Code shortcuts on this page?

Use the search box or press /, then type an action such as show command palette.

Can I print this VS Code shortcut cheat sheet?

Yes. Use the Print / PDF button or your browser print command to save a compact cheat sheet.

Which operating systems are included for VS Code?

This reference includes shortcuts for Windows · macOS · Linux. Availability depends on the action and app version.

See also

Explore shortcuts by key

Key lookup

Compare shortcuts

VS Code / Cursor · VS Code / Sublime Text · VS Code / Vim · VS Code / Zed

No shortcuts match your search.