xCode默认是能够进行代码格式化的,能知足基础开发需求,若是想要个性一些代码对齐方式宏对齐,等号对齐,属性对齐,xAlign就提供了以上三种功能,参考文中效果~curl
等号对齐:ui
属性对齐:url
宏对齐:spa
1.控制台命令
.net
curl -fsSL http://qfi.sh/XAlign/build/install.sh | sh
2.手动安装下载插件包:XAlign.xcplugin,将下载的插件放在~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/目录下,Finder路径寻找快捷键command + shift + G;插件
curl -fsSL http://qfi.sh/XAlign/build/uninstall.sh | sh
手动安装的直接到第二步~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/删除插件便可~
code
5.经过xCode→Edit→XAlign中的选项,cmd+shift+x便可看到效果~blog