[转]在Keil μVision中集成格式化代码工具Astyle

关于Astyle

Astyle 的全称是Artistic Style的简称,是一个开源的源代码格式化工具,可以对C,C++,C#以及Java等编程语言的源代码进行缩进、格式化、美化。
Home Page:
http://astyle.sourceforge.net/
Project Page: http://sourceforge.net/projects/astyle/

在Keil μVision中集成Astyle(以Keil μVison4为例)

①下载Astyle,解压到任意位置(Astyle为绿色软件)(Win2.02.1版,可以到官网参看最新版)

千易下载:http://1000eb.com/aguv
博客下载:http://files.cnblogs.com/totop/AStyle_2.02.1_windows.zip

②µVision4中单击Tools菜单---Customize Tools Menu

[转]在Keil μVision中集成格式化代码工具Astyle_第1张图片

③添加Astyle All Files 和Astyle Current File菜单(自定义菜单名,可以使用中文)

这里添加了两个菜单,分别是格式化当前文件和格式化project中的所有文件。

[转]在Keil μVision中集成格式化代码工具Astyle_第2张图片

④添加Command命令:单击...按钮,在Astyle的安装目录中选择Astyle.exe。

⑤Arguments:
Astyle Current File菜单填写 !E
当前文件
Astyle All Files菜单填写 "$E*.c" "$E*.h"
当前文件所在文件夹中的所有.c 和.h文件

⑥实际使用效果如下:

[转]在Keil μVision中集成格式化代码工具Astyle_第3张图片

转自:http://www.cnblogs.com/totop/archive/2012/07/04/keil-astyle.html

你可能感兴趣的:(visio)