Skip to content

↑↓ moveEnter openEsc close

Add line comment in VS Code

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

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

A chord: press each combination in turn. What else uses Ctrl+K Ctrl+C?

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