IntelliJ IDEA: move line?

I really like IntelliJ IDEA. Shortcut of the Move statement ( Ctrl + Shift + ↑ / ↓ ). However - I'm not sure if this is a bug that was released for ActionScript editing only. The move operation is not always what I want, and sometimes this is not true when editing AS code.

So I just want to move the row block up / down. Shortcut Eclipse Alt + ↑ / ↓ and does not move according to the instructions. Is there an equivalent in IntelliJ IDEA?

+49
intellij-idea keyboard-shortcuts
Dec 11 '09 at 17:24
source share
4 answers

Go to Settings β†’ Keymap , then search for β€œmove line” through the top right search query.

In the Code folder you will see:

  • Swap expression down
  • Move expression up
  • Move row down
  • Move line up

The actions you are looking for are (as you might guess) the actions of the line of movement.

+51
Dec 02 2018-11-21T00:
source share
β€” -

As other people say, it is already available as a team. You can adjust the reduction to your liking, but by default (at least in IntelliJ 10) it is tied to ALT + SHIFT + ↑ and ALT + SHIFT + ↓

+53
Dec 07 2018-11-11T00:
source share

The LineMover plugin works very well and is an acceptable solution.

+3
Dec 16 '09 at 20:56
source share

You can move multiple lines with the move instruction. Are you trying to move partial lines? I do not think that there is a way in Idea.

0
Dec 11 '09 at 18:56
source share



All Articles