Source insight添加工具自動排版


當在網上找了一些別人的程序拿來學習,用Source insight來看時,會不會因為代碼太亂看了義憤填膺呢?

有很多集成的開發環境可以自動排版,但source insight卻不行!不過,有工具和配置,可以幫助完成這個事情:

1,下載astyle工具:http://download.csdn.net/detail/taixinlfx/4306730
2,打開你的SourceInsight, 選擇菜單“Options-->Custom Commands-->Add”, 輸入Artistic Style(可以隨便輸入一個名字)。

3,Run中輸入: "C:\Program Files\astyle\astyle.exe" -n -t --style=ansi %f (注意路徑不可以是中文的)
4,Dir留空,將Iconic Window, Pause when done, Wait until done, File,then Line 四項前打上勾。
5,然后點對話框中右側的按鈕“Menu”, Menu--->Menu-->View--><end of menu>, 右側Insert, OK.
6,此時在SourceInsight中的View菜單下多了個Style的子菜單選項,可以用它來對單個C/C++文件進行格式化。

參考鏈接:http://blog.csdn.net/taixinlfx/article/details/7573411


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM