Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to delete a line in Visual Studio without cutting it?

I want to delete a line just like hitting Ctrl + X without anything selected, but without saving the line to the copy stack. Is this possible?

I'm using Visual Studio 2010.

like image 239
JChristian Avatar asked Sep 17 '10 00:09

JChristian


People also ask

How do you delete one line in VS Code?

In order to quickly delete a line in VSCode, you can simply press Ctrl+Shift+K keyboard combination while the cursor is being placed in the desired line. The hotkey can be changed by modifying editor. action. deleteLines key in VSCode settings.

How do I delete a line of code?

If you're at the end of a line and want to select the complete line, use the shortcut key combination Shift + Home . If there's only one line of text in the document, or you want to delete all text, press Ctrl + A key to select all text. Once highlighted, press delete to delete everything.


1 Answers

Edit.LineDelete is the name of the command. By default it's bound to Ctrl + Shift + L, but you can give it whatever you like in Tools | Options | Keyboard.

Edit: Corrected default shortcut info.

like image 112
Kirk Woll Avatar answered Oct 07 '22 12:10

Kirk Woll