VSCode Keyboard Shortcuts Cheat Sheet [2026]
Master Visual Studio Code with this comprehensive keyboard shortcuts cheat sheet for Mac and Windows. Boost your coding speed in 2026.
Why Learn VSCode Keyboard Shortcuts?
Visual Studio Code is the most popular code editor in the world, used by millions of developers daily. Yet most people rely on mouse clicks for tasks that could be done in a fraction of the time with keyboard shortcuts. Learning even 20 key shortcuts can save you 30 minutes or more per day.
This cheat sheet covers the most useful VSCode shortcuts for both Mac and Windows/Linux, organized by category so you can find exactly what you need.
---
General / File Management
| Action | Mac | Windows / Linux |
|---|---|---|
| Command Palette | Cmd + Shift + P | Ctrl + Shift + P |
| Quick Open file | Cmd + P | Ctrl + P |
| New file | Cmd + N | Ctrl + N |
| Save | Cmd + S | Ctrl + S |
| Save All | Cmd + Option + S | Ctrl + K S |
| Close editor | Cmd + W | Ctrl + W |
| Reopen closed editor | Cmd + Shift + T | Ctrl + Shift + T |
| Toggle Sidebar | Cmd + B | Ctrl + B |
| Open Settings | Cmd + , | Ctrl + , |
| Toggle Terminal | Ctrl + | Ctrl + |
---
Editing
| Action | Mac | Windows / Linux |
|---|---|---|
| Cut line | Cmd + X | Ctrl + X |
| Copy line | Cmd + C | Ctrl + C |
| Move line up/down | Option + Up/Down | Alt + Up/Down |
| Duplicate line | Shift + Option + Up/Down | Shift + Alt + Up/Down |
| Delete line | Cmd + Shift + K | Ctrl + Shift + K |
| Insert line below | Cmd + Enter | Ctrl + Enter |
| Insert line above | Cmd + Shift + Enter | Ctrl + Shift + Enter |
| Indent line | Cmd + ] | Ctrl + ] |
| Outdent line | Cmd + [ | Ctrl + [ |
| Toggle comment | Cmd + / | Ctrl + / |
| Block comment | Shift + Option + A | Shift + Alt + A |
---
Multi-Cursor and Selection
One of VSCode's most powerful features is multi-cursor editing. These shortcuts let you edit multiple lines at once.
| Action | Mac | Windows / Linux |
|---|---|---|
| Add cursor above/below | Cmd + Option + Up/Down | Ctrl + Alt + Up/Down |
| Add cursor at click | Option + Click | Alt + Click |
| Select current word | Cmd + D | Ctrl + D |
| Select all occurrences | Cmd + Shift + L | Ctrl + Shift + L |
| Expand selection | Cmd + Shift + Right | Shift + Alt + Right |
| Shrink selection | Cmd + Shift + Left | Shift + Alt + Left |
| Column select | Shift + Option + Drag | Shift + Alt + Drag |
---
Search and Replace
| Action | Mac | Windows / Linux |
|---|---|---|
| Find | Cmd + F | Ctrl + F |
| Replace | Cmd + Option + F | Ctrl + H |
| Find in files | Cmd + Shift + F | Ctrl + Shift + F |
| Replace in files | Cmd + Shift + H | Ctrl + Shift + H |
| Find next | Cmd + G | F3 |
| Find previous | Cmd + Shift + G | Shift + F3 |
| Toggle regex | Cmd + Option + R | Alt + R |
---
Navigation
| Action | Mac | Windows / Linux |
|---|---|---|
| Go to line | Ctrl + G | Ctrl + G |
| Go to symbol | Cmd + Shift + O | Ctrl + Shift + O |
| Go to definition | F12 | F12 |
| Peek definition | Option + F12 | Alt + F12 |
| Go back | Ctrl + - | Alt + Left |
| Go forward | Ctrl + Shift + - | Alt + Right |
| Switch editor tab | Cmd + Option + Left/Right | Ctrl + PageUp/Down |
| Toggle breadcrumbs | Cmd + Shift + . | Ctrl + Shift + . |
---
Integrated Terminal
| Action | Mac | Windows / Linux |
|---|---|---|
| New terminal | Ctrl + Shift + | Ctrl + Shift + |
| Split terminal | Cmd + \ | Ctrl + Shift + 5 |
| Focus terminal | Cmd + J | Ctrl + J |
| Kill terminal | — | Ctrl + Shift + X in terminal panel |
| Cycle terminals | Cmd + Shift + [ / ] | Ctrl + PageUp/Down in terminal |
---
Debugging
| Action | Mac | Windows / Linux |
|---|---|---|
| Start/Continue | F5 | F5 |
| Step Over | F10 | F10 |
| Step Into | F11 | F11 |
| Step Out | Shift + F11 | Shift + F11 |
| Toggle breakpoint | F9 | F9 |
| Stop | Shift + F5 | Shift + F5 |
---
Refactoring and IntelliSense
| Action | Mac | Windows / Linux |
|---|---|---|
| Trigger Suggest | Ctrl + Space | Ctrl + Space |
| Trigger parameter hints | Cmd + Shift + Space | Ctrl + Shift + Space |
| Rename symbol | F2 | F2 |
| Quick Fix | Cmd + . | Ctrl + . |
| Format document | Shift + Option + F | Shift + Alt + F |
| Organize imports | Shift + Option + O | Shift + Alt + O |
---
Top 10 Shortcuts Every VSCode User Should Know
If you only memorize a handful of shortcuts, make it these:
- Cmd/Ctrl + P — Quick Open is the fastest way to jump between files.
- Cmd/Ctrl + Shift + P — Command Palette gives you access to every command.
- Cmd/Ctrl + D — Select the next occurrence of the current word for multi-cursor editing.
- Cmd/Ctrl + Shift + K — Delete an entire line instantly.
- Option/Alt + Up/Down — Move lines up or down without cutting and pasting.
- Cmd/Ctrl + / — Toggle line comments in any language.
- Cmd/Ctrl + B — Toggle the sidebar to maximize editor space.
- Cmd/Ctrl + ` — Toggle the integrated terminal without leaving your editor.
- F12 — Jump to the definition of a function or variable.
- Cmd/Ctrl + Shift + F — Search across your entire project.
---
How to Customize VSCode Shortcuts
VSCode lets you remap any shortcut. Open Keyboard Shortcuts with Cmd + K, Cmd + S (Mac) or Ctrl + K, Ctrl + S (Windows). From there you can search, edit, or export your keybindings to a keybindings.json file.
For developers who want to take shortcut mastery further, consider a dedicated practice tool like Keyhab — it lets you build muscle memory for keyboard shortcuts through spaced-repetition drills tailored to your editor of choice.
---
Conclusion
Mastering VSCode keyboard shortcuts is one of the highest-leverage skills you can invest in as a developer. Start with the top 10 list above, practice them daily, and gradually add more to your repertoire. Within a few weeks, you will notice a significant improvement in your editing speed and flow state.