Essential Keyboard Shortcuts
VS Code Essential Keyboard Shortcuts The shortcuts that matter day-to-day. macOS shown — swap ⌘ for Ctrl on Windows/Linux. Navigation ⌘P Quick Open (file by nam…
VS Code Essential Keyboard Shortcuts
The shortcuts that matter day-to-day. macOS shown — swap ⌘ for Ctrl on Windows/Linux.
Navigation
⌘P Quick Open (file by name)
⌘⇧P Command Palette
⌘⇧E Explorer panel
⌘⇧F Search across files
⌘⇧G Source Control panel
⌘⇧D Run & Debug panel
⌘⇧X Extensions panel
⌘B Toggle sidebar
⌘J Toggle terminal panel
⌃` Open terminal
⌘1/2/3 Switch editor groups
⌘W Close tab
⌘⇧T Reopen closed tab
⌘⌥←/→ Navigate back / forward
⌘K ⌘S Open keyboard shortcutsEditing
⌘D Select next occurrence of word
⌘⇧L Select all occurrences
⌥Click Add cursor
⌘⌥↑/↓ Add cursor above / below
⌘L Select line
⌥↑/↓ Move line up / down
⌥⇧↑/↓ Copy line up / down
⌘⇧K Delete line
⌘Enter Insert line below
⌘⇧Enter Insert line above
⌘/ Toggle line comment
⌥⇧A Toggle block comment
Tab / ⇧Tab Indent / outdent selection
⌘] / ⌘[ Indent / outdent lineCode Intelligence
F12 Go to Definition
⌥F12 Peek Definition
⇧F12 Go to References
F2 Rename symbol
⌘. Quick Fix / Code actions
⇧⌥F Format document
⌘K ⌘F Format selection
⌃Space Trigger IntelliSense
⌘⇧Space Trigger parameter hintsSearch & Replace
⌘F Find in file
⌘H Replace in file
⌘⇧F Find in workspace
⌘⇧H Replace in workspace
⌘G / ⇧⌘G Next / previous match
⌥Enter Select all matches in Find
⌘⌥R Toggle regex in searchGit (built-in)
⌃⇧G Open Source Control
⌘K ⌘K Commit staged (when panel focused)
⌘Enter Confirm commit message input