在source insight 中有的时候赋值粘贴文件 会试文件格式乱掉,尤其是大括号之类的 特别烦人,
source insight中挂载Astyle工具 能有效的格式化文件格式。
在网站http://astyle.sourceforge.net下载
a、将下载的软件解压,我是放在D盘根目录下,软件好像对路径有限制,,,,。
b、在SourceInsight菜单栏里,Tools–>Custom Commands界面上选择:Add,在弹出对话框写入 命令名,在run中添加相应的命令。
在run中添加
D:\AStyle\bin\astyle.exe –style=ansi -s4 -S -N -L -m0 -M40 –suffix=none –convert-tabs %f
在Options–>Menu Assignment界面上选择 添加 在任意菜单下,我是添加到了 Tools下了,,
4、使用
点击回车 就好