Skip to content

Tip 1.2: How to cycle through the Clipboard ring to paste different things

January 31, 2011

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

Sara Aside

For Sara, this is yet another one of those moments where she exclaims, “Why can’t I ever remember this tip?! It would save me so much time! Argh!” But then again, every time she’s reminded about this tip, it’s like getting a little gift in the mail.

You can cycle through the past 20 items you’ve either cut or copied onto the Clipboard via Ctrl+Shift+V. Pretty cool, huh?
To illustrate, let’s suppose you have two Console.WriteLine() calls and you need to swap the two strings, as shown in the following example:

2 Console.WriteLine() calls

Start by cutting both strings: “World” first, and “Hello” second. Now go to the first Console. WriteLine() call. When you press Ctrl+Shift+V once inside the parentheses, you’ll get the following changes to the code:
Ctrl+Shift+V Pressed once in first Console.WriteLine() call

Next, move to the second Console.WriteLine() call, and press Ctrl+Shift+V twice in a row. You’ll get this:

Ctrl+Shift+V Pressed twice in second Console.WriteLine() call

And you store up to 20 items before the Clipboard cycles, meaning that it’ll go back to the first item still recorded on the Clipboard. This is why the feature is called a Clipboard ring.

Happy && Productive Coding! =)

Advertisements
One Comment
  1. Greg permalink

    Highlight some text, grab it, and pull it to the toolbox. Don’t know how many you can store there, but it works wonderfully.

Leave a Reply

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

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

%d bloggers like this: