Categories
Anything

Visual Studio Tips: Copy & paste tricks – Go DevMENTAL – Site Home – MSDN Blogs

Summary learned from the page: Thanks, Susan!

Line Copy

If you want to copy a single line of code, did you know you can just put the cursor anywhere on the line of code and then use to copy the line to your clipboard. When no text is selected, the default is to select the entire line.

How to Not Accidentally Copy a Blank Line

From the menu, select Tools | Options | Text Editor | All Languages
Then deselect the checkbox beside Apply Cut or Copy Commands to blank lines when there is no selection

How to Cycle the Clipboard Ring

Each item you copy to the clipboard is kept in the clipboard ring, you can actually cycle through the clipboard ring by using the keyboard shortcut .

Add Code Snippets to the Toolbox

If you select code and drag it to the toolbox it is saved and at any time you can drag the code from the toolbox back to your code to paste it. The best part is the code you drag to the toolbox will be kept there from project to project, even when you close and re-open Visual Studio. It’s a great place to put favorite comment blocks, error handling, or any other code you want to be able to re-use.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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