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:XAlign/patterns.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

Align by define group

Align by property group

Todo:

  • Much easier to customize alignment patterns.

Install & Update

Via source

  1. Clone this repo

  2. Then build the XAlign target in the Xcode project and the plug-in will automatically be installed in~/Library/Application Support/Developer/Shared/Xcode/Plug-ins

  3. Restart Xcode.

Via command-line

curl -fsSL http://qfi.sh/XAlign/build/install.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 -fsSL http://qfi.sh/XAlign/build/uninstall.sh | sh

or Delete the following directory:

~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XAlign.xcplugin

使用方法

安装

下载后运行工程

开启

Xcode -> Edit -> XAlign

自动对齐快捷键

shfit + cmd + x

git地址

https://github.com/qfish/XAlign

XAlign—自动对齐代码插件的更多相关文章

  1. Windows Live Writer代码插件整理

    以下code插件命名按照 Windows Live Writer 中显示的插件名 1.Source code plug-in(cnblogs官方推荐) 界面: 效果: /** * Returns th ...

  2. Open Live Writer增加代码插件

          作为一名程序员,免不了和代码打交道,自然在写博客的时候,也会用到代码的展示,Open Live Writer确实是一个不错的工具,不用再去登录博客的后台,就可以在本地进行文章的编写,但是致 ...

  3. win7 下的open live writer代码插件

    open live writer 是博客园官方推荐的编辑器.恰好被它的各种便利吸引住了,于是花点时间研究一下,结果又用了好长时间,因为代码插件一时安装不了.在这里推荐小伙伴们可以先去看看这篇博文:ht ...

  4. SpringBoot 添加mybatis generator 自动生成代码插件

    自动生成数据层代码,提高开发效率 1.pom添加插件,并指定配置文件路径 <!-- mybatis generator 自动生成代码插件 --> <plugin> <gr ...

  5. vscode格式化代码插件Beautify

    vscode格式化代码安装 VsCode 格式化代码插件搜索并安装 Beautify 格式化代码插件使用:打开要格式化的文件 —> F1 —> Beautify file —> 选择 ...

  6. 前端html、CSS快速编写代码插件-Emmet使用方法技巧详解

    前端html.CSS快速编写代码插件-Emmet使用方法技巧详解   Emmet的前身是大名鼎鼎的Zen coding,如果你从事Web前端开发的话,对该插件一定不会陌生.它使用仿CSS选择器的语法来 ...

  7. sublime自动格式化代码插件HTML-CSS-JS Prettify安装

    sublime自动格式化代码插件HTML-CSS-JS Prettify安装 问题: 用 Sublime Text 格式化代码(安装 HTML-CSS-JS Prettify 插件)时,格式化时却会提 ...

  8. sublime text3安装格式化代码插件

    1.代码提示插件:sublimeCodeIntel a)在Sublime Text 3中,按下Ctrl+Shift+P调出命令面板;b)输入install 调出 Install Package 选项并 ...

  9. 编写一个Open Live Writer的VSCode代码插件

    起因 又是一年多没有更新过博客了,最近用Arduino做了一点有意思的东西,准备写一篇博客.打开尘封许久的博客园,发现因为Windows Live Writer停止更新,博客园推荐的客户端变为了Ope ...

随机推荐

  1. 洛谷 P3960 列队 解题报告

    P3960 列队 题目描述 \(Sylvia\)是一个热爱学习的女♂孩子. 前段时间,\(Sylvia\)参加了学校的军训.众所周知,军训的时候需要站方阵. \(Sylvia\)所在的方阵中有\(n ...

  2. 1 Easy Read/Write Splitting with PHP’s MySQLnd

    以下均是使用翻译软件翻译的! Note: This is part one in our Extending MySQL with PHP's MySQLnd Series, read part 2 ...

  3. SpringAOP简介

    AOP(Aspect Orient Programming) --- 面向切面编程 将分散在各个业务逻辑中的相同代码 通过 “横向”切割方式抽取到独立模块中 方式抽取到独立模块中;[它针对的是程序运行 ...

  4. 【单调队列】【P1776】宝物筛选

    传送门 Description 终于,破解了千年的难题.小FF找到了王室的宝物室,里面堆满了无数价值连城的宝物--这下小FF可发财了,嘎嘎.但是这里的宝物实在是太多了,小FF的采集车似乎装不下那么多宝 ...

  5. Apple Tree POJ - 3321 dfs序列构造树状数组(好题)

    There is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. ...

  6. mybatis主键返回的实现

    向数据库中插入数据时,大多数情况都会使用自增列或者UUID做为主键.主键的值都是插入之前无法知道的,但很多情况下我们在插入数据后需要使用刚刚插入数据的主键,比如向两张关联表A.B中插入数据(A的主键是 ...

  7. BZOJ1105 [POI2007]石头花园SKA 贪心

    [POI2007]石头花园SKA Time Limit: 20 Sec  Memory Limit: 162 MBSubmit: 776  Solved: 237[Submit][Status][Di ...

  8. Android编程之LayoutInflater的inflate方法详解

    LayoutInflater的inflate方法,在fragment的onCreateView方法中经常用到: public View onCreateView(LayoutInflater infl ...

  9. Ubuntu 15.04 安装配置Apache和mysql的方法

    前 言 上篇海面特效的博文结尾提到了SideFX开发的HQueue分布式集群,配置HQueue首先需要安装mysql,所以今天先分享一下如何在Ubuntu系统中安装mysql和Apache: Ubun ...

  10. John's trip(POJ1041+欧拉回路+打印路径)

    题目链接:http://poj.org/problem?id=1041 题目: 题意:给你n条街道,m个路口,每次输入以0 0结束,给你的u v t分别表示路口u和v由t这条街道连接,要输出从起点出发 ...