Visual Studio: hotkeys to move line up/down and move through recent changes

前端 未结 9 2203
清酒与你
清酒与你 2020-12-07 11:53

I\'m moving from Eclipse to Visual Studio .NET and have found all my beloved hotkeys except two:

  • in Eclipse you can press ALT- and
9条回答
  •  执笔经年
    2020-12-07 12:07

    I have recently done the same thing and moved from Eclipse to Visual Studio when I moved onto a new project. The Resharper add in is highly recommended - it adds some of the rich editing, navigational and refactoring functionality that eclipse has to VS.

    Resharper also allows you to use a keybaord mapping scheme that is very simillar to InteliJ. Very handy for the Java escapees...

    Regarding your second question, Resharper has the same move code up / down function as eclipse, but with some caveats. Firstly, using the InteliJ keyboard mappings, the key combination is rather tortuous.

    Move code up: ctrl + shift + alt + up cursor

    Move code down: ctrl + shift + alt + down cursor

    Secondly, it does not always move by just one line, but actually jumps code blocks. So it cannot move a line from outside an if statement to inside it - it jumps the selected line right over the if block. To do that you need to move "left" and "right" using

    Move code into outer code block: ctrl + shift + alt + left cursor

    Move code into next inner code block: ctrl + shift + alt + right cursor

提交回复
热议问题