Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 5 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
    
For VS2013, it looks like this functionality is in LineMan – Jarrod Dixon Dec 29 '14 at 1:47

Shift+Alt+T moves the current line down. Look for "Edit.LineTranspose" in Pre-defined Keyboard Shortcuts.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .