Skip to content

200895045/XAlign

Repository files navigation

XAlign

An amazing Xcode plugin 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: main/main/patterns.plist, the patterns are based on regular expression. Just try it yourself.

Align by equals sign

Equal

Align by define group

Define

Align by property group

Property

Install & Update

Via command-line

 # install
 $ curl github.so/XAlign/build/install.sh | sh

 or

 # update
 $ curl github.so/XAlign/build/update.sh | sh

Manually

  1. Download this package XAlign.tar.gz

  2. Unpack it, copy or move the XAlign.xcplugin to the following path:

    ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/
    

    Tips: To quickly go to Finder type Shift + Cmd + G. If there is no Plug-ins directory, you should make one.

  3. Restart Xcode.

Uninstall

$ curl github.so/XAlign/build/uninstall.sh | sh

Usage

In Xcode

Xcode -> Edit -> XAlign 

Auto Align Shortcut (default)

Shift + Cmd + X

You can choose the shortcut in the Settings panel, Xcode -> Edit -> XAlign -> Setting.

Trouble-Shooting

Want to help

Special thanks to

  • Geek-Zoo

    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.

Todo:

  • How to customize your alignment patterns
  • My Xcode plugin template
  • etc.

About

代码对齐

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 99.0%
  • Shell 1.0%