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.
Back to ShortcutsGeneral 7
Cmd+Shift+P / Ctrl+Shift+POpen command palette, entry point for all commands
Cmd+P / Ctrl+PQuick open file by fuzzy name
Cmd+Shift+N / Ctrl+Shift+NOpen new window
Cmd+W / Ctrl+WClose current editor tab
Cmd+, / Ctrl+,Open user settings
Cmd+K Cmd+S / Ctrl+K Ctrl+SOpen keyboard shortcuts settings
Cmd+Shift+X / Ctrl+Shift+XOpen extensions panel
Editing 14
Cmd+D / Ctrl+DSelect next occurrence of current word, multi-cursor editing
Cmd+Shift+L / Ctrl+Shift+LSelect all occurrences of current word
Cmd+/ / Ctrl+/Toggle line comment
Option+Shift+A / Shift+Alt+AToggle 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+EnterInsert line below
Cmd+Shift+Enter / Ctrl+Shift+EnterInsert line above
Cmd+] / Ctrl+]Indent line
Cmd+[ / Ctrl+[Outdent line
F2 / F2Rename symbol (updates all references)
Cmd+Z / Ctrl+ZUndo
Cmd+Shift+Z / Ctrl+YRedo
Search 8
Cmd+F / Ctrl+FFind in current file
Option+Cmd+F / Ctrl+HReplace in current file
Cmd+Shift+F / Ctrl+Shift+FFind across workspace
Cmd+Shift+H / Ctrl+Shift+HReplace across workspace
Enter / EnterNext match in search
Shift+Enter / Shift+EnterPrevious match in search
Option+Enter / Alt+EnterSelect all matches (multi-cursor)
Cmd+G / F3Jump to next find match
Window Management 9
Cmd+\ / Ctrl+\Split editor (side by side)
Cmd+1 / Ctrl+1Focus 1st editor group
Cmd+2 / Ctrl+2Focus 2nd editor group
Cmd+Option+← / Ctrl+PageUpSwitch to previous tab
Cmd+Option+→ / Ctrl+PageDownSwitch to next tab
Cmd+K W / Ctrl+K WClose all editors
Cmd+K F / Ctrl+K FClose current folder
Cmd+B / Ctrl+BToggle sidebar visibility
Cmd+J / Ctrl+JToggle bottom panel visibility
Terminal 7
Ctrl+` / Ctrl+`Toggle integrated terminal
Ctrl+Shift+` / Ctrl+Shift+`Create new terminal instance
Cmd+\ / Ctrl+\Split terminal (within terminal)
Cmd+K / Ctrl+KClear terminal (when focused)
Ctrl+Cmd+↑ / Ctrl+Shift+UpScroll 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.
Official References
Commands are compiled from the official docs below. Click to verify the latest usage.
Maintained by LaoHand
Publicly updated on Jul 31, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us