【轉】SourceInsight 中集成Artistic Style 格式化代碼

下載地址php

http://sourceforge.net/project/showfiles.php?group_id=2319l.net

Windows平臺下也有好多人都喜歡用SourceInsight編輯C/C++程序,
可是SourceInsight沒有提供對代碼格式化的功能,
若是將Artistic Style集成到SourceInsight中,那就能夠爲它擴展出代碼格式化的功能了。get

假定AStyle.exe的目錄是「C:\ArtisticStyle\」,在該目錄下有一個「c.opt」文件是用來保存配置的文件。
下面簡要地介紹下Artistic Style集成到SourceInsight中的方法。
1. 打開你的SourceInsight, 選擇菜單「Options-->Custom Commands-->Add」, 輸入Artistic Style(能夠隨便輸入一個名字)。
2. Run中輸入: C:\ArtisticStyle\Astyle.exe --options=c.opt %f
3. Dir留空,將Iconic Window, Capture Output, Parse Links in OutPut, File,then Line 四項前打上勾。
4. 而後點對話框中右側的按鈕「Menu」, Menu--->Menu-->View--><end of menu>, 右側Insert, OK.
5. 此時在SourceInsight中的View菜單下多了個Style的子菜單選項,能夠用它來對單個C/C++文件進行格式化。io

相關文章
相關標籤/搜索