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

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.
Speed search with the Navigation Bar
Speed search with the Navigation Bar
Use the keyboard abbreviations to quickly find what you're looking for in the Navigation bar.