Move line Up/Down shortcut in Visual Studio 2012

后端 未结 9 1655
广开言路
广开言路 2021-01-30 15:59

In VS2010 I had a shortcut set up Alt+Up/Down to move lines of code up or down, just like I used to have in Eclipse in my Java days.

Now since Powe

相关标签:
9条回答
  • 2021-01-30 16:30

    In Visual Studio 2017(atleast) I have below

    0 讨论(0)
  • 2021-01-30 16:32

    For those who arrived on this question using Visual Studio 2013 or above, the feature is built right into the program. Just use AltUp and AltDown to move the line with your cursor—or the selected lines—up and down.

    If you wish to rebind it in Tools > Options > Environment > Keyboard, the keys are Edit.MoveSelectedLinesUp and Edit.MoveSelectedLinesDown. You may need to remove your new combination from other existing keys first.

    0 讨论(0)
  • 2021-01-30 16:35

    Update: huzzah, Productivity PowerTools VS2012 is now available and offers this functionality (along with another personal favorite, Tools.AddEndTokenAtTheEnd.)

    MoveLine Extension (compatible with VS 2012; I had to manually restart my VS in order to see the commands in VS's keyboard shortcut tool.)

    0 讨论(0)
提交回复
热议问题