Visual Studio Clipboard Ring
Visual Studio supports the standard clipboard features for cutting, copying and pasting code within and between code windows. The Clipboard Ring feature enhances this support by providing a history of items added to the clipboard that may each be pasted.
It is almost certain that you have used the cut, copy and paste features of Microsoft Windows to move or duplicate code in a Visual Studio project. Usually the cut command is issued by pressing Ctrl-X, or the copy command by pressing Ctrl-C, to add information to the clipboard. This can later be added back to the source code in an editor using the paste command or by pressing Ctrl-V.
When using Visual Studio, any text that is placed in the clipboard is also added to the Clipboard Ring. This holds a brief history of the last items that have been cut or copied. To paste an item from the clipboard ring instead of the clipboard directly, you can press Ctrl-Shift-V. This pastes the latest item that was copied. If you hold the Ctrl and Shift keys you will see that the inserted text is changed each time the V key is pressed. This allows you to cycle through the clipboard ring until you find the desired item. You can then release Ctrl and Shift to leave the newly pasted text in place.
The clipboard ring is especially useful when you wish to move or copy several blocks of code from one file to another. Without the clipboard ring you would need to repeatedly copy one item, switch to the destination window and paste the copied code. By using the clipboard ring you can copy several blocks of text before switching windows and pasting each using Ctrl-Shift-V.
30 September 2010