Did you know – Now you can duplicate Line of Code without losing your clipboard content within Visual Studio?

Did you know – Now you can duplicate Line of Code without losing your clipboard content within Visual Studio?

The recent release of Visual Studio 2017 Preview version introduced a very small but useful feature – Duplicate Line of Code. Until now If we need to duplicate a line, we need to follow the standard copy & paste flow. With that, we lose the previous clipboard content. Now, Visual Studio allows us to quickly duplicate a line of code without losing the contents of clipboards. You can just duplicate the line by using Ctrl+E,V 

This will keep your copy clipboard content intact, and you can past the previously copied information’s.

This works well with block of code as well. Select the block of code and then use the duplicate shortcut key – Ctrl+E,V

You can now find the Duplicate Ctrl+E,V  option from Edit Menu.

This is a very small feature but will definitely make you more productive.

P.S –  This feature is available in Visual Studio 2017 Version 15.6 Preview 2

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

3 Comments to “Did you know – Now you can duplicate Line of Code without losing your clipboard content within Visual Studio?”

  1. Thanks for sharing. Visual Studio has a “Clipboard Ring” feature which you can access by pressing Ctrl + Shift + V. Keep pressing that and you will get the previously copied entries. So you wouldn’t lose the clipboard contents. Ctrl + E, V is added for a convenience I guess.

Comments are closed.