Super Shortcuts

VS Code keyboard shortcuts for Mac

66 shortcuts · Updated

These are the default VS Code keyboard shortcuts on macOS, straight from Microsoft's official keybindings reference. The command palette (Cmd Shift P) can run everything, but the shortcuts below are the ones worth firing directly - editing, multi-cursor, navigation, and window management.

66 shortcuts

General7

ShortcutAction
Command Shift POpen the Command Palette (run any command)
Command PQuick Open - jump to any file by name
Command Shift NNew window
Command WClose the current editor tab
Command Shift WClose the window
Command ,Open Settings
Command K, then Command SOpen the Keyboard Shortcuts editor

Basic editing14

ShortcutAction
Command XCut the line (with nothing selected)
Command CCopy the line (with nothing selected)
Option Down ArrowMove the line down
Option Up ArrowMove the line up
Shift Option Down ArrowCopy the line down
Shift Option Up ArrowCopy the line up
Command Shift KDelete the line
Command ReturnInsert a line below the current one
Command Shift ReturnInsert a line above the current one
Command ]Indent the line
Command [Outdent the line
Command /Toggle line comment
Shift Option AToggle block comment
Option ZToggle word wrap

Multi-cursor & selection10

ShortcutAction
Option ClickInsert an extra cursor where you click
Command Option Up ArrowAdd a cursor on the line above
Command Option Down ArrowAdd a cursor on the line below
Command DSelect the next occurrence of the current word
Command Shift LSelect every occurrence of the current selection
Command UUndo the last cursor operation
Shift Option IInsert a cursor at the end of each selected line
Command LSelect the current line
Control Shift Command Right ArrowExpand the selection
Control Shift Command Left ArrowShrink the selection

Find & replace6

ShortcutAction
Command FFind in the current file
Command Option FReplace in the current file
Command GFind next
Command Shift GFind previous
Command Shift FSearch across all files
Command Shift HReplace across all files

Code navigation11

ShortcutAction
Control GGo to line
Command Shift OGo to symbol in the current file
Command TGo to symbol in the workspace
F12Go to definition
Option F12Peek definition
Shift F12Show all references
F2Rename symbol
F8Jump to the next error or warning
Control -Go back
Control Shift -Go forward
Command Shift \Jump to the matching bracket

Editor & window management6

ShortcutAction
Command \Split the editor
Command 1Focus the first editor group
Command 2Focus the second editor group
Command Shift TReopen the last closed editor
Command K, then Command WClose all editors
Control TabCycle through open editors

Display & panels9

ShortcutAction
Command BToggle the sidebar
Command Shift EShow the Explorer
Control Shift GShow Source Control
Command Shift DShow Run & Debug
Command Shift XShow Extensions
Command JToggle the bottom panel
Command K, then ZEnter Zen mode (Esc twice to exit)
Command =Zoom in
Command -Zoom out

Integrated terminal3

ShortcutAction
Control `Toggle the integrated terminal
Control Shift `Create a new terminal
Command Shift 5Split the terminal

Curated from the official VS Code macOS keyboard shortcuts reference. Defaults only - shortcuts you've remapped will differ.

Frequently asked questions

How do I see all keyboard shortcuts in VS Code?

Press ⌘K ⌘S to open the Keyboard Shortcuts editor - a searchable list of every command and its binding. The same list is behind Code → Settings → Keyboard Shortcuts.

How do I change a keyboard shortcut in VS Code?

Open the Keyboard Shortcuts editor (⌘K ⌘S), search for the command, double-click it, and press your new key combination. VS Code warns you if the combo is already taken.

What is the most important VS Code shortcut to learn first?

The Command Palette, ⌘⇧P. Every VS Code command is reachable from it by name, so it works even when you don't know (or forgot) the dedicated shortcut.

More Mac shortcut guides