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. 《Java程序设计》第六周学习总结 20165218 2017-2018-1

    20165218 2017-2018-1 <Java程序设计>第六周学习总结 教材学习内容总结 第8章 常用实用类 String类 不可以有子类 在java.lang 包中,被默认引入 S ...

  2. 学习操作Mac OS 之 使用brew安装软件

    安装brew软件 安装方法:  在Mac中打开Termal:  输入命令: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercont ...

  3. bzoj3157: 国王奇遇记

    emmm...... 直接看题解好了: BZOJ-3157. 国王奇遇记 – Miskcoo's Space O(m)不懂扔掉 总之,给我们另一个处理复杂求和的方法: 找到函数之间的递推公式! 这里用 ...

  4. 【线性DP】【lgP1336】最佳课题选择

    传送门 Description Matrix67要在下个月交给老师n篇论文,论文的内容可以从m个课题中选择.由于课题数有限,Matrix67不得不重复选择一些课题.完成不同课题的论文所花的时间不同.具 ...

  5. JavaScript中的函数与栈

    Javascript中会经常用到setTimeout来推迟一个函数的执行,如: setTimeout(function(){ alert("Hello World"); },100 ...

  6. Codeforces Round #337 (Div. 2)B

    B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  7. Bigbluebutton安装过程

    BigBlueButton安装过程(翻译) 欢迎来到BigBlueButton 1.0-beta安装指南(以下简称BigBlueButton 1.0).BigBlueButton是一个开放源代码的网络 ...

  8. JS鼠标滚轮事件解析

    一.不同浏览器的鼠标滚轮事件 首先,不同的浏览器有不同的滚轮事件.主要是有两种,onmousewheel(IE/Opera/Chrome支持,firefox不支持)和DOMMouseScroll(只有 ...

  9. 详解ListView加载网络图片的优化

    我们来了解一些ListView在加载大量网络图片的时候存在的常见问题: 1.性能问题,ListView的滑动有卡顿,不流畅,造成非常糟糕的用户体验. 2.图片的错位问题. 3.图片太大,加载Bitma ...

  10. [SDOI2008]仪仗队 (洛谷P2158)

    洛谷题目链接:[SDOI2008]仪仗队 题目描述 作为体育委员,C君负责这次运动会仪仗队的训练.仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视 ...