Wednesday, September 11, 2013

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.

No comments :