Keyhab
⌘⇧P
VS Code

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

ActionMacWindows / Linux
Command PaletteCmd + Shift + PCtrl + Shift + P
Quick Open fileCmd + PCtrl + P
New fileCmd + NCtrl + N
SaveCmd + SCtrl + S
Save AllCmd + Option + SCtrl + K S
Close editorCmd + WCtrl + W
Reopen closed editorCmd + Shift + TCtrl + Shift + T
Toggle SidebarCmd + BCtrl + B
Open SettingsCmd + ,Ctrl + ,
Toggle TerminalCtrl + Ctrl +

---

Editing

ActionMacWindows / Linux
Cut lineCmd + XCtrl + X
Copy lineCmd + CCtrl + C
Move line up/downOption + Up/DownAlt + Up/Down
Duplicate lineShift + Option + Up/DownShift + Alt + Up/Down
Delete lineCmd + Shift + KCtrl + Shift + K
Insert line belowCmd + EnterCtrl + Enter
Insert line aboveCmd + Shift + EnterCtrl + Shift + Enter
Indent lineCmd + ]Ctrl + ]
Outdent lineCmd + [Ctrl + [
Toggle commentCmd + /Ctrl + /
Block commentShift + Option + AShift + 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.

ActionMacWindows / Linux
Add cursor above/belowCmd + Option + Up/DownCtrl + Alt + Up/Down
Add cursor at clickOption + ClickAlt + Click
Select current wordCmd + DCtrl + D
Select all occurrencesCmd + Shift + LCtrl + Shift + L
Expand selectionCmd + Shift + RightShift + Alt + Right
Shrink selectionCmd + Shift + LeftShift + Alt + Left
Column selectShift + Option + DragShift + Alt + Drag

---

Search and Replace

ActionMacWindows / Linux
FindCmd + FCtrl + F
ReplaceCmd + Option + FCtrl + H
Find in filesCmd + Shift + FCtrl + Shift + F
Replace in filesCmd + Shift + HCtrl + Shift + H
Find nextCmd + GF3
Find previousCmd + Shift + GShift + F3
Toggle regexCmd + Option + RAlt + R

---

ActionMacWindows / Linux
Go to lineCtrl + GCtrl + G
Go to symbolCmd + Shift + OCtrl + Shift + O
Go to definitionF12F12
Peek definitionOption + F12Alt + F12
Go backCtrl + -Alt + Left
Go forwardCtrl + Shift + -Alt + Right
Switch editor tabCmd + Option + Left/RightCtrl + PageUp/Down
Toggle breadcrumbsCmd + Shift + .Ctrl + Shift + .

---

Integrated Terminal

ActionMacWindows / Linux
New terminalCtrl + Shift + Ctrl + Shift +
Split terminalCmd + \Ctrl + Shift + 5
Focus terminalCmd + JCtrl + J
Kill terminal—Ctrl + Shift + X in terminal panel
Cycle terminalsCmd + Shift + [ / ]Ctrl + PageUp/Down in terminal

---

Debugging

ActionMacWindows / Linux
Start/ContinueF5F5
Step OverF10F10
Step IntoF11F11
Step OutShift + F11Shift + F11
Toggle breakpointF9F9
StopShift + F5Shift + F5

---

Refactoring and IntelliSense

ActionMacWindows / Linux
Trigger SuggestCtrl + SpaceCtrl + Space
Trigger parameter hintsCmd + Shift + SpaceCtrl + Shift + Space
Rename symbolF2F2
Quick FixCmd + .Ctrl + .
Format documentShift + Option + FShift + Alt + F
Organize importsShift + Option + OShift + Alt + O

---

Top 10 Shortcuts Every VSCode User Should Know

If you only memorize a handful of shortcuts, make it these:

  1. Cmd/Ctrl + P — Quick Open is the fastest way to jump between files.
  2. Cmd/Ctrl + Shift + P — Command Palette gives you access to every command.
  3. Cmd/Ctrl + D — Select the next occurrence of the current word for multi-cursor editing.
  4. Cmd/Ctrl + Shift + K — Delete an entire line instantly.
  5. Option/Alt + Up/Down — Move lines up or down without cutting and pasting.
  6. Cmd/Ctrl + / — Toggle line comments in any language.
  7. Cmd/Ctrl + B — Toggle the sidebar to maximize editor space.
  8. Cmd/Ctrl + ` — Toggle the integrated terminal without leaving your editor.
  9. F12 — Jump to the definition of a function or variable.
  10. 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.

⌘⇧P

Learn VSCode shortcuts with quick quizzes

Keyhab quizzes you on 1,050 shortcuts for 15 tools, from Basics to Advanced. Five minutes a day on iPhone or iPad — VSCode (Mac) and Vim Basics are free.

Download free on the App Store

Related