Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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:

Alt+Up Arrow – Moves a line up
Alt+Down Arrow – Moves a line down

To change the shortcut keys:

  • In the Visual Studio main menu go to Tools -> Options
  • Expand Environment
  • Select Keyboard
  • In the Show commands containing box type Tools.MoveLineUp or Tools.MoveLineDown
  • In the Press shortcut keys box press the new shortcut keys
  • Click Assign
share|improve this answer
add comment

SHIFT+ALT+T. this moves current line down. look for Edit.LineTranspose in link http://msdn.microsoft.com/en-us/library/da5kh0wa(v=vs.110).aspx

share|improve this answer
1  
This moves the line down, but I guess there isn't a way to move up. +1 anyway –  BrunoLM Sep 28 '12 at 23:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.