VSCode Keyboard Shortcuts Cheatsheet

High-frequency VSCode keyboard shortcuts organized by General, Editing, Navigation, Search, Window Management, and Terminal. macOS and Windows side-by-side for quick reference while coding.

Keyboard Shortcuts·56 commands·Last updated 2026-07-31
Back to Keyboard Shortcuts

#General7

Cmd+Shift+P / Ctrl+Shift+P
Open command palette, entry point for all commands
Cmd+P / Ctrl+P
Quick open file by fuzzy name
Cmd+Shift+N / Ctrl+Shift+N
Open new window
Cmd+W / Ctrl+W
Close current editor tab
Cmd+, / Ctrl+,
Open user settings
Cmd+K Cmd+S / Ctrl+K Ctrl+S
Open keyboard shortcuts settings
Cmd+Shift+X / Ctrl+Shift+X
Open extensions panel

#Editing14

Cmd+D / Ctrl+D
Select next occurrence of current word, multi-cursor editing
Cmd+Shift+L / Ctrl+Shift+L
Select all occurrences of current word
Cmd+/ / Ctrl+/
Toggle line comment
Option+Shift+A / Shift+Alt+A
Toggle block comment
Option+↑ / Alt+↑
Move current line up
Option+↓ / Alt+↓
Move current line down
Shift+Option+↓ / Shift+Alt+↓
Copy current line down
Cmd+Enter / Ctrl+Enter
Insert line below
Cmd+Shift+Enter / Ctrl+Shift+Enter
Insert line above
Cmd+] / Ctrl+]
Indent line
Cmd+[ / Ctrl+[
Outdent line
F2 / F2
Rename symbol (updates all references)
Cmd+Z / Ctrl+Z
Undo
Cmd+Shift+Z / Ctrl+Y
Redo

#Window Management9

Cmd+\ / Ctrl+\
Split editor (side by side)
Cmd+1 / Ctrl+1
Focus 1st editor group
Cmd+2 / Ctrl+2
Focus 2nd editor group
Cmd+Option+← / Ctrl+PageUp
Switch to previous tab
Cmd+Option+→ / Ctrl+PageDown
Switch to next tab
Cmd+K W / Ctrl+K W
Close all editors
Cmd+K F / Ctrl+K F
Close current folder
Cmd+B / Ctrl+B
Toggle sidebar visibility
Cmd+J / Ctrl+J
Toggle bottom panel visibility

#Terminal7

Ctrl+` / Ctrl+`
Toggle integrated terminal
Ctrl+Shift+` / Ctrl+Shift+`
Create new terminal instance
Cmd+\ / Ctrl+\
Split terminal (within terminal)
Cmd+K / Ctrl+K
Clear terminal (when focused)
Ctrl+Cmd+↑ / Ctrl+Shift+Up
Scroll to previous command
Cmd+↑ / Ctrl+↑
Previous command in terminal history
Cmd+↓ / Ctrl+↓
Next command in terminal history

💡 Tips

  • Cmd+D / Ctrl+D is the core multi-cursor shortcut — press repeatedly to select identical words for batch editing.
  • After Cmd+P / Ctrl+P, type ? to see all quick-open modes (: line, @ symbol, # workspace symbol).
  • Cmd+K is a chord prefix — release then press the next key (e.g. Cmd+K W closes all editors).
  • On macOS, Option maps to Alt and Cmd maps to Ctrl on Windows — use this mapping when switching platforms.