Have you ever wonder if you could copy multiple lines of code and past them as and when need. Wouldn’t it improve your development productivity? Just copy multiple code block, and past them as and when need. Well, this is another hidden feature of Visual Studio and either many of us never used it or generally forget about it ! But it is there since beginning. This built-in feature is known as “Clipboard Ring”. The way it works is very simple; all the cute / copy text items are stored in a memory and you can use them as and when need by paste.
for Cyclic paste from the Clipboards, you need to paste using Ctrl+Sift+V
So, this is how it works.
- Copy / Cut number of code blocks.
- Paste them using Ctrl+Shit+V Option
- use the same key set to paste the information as long as you are not seeing the right code block for you.
The clipboard store only the last 15 text items in the memory
For an example, consider you have following blocks of code snippet and you did copy of three different code segments one by one as highlighted below.
Now, you have three different code block in the clipboard, start pressing Ctrl+Shift+V , as long as you are not getting your required code block.
You can continue copy code block again after / during the past, and clipboard would keep last 15 items in memory. This is very very powerful feature if you can you it in a right way.
Hope this helps.