An amazing Xcode Source Editor extension to align regular code. It can align Xnything in any way you want.
Objective-C
Switch branches/tags
Nothing to show
Clone or download
Latest commit b9e65c5 Dec 13, 2016
Permalink
Failed to load latest commit information.
Design Xcode 8 with <3 Nov 9, 2016
Source Xcode 8 with <3 Nov 9, 2016
SourceEditorExtension Xcode 8 with <3 Nov 9, 2016
XAlign.xcodeproj Fix bug Nov 11, 2016
XAlign []~( ̄▽ ̄)~* Nov 11, 2016
.gitignore Xcode 8 with <3 Nov 9, 2016
LICENSE Initial commit Dec 1, 2013
README.md Update README.md Dec 13, 2016

README.md

XAlign (Ready for Xcode 8+ 🚀)

An amazing Xcode Source Editor extension to align regular code. It can align anything by using custom alignment patterns.

What's XAlign

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.

Tips:

  • 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

Equal

Align by define group

Define

Align by property group

Property

Todo:

  • Much easier to customize alignment patterns.

Install on Xcode 8

  1. Download the XAlign.dmg📎 or XAlign.app.zip📎
  2. Open and copy XAlign.app to /Applications folder
  3. Run it then close it.

Usage

1. Enable XAlign

Check System Preferences -> Extensions -> Xocde Source Editor -> XAlign

help-1

2. Setting Shortcut in Xocde

Preferences -> Key bindings -> Filter: xalign

help-2

Trouble Shooting

  • 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;

Want to help

Special thanks to

  • Geek Zoo Studio Geek Zoo Studio

    They provide awesome design and development works continues to help the open-source community even better.

  • BeeFramework

    BeeFramework is a new generation of development framework which makes faster and easier app development, Build your app by geek's way.