IntelliJ IDEA: Move line?

Joa Ebert picture Joa Ebert · Dec 11, 2009 · Viewed 52.2k times · Source

I really like IntelliJ IDEA's "Move statement" shortcut (Ctrl + Shift + /). However -- I am not sure if this is a bug releated to ActionScript editing only -- move statement is not always what I want and sometimes it is not correct when editing AS code.

So I just want to move a block of lines up/down. The Eclipse shortcut is Alt + / and does not move statement-wise. Is there an equivalent in IntelliJ IDEA?

Answer

Kai Zimmer picture Kai Zimmer · Dec 2, 2011

Open Setings -> Keymap then search for "move line" via the upper right searchbox.

Under the Code folder you'll see:

  • Move Statement Down
  • Move Statement Up
  • Move Line Down
  • Move Line Up

The actions you're looking for are (as you may guess) the move line actions.