Visual Studio 2017 - How do I duplicate the current line?

J.Doe picture J.Doe · Jul 16, 2017 · Viewed 7.1k times · Source

I want to duplicate the current line to a new line below it. I found this post but I can't find the option they're talking about (editor.action.copyLinesDownAction) in options > keyboard.

How do we do this in 2017?

Answer

JeffR picture JeffR · Jun 22, 2018

I'm not sure if this is a new feature from one of the updates but the following key combination works for me in VS 2017 (v 15.7.3):

Ctrl + E,V

This duplicates the current line that the cursor is on or it will duplicate any selected text and you won't lose the contents stored in the clipboard.
I have not tried remapping that command to a different key combination.