VSCode Shortcuts logo

All VSCode Shortcuts for MacOS, Linux and Windows

Here is a listing of all VS Code shortcuts for all popular operating systems (Mac, Linux, and Windows) organized and listed in one place.
These shortcuts are taken from the official documentation on Microsoft Visual Studio Code.

Table of contents

General        ↑top

What for Mac OS Linux / Windows
Show Command Pallete Shift + Command + P Ctrl + Shift + P
Quickly open file | Go to file Command + P Ctrl + P
Open New Window Shift + Command + N Ctrl + Shift + N
Close Window Command + W Ctrl + W
Go to User settings Command + , (comma) Ctrl + , (comma)
Show Keyboard shortcuts menu Command K , Command S Ctrl + K, Ctrl + S

Basic Editing        ↑top

What for Mac OS Linux / Windows
Cut a line (empty selection) Command + X Ctrl + X
Copy line (empty selection) Command + C Ctrl + C
Move line down/up (works for selected lines too) Option + Down Arrow / Option + Up Arrow Alt + Down Arrow / Alt + Up Arrow
Copy line down/up (works for selected lines too) Shift + Option + Down Arrow / Shift + Option + Up Arrow Shift + Alt + Down Arrow / Up Arrow
Delete a line Shift + Command + K Shift + Control + K
Insert line above/below Command + Enter / Command + Shift + Enter Ctrl + Enter / Ctrl + Shift + Enter
Jump to matching bracket Shift + Command + \ Shift + Control + \
Indent / Outdent line Command + ] (closing square bracket) / Command + [ ( opening square bracket) Ctrl + ] (closing square bracket) / Ctrl + [ ( opening square bracket)
Go to beginning / end of line fn + Left Arrow / fn + Right Arrow Control + Up Arrow / fn + Contol + Down Arrow
Go to beginning of file / end of file Command + Up Arrow / Command + Down Arrow Ctrl + Home / Ctrl + End
Scroll line up / down fn + Control + Up Arrow / fn + Contol + Down Arrow Control + Up Arrow / Contol + Down Arrow
Scroll page up / down fn + Up Arrow / fn + Down Arrow Alt + PgUp / Alt + PgDn
Fold / Unfold region Option + Command + [ / Option + Command + ] Control + Shift [ / Control + Shift ]
Fold / Unfold all subregions Command + K , Command [ / Command + K , Command ] Ctrl + K , Ctrl [ / Ctrl + K , Ctrl ]
Fold / Unfold all regions Command + K , Command 0 / Command + K , Command J Control + Up Arrow / Contol + Down Arrow
Add line comment Command + K , Command C (Command '/' works too) Ctrl K, Ctrl C
Remove line comment Command + K , Command U Ctrl K, Ctrl U
Toggle line comment Command + / Ctrl + /
Toggle block comment Shift + Option + A Ctrl + Shift + A
Toggle wrap word Option + Z Alt + Z

Multi-cursor and Selection        ↑top

What for Mac OS Linux / Windows
Insert cursor Option + click Alt + Click
Insert cursor above / below Command + Option + Up Arrow / Command + Option + Down Arrow Shift+ Alt + Up Arrow / Shift+ Alt + Down Arrow
Undo your last cursor operation Command + U Ctrl + U
Insert cursor at the end of each line selected Shift + Option + I Shift + Alt + I
Select current line Command + L Ctrl + L
Select all occurences of current selection Shift + Command + L Ctrl + Shift + L
Select all occurences of current word Command + fn + F2 Ctrl + F2
Expand / Shrink your selection Shift + Option + Right Arrow / Left Arrow Shift + Alt + Right Arrow / Left Arrow
Column (box) selection Shift + Option + Drag Mouse Shift + Alt + Drag Mouse

Search and Replace        ↑top

What for Mac OS Linux / Windows
Open Find menu bar Command + F Ctrl + F
Open Find and Replace menu bar Command + Option + F Ctrl + H
Find next / previous occurence of selected word Command + G / Command + Shift + G F3 / Shift + F3
Select all occurences of found match Option + Enter Alt + Enter
Add next found occurence to selection Command + D Ctrl + D
Move selection to its next occurence Command + K, Command + L Ctrl + K, Ctrl + D
Select all occurences of current word Command + fn + F2 Ctrl + F2
Expand / Shrink your selection Shift + Option + Right Arrow / Left Arrow Shift + Alt + Right Arrow / Left Arrow
Column (box) selection Shift + Option + Drag Mouse Shift + Alt + Drag Mouse

Rich languages editing        ↑top

What for Mac OS Linux / Windows
Trigger suggestion Control + Space Ctrl + Space
Trigger function parameter hints Shift + Control + Space Ctrl + Shift + Space
Format document Shift + Option + F Ctrl + Shift + I
Format selection Command + K, Command + F Ctrl+ K, Ctrl + F
Go to Definition fn + F12 F12
Peek Definition Option + fn + F12 Ctrl + Shift + F10 || Alt + F12
Open Definiion to the side Command + K, fn + F12 Ctrl + K, F12
Quick fix Command + . (dot) Ctrl + . (dot)
Show references Shift + fn + F12 Shift + F12
Rename Symbol fn + F2 F2
Trim trailing whitespace Command + K, Command + X Ctrl + K, Ctrl + X
Change file language (say from HTML to Python for example) Command + K, M Ctrl + K, M
What for Mac OS Linux / Windows
Show all symbols Command + T Ctrl + T
Go to a given line Control + G Ctrl + G
Go to a given file Command + P Ctrl + P
Go to Symbol Shift + Command + O Ctrl + Shift + O
Show Problems Panel (toggles it too) Shift + Command + M Ctrl + Shift + M
Go to next/previous error or warning fn + F8 / Shift + fn + F8 F8 / Shift + F8
Navigate editor group history Control + Shift + Tab Ctrl + Shift + Tab
Go forward / backward across open tabs Control + - (dash) / Shift + Control + - (dash) Ctrl + Shift + - (dash) / Ctrl + Alt + - (dash) || Alt + Right Arrow / Alt + Left Arrow
Toggle Tab moves focus Shift + Control + M Control + M

Editor Management        ↑top

What for Mac OS Linux / Windows
Close Editor Command + W Ctrl + W
Close Folder Command + K, F Ctrl + K, F
Split Editor Command + \ (backslash) Ctrl + P
Focus into 1st, 2nd, 3rd editor group Command 1 / 2 / 3 Ctrl + 1 / 2 / 3
Focus into previous / next editor group Command + K, Command + Left Arrow / Command + Right Arrow Ctrl + K, Ctrl + Left Arrow / Ctrl + Right Arrow
Move editor left / right Command + K, Command + Shift + Left Arrow / Right Arrow Ctrl + Shift + PgUp / PgDn
Move active editor group Command + K, Left Arrow / Right Arrow Ctrl + K, Left Arrow / Right Arrow

File Management        ↑top

What for Mac OS Linux / Windows
Open New File Command + N Ctrl + N
Open File Control + O Ctrl + O
Save File Command + S Ctrl + S
Save As... Shift + Command + S Ctrl + Shift + S
Save All Shift + Command + S Ctrl + K, S
Close Command + W Ctrl W || Ctrl F4
Close All Command + K, Command + W Ctrl + K, Ctrl + W
Reopen close editor Shift + Command + T Shift + Ctrl + T
Keep Preview mode editor open Command + K, Enter Ctrl + K, Enter
Open next / previous window or tab Control + Tab / Shift + Control + Tab Ctrl + Tab / Shift + Ctrl + Tab
Copy path of active file Command + K, P Ctrl + K, P
Reveal active file in File explorer Command + K, R Ctrl + K, R
Show active file in new window or instance Command + K, O Ctrl + K, O

Display        ↑top

What for Mac OS Linux / Windows
Toggle Fullscreen Control + Command + F F11
Toggle editor layout between horizontal and vertical Option + Command + 0 Shift + Alt + 0
Zoom in / out Command + = (equal) / - (dash) Ctrl + = (equal) / - (dash)
Copy line down/up (works for selected lines too) Shift + Option + Down Arrow / Shift + Option + Up Arrow Ctrl + W
Toggle sidebar visibility Command + B Ctrl + B
Show Explorer / Toggle focus Shift + Command + E Ctrl + Shift + E
Show Search Shift + Command + F Shift + Control + F
Show Source Control Shift + Control + G Shift + Ctrl + G
Show Debug Shift + Command + D Shift + Ctrl + D
Show Extensions Shift + Command + X Shift + Ctrl + X
Replace in files Shift + Command + H Shift + Ctrl + H Control + Up Arrow / Contol + Down Arrow
Toggle Search details Shift + Command + J Shift + Ctrl + J
Show Output panel Shift + Command + U Ctrl + K, Ctrl + H || Ctrl + Shift + U
Open Markdown preview Shift + Command + V Ctrl + Shift + V
Open Markdown preview to the side Command + K , V Ctrl + K, V
Zen Mode (Esc ESc to exit) Command + K , Z Ctrl + K, Z

Debug        ↑top

What for Mac OS Linux / Windows
Toggle Breakpoint fn + F9 F9
Start / Continue fn + F5 F5
Step in / out fn + F11 / Shift + fn + F11 F11 / Shift + F11
Step over fn + F10 F10
Stop Shift + fn + F5 Shift + F5
Show hover Command + K , Command + I Ctrl + K, Ctrl + I

Integrated Terminal        ↑top

What for Mac OS Linux / Windows
Show Integrated Terminal Control + ` (backtick) Ctrl + ` (backtick)
Open new terminal window Shift + Control + ` (backtick) Ctrl + Shift + ` (backtick)
Copy selection Command + C Ctrl + Shift + C || Ctrl + C
Scroll Up / Down Command + Up Arrow / Down Arrow Ctrl + Shift + Up Arrow / Down Arrow || Ctrl + Up Arrow / Down Arrow
Scroll page up / down fn + Up Arrow / Down Arrow Shift + PgUP / PgDn
Scroll to top / bottom Command + Up Arrow / Down Arrow Shift + Home / End || Ctrl + Home + End

Useful Resources        ↑top

VSCode Pro Course
Do you want to be a VSCode Pro in 5 hours?

Bring all your custom settings and learn the power user workflows for HTML/CSS, GitHub/Git & Open Source, supercharged Markdown, and everything from JavaScript to PHP, Go, Python, C++, C#, ROR & 50+ Extensions.


#vscode pro #productivity #course

VSCode Pro Course
Master Node CLI Automation skills

Learn to build Node.js & JavaScript based CLI (Command Line Interface) apps. Automate the grunt work, do more in less time, impress your manager, and help the community.


#node cli #automation #course