Cut line shortcut in Visual Studio Code (Ctrl+L in VS) (not delete line!)

What you are looking for is the Cut command:


It cuts (copies to the clipboard then deletes the line) either a selection or the entire line if nothing is selected.
I tested it with vscode 1.23.1

On windows this command is bound to Ctrl + X as well as to Shift + Delete by default.

Command works this way when Editor: Empty Selection Clipboard preference is enabled. It is enabled by default:

"editor.emptySelectionClipboard": true

Leave a Comment