Visual Studio has by default the shortcut Ctrl+l (cut line). It copies the line where the cursor is to the clipboard and deletes it.
I cannot find it in Visual Studio Code. Is there a way to add it as end user?
(I know there is Ctrl+Shift+K for delete line, which is not the same)
Shift + Delete on VS Code cuts the line i.e. copies the line to the clipboard and deletes it.
Press Ctrl + Shift + L . This will select all words that match your current selection. It also adds a cursor to each text span matching your current selection. Simply start typing your replacement text and vscode will start replacing all instances of text matching your selection in-editor as you type.
Ctrl + Shift + L will delete the line and not copy to the clipboard.
Align the text to the left. Ctrl+L. Align the text to the right. Ctrl+R.
What you are looking for is the Cut command:
editor.action.clipboardCutAction
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With