› VS Code

VS Code Shortcuts

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

Source: Official documentation · Dataset date 2026-06

80
Shortcuts
10
Categories

Cheat sheet guide

VS Code shortcuts worth learning first

This page collects 81 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

6 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

Editing

19 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+↓
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
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

Multi-cursor & Selection

7 shortcuts
Insert cursor above/below
AltCtrl↑/↓
Alt+Ctrl+↑ · Alt+Ctrl+↓ · Opt+Cmd+↑ · Opt+Cmd+↓
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

Search & Replace

8 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

Navigation

9 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
Open definition to side
CtrlKF12
Ctrl+K F12 · Cmd+K F12
Go back / forward
Alt←Alt→
Alt+← · Alt+→ · Ctrl+- · Ctrl+Shift+-
Go to next error/warning
F8
F8
Show all references
AltShiftF12
Alt+Shift+F12 · Shift+F12

Editor Management

6 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 →

File Management

6 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

Display

7 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
Ctrl0
Ctrl+0 · Cmd+0
Zen mode
CtrlKZ
Ctrl+K Z · Cmd+K Z

Debug

7 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

Integrated Terminal

5 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

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.