Visual Studio Code keyboard shortcuts

VS Code shortcuts keep navigation, editing, search, layout, files, and AI commands within the same working rhythm. This is the set to learn before adding your own keybindings.

VS Code has enough commands to become noisy. Start with navigation and search, then add editing, layout, files, and AI actions in the order your work brings them into view.

Editing

Change lines, format code, add cursors, rename symbols, and apply fixes without leaving the editor.

ActionWindowsmacOSLinux
Toggle line commentCtrl/Cmd/Ctrl/
Delete lineCtrlShiftKCmdShiftKCtrlShiftK
Insert line below without moving the cursorCtrlEnterCmdEnterCtrlEnter
Move line downUse Up instead of Down to move the line up.AltDownAltDownAltDown
Copy line downLinux adds Ctrl compared with Windows and macOS.ShiftAltDownShiftOptionDownCtrlShiftAltDown
Format documentShiftAltFShiftOptionFCtrlShiftI
Rename symbolF2F2F2
Trigger quick fixCtrl.Cmd.Ctrl.
Add selection to next find match (multi-cursor)CtrlDCmdDCtrlD
UndoCtrlZCmdZCtrlZ
CutCtrlXCmdXCtrlX
CopyCtrlCCmdCCtrlC
PasteCtrlVCmdVCtrlV
Select allCtrlACmdACtrlA
Trim trailing whitespaceCtrlKCtrlXCmdKCmdXCtrlKCtrlX
Change the language modeCtrlKMCmdKMCtrlKM

Editors, panels, and terminal

Split editor groups, focus panels, open the terminal, and move the active editor around the workspace.

ActionWindowsmacOSLinux
Split editorCtrl\Cmd\Ctrl\
Close editorCtrlF4CmdWCtrlW
Reopen closed editorCtrlShiftTCmdShiftTCtrlShiftT
Toggle sidebar visibilityCtrlBCmdBCtrlB
Toggle integrated terminalUses Ctrl even on macOS.Ctrl`Ctrl`Ctrl`
Open a new windowCtrlShiftNCmdShiftNCtrlShiftN
Close the windowAltF4CmdShiftWCtrlShiftW
Focus the first editor groupCtrl1Cmd1Ctrl1
Focus the second editor groupCtrl2Cmd2Ctrl2

Files and settings

Open files, change language or settings, save work, and reach the keyboard shortcuts editor.

ActionWindowsmacOSLinux
SaveCtrlSCmdSCtrlS
Open SettingsCtrl,Cmd,Ctrl,
Open Keyboard ShortcutsCtrlKCtrlSCmdKCmdSCtrlKCtrlS
Select a color themeCtrlKCtrlTCmdKCmdTCtrlKCtrlT
Open a fileCtrlOCmdOCtrlO

Copilot chat and AI

Built-in chat and inline AI actions in current VS Code.

ActionWindowsmacOSLinux
Open Chat viewCtrlAltICtrlCmdICtrlAltI
Open inline chat in the editorThe same binding starts inline chat in the integrated terminal.CtrlICmdICtrlI

Make the useful keys stick

The goal is not to memorise VS Code's entire command palette. Learn the keys that keep you in the file, then add the ones that remove your most common trip to a panel or menu.

You do not need this whole page in your head. Pick two shortcuts that remove a repeated hand movement, use them until they feel ordinary, and come back for the next pair.

Make a printable sheet for this app