VS Code macOS Shortcuts

169 shortcuts · View all OS →

WindowsmacOSLinuxCompare all
VS Code macOS keyboard shortcuts
ActionmacOS Shortcut
General
Show Command Palette⌘⇧P
Quick Open / Go to File⌘P
New Window⌘⇧N
Close Window⌘⇧W
User Settings⌘,
Keyboard Shortcuts⌘K⌘S
Select color theme⌘K⌘T
Open Chat view⌘⌃I
Open Chat in agent mode⌘⇧I
Open Quick Chat⌘⌥⇧L
Open language model picker⌘⌥.
Accept inline suggestionTab
Run build task⌘⇧B
Open inline chat in editor⌘I
Open chat agent picker⌘.
Start a new chat session⌘N
Editing
Cut line (empty selection)⌘X
Copy line (empty selection)⌘C
Move line up/down⌥↑/↓
Copy line up/down⌥⇧↑/↓
Delete line⌘⇧K
Insert line below⌘Enter
Insert line above⌘⇧Enter
Jump to matching bracket⌘⇧\
Indent / outdent line⌘]⌘[
Go to beginning of lineHome
Go to end of lineEnd
Go to beginning of file⌘↑
Go to end of file⌘↓
Toggle line comment⌘/
Toggle block comment⇧⌥A
Undo⌘Z
Redo⌘⇧Z
Format document⌥⇧F
Format selection⌘K⌘F
Toggle word wrap⌥Z
Show parameter hints⌘⇧Space
Select all occurrences of find match⌥Enter
Move line up⌥↑
Move line down⌥↓
Copy line down⌥⇧↓
Paste⌘V
Copy line up⌥⇧↑
Move last selection to next find match⌘K⌘D
Scroll one line down⌃PageDown
Scroll one line up⌃PageUp
Scroll one page down⌘PageDown
Scroll one page up⌘PageUp
Toggle folding of current region⌘K⌘L
Fold all nested regions⌘K⌘[
Unfold all nested regions⌘K⌘]
Fold all regions⌘K⌘0
Unfold all regions⌘K⌘J
Add line comment⌘K⌘C
Remove line comment⌘K⌘U
Replace with previous value⌘⇧,
Expand syntax selection⌘⌃⇧→
Shrink syntax selection⌘⌃⇧←
Trim trailing whitespace⌘K⌘X
Change file language mode⌘KM
Fold current region⌥⌘[
Unfold current region⌥⌘]
Toggle Tab focus mode⌃⇧M
Trigger suggestions⌃Space
Show quick fixes⌘.
Rename symbolF2
Replace with next value⇧⌘.
Multi-cursor & Selection
Insert cursor above/below⌥⌘↑/↓
Undo last cursor⌘U
Select all occurrences of current selection⌘⇧L
Select all occurrences of current word⌘F2
Add selection to next find match⌘D
Select current line⌘L
Column (box) selection⇧⌥drag
Insert cursor above⌘⌥↑
Insert cursors at selected line ends⌥⇧I
Search & Replace
Find⌘F
Replace⌥⌘F
Find next/previous⌘G⌘⇧G
Toggle case-sensitive⌥⌘C
Toggle regex⌥⌘R
Toggle whole word⌥⌘W
Search across files⌘⇧F
Replace across files⌘⇧H
Toggle search details⌘⇧J
Find next match in find widgetEnter
Find previous match in find widget⇧Enter
Focus next search resultF4
Focus previous search result⇧F4
Next search term in Search view↓
Previous search term in Search view↑
Focus Search Editor inputEsc
Search again in Search Editor⌘⇧R
Delete file results from Search Editor⌘⇧Backspace
Open search results in Search Editor⌘Enter
Navigation
Go to line⌃G
Go to symbol in file⌘⇧O
Go to symbol in workspace⌘T
Go to definitionF12
Peek definition⌥F12
Open definition to side⌘KF12
Go back / forward⌃-⌃⇧-
Go to next error/warningF8
Show all references⇧F12
Navigate editor group history⌃Tab
Go to previous error or warning⇧F8
Focus breadcrumbs⌘⇧;
Go back in Quick Input⌃-
Focus and select breadcrumbs⇧⌘.
Editor Management
Close editor⌘W
Close folder⌘KF
Split editor⌘\
Focus 1st/2nd/3rd editor group⌘1/2/3
Move editor left/right⌘⇧PgUp/PgDn
New editor group to the left/right⌘K←/→
Focus first editor group⌘1
Focus second editor group⌘2
Focus third editor group⌘3
Focus editor group on the left⌘K⌘←
Focus editor group on the right⌘K⌘→
Move editor left⌘K⌘⇧←
Move editor right⌘K⌘⇧→
Move active editor group left⌘K←
Move active editor group right⌘K→
Move editor into next group⌘⌃→
Move editor into previous group⌘⌃←
File Management
New file⌘N
Open file⌘O
Save⌘S
Save as⌘⇧S
Save all⌘⌥S
Close all editors⌘K⌘W
Reopen closed editor⌘⇧T
Close editor group⌘KW
Keep preview editor open⌘KEnter
Copy active file path⌘KP
Reveal active file in system file manager⌘KR
Display
Toggle full screen⌃⌘F
Toggle sidebar⌘B
Toggle terminal⌃`
Toggle problems panel⌘⇧M
Zoom in/out⌘=⌘-
Reset zoom⌘Numpad0(numerickeypad)
Zen mode⌘KZ
Show Source Control view⌃⇧G
Show Extensions view⌘⇧X
Leave Zen ModeEscEsc
Quickly open a view⌃Q
Open preview to the side⌘KV
Show or focus Explorer⇧⌘E
Show Run view⇧⌘D
Show Output panel⇧⌘U
Toggle Markdown preview⇧⌘V
Debug
Toggle breakpointF9
Start / continue debugF5
Stop debug⇧F5
Step overF10
Step intoF11
Step out⇧F11
Show hover⌘K⌘I
Start without debugging⌃F5
Pause debuggerF6
Integrated Terminal
Create new terminal⌃⇧`
Copy selection⌘C
Scroll up/down⌘↑/↓
Scroll page up/down⇧PgUp/PgDn
Scroll to top/bottom⌘Home/End
Open external terminal⌘⇧C
Open inline chat in terminal⌘I