Move Block Up/Down Using Keyboard

Use the keyboard to move a line or selection up or down in your file.

We want to operate on code in the editor fast. Using Cut-and-Paste is kinda fast, but there's a better way that doesn't temporarily remove the code from your file.

Make a selection (without using the mouse) and use ⌥⇧↑ (macOS) / Shift+Alt+Up Arrow (Windows/Linux) or ⌥⇧↓ (macOS) / Shift+Alt+Down Arrow (Windows/Linux) to move that selection to the target line. The selection gets dragged along, in view.

With cut-and-paste, you have semi-dangerously remove your code, then make a new line to put place the selection, then paste.


Related Resources

Navigation Bar - All the power!
Navigation Bar - All the power!
The Navigation Bar can do much more than you think!
Clean Up Messy Imports With Optimize Imports
Clean Up Messy Imports With Optimize Imports
Quickly remove any unused imports and more.
Find in Path with the Navigation Bar
Find in Path with the Navigation Bar
Use the Navigation bar and Find in File together and be faster than all of your team members.