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

后端 未结 10 1389
刺人心
刺人心 2021-01-30 05:55

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\'

10条回答
  •  迷失自我
    2021-01-30 06:34

    The other answers are specific to Visual Studio, which is what was requested by OP, however if anyone is looking for a more generalized way to do this for most Windows programs, you can also Triple-Click to select any block of text, then just press the Delete key. This works for any Windows text editors or TextBoxes, including password boxes, search boxes, browser web address boxes, etc. For text editors such as Visual Studio, a block of text is typically one line of code. Obviously you can do other things too, such as triple-click to select a line of code, then Ctrl-X, Ctrl-V to cut/paste, etc, or just triple-click and type over it to replace a line.

提交回复
热议问题