I wonder how can I format my code to align it neatly? Does it have a feature similar to Eclipse's ctrlshiftf?
In the Xcode menu click [Editor] -> [Swimat] -> [Format] then the current active file will reformat. You can also create a hot-key in [Xcode] -> [Preferences..]
Xcode can fix this with one shortcut: select the code you want to fix, then press Ctrl+I to reindent it.
Select first the text you want to format and then press Ctrl+I.
Use Cmd+A first if you wish to format all text in the selected file.
Note: this procedure only re-indents the lines, it does not do any advanced formatting.
The new key binding to re-indent is control+I.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With