AStyle source insight 代码整理插件

From: http://www.cnblogs.com/xuxm2007/archive/2013/04/06/3002390.html

 

一、AStyle下载路径

  Astyle为开源项目,支持C/C++和java的代码格式化

  Home Page: http://astyle.sourceforge.net/

  Project Page: http://sourceforge.net/projects/astyle/

  下载最新Windows版本的AStyle,解压到C盘根目录

 

二、Source Insight中安装Astyle工具

  如:增加Astyle_C命令,格式化C/C++文件

  1. 打开source insight中的一个工程,选择Options--Custom Commands命令

  2. 点击add,添加新的命令Astyle_C。

  其中,Run中输入astyle的命令参数:C:\AStyle\bin\AStyle.exe --style=linux -s4 -S -N -L -m0 -M40 --pad-oper --suffix=none --convert-tabs %f

C:\AStyle\bin\AStyle.exe //这里的目录需要键入binaray的路径。

 

  3. 添加menu菜单,点击“menu”,选择menu--View,然后INSERT。

  4. 添加快捷键,点击"Assigh New Key",输入快捷键:Ctrl+Alt+C。以后格式化C/C++文件,就可以直接使用快捷键了。

posted @ 2015-06-28 23:47  JustRelax  阅读(329)  评论(0)    收藏  举报