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
Pingback: Dew Drop - January 15, 2018 (#2643) - Morning Dew
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.
Thanks Shahzad. This is an excellent feature as well. I posted about clipboard ring as well – Did you know – In Visual Studio you can copy multiple code blocks together and paste them one by one ?