DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

Move Line Up / Down

Explained by Updated

What is Move Line Up / Down?

Move Line Up / Down: Move the current line (or selected block) up or down without cut-and-paste. Move line up or down shifts the current line, or a selected block, one line at a time without cutting and pasting. In VS Code it is Alt+Up/Down or Option+Up/Down. JetBrains IDEs use Alt+Shift+Up/Down or Option+Shift+Up/Down. It is handy for reordering statements, list items, CSS rules or array entries. Your clipboard stays untouched, and the editor keeps indentation correct as the line moves.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Move Line Up / Down

What should you keep in mind with Move Line Up / Down?

JetBrains also offers "move statement", Ctrl+Shift+Up/Down, which moves a whole method or block as a unit and respects the code structure. Combined with duplicate line and delete line, these shortcuts handle most of the small edits you make all day without reaching for the mouse.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with M

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.