Is there a shortcut to move a line up/down?
Visual Studio 2010 Productivity Power Tools had this feature, is it built-in on Visual Studio 2012? Is there perhaps a light extension that adds this feature?
Is there a shortcut to move a line up/down?
Visual Studio 2010 Productivity Power Tools had this feature, is it built-in on Visual Studio 2012? Is there perhaps a light extension that adds this feature?
I found an extension for it: MoveLine
Compatible with VS2012. Moves a line, or group of lines, up or down in the editor using shortcut keys. Press the shortcut keys to move the line under the cursor up or down or select a block of text and press the shortcut keys to move the entire block up or down.
The default shortcut keys are as follows:
To change the shortcut keys:
Tools.MoveLineUp or Tools.MoveLineDownVS 2013+ should have this editor action built in - if you want to assign keybindings, go to:
Tools > Options > Keyboard
Search for the commands:
Edit.MoveSelectedLinesUp
Edit.MoveSelectedLinesDown
Set the shortcut keys in "Text Editor" scope
See Also: What's the equivalent for eclipse's ALT+UP/DOWN (move line) in Visual Studio?
Shift+Alt+T moves the current line down. Look for "Edit.LineTranspose" in Pre-defined Keyboard Shortcuts.