Skip to main content

Keyboard shortcut reference

90 shortcuts across VS Code, Chrome, macOS, Terminal, and Git - searchable and filterable.

Editing
Command palette - Open the command palette
⌘ Shift P
Quick open file
⌘ P
Toggle terminal
⌘ `
Format document
⇧ ⌥ F
Toggle comment
⌘ /
Duplicate line
⇧ ⌥ ↓
Move line up
⌥ ↑
Move line down
⌥ ↓
Delete line
⌘ Shift K
Add cursor above
⌥ ⌘ ↑
Add cursor below
⌥ ⌘ ↓
Select all occurrences
⌘ Shift L
Add next occurrence
⌘ D
Undo
⌘ Z
Redo
⌘ Shift Z
Navigation
Go to definition
F12
Peek definition
⌥ F12
Go to line
⌃ G
Find in file
⌘ F
Find in project
⌘ Shift F
Go to symbol
⌘ Shift O
Quick switch tab
⌃ Tab
Split editor
⌘ \
Toggle sidebar
⌘ B
Zen mode
⌘ K Z
Refactoring
Rename symbol
F2
Quick fix
⌘ .
Show references
Shift F12