10

What is the key for duplicating a line in Microsoft Visual Studio 2012? (in Notepad++ it is ctrl+D )

1

3 Answers 3

7

Check this extension:

Duplicate the line without touching the clipboard (as Notepad++ does).

1
  • Nice! You should be selected as the best answer dude!
    – Lamaseed
    Commented May 20, 2016 at 14:40
1

Just to make it absolutely clear

ctrl-C at the start of a line copies the whole line without your needing to select it

source Shortcut for duplicating a line of code in Visual Studio 11

2
  • 3
    Ctrl-C should copy the whole line from anywhere on the line.
    – 10gistic
    Commented Jan 24, 2013 at 15:05
  • 4
    Copying and pasting isn't the same as duplicating as ctrl+D in N++ preserves the contents of the clipboard. In VS2010 I had a macro to do this but macros don't seem to be around anymore :-( If anyone knows a way to do it again in 2012 that would be really helpful.
    – Ben
    Commented Mar 7, 2013 at 9:38
0

Here's a list of keyboard shortcuts, but don't see a duplicate on it. Ctrl+C/Ctrl+V may be your best bet or see if there's something you can define under Tools>Options>Keyboard.

1
  • thanq, no shortcut key for duplicate in visual studio
    – finder
    Commented Sep 15, 2012 at 5:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.