What is the key for duplicating a line in Microsoft Visual Studio 2012? (in Notepad++ it is ctrl+D )
            Asked
            
        
        
            Active
            
        
            Viewed 4,358 times
        
    10
            
            
        - 
                    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 Answers
7
            
            
        Check this extension:
- Duplicate Selection extension : http://visualstudiogallery.msdn.microsoft.com/830a6482-3b8f-41a8-97b5-b9c581e5ad8b
 
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
- 
                    3
 - 
                    4Copying 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