Visual Studio Code Keyboard Shortcuts for macOS

VS Code Keyboard Shortcuts for MacOS. View hotkeys online or download free PDF Cheat Sheet to work faster and navigate VS Code efficiently on MacOS.
Show table of contentsPrint shortcutsSign in to download the PDF It takes a few seconds.
Sign in →
Sign in to save this shortcuts set to favorites.
Sign in →
Key label style

General

Show Command Palette
Cmd+Shift+P
or
Cmd+Shift+F1
Quick Open, Go to File…
Cmd+P
New window/instance
Cmd+Shift+N
Close window/instance
Cmd+W
User Settings
Cmd+,
Keyboard Shortcuts
Cmd+K,Cmd+S

Basic editing

Cut line (empty selection)
Cmd+X
Copy line (empty selection)
Cmd+C
Move line down/up
Opt+Down
or
Opt+Up
Copy line down/up
Opt+Shift+Down
or
Opt+Shift+Up
Delete line
Cmd+Shift+K
Insert line below/above
Cmd+Return
or
Cmd+Shift+Return
Jump to matching bracket
Cmd+Shift+\
Indent/outdent line
Cmd+]
or
Cmd+[
Go to beginning/end of line
Home
or
End
Go to beginning/end of file
Cmd+Up
or
Cmd+Down
Scroll line up/down
Ctrl+Pg Up
or
Ctrl+Pg Dn
Scroll page up/down
Cmd+Pg Up
or
Cmd+Pg Dn
Fold/unfold region
Cmd+Opt+[
or
Cmd+Opt+]
Fold/unfold all subregions
Cmd+K,Cmd+[
or
Cmd+K,Cmd+]
Fold/unfold all regions
Cmd+K,Cmd+0
or
Cmd+K,Cmd+J
Add line comment
Cmd+K,Cmd+C
Remove line comment
Cmd+K,Cmd+U
Toggle line comment
Cmd+/
Toggle block comment
Opt+Shift+A
Toggle word wrap
Opt+Z

Multi-cursor and selection

Insert cursor
Opt,Click
Insert cursor above
Cmd+Opt+Up
Insert cursor below
Cmd+Opt+Down
Undo last cursor operation
Cmd+U
Insert cursor at end of each line selected
Opt+Shift+I
Select current line
Cmd+L
Select all occurrences of current selection
Cmd+Shift+L
Select all occurrences of current word
Cmd+F2
Expand / shrink selection
Cmd+Ctrl+Shift+Right
or
Cmd+Ctrl+Shift+Left
Column (box) selection
Opt+Shift+Drag
Column (box) selection up/down
Cmd+Opt+Shift+Up
or
Cmd+Opt+Shift+Down
Column (box) selection left/right
Cmd+Opt+Shift+Left
or
Cmd+Opt+Shift+Right
Column (box) selection page up
Cmd+Opt+Shift+Pg Up
Column (box) selection page down
Cmd+Opt+Shift+Pg Dn

Search and replace

Find
Cmd+F
Replace
Cmd+Opt+F
Find next/previous
Cmd+G
or
Cmd+Shift+G
Select all occurrences of Find match
Opt+Return
Add selection to next Find match
Cmd+D
Move last selection to next Find match
Cmd+K,Cmd+D

Rich languages editing

Trigger suggestion
Ctrl+Space
or
Cmd+I
Trigger parameter hints
Cmd+Shift+Space
Format document
Opt+Shift+F
Format selection
Cmd+K,Cmd+F
Go to Definition
F12
Peek Definition
Opt+F12
Open Definition to the side
Cmd+K,F12
Quick Fix
Cmd+.
Show References
Shift+F12
Rename Symbol
F2
Trim trailing whitespace
Cmd+K,Cmd+X
Change file language
Cmd+K,M

Editor management

Close editor
Cmd+W
Close folder
Cmd+K,F
Split editor
Cmd+\
Focus into 1st, 2nd, 3rd editor group
Cmd+1
or
Cmd+2
or
Cmd+3
Focus into previous/next editor group
Cmd+K,Cmd+Left
or
Cmd+K,Cmd+Right
Move editor left/right
Cmd+K,Cmd+Shift+Left
or
Cmd+K,Cmd+Shift+Right
Move active editor group
Cmd+K,Left
or
Cmd+K,Right

File management

New File
Cmd+N
Open File...
Cmd+O
Save
Cmd+S
Save As...
Cmd+Shift+S
Save All
Cmd+Opt+S
Close
Cmd+W
Close All
Cmd+K,Cmd+W
Reopen closed editor
Cmd+Shift+T
Keep preview mode editor open
Cmd+K,Return
Open next / previous
Ctrl+Tab
or
Ctrl+Shift+Tab
Copy path of active file
Cmd+K,P
Reveal active file in Finder
Cmd+K,R
Show active file in new window/instance
Cmd+K,O

Display

Toggle full screen
Cmd+Ctrl+F
Toggle editor layout (horizontal/vertical)
Cmd+Opt+0
Zoom in/out
Cmd+=
or
Cmd+Shift+-
Toggle Sidebar visibility
Cmd+B
Show Explorer / Toggle focus
Cmd+Shift+E
Show Source Control
Ctrl+Shift+G
Show Debug
Cmd+Shift+D
Show Extensions
Cmd+Shift+X
Replace in files
Cmd+Shift+H
Toggle Search details
Cmd+Shift+J
Show Output panel
Cmd+Shift+U
Open Markdown preview
Cmd+Shift+V
Open Markdown preview to the side
Cmd+K,V

Debug

Toggle breakpoint
F9
Start/Continue
F5
Step into/ out
F11
or
Shift+F11
Step over
F10
Stop
Shift+F5
Show hover
Cmd+K,Cmd+I

Integrated terminal

Show integrated terminal
Ctrl+`
Create new terminal
Ctrl+Shift+`
Copy selection
Cmd+C
Scroll up/down
Cmd+Up
or
Cmd+Down
Scroll page up/down
Pg Up
or
Pg Dn
Scroll to top/bottom
Cmd+Home
or
Cmd+End

Need more than shortcuts?
Visit the Visual Studio Code app page for an overview and helpful links.

Want to suggest a new app, report a bug, or get help? Email us at info@hkeys.appCopy email.

For anything else or just a quick hello, write to us at info@hkeys.appCopy email.