Move Block Up/Down Using Keyboard

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

Move lines and blocks, up or down, using the keyboard.

When you're in the flow, you want to re-arrange code fast. Use this tip to move code around without cut-and-paste.

How to use:

Move Statement Up with ⌘⇧↑ (macOS) / Ctrl+Shift+Up Arrow (Windows/Linux).

Move Statement Down with ⌘⇧↑ (macOS) / Ctrl+Shift+Up Arrow (Windows/Linux).


Related Resources

Go doc comments in quick documentation
Go doc comments in quick documentation
Support for links, lists, and new headings in doc comments.
Quick Documentation
Quick Documentation
View documentation for any symbol without interrupting your workflow.
Perform simple math in Search Everywhere
Perform simple math in Search Everywhere
Quickly perform simple math operations from the comfort of your IDE.