shortcut for moving marked block Follow
in Eclipse there is a shortcut where you can move around a marked block up and down (shortcut: Alt+down/up). This is quite handy instead of doing normal copy/paste, if you just want to move code snippets a few lines up and down.
Does IntelliJ provide this?
Please sign in to leave a comment.
The current selection can be shuffled up and down using CTRL+SHIFT-UpArrow and CTRL+SHIFT-DownArrow, resp.
Okay, I had another try. Weird enough it only works on method boundaries, moving marked blocks out of the method it does not work.
It's not supposed to. This is a semantic move operation, which tries to keep
the code meaningful after a move. It's hard to guess what would be the meaningful
way of moving code out of a method.
"Develop with Pleasure!"
but in coding day-life i am moving blocks around without needing this semantic-help. for instance:
having a unit test method and quickly moving an init-block to setUp method, which sits just above.