Skip to content

About

A Visual Studio extension that adds a command for duplicating the current selection (or line).

Resources

Stars

47 stars

Watchers

3 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duplicate Selection

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 / Screenshots

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

Before After
No Selection Before No Selection After
Multiline Stream Before Multiline Stream After
Single Line Stream Before Single Line Stream After
Block Before Block 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
Partial Multiline Stream Before Partial Multiline Stream After

About

A Visual Studio extension that adds a command for duplicating the current selection (or line).

Resources

Stars

47 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages