在xcode中格式化代码
1.安装homebrew
/usr/bin/ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
2.安装uncrustify
brew install uncrustify
3.下载配置好的workflow包
http://by-igotit.com/wordpress/wp-content/uploads/2012/03/Uncrustify-Objective-C.workflow.tar.gz
4.解压缩workflow包
mv Uncrustify-Objective-C.workflow.tar.gz ~/Library/Services/ cd ~/Library/Services/ tar zxvf Uncrustify-Objective-C.workflow.tar.gz
5.下载针对Objective-C语言的Uncrustify配置文件
http://by-igotit.com/wordpress/wp-content/uploads/2012/03/uncrustify_obj_c.txt
6.移动配置文件到用户主目录
mv uncrustify_obj_c.txt ~/.uncrustify_obj_c.cfg
7.在keyboardshortcuts中配置快捷键command+shift+F
8.在xcode中,全选code,使用快捷键格式化code,或者右键在services中uncrustifyObjective-C
相关推荐
tozeroblog 2020-06-09
blackeagleoht 2020-05-07
swency 2011-05-13
XUELEI00 2013-08-06
wufan0 2019-06-27
softwear 2019-06-27
87201943 2012-09-06
FORLIVEFORLIFE 2013-01-16
zgzczzw 2017-09-06
yuwinter 2012-05-16
coderMozart 2018-02-23
coderMozart 2018-03-01
lispython 2016-03-23
Pythonandme 2019-04-19
JasonThinking 2012-12-28
舜岳 2011-01-12
digwtx 2018-05-25