An amazing Xcode plugin 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:
XAlign/patterns.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 & Update
Clone this repo
Then build the
XAligntarget in the Xcode project and the plug-in will automatically be installed in
curl -fsSL http://qfi.sh/XAlign/build/install.sh | sh
- Download this package XAlign.tar.gz
Unpack it, copy or move the
XAlign.xcpluginto the following path:
Tips: To quickly go to Finder type
Shift + Cmd + G. If there is no
Plug-insdirectory, you should make one.
curl -fsSL http://qfi.sh/XAlign/build/uninstall.sh | sh
or Delete the following directory:
Xcode -> Edit -> XAlign
Auto Align Shortcut (default)
Shift + Cmd + X
You can choose the shortcut in the Settings panel,
Xcode -> Edit -> XAlign -> Setting.
New version Xcode ? Try this in your terminal :
Get current Xcode UUID
XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
Write it into the Plug-ins's plist
for f in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*; do defaults write "$f/Contents/Info" DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID; done
- Restart your Xcode, and select Load Bundles on the alert
Want to help
Special thanks to
They provide awesome design and development works continues to help the open-source community even better.
BeeFramework is a new generation of development framework which makes faster and easier app development, Build your app by geek's way.