source insight代码格式化(Astyle)
来源:互联网 发布:js两个数组去重复 编辑:程序博客网 时间:2024/06/05 03:04
source insight代码格式化(Astyle)
GNU的astyle是一个免费的代码格式化工具,能够格式化c/c++等代码 , 我们可以将Astyle.exe外挂到SourceInsight中,具体步骤如下:
1、下载Astyle工具
在网站http://astyle.sourceforge.net下载
2、source insight中挂载Astyle工具
a、将AStyle_2.02_windows.zip解压到D:\lb\目录下(可以放在任意目录)。
b、在SourceInsight菜单栏里,Options-->Custom Commands界面上选择:Add,在弹出对话框写入 命令名,在run中添加相应的命令。
1)ansi C 格式化当前文件的命令为:"D:\lb\AStyle\bin\Astyle.exe" --style=ansi -s4 -S -N -L -m0 -M40 --convert-tabs --suffix=.pre %f
2)ansi C 格式化某个目录下所有文件的命令为:"D:\lb\AStyle\bin\Astyle.exe" Z:\LocalProject\DEZHOU3716/*.c Z:\LocalProject\DEZHOU3716/*.h -- style=ansi -s4 -S -N -L -m0 -M40 --recursive --convert-tabs --suffix=.pre %f
c、在SourceInsight菜单栏里,Options-->Custom Commands界面上选择:Keys,在弹出对话框的Command框的列表中找到你定义的命令名,然后点击Assign New Key,接着按下你要设置的快捷键。
3、Astyle参数说明详见http://astyle.sourceforge.net/astyle.html(官方文档)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- source insight代码格式化(Astyle)
- astyle工具实现对Source insight及KEIL 代码格式化
- source insight代码格式化
- source insight代码格式化
- source insight代码格式化
- source insight代码格式化
- source insight代码格式化
- source insight代码格式化
- source insight代码格式化
- source insight代码格式化
- Subversion配置和使用之附录
- code review (ZZ)
- 黑白图像显示栈版
- 求职感慨
- [转] 贪吃蛇游戏(有BUG)
- source insight代码格式化(Astyle)
- Starvation and Deadlock
- IE6中absolute定位的对象消失了!
- UAC技巧:使 Windows 内置程序默认以管理员权限运行
- linux下批量增加文件后缀名
- LoadControl 传递参数
- 嵌入式博客收集
- MFC中将所画图像保存到图像文件
- 设计模式学习笔记(十四)—Command模式