Reputation: 5941
In Visual Studio 2010 what is the hotkey binding name for duplicating a line in the keyboard editor? I want to change it from
CTRL + C / CTRL + V
to
CTRL + SHIFT + DOWN
Then I can be happy and content :)
Upvotes: 0
Views: 64
Reputation: 5818
This can be done by creating Macro
. To create the macro, follow these steps.
My Macros
and click New Module
.In the module created copy and paste the code.
Sub DuplicateLine()
Dim line As String
DTE.ActiveDocument.Selection.StartOfLine(0)
DTE.ActiveDocument.Selection.EndOfLine(True)
line = DTE.ActiveDocument.Selection.Text
DTE.ActiveDocument.Selection.EndOfLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.StartOfLine(0)
DTE.ActiveDocument.Selection.Text = line
End Sub
Now just assign a keyboard shortcut to it:
*Source: * http://www.herrodius.com/blog/52
Upvotes: 1