Skip to content

↑↓ moveEnter openEsc close

Cut line (empty selection) in VS Code

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

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

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

More VS Code shortcuts: basic editing

ActionMacWindowsLinux
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\
Indent lineCmd]Ctrl]Ctrl]

All 33 in basic editing · All 138 VS Code shortcuts