XAlign (Ready for Xcode 8+
An amazing Xcode Source Editor extension to align regular code. It can align anything by using custom alignment patterns.
Here are some example alignment patterns. Of course you can make your own. The pattern file is here:
/Source/Patterns.bundle/default.plist, and the patterns are based on regular expression.
- You may not like the alignment style below, try it yourself or tell me at the Issues. :)
- There is no need to align all codes at a time when they are complicated, try to align by group which the codes are more similar in.
- 默认对齐的风格不是你喜欢的，可以自定义，或者提个 Issues。
Align by equals sign
Align by define group
Align by property group
- Much easier to customize alignment patterns.
Install on Xcode 8
- Download the XAlign.dmg
📎or XAlign.app.zip 📎
- Open and copy
- Run it then close it.
1. Enable XAlign
Check System Preferences -> Extensions -> Xocde Source Editor -> XAlign
2. Setting Shortcut in Xocde
Preferences -> Key bindings -> Filter: xalign
- Please install macOS Sierra (version 10.12) if your macOS is 10.11.
- If you are looking for the version supporting Xcode 7, check this branch;