Summary

Summary and shortcuts we used

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.

Shortcuts Used

Here are some of the shortcuts that we used and some additional ones that you can try out.

arrangement settings

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
Format File ⌥⇧⌘L Ctrl+Alt+Shift+L
Format Code ⌥⌘L Ctrl+Alt+L
Search everywhere dialog ⇧⇧ Shift+Shift
Preferences/Settings dialog dialog ⌘, Ctrl+Shift+S
Find Action ⌘⇧A Ctrl+Shift+A
Commit Tool Window ⌘0 Alt+0
Project Tool Window ⌘1 Alt+1

Related Links