Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Duplicate Selection VS2010
Duplicate Selection VS2010

Duplicate Selection VS2010

ctlajoie

|
288 installs
| (0) | Free
Adds a command to Visual Studio to duplicate the current selection (or line). By default, this is bound to Alt+D.
Download

NOTE: This is the legacy version of the extension, supporting Visual Studio 2010. For the current version, go here.

This Visual Studio extension adds a "Duplicate Selection" command that you can bind to a keyboard shortcut of your choosing (but I recommend Ctrl+D).When invoked, the command inserts whatever text you have selected in front of the current selection.Alternatively, if you do not have a selection, it duplicates the line the caret is on.

Key Binding

To change the keyboard shortcut that the command is bound to, go into Tools > Options > Keyboard, and type "Duplicate" in the search box (the full command string is "Edit.DuplicateSelection"). Here you can bind it to any shortcut in the same way you would for any other command.

Examples

Below are some before and after screenshots to help illustrate what the command will do in different situations.

Before After
   
   
   
   

 

If you select multiple lines but the selection does not  encompass each line entirely, all lines that your selection touches will be duplicated.

Before After
   

 

The source code is available on Github: http://github.com/ctlajoie/DupSelection

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft