Here's a comprehensive Visual Studio Code shortcuts (VS Code) covering key features, shortcuts, and commands across different operating systems (Windows, macOS, and Linux).
General Shortcuts
| Action |
Windows/Linux |
macOS |
| Command Palette |
Ctrl + Shift + P |
Cmd + Shift + P |
| Quick Open |
Ctrl + P |
Cmd + P |
| New Window |
Ctrl + Shift + N |
Cmd + Shift + N |
| Close Window |
Ctrl + Shift + W |
Cmd + Shift + W |
| Toggle Full Screen |
F11 |
Cmd + Ctrl + F |
| Toggle Sidebar |
Ctrl + B |
Cmd + B |
| Split Editor |
Ctrl + \ |
Cmd + \ |
| Toggle Terminal |
Ctrl + ` |
Cmd + ` |
| Toggle Zen Mode |
Ctrl + K Z |
Cmd + K Z |
| Open Settings |
Ctrl + , |
Cmd + , |
| Open Keyboard Shortcuts |
Ctrl + K Ctrl + S |
Cmd + K Cmd + S |
File Management
| Action |
Windows/Linux |
macOS |
| New File |
Ctrl + N |
Cmd + N |
| Open File |
Ctrl + O |
Cmd + O |
| Save |
Ctrl + S |
Cmd + S |
| Save As |
Ctrl + Shift + S |
Cmd + Shift + S |
| Close Editor |
Ctrl + W |
Cmd + W |
| Reopen Closed Editor |
Ctrl + Shift + T |
Cmd + Shift + T |
| Close Folder |
Ctrl + K F |
Cmd + K F |
Editing
| Action |
Windows/Linux |
macOS |
| Cut Line |
Ctrl + X |
Cmd + X |
| Copy Line |
Ctrl + C |
Cmd + C |
| Move Line Up/Down |
Alt + Up/Down |
Option + Up/Down |
| Duplicate Line |
Shift + Alt + Down |
Shift + Option + Down |
| Delete Line |
Ctrl + Shift + K |
Cmd + Shift + K |
| Insert Line Above |
Ctrl + Shift + Enter |
Cmd + Shift + Enter |
| Insert Line Below |
Ctrl + Enter |
Cmd + Enter |
| Select All |
Ctrl + A |
Cmd + A |
| Indent Line |
Ctrl + ] |
Cmd + ] |
| Outdent Line |
Ctrl + [ |
Cmd + [ |
| Toggle Line Comment |
Ctrl + / |
Cmd + / |
| Toggle Block Comment |
Shift + Alt + A |
Shift + Option + A |
Navigation
| Action |
Windows/Linux |
macOS |
| Go to Line |
Ctrl + G |
Cmd + G |
| Go to File |
Ctrl + P |
Cmd + P |
| Go to Symbol |
Ctrl + Shift + O |
Cmd + Shift + O |
| Go to Definition |
F12 |
F12 |
| Peek Definition |
Alt + F12 |
Option + F12 |
| Find |
Ctrl + F |
Cmd + F |
| Replace |
Ctrl + H |
Cmd + Option + F |
| Find in Files |
Ctrl + Shift + F |
Cmd + Shift + F |
| Next Error |
F8 |
F8 |
| Previous Error |
Shift + F8 |
Shift + F8 |
Terminal
| Action |
Windows/Linux |
macOS |
| New Terminal |
Ctrl + Shift + |
Cmd + Shift + |
| Split Terminal |
Ctrl + Shift + 5 |
Cmd + Shift + 5 |
| Copy Selection |
Ctrl + C |
Cmd + C |
| Paste Selection |
Ctrl + V |
Cmd + V |
Integrated Development Environment (IDE) Features
| Action |
Windows/Linux |
macOS |
| Run Task |
Ctrl + Shift + B |
Cmd + Shift + B |
| Open Debug |
Ctrl + Shift + D |
Cmd + Shift + D |
| Start/Stop Debugging |
F5 |
F5 |
| Step Over |
F10 |
F10 |
| Step Into |
F11 |
F11 |
| Step Out |
Shift + F11 |
Shift + F11 |
| Toggle Breakpoint |
F9 |
F9 |
Miscellaneous
| Action |
Windows/Linux |
macOS |
| Open Command Line |
Ctrl + Shift + C |
Cmd + Shift + C |
| Zoom In/Out |
Ctrl + = / - |
Cmd + = / - |
| Toggle Minimap |
Ctrl + M |
Cmd + M |
| Markdown Preview |
Ctrl + Shift + V |
Cmd + Shift + V |
| Focus into Editor Group |
Ctrl + 1 / 2 / 3 |
Cmd + 1 / 2 / 3 |
These shortcuts can greatly improve your efficiency when using Visual Studio Code. They are fairly consistent across all operating systems, with some variations mainly due to different system conventions. You can customize these shortcuts or add new ones via the Keyboard Shortcuts settings (Ctrl + K Ctrl + S or Cmd + K Cmd + S).
For more details and an up-to-date list, you can refer to the official Visual Studio Code documentation.