I would like to provide some supplementary information to @Ivan's answer.
Hit the Reformat Code (⌥ + ⌘ + L) action while you are in the editor for that.