Cut or Delete the Current Line
Keyboard: CTRL + L (cut text); SHIFT + DEL(cut text and carriage return); CTRL + X(cut text and carriage return); CTRL + SHIFT + L (delete)
Command: Edit.LineCut; Edit.Cut; Edit.Cut; Edit.LineDelete
Versions: 2008,2010
Published: 4/4/2010
Code: vstipEdit0038
You can quickly and easily do a cut operation by doing the following:
- Place your cursor on any line:
- Do one of the following commands:
- CTRL + L to cut the text only
- SHIFT + DEL or CTRL + X to cut the line and the carriage return at the end of the line
If you want to DELETE the line instead you can use CTRL + SHIFT + L
Comments
Anonymous
April 04, 2010
The comment has been removedAnonymous
April 04, 2010
Catto! So...do you like the keystrokes? How are they working for you? ZAnonymous
April 05, 2010
The comment has been removedAnonymous
January 12, 2011
@Thomas for your copy empty text problem there is a setting you can change to avoid it. Tools -> Options -> Text Editor -> All Languages -> General -> unselect "Apply cut and Copy Command to empty lines" Also the your previous copied content arent lost you can find the lates (20) by pressing ctrl + shift + V.Anonymous
January 12, 2011
The comment has been removedAnonymous
June 21, 2012
I have been waiting for the equivalent of VB6's Ctrl-Y for years! Thanks a lot! Are you updating the book for VS 2012 anytime soon? :PAnonymous
June 21, 2012
Hey Paul :) Yeah Sara and I are hasing out what we want to put in the new book and some changes we want to make. You can see what we are currently thinking about here: blogs.msdn.com/.../coding-faster-v2-being-considered.aspx ZAnonymous
June 21, 2012
Excellent, Z. I'll keep an eye on that development.Anonymous
April 13, 2013
@Thomas you can use Ctrl+Shift+V to roll back in the clipboard to earlier values that you copied in Visual Studio, it rescued for me many codes that I would lost without it.Anonymous
May 11, 2015
The comment has been removed