Search code examples
visual-studio-2015keyboard-shortcuts

How to move line up and down in VS2015


I don't know if something has changed recently in Visual Studio 2015 but before I was able to press ALT + UP ARROW KEY or ALT + DOWN ARROW KEY to move lines in code up or down and now it does not do anything.

I went into Tools > Options > Environment > Keyboard and I cannot find anything like in the past called ProjectandSolutionContextMenus.Item.MoveUp or ProjectandSolutionContextMenus.Item.MoveDown

Also here in the list of VS2015 I don't see that option: http://visualstudioshortcuts.com/2015/

How to achieve this?


Solution

  • The commands you are looking for are Edit.MoveSelectedLinesUp and Edit.MoveSelectedLinesDown. Shortcuts for them should be defined in the Text Editor context.