Visual Studio Code
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.
Do you want to
edit
or report
this page?
Table of Contents
Ctrl Shift P or F1
|
⇧ ⌘ P or F1
|
Ctrl Shift P or F1
|
Show Command Palette |
Ctrl P
|
⌘ P
|
Ctrl P
|
Quick Open, Go to File… |
Ctrl Shift N
|
⇧ ⌘ N
|
Ctrl Shift N
|
New window/instance |
Ctrl Shift W
|
⌘ W
|
Ctrl Shift W
|
Close window/instance |
Ctrl ,
|
⌘ ,
|
Ctrl ,
|
User Settings |
Ctrl K Ctrl S
|
⌘ K ⌘ S
|
Ctrl K Ctrl S
|
Keyboard Shortcuts |
Ctrl C
|
⌘ C
|
Ctrl C
|
Copy line (empty selection) |
Ctrl Shift K
|
⇧ ⌘ K
|
Ctrl Shift K
|
Delete Line |
Ctrl Enter
|
⌘ Enter
|
Ctrl Enter
|
Insert Line Below |
Ctrl Shift Enter
|
⇧ ⌘ Enter
|
Ctrl Shift Enter
|
Insert Line Above |
Alt Down
|
⌥ ↓
|
Alt Down
|
Move Line Down |
Alt Up
|
⌥ ↑
|
Alt Up
|
Move Line Up |
Shift Alt Down
|
⇧ ⌥ ↓
|
Shift Alt Down
|
Copy Line Down |
Shift Alt Up
|
⇧ ⌥ ↑
|
Shift Alt Up
|
Copy Line Up |
Ctrl D
|
⌘ D
|
Ctrl D
|
Add Selection To Next Find Match |
Ctrl K Ctrl D
|
⌘ K ⌘ D
|
Ctrl K Ctrl D
|
Move Last Selection To Next Find Match |
Ctrl U
|
⌘ U
|
Ctrl U
|
Undo last cursor operation |
Shift Alt I
|
⇧ ⌥ I
|
Shift Alt I
|
Insert cursor at end of each line selected |
Ctrl Shift L
|
⇧ ⌘ L
|
Ctrl Shift L
|
Select all occurrences of current selection |
Ctrl F2
|
⌘ F2
|
Ctrl F2
|
Select all occurrences of current word |
Ctrl I
|
⌘ I
|
Ctrl I
|
Select current line |
Ctrl Alt Down
|
⌥ ⌘ ↓
|
Ctrl Alt Down
|
Insert Cursor Below |
Ctrl Alt Up
|
⌥ ⌘ ↑
|
Ctrl Alt Up
|
Insert Cursor Above |
Ctrl Shift \
|
⇧ ⌘ \
|
Ctrl Shift \
|
Jump to matching bracket |
Ctrl ]
|
⌘ ]
|
Ctrl ]
|
Indent Line |
Ctrl [
|
⌘ [
|
Ctrl [
|
Outdent Line |
Home
|
Home
|
Home
|
Go to Beginning of Line |
End
|
End
|
End
|
Go to End of Line |
Ctrl End
|
⌘↓
|
Ctrl End
|
Go to End of File |
Ctrl Home
|
⌘↑
|
Ctrl Home
|
Go to Beginning of File |
Ctrl Down
|
⌃ Pagedown
|
Ctrl Down
|
Scroll Line Down |
Ctrl Up
|
⌃ Pageup
|
Ctrl Up
|
Scroll Line Up |
Alt Pagedown
|
⌘ Pagedown
|
Alt Pagedown
|
Scroll Page Down |
Alt Pageup
|
⌘ Pageup
|
Alt Pageup
|
Scroll Page Up |
Ctrl Shift [
|
⌥ ⌘ [
|
Ctrl Shift [
|
Fold (collapse) region |
Ctrl Shift ]
|
⌥ ⌘ ]
|
Ctrl Shift ]
|
Unfold (uncollapse) region |
Ctrl K Ctrl [
|
⌘ K ⌘ [
|
Ctrl K Ctrl [
|
Fold (collapse) all subregions |
Ctrl K Ctrl ]
|
⌘ K ⌘ ]
|
Ctrl K Ctrl ]
|
Unfold (uncollapse) all subregions |
Ctrl K Ctrl 0
|
⌘ K ⌘ 0
|
Ctrl K Ctrl 0
|
Fold (collapse) all regions |
Ctrl K Ctrl J
|
⌘ K ⌘ J
|
Ctrl K Ctrl J
|
Unfold (uncollapse) all regions |
Ctrl K Ctrl C
|
⌘ K ⌘ C
|
Ctrl K Ctrl C
|
Add Line Comment |
Ctrl K Ctrl U
|
⌘ K ⌘ U
|
Ctrl K Ctrl U
|
Remove Line Comment |
Ctrl /
|
⌘ /
|
Ctrl /
|
Toggle Line Comment |
Shift Alt A
|
⇧ ⌥ A
|
Shift Alt A
|
Toggle Block Comment |
Ctrl F
|
⌘ F
|
Ctrl F
|
Find |
Ctrl H
|
⌥ ⌘ F
|
Ctrl H
|
Replace |
F3
|
⌘ G
|
F3
|
Find Next |
Shift F3
|
⇧ ⌘ G
|
Shift F3
|
Find Previous |
Alt Enter
|
⌥ Enter
|
Alt Enter
|
Select All Occurrences of Find Match |
Alt C
|
⌥ ⌘ C
|
Alt C
|
Toggle Find Case Sensitive |
Alt R
|
⌥ ⌘ R
|
Alt R
|
Toggle Find Regex |
Alt W
|
⌥ ⌘ W
|
Alt W
|
Toggle Find Whole Word |
Ctrl M
|
⌃ ⇧ M
|
Ctrl M
|
Toggle Use of Tab Key for Setting Focus |
Unassigned
|
Unassigned
|
Unassigned
|
Toggle Render Whitespace |
Alt Z
|
⌥ Z
|
Alt Z
|
Toggle Word Wrap |
Ctrl Space
|
⌃ Space
|
Ctrl Space
|
Trigger Suggest |
Ctrl Shift Space
|
⇧ ⌘ Space
|
Ctrl Shift Space
|
Trigger Parameter Hints |
Shift Alt F
|
⇧ ⌥ F
|
Shift Alt F
|
Format Document |
Ctrl K Ctrl F
|
⌘ K ⌘ F
|
Ctrl K Ctrl F
|
Format Selection |
F12
|
F12
|
F12
|
Go to Definition |
Ctrl K Ctrl I
|
⌘ K ⌘ I
|
Ctrl K Ctrl I
|
Show Hover |
Alt F12
|
⌥ F12
|
Alt F12
|
Peek Definition |
Ctrl K F12
|
⌘ K F12
|
Ctrl K F12
|
Open Definition to the Side |
Ctrl .
|
⌘ .
|
Ctrl .
|
Quick Fix |
Shift F12
|
⇧ F12
|
Shift F12
|
Show References |
F2
|
F2
|
F2
|
Rename Symbol |
Ctrl Shift .
|
⇧ ⌘ .
|
Ctrl Shift .
|
Replace with Next Value |
Ctrl Shift ,
|
⇧ ⌘ ,
|
Ctrl Shift ,
|
Replace with Previous Value |
Shift Alt Right
|
⌃ ⇧ ⌘ →
|
Shift Alt Right
|
Expand AST Select |
Shift Alt Left
|
⌃ ⇧ ⌘ ←
|
Shift Alt Left
|
Shrink AST Select |
Ctrl K Ctrl X
|
⌘ K ⌘ X
|
Ctrl K Ctrl X
|
Trim Trailing Whitespace |
Ctrl K M
|
⌘ K M
|
Ctrl K M
|
Change Language Mode |
Ctrl T
|
⌘ T
|
Ctrl T
|
Show All Symbols |
Ctrl G
|
⌃ G
|
Ctrl G
|
Go to Line... |
Ctrl P
|
⌘ P
|
Ctrl P
|
Go to File..., Quick Open |
Ctrl Shift O
|
⇧ ⌘ O
|
Ctrl Shift O
|
Go to Symbol... |
Ctrl Shift M
|
⇧ ⌘ M
|
Ctrl Shift M
|
Show Problems |
F8
|
F8
|
F8
|
Go to Next Error or Warning |
Shift F8
|
⇧ F8
|
Shift F8
|
Go to Previous Error or Warning |
Ctrl Shift P
|
⇧ ⌘ P
|
Ctrl Shift P
|
Show All Commands |
Ctrl Shift Tab
|
⌃ ⇧ Tab
|
Ctrl Shift Tab
|
Navigate Editor Group History |
Alt Left
|
⌃ -
|
Alt Left
|
Go Back |
Alt Right
|
⌃ ⇧ -
|
Alt Right
|
Go Forward |
Ctrl W
|
⌘ W
|
Ctrl W
|
Close Window |
Ctrl F4
|
⌘ W
|
Ctrl F4
|
Close Editor |
Ctrl K F
|
⌘ K F
|
Ctrl K F
|
Close Folder |
Unassigned
|
Unassigned
|
Unassigned
|
Cycle Between Editor Groups |
Ctrl \
|
⌘ \
|
Ctrl \
|
Split Editor |
Ctrl 1
|
⌘ 1
|
Ctrl 1
|
Focus into First Editor Group |
Ctrl 2
|
⌘ 2
|
Ctrl 2
|
Focus into Second Editor Group |
Ctrl 3
|
⌘ 3
|
Ctrl 3
|
Focus into Third Editor Group |
Unassigned
|
Unassigned
|
Unassigned
|
Focus into Editor Group on the Left |
Unassigned
|
Unassigned
|
Unassigned
|
Focus into Editor Group on the Right |
Ctrl Shift Pageup
|
⌘ K ⇧ ⌘ ←
|
Ctrl Shift Pageup
|
Move Editor Left |
Ctrl Shift Pagedown
|
⌘ K ⇧ ⌘ →
|
Ctrl Shift Pagedown
|
Move Editor Right |
Ctrl K Left
|
⌘ K ←
|
Ctrl K Left
|
Move Active Editor Group Left |
Ctrl K Right
|
⌘ K →
|
Ctrl K Right
|
Move Active Editor Group Right |
Ctrl Alt Right
|
⌃ ⌘→
|
Ctrl Alt Right
|
Move Editor into Next Group |
Ctrl Alt Left
|
⌃ ⌘←
|
Ctrl Alt Left
|
Move Editor into Previous Group |
Ctrl O
|
Unassigned
|
Ctrl O
|
Open File... |
Ctrl S
|
⌘ S
|
Ctrl S
|
Save |
Ctrl K S
|
⌥ ⌘ S
|
Ctrl K S
|
Save All |
Ctrl Shift S
|
⇧ ⌘ S
|
Ctrl Shift S
|
Save As... |
Ctrl F4
|
⌘ W
|
Ctrl F4
|
Close |
Unassigned
|
⌥ ⌘ T
|
Unassigned
|
Close Others |
Ctrl K W
|
⌘ K W
|
Ctrl K W
|
Close Group |
Unassigned
|
Unassigned
|
Unassigned
|
Close Other Groups |
Unassigned
|
Unassigned
|
Unassigned
|
Close Group to Left |
Unassigned
|
Unassigned
|
Unassigned
|
Close Group to Right |
Ctrl K Ctrl W
|
⌘ K ⌘ W
|
Ctrl K Ctrl W
|
Close All |
Ctrl Shift T
|
⇧ ⌘ T
|
Ctrl Shift T
|
Reopen Closed Editor |
Ctrl K Enter
|
⌘ K Enter
|
Ctrl K Enter
|
Keep Open |
Ctrl Tab
|
⌃ Tab
|
Ctrl Tab
|
Open Next |
Ctrl Shift Tab
|
⌃ ⇧ Tab
|
Ctrl Shift Tab
|
Open Previous |
Ctrl K P
|
⌘ K P
|
Ctrl K P
|
Copy Path of Active File |
Ctrl K R
|
⌘ K R
|
Ctrl K R
|
Reveal Active File in Windows |
Ctrl K O
|
⌘ K O
|
Ctrl K O
|
Show Opened File in New Window |
Unassigned
|
Unassigned
|
Unassigned
|
Compare Opened File With |
Ctrl K Z
|
⌘ K Z
|
Ctrl K Z
|
Toggle Zen Mode |
Escape Escape
|
Escape Escape
|
Escape Escape
|
Leave Zen Mode |
Ctrl =
|
⌘ =
|
Ctrl =
|
Zoom in |
Ctrl -
|
⌘ -
|
Ctrl -
|
Zoom out |
Ctrl Numpad0
|
⌘ Numpad0
|
Ctrl Numpad0
|
Reset Zoom |
Ctrl B
|
⌘ B
|
Ctrl B
|
Toggle Sidebar Visibility |
Ctrl Shift E
|
⇧ ⌘ E
|
Ctrl Shift E
|
Show Explorer / Toggle Focus |
Ctrl Shift F
|
⇧ ⌘ F
|
Ctrl Shift F
|
Show Search |
Ctrl Shift G
|
⌃ ⇧ G
|
Ctrl Shift G
|
Show Source Control |
Ctrl Shift D
|
⇧ ⌘ D
|
Ctrl Shift D
|
Show Debug |
Ctrl Shift X
|
⇧ ⌘ X
|
Ctrl Shift X
|
Show Extensions |
Ctrl Shift U
|
⇧ ⌘ U
|
Ctrl Shift U
|
Show Output |
Ctrl Q
|
⌃ Q
|
Ctrl Q
|
Quick Open View |
Ctrl Shift C
|
⇧ ⌘ C
|
Ctrl Shift C
|
Open New Command Prompt |
Ctrl Shift V
|
⇧ ⌘ V
|
Ctrl Shift V
|
Toggle Markdown Preview |
Ctrl K V
|
⌘ K V
|
Ctrl K V
|
Open Preview to the Side |
Ctrl `
|
⌃ `
|
Ctrl `
|
Toggle Integrated Terminal |
Ctrl Shift H
|
⇧ ⌘ H
|
Ctrl Shift H
|
Replace in Files |
Alt C
|
⌥ ⌘ C
|
Alt C
|
Toggle Match Case |
Alt W
|
⌥ ⌘ W
|
Alt W
|
Toggle Match Whole Word |
Alt R
|
⌥ ⌘ R
|
Alt R
|
Toggle Use Regular Expression |
Ctrl Shift J
|
⇧ ⌘ J
|
Ctrl Shift J
|
Toggle Search Details |
F4
|
F4
|
F4
|
Focus Next Search Result |
Shift F4
|
⇧ F4
|
Shift F4
|
Focus Previous Search Result |
Down
|
↓
|
Down
|
Show Next Search Term |
Up
|
↑
|
Up
|
Show Previous Search Term |
Unassigned
|
Unassigned
|
Unassigned
|
Open Workspace Settings |
Ctrl K Ctrl S
|
⌘ K ⌘ S
|
Ctrl K Ctrl S
|
Open Keyboard Shortcuts |
Unassigned
|
Unassigned
|
Unassigned
|
Open User Snippets |
Ctrl K Ctrl T
|
⌘ K ⌘ T
|
Ctrl K Ctrl T
|
Select Color Theme |
Unassigned
|
Unassigned
|
Unassigned
|
Configure Display Language |
F5
|
F5
|
F5
|
Start |
F5
|
F5
|
F5
|
Continue |
Ctrl F5
|
⌃ F5
|
Ctrl F5
|
Start (without debugging) |
F6
|
F6
|
F6
|
Pause |
F11
|
F11
|
F11
|
Step Into |
Shift F11
|
⇧ F11
|
Shift F11
|
Step Out |
F10
|
F10
|
F10
|
Step Over |
Shift F5
|
⇧ F5
|
Shift F5
|
Stop |
Ctrl K Ctrl I
|
⌘ K ⌘ I
|
Ctrl K Ctrl I
|
Show Hover |
Unassigned
|
Unassigned
|
Unassigned
|
Run Test Task |
Ctrl `
|
⌃ `
|
Ctrl `
|
Show integrated terminal |
Ctrl Shift `
|
⌃ ⇧ `
|
Ctrl Shift `
|
Create new terminal |
Ctrl C
|
⌘ C
|
Ctrl C
|
Copy selection |
Ctrl V
|
|
Ctrl V
|
Paste into active terminal |
Ctrl ↑ / ↓
|
⌘↑ /
|
Ctrl ↑ / ↓
|
Scroll up/down |
Shift Pgup / Pgdn
|
Pgup / Pgdn
|
Shift Pgup / Pgdn
|
Scroll page up/down |
Ctrl Home / End
|
⌘ Home / End
|
Ctrl Home / End
|
Scroll to top/bottom |
Source: https://code.visualstudio.com/docs/getstarted/keybindings
Do you want to
report or
edit
this page?