Visual Studio Tip #7: Whole line editing

[cross posted from my MSDN blog]

OK here is a quick simple one. How do I move or edit entire lines of code?

#1 Just don’t select anything.

If you don’t have anything selected in your code window then the commands for copy, cut and paste work as if the entire line of code was selected.

So if you need to quickly duplicate a line, don’t bother trying to get a whole line selected. Just put the cursor on the line then type Ctrl+C, Ctrl+V and you’ll see the new line pasted below the old line.

#2 Just move the line. Put your cursor on the line in question and use Alt+UpArrow or Alt+DownArrow to move the entire line up or down in your file.

This post is part of a series of Visual Studio tips. The first post in the series contains the whole list.

About Negative Eddy

Professional Geek - I work for Microsoft
This entry was posted in Windows Phone. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s