Source Insight 格式化
1、Artistic Style?下載地址:http://sourceforge.net/project/showfiles.php?group_id=2319l
2、在Source Insight掛載AStyle
2.1解壓到某個目錄(記住路徑,如D:\AStyle\)
2.2SourceInsight -> Options -> Custom Commands -> Add 在彈出的對話框中寫入命令名(最終會出現在View下面)
2.3在Run中添加相應命令:D:\AStyle\bin\AStyle.exe --style=ansi -s4 -S -N -L -m0 -M40 --convert-tabs --suffix=.pre %f
即,ansi C 格式化當前文件!
如果要格式化某個目錄下所有文件:
在Run中添加命令為:D:\AStyle\bin\AStyle.exe Z:\Android/*.c Z:Android/*.h?--style=ansi -s4 -S -N -L -m0 -M40 --recursive --convert-tabs --suffix=.pre %f
2.4Dir留空,將Iconic Window, Capture Output, Parse Links in OutPut, File,then Line 四項前打上勾。
2.5然后點對話框中右側的按鈕“Menu”, Menu--->Menu-->View--><end of menu>, 右側Insert, OK.
2.6此時在SourceInsight中的View菜單下多了個Style的子菜單選項,可以用它來對單個C/C++文件進行格式化。
?
參考:
http://blog.csdn.net/lb015331/article/details/6817599
http://blog.csdn.net/rishihk/article/details/2297093
轉載于:https://www.cnblogs.com/jimwind/archive/2013/05/08/3067724.html
總結
以上是生活随笔為你收集整理的Source Insight 格式化的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 生活在地球上:网络摘录
- 下一篇: ubuntu Ulipad 配置