Is there a way to delete a string in Visual Studio without trimming it?

I want to delete a line in the same way as pressing Ctrl + X without selecting, but without saving the line to the copy stack. Is it possible?

I am using Visual Studio 2010.

+102
visual-studio visual-studio-2010 keyboard-shortcuts
Sep 17 2018-10-09T00:
source share
4 answers

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

Change Fixed default label information.

+154
Sep 17 '10 at 0:55
source share

Ctrl + Shift + L will delete the line and will not copy it to the clipboard.

+34
Sep 17 2018-10-10T00:
source share

I matched Ctrl + L (global) with Edit.LineDelete . Otherwise, this is the keyboard shortcut Ctrl + Shift + L , which is inconvenient. Go to Tools > Options > Environment > Keyboard as shown below.

Tools | Options | Keyboard

+18
Sep 17 2018-10-09T00:
source share

Its Cmd + Shift + K on Mac by default.

But it can be changed in accordance with the user's needs in the settings (" Preferences → Keyboard Shortcuts ) → search for the key value" Delete Line .

+1
Nov 06 '18 at 6:43
source share