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

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

Related Links