I keep forgetting where and how to find this feature. Turns out the Command menu gives us such features:
- Commands – Apply Source Formatting (to Selection)
Applies the correct indentations to the entire file, or your selection only. It’s the equivalent of Xcode’s “Editor – Structure – Re-Indent”.
To manually move blocks of code, select the lines that need to be shifted, then hold down OPTION + CMD and press the square brackets to indent and outdent respectively. Not sure what these keys are on Windows.
Collapsing Code
On this note, it is also possible to collapse code that you don’t want to look at. It’s not as easy as using Xcode’s method collapse option. In Dreamweaver, you select the code you want to collapse, then hit one of the little triangles that appears on the left hand side.