10

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

CharlesB
  • 86,532
  • 28
  • 194
  • 218
finder
  • 111
  • 1
  • 4
  • possible duplicate of [Visual Studio : short cut Key : Duplicate Line](http://stackoverflow.com/questions/2279000/visual-studio-short-cut-key-duplicate-line) – bluish Sep 18 '15 at 07:08

3 Answers3

7

Check this extension:

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

nergeia
  • 894
  • 13
  • 20
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

Community
  • 1
  • 1
ioikka
  • 189
  • 2
  • 11
  • 3
    Ctrl-C should copy the whole line from anywhere on the line. – 10gistic Jan 24 '13 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 Mar 07 '13 at 09: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.

Jim O'Neil
  • 23,344
  • 7
  • 42
  • 67