Summary of Rearranging Code
In this tutorial we took at look at some fast ways to move statements and lines around in your classes. We then looked at an example and applied our code arrangement rules.
Here are some of the shortcuts that we used and some additional ones that you can try out.
|Name||macOS Shortcut||Windows Shortcut|
|Move a Line Up||⌥⇧↑||Alt+Shift+Up Arrow|
|Move a Line Down||⌥⇧↓||Alt+Shift+Down Arrow|
|Move a Statement Up||⇧⌘↑||Ctrl+Shift+Up Arrow|
|Move a Statement Down||⇧⌘↓||Ctrl+Shift+Down Arrow|
|Search everywhere dialog||⇧⇧||Shift+Shift|
|Preferences/Settings dialog dialog||⌘,||Ctrl+Shift+S|
|Commit Tool Window||⌘0||Alt+0|
|Project Tool Window||⌘1||Alt+1|