Tips And Tricks, VS2005

Copy and Paste in Visual Studio and MS SQL Server Management Studio.

I realized that many people don’t know how easy Visual Studio or SQL Server Management Studio allows us to copy, cut & paste. I’m sure that many of you know that but if you don’t, please give it try I’m sure that you’ll save some time.

Even my mother knows Ctrl-C, Ctrl-X, & Ctrl-V shortcuts to copy, cut, & paste. But do you know that you don’t need to select a line to copy/cut it. Just move cursor to the line you want to copy/cut and press Ctrl-C or Ctrl-X, the whole line will be copied into the clipboard.
We copied a line, now we can paste it. The line always will be posted above the line where you cursor is. And you cursor can be in any position on that line; I repeat ANY position of the line.
Do you know that you can cycle through the clipboard ring? Here’s the example where we are going to swap ‘var1’ and ‘var2’ words:

public void foo()
string s1 = "var1";
string s2 = "var2"

  • First double click on word ‘var1’, to select it and then press Ctrl-C, to put the selection into the clipboard.
  • Next double click on word ‘var2 and press Ctrl-C again. Now we have both selections in the clipboard.
  • Now double click on word ‘var1’ again and replace it with ‘var2’ by pressing Ctrl-V. So far nothing new.
  • Last, double click on word ‘var2’ on the next line where we’re declaring variable s2 and press Ctrl-Shift-V twice (it means two times :) ).

kick it on


9 thoughts on “Copy and Paste in Visual Studio and MS SQL Server Management Studio.

  1. I recall there used to be a toolbox panel that showed the contents of the clipboard ring that seems to have disappeared in VS 2005. You have any idea where that is?

  2. And any idea how to disable it in Visual Studio ? I find it more boring than useful…

    For example :
    Copy (Ctrl-C) some text, go to the place where you want to paste it, and then you hit Ctrl-C instead of Ctrl-V (yes, I have big fingers)… Well you can’t paste your text any more, you have to go back, copy again, and paste. And when you had cut the text, you even have to undo !

    Just found something in the options, but only for cutting/copying empty lines. Good, but just not enough…

Leave a Reply

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

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