iOS開發-xCode代碼格式化xAlign

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;插件

3.重啓xCode,加載xAlign;
4.卸載
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

 
相關文章
相關標籤/搜索