Visual Studio 2010 tip: Cut empty lines

Posted by koevoeter on ASP.net Weblogs See other posts from ASP.net Weblogs or by koevoeter
Published on Thu, 17 Jun 2010 14:38:37 GMT Indexed on 2010/06/17 14:43 UTC
Read the original article Hit count: 489

Filed under:
|

How many times you wanted to move 2 lines by cut and pasting them, but the line you cut last is actually a blank line and your actual code is removed from the clipboard? Visual Studio 2010 has an option that keeps cutting blank lines from overwriting the clipboard. Go and uncheck this one: Tools » Options » Text Editor » All Languages » General » Apply Cut or Copy commands to blank lines when there is no selection

image

Extra (related) tip

The (free) Visual Studio 2010 extension Visual Studio 2010 Pro Power Tools contains (apart from a bunch of other handy features) the commands Edit.MoveLineUp and Edit.MoveLineDown to do whatever they say they do and maps them automatically to keyboard shortcuts Alt+Up & Alt+Down.

Resharper (not-free) has similar commands for moving lines, by default mapped to Ctrl+Alt+Shift+Up/Down.

© ASP.net Weblogs or respective owner

Related posts about Visual Studio

Related posts about .NET