Eclipse IDE Shortcut: Move Code Up/Down

Apr 20, 2009

A while ago I posted about some shortcuts I often use in Eclipse. Well this morning I found a new shortcut that I can't believe I never knew about; and while borderline, I deemed it worthy of it's own post!

ALT + UP-ARROW
ALT + DOWN-ARROW

I tend to be an ordering freak and this little gem of simplicity is way better than cutting and pasting. This short-cut key will move any line your cursor is on or any lines you have selected in the direction you press.

Comments

Bradley Moore

Bradley Moore wrote on 04/20/09 2:34 PM

There's another awesome shortcut to go with moving lines up/down.

Ctrl + Alt + Up/Down

This duplicates the current line(s) above or below itself. I usually duplicate the line, then move the line where needed with alt + up/down.

Write your comment



(it will not be displayed)



Subscribe to this comment thread