Tips and Tricks: Clipboard Ring and Toolbox Snippets

“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.

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!

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.

@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]

8 years ago

Jan Kučera

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

8 years ago

Ben

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

8 years ago

Henry Widdler

@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.

8 years ago

Gideon

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

7 years ago

eLAB.com.au

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

7 years ago

Mahen

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