Developer ToolsMacOSShortcutsWindows

130 Visual Studio Code Keyboard Shortcuts

for Windows & MacOS

Download Visual Studio Code Shortcuts PDF

Learn Visual Studio Code Shortcuts for Windows & Mac

Most used Visual Studio Code Shortcuts

Action Visual Studio Code Shortcuts Windows Visual Studio Code Shortcuts Mac
Show Command Palette Ctrl + Shift + P then F1 Command + Shift + P then F1
Quick Open, Go to File Ctrl + P Command + P
New window/instance Ctrl + Shift + N Command + Shift + N
Close window/instance Ctrl + Shift + W Command + Shift + W
User Settings Ctrl + , Command + ,
Keyboard Shortcuts Ctrl + K then Ctrl + S Command + K then Command + S

Basic Editing Shortcuts

Action Visual Studio Code Shortcuts Windows Visual Studio Code Shortcuts Mac
Cut line (empty selection) Ctrl + X Command + X
Copy line (empty selection) Ctrl + C Command + C
Move line up Alt + Up Arrow key Option + Up Arrow key
Move line down Alt + Down Arrow key Option + Down Arrow key
Copy line up Shift + Alt + Up Arrow key Shift + Option + Up Arrow key
Copy line down Shift + Alt + Down Arrow key Shift + Option + Down Arrow key
Delete line Ctrl + Shift + K Command + Shift + K
Insert line below Ctrl + Enter Command + Enter
Insert line above Ctrl + Shift + Enter Command + Shift + Enter
Jump to the matching bracket Ctrl + Shift + \ Command + Shift + \
Indent line Ctrl + ] Command + ]
Outdent line Ctrl + [ Command + [
Go to the beginning of the line Home Home
Go to the end of the line End End
Go to the beginning of the file Ctrl + Home Command + Home
Go to end of the file Ctrl + End Command + End
Scroll line up Ctrl + Up Arrow key Command + Up Arrow key
Scroll line down Ctrl + Down Arrow key Command + Down Arrow key
Scroll page up Alt + Page Up key Option + Page Up key
Scroll page down Alt + Page Down key Option + Page Down key
Fold (collapse) region Ctrl + Shift + [ Command + Shift + [
Unfold (uncollapse) region Ctrl + Shift + ] Command + Shift + ]
Fold (collapse) all subregions Ctrl + K then Ctrl + [ Command + K then Command + [
Unfold (uncollapse) all subregions Ctrl + K then Ctrl + ] Command + K then Command + ]
Fold (collapse) all regions Ctrl + K then Ctrl + 0 Command + K then Command + 0
Unfold (uncollapse) all regions Ctrl + K then Ctrl + J Command + K then Command + J
Add line comment Ctrl + K then Ctrl + C Command + K then Command + C
Remove line comment Ctrl + K then Ctrl + U Command + K then Command + U
Toggle line comment Ctrl + / Command + /
Toggle block comment Shift + Alt + A Shift + Option + A
Toggle word wrap Alt + Z Option + Z

Navigation Shortcuts

Action Visual Studio Code Shortcuts Visual Studio Code Shortcuts
Show all symbols Ctrl + T Command + T
Go to line Ctrl + G Command + G
Go to file Ctrl + P Command + P
Go to symbol Ctrl + Shift + O Command + Shift + O
Show Problems panel Ctrl + Shift + M Command + Shift + M
Go to the next error or warning F8 F8
Go to the previous error or warning Shift + F8 Shift + F8
Navigate editor group history Ctrl + Shift + Tab Command + Shift + Tab
Go back Alt + Left Arrow key Option + Left Arrow key
Go forward Alt + Right Arrow key Option + Right Arrow key
Toggle Tab moves the focus Ctrl + M Command + M

Search and Replace Shortcuts

Action Visual Studio Code Shortcuts Visual Studio Code Shortcuts
Find Ctrl + F Command + F
Replace Ctrl + H Command + H
Find next F3 F3
Find Previous Shift + F3 Shift + F3
Select all occurrences of Find match Alt + Enter Option + Enter
Add selection to next Find match Ctrl + D Command + D
Move the last selection to the next Find match Ctrl + K then Ctrl + D Command + K then Command + D
Toggle case-sensitive Alt + C Option + C
Toggle regex Alt + R Option + R
Toggle whole word Alt + W Option + W

Rich Languages Editing Shortcuts

Action Visual Studio Code Shortcuts Visual Studio Code Shortcuts
Trigger suggestion Ctrl + Spacebar Command + Spacebar
Trigger parameter hints Ctrl + Shift + Spacebar Command + Shift + Spacebar
Format document Shift + Alt + F Shift + Option + F
Format selection Ctrl + K then Ctrl + F Command + K then Command + F
Go to Definition F12 F12
Peek Definition Alt + F12 Option + F12
Open Definition to the side Ctrl + K then F12 Command + K then F12
Quick Fix Ctrl + . Command + .
Show References Shift + F12 Shift + F12
Rename Symbol F2 F2
Trim trailing whitespace Ctrl + K then Ctrl + X Command + K then Command + X
M Change file language Ctrl + K then M Command + K then M

Editor Management Shortcuts

Action Visual Studio Code Shortcuts Visual Studio Code Shortcuts
Close editor Ctrl + F4 then Ctrl + W Command + F4 then Command + W
F Close folder Ctrl + K Command + K
Split editor Ctrl + \ Command + \
Focus on the first group Ctrl + 1 Command + 1
Focus on the second group Ctrl + 2 Command + 2
Focus on the third group Ctrl + 3 Command + 3
Focus on the previous editor’s group Ctrl + K then Ctrl + Left Arrow key Command + K then Command + Left Arrow key
Focus on the next editor group Ctrl + K then Ctrl + Right Arrow key Command + K then Command + Right Arrow key
Move editor left Ctrl + Shift + Page Up key Command + Shift + Page Up key
Move editor right Ctrl + Shift + Page Down key Command + Shift + Page Down key
Move active editor group Ctrl + K then Left & Right Arrow key Command + K then Left & Right Arrow key

File Management Shortcuts

Action Visual Studio Code Shortcuts Visual Studio Code Shortcuts
New File Ctrl + N Command + N
Open File Ctrl + O Command + O
Open folder Ctrl + K then Ctrl + O Command + K then Command + O
Open recent Ctrl + R Command + R
Save Ctrl + S Command + S
Save As Ctrl + Shift + S Command + Shift + S
Save All Ctrl + K then S Command + K then S
Close Ctrl + F4 Command + F4
Close All Ctrl + K then Ctrl + W Command + K then Command + W
Reopen closed editor Ctrl + Shift + T Command + Shift + T
Enter Keep preview mode editor open Ctrl + K Command + K
Open next Ctrl + Tab Command + Tab
Open previous Ctrl + Shift + Tab Command + Shift + Tab
Copy path of active file Ctrl + K then P Command + K then P
Reveal active files in Explorer Ctrl + K then R Command + K then R
Show active file in new window/instance Ctrl + K then O Command + K then O

Display Shortcuts

Action Visual Studio Code Shortcuts Visual Studio Code Shortcuts
Toggle fullscreen F11 F11
Toggle editor layout (horizontal/vertical) Shift + Alt + 1 Shift + Option + 1
Zoom in Ctrl + = Command + =
Zoom out Ctrl + – Command + –
Toggle Sidebar Visibility Ctrl + B Command + B
Show Explorer / Toggle focus Ctrl + Shift + E Command + Shift + E
Show Search Ctrl + Shift + F Command + Shift + F
Show Source Control Ctrl + Shift + G Command + Shift + G
Show Debug Ctrl + Shift + D Command + Shift + D
Show Extensions Ctrl + Shift + X Command + Shift + X
Replace in files Ctrl + Shift + H Command + Shift + H
Toggle Search details Ctrl + Shift + J Command + Shift + J
Show Output panel Ctrl + Shift + U Command + Shift + U
Open Markdown preview Ctrl + Shift + V Command + Shift + V
Open Markdown preview to the side Ctrl + K then V Command + K then V
Zen Mode (Esc Esc to exit) Ctrl + K then Z Command + K then Z

Debug Shortcuts

Action Visual Studio Code Shortcut keys Visual Studio Code Shortcut keys
Toggle breakpoint F9 F9
Start/Continue F5 F5
Stop Shift + F5 Shift + F5
Step into F11 F11
Step out Shift + F11 Shift + F11
Step over F10 F10
Show hover Ctrl + K then Ctrl + I Command + K then Command + I

Integrated Terminal Shortcuts

Action Visual Studio Code Shortcut keys Visual Studio Code Shortcut keys
Show integrated terminal Ctrl + ` Command + `
Create new terminal Ctrl + Shift + ` Command + Shift + `
Copy selection Ctrl + C Command + C
Paste into the active terminal Ctrl + V Command + V
Scroll up Ctrl + Up Arrow key Command + Up Arrow key
Scroll down Ctrl + Down Arrow key Command + Down Arrow key
Scroll page up Shift + Page Up key Shift + Page Up key
Scroll page down Shift + Page Down key Shift + Page Down key
Scroll to top Ctrl + Home Command + Home
Scroll to bottom Ctrl + End Command + End

READ NEXT:

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button