Visual Studio tip: delete line in Code Editor

Posted: (EET/GMT+2)

 

Very often, I find myself wanting to delete a line of code in Visual Studio's code editor, but so far, I haven't found a keyboard shortcut to do that. In Delphi, the key is Ctrl+Y, but naturally that's a different environment. Visual Studio has Ctrl+L for cutting a line to the clipboard, but that would replace the clipboard contents, which I don't usually want to do.

Luckily, I found the key while looking at the list of Visual Studio's commands. The IDE has an internal command called Edit.DeleteLine, which was just what I was after. And then, in the Customize dialog box I found it: the keyboard shortcut for deleting a line is by default Ctrl+Shift+L. Woo hoo! :-)