Tips and Tricks: Clipboard Ring and Toolbox Snippets

Tips and Tricks: Clipboard Ring and Toolbox Snippets

Rate This
  • Comments 12

I was spending some time responding to Connect bugs the other day when I ran across this suggestion:

“It would be nice to have a clip board history window that could be next to the control toolbox as a nice utility window. (Often in presentations I see Microsoft presenters using a custom clipboard tool for such a purpose).

Many times I wish I could go back to something I copied & pasted just a few minutes ago, then to have to go and copy the same text all over again.”

Turns out that Visual Studio already has this “hidden” feature.  It’s called the Clipboard Ring.  If you copy a number of items to the clipboard, pressing [Ctrl]+[Shift]+[V] will paste the last text that was copied, but it will also highlight the pasted phrase.  Continue holding down [Ctrl]+[Shift] and press [V] again.  This will cause that highlighted section to cycle through the other items on the clipboard.  This is extremely useful when you have to copy multiple lines of separate text to a new document. 

Now, you might be saying, “Great, but what if I want to save a piece of code that I use frequently in multiple places?  I don’t want to have to cycle through the clipboard ring every time.”  Well, there’s also a feature for that!  If you highlight a section of code (or text) and drag it to the Toolbox, VS will create a "snippet” (not to be confused with code snippets) that can be dragged into the VS editor.

image

This feature is extremely useful for code demos where you don’t want to type out each line of code. 

Hope you find these tips useful!

  wespic Weston Hutchins – Program Manager, Visual Studio Shell Team
Short Bio: I started at Microsoft as an intern in 2005 and have been working in Visual Studio ever since.  I’m currently a PM on the VS Shell IDE team and work on the core IDE UI and services as well as the Extension Manager and http://visualstudiogallery.com integration. Prior to my current duties, I was the SKU manager for the Visual Studio Express products.
Leave a Comment
  • Please add 6 and 5 and type the answer here:
  • Post
  • No offence, but this sounds very lame to me. Have you ever heard for ClipX (http://bluemars.org/clipx/). This is pretty old program.

  • @Robert: Yes, and I strongly debated mentioning it in the post as a great 3rd-party clipboard manager.  In fact, I have it installed currently.  However, for this post, I just wanted to cover some features that shipped with Visual Studio that many people may not know about and can be quite useful.

  • @Wes: Thanks for the article, personally I had no idea what Ctrl+Shift+V does :-)

    As for the toolbox-snippets, this is exactly what I've seen Microsoft presenters use to "write" code faster during their Demo sessions.

    Alin Constantin

    [VS development]

  • Great tip, thanks! For those of us using Shift+Ins, seems the Ctrl+Shift+Ins does the trick.

  • I have been programming for about a year now and never really bothered to check out all the cool stuff that Visual studio actually has. This is definitely one of them. Thanks guy for posting this

  • @Robert

    I don't understand why you would think it was lame that Visual Studio contains a feature that you would happily install extra software to get. Either you like the feature or you don't.

  • haha.. I just saw Anders use it in a video and I had to google it the next minute. Sometimes I wonder just want VS doesn't have! lol

  • Hi Weston, I have been using this feature for a while, however, if i drag a code snippet to my toolbox - it only exists for that session. If I close and re-open VS2010 - its gone! Is there anyway to keep it there for next time?

    Thank you,

    Dale

  • In VS 2003, you could view the Clipboard Ring and select individual items to paste from there.

    Do you know how to view the ring in 2010?

  • That's very nice, but only works in Visual Studio. I use this tool www.cloudclipx.com/.../default.aspx to manage my clipboard. It is actually an integration between my clipboard and my iPhone, but if you download the tool from here www.cloudclipx.com/.../CloudClipX0-2Beta.zip you pretty much get only the Windows Clipboard History Manager

  • The Clipboard Ring exists in VS2010 and VS2012, however it is bound to Ctrl+Shift+Ins by default, NOT Ctrl+Shift-V.

    I edit my keyboard shortcuts to make it available on Ctrl-Shift-V, which to make makes a lot more sense (and is a lot more useful!) than the Code Visualization Window.

  • Thank You

Page 1 of 1 (12 items)