Skip to content

↑↓ moveEnter openEsc close

Toggle line comment in VS Code

VS Code 1.96 · 138 shortcuts · checked Nov 2026 · Source: Microsoft docs

In Visual Studio Code, press Cmd+/ (Mac), Ctrl+/ (Windows, Linux).

What else uses Cmd+/? · What else uses Ctrl+/?

More VS Code shortcuts: basic editing

ActionMacWindowsLinux
Cut line (empty selection)CmdXCtrlXCtrlX
Copy line (empty selection)CmdCCtrlCCtrlC
Move line downOption↓Alt↓Alt↓
Move line upOption↑Alt↑Alt↑
Copy line downOptionShift↓AltShift↓CtrlAltShift↓
Copy line upOptionShift↑AltShift↑CtrlAltShift↑
Delete lineShiftCmdKCtrlShiftKCtrlShiftK
Insert line belowCmdEnterCtrlEnterCtrlEnter
Insert line aboveShiftCmdEnterCtrlShiftEnterCtrlShiftEnter
Jump to matching bracketShiftCmd\CtrlShift\CtrlShift\

All 33 in basic editing · All 138 VS Code shortcuts