VS Code Shortcuts
PDF
Markdown
HTML
The shortcuts below use Windows/Linux bindings. On macOS, swap Ctrl for ⌘ (Cmd) and Alt for ⌥ (Option) for most of them — a handful keep Control, noted where they do. When in doubt, the Command Palette finds any action and shows its current binding.
The Essentials
Shortcut
Action
Ctrl+Shift+P
Command Palette — run any command
Ctrl+P
Quick Open — jump to any file by name
Ctrl+,
open Settings
Ctrl+K Ctrl+S
Keyboard Shortcuts editor
Ctrl+Shift+X
Extensions view
Ctrl+Shift+P then >
browse all commands
Forget a shortcut? Ctrl+Shift+P, type what you want ("format", "split", "rename"). The palette lists the command and its key binding, so you re-learn it in place.
Editing
Shortcut
Action
Ctrl+/
toggle line comment
Shift+Alt+A
toggle block comment
Alt+↑ / Alt+↓
move line up / down
Shift+Alt+↓
copy line down (duplicate)
Ctrl+Shift+K
delete line
Ctrl+Enter
insert line below
Ctrl+] / Ctrl+[
indent / outdent
Shift+Alt+F
format the document
Ctrl+Space
trigger suggestions
Multi-Cursor & Selection
Shortcut
Action
Ctrl+D
select next occurrence of the word (add cursor)
Ctrl+Shift+L
select all occurrences at once
Alt+Click
add a cursor wherever you click
Ctrl+Alt+↑ / ↓
add a cursor above / below
Shift+Alt+drag
column (box) selection
Ctrl+L
select the current line
Shift+Alt+→ / ←
expand / shrink selection
Navigation
Shortcut
Action
Ctrl+G
go to line number (Mac: ⌃G)
Ctrl+Shift+O
go to symbol in the file
Ctrl+T
go to symbol across the workspace
F12
go to definition
Alt+F12
peek definition (inline)
Ctrl+Tab
switch between open editors
Alt+← / Alt+→
navigate back / forward
Search & Replace
Shortcut
Action
Ctrl+F
find in the current file
Ctrl+H
replace in the current file
Ctrl+Shift+F
find across all files
Ctrl+Shift+H
replace across all files
F3 / Shift+F3
next / previous match
Alt+Enter
select all find matches
Panels & Layout
Shortcut
Action
Ctrl+B
toggle the sidebar
Ctrl+`` | toggle the integrated terminal (Mac: ⌃)
Ctrl+J
toggle the bottom panel
Ctrl+\
split the editor
Ctrl+K Z
Zen mode (distraction-free)
Ctrl+Shift+E
Explorer
Ctrl+Shift+G
Source Control