DEV Community

Cover image for Copying multiple code blocks together and paste them one by one
Emanuele Bartolesi
Emanuele Bartolesi

Posted on

Copying multiple code blocks together and paste them one by one

How many times do you navigate from one file to another multiple times to copy and paste small parts of code?
Especially during a refactoring?

There is a feature in Visual Studio 2022 called "Clipboard Ring" that can really help you.

How it works

You can start to copy (or cut) the code blocks with the usual key combination Ctrl+C or Ctrl+V

Instead of paste the code with the key combination Ctrl+V, paste them using Ctrl+Shift+V.

A dropdown appears close to the cursor with the list of your clipboard history from Visual Studio.
Now you can click directly to an item or you can use the number of the line that you want to paste.

That's all!

Image description

Top comments (0)