源码格式化工具Astyle及编辑器集成
来源:互联网 发布:win8未激活网络怎么办 编辑:程序博客网 时间:2024/06/03 12:45
1.astyle是一个开源的源码格式化工具软件,命令行版的,官方网址:
Home Page: http://astyle.sourceforge.net/
Project Page: http://sourceforge.net/projects/astyle/
2.使用方法
因为只有一个exe就可以执行,为了使用方便,我把它拷贝到windows/system32目录下。
运行cmd.exe,进入命令行
astyle -h 得到命令行帮助,参数有很多,不过如果大多数情况下并不使用,默认设置就很好了
astyle a.c 格式化当前目录下的a.c文件
astyle *.c 格式化所有当前目录下的.c 文件
可以把你的喜欢的风格存为一个文本文件,名必须为 astylerc ,存放在%USERPROFILE%目录下,以后就不用输入参数了,
我的astylerc 文件内容为
style=ansi
#---------------indent options-----------------
indent=spaces=4
indent-preprocessor
indent-namespaces
max-instatement-indent=80
min-conditional-indent=0
pad=oper
unpad=paren
#------------- breack options --------------------
one-line=keep-statements
one-line=keep-blocks
#Add extra indentation to namespace blocks
suffix=none
errors-to-stdout
3.编辑器集成
---------------------------------------------------------
1) Program notepad
---------------------------------------------------------
2) IAR 4.21
----------------------------------------------------------
3) Visual C++ 6.0
4) AVR Studio (帮助中没有打开配置工具的参数,没有完成)
5) IAR 7.13
- 源码格式化工具Astyle及编辑器集成
- SourceInsight集成AStyle工具格式化C_C++代码
- 代码格式化工具---astyle
- 代码格式化工具Astyle
- astyle代码格式化工具
- astyle工具实现对Source insight及KEIL 代码格式化
- 【转】代码格式化工具Astyle
- 代码格式化工具AStyle介绍
- VS2010 代码格式化工具 AStyle
- 代码格式化工具Astyle配置
- 关于代码格式化工具astyle
- c代码格式化工具AStyle
- IAR 工具使用AStyle工具格式化代码
- 使用AStyle工具格式化java程序
- Astyle:代码格式化工具简明指南
- Astyle:代码格式化工具简明指南
- Astyle:代码格式化工具简明指南
- [转]Astyle:代码格式化工具简明指南
- 心殇
- php中的 引用
- Debian Linux and Orange 3G
- (转)XMLHTTPRequest对象原理介绍与应用
- Android根据Button状态(normal,focused,pressed)显示不同背景图片
- 源码格式化工具Astyle及编辑器集成
- 级联删除MYSQL
- 多角度彻底理解数据库事务中的"脏读"."不可重复的读"及"虚读"(转载)
- failed to lazily initialize a collection of role
- SQLGrammarException: Could not execute JDBC batch update
- ie8 无法在此处设置断点 该文档
- 解决hibernate 删除异常:deleted object would be re-saved by cascade
- 创建新类时自动生成注释
- Ibatis之LIKE用法