SourceInsight 中集成Artistic Style 格式化代码 .
2011-08-26 09:38
603 查看
下载地址
http://sourceforge.net/project/showfiles.php?group_id=2319l
Windows平台下也有好多人都喜欢用SourceInsight编辑C/C++程序,但是SourceInsight没有提供对代码格式化的功能,如果将Artistic Style集成到SourceInsight中,那就可以为它扩展出代码格式化的功能了。
假定AStyle.exe的目录是“C:/ArtisticStyle/”,在该目录下有一个“c.opt”文件是用来保存配置的文件。下面简要地介绍下Artistic Style集成到SourceInsight中的方法。
1. 打开你的SourceInsight, 选择菜单“Options-->Custom Commands-->Add”, 输入Artistic Style(可以随便输入一个名字)。
2. Run中输入: C:/ArtisticStyle/Astyle.exe --options=c.opt %f
3. Dir留空,将Iconic Window, Capture Output, Parse Links in OutPut, File,then Line 四项前打上勾。
4. 然后点对话框中右侧的按钮“Menu”, Menu--->Menu-->View--><end of menu>, 右侧Insert, OK.
5. 此时在SourceInsight中的View菜单下多了个Style的子菜单选项,可以用它来对单个C/C++文件进行格式化。.
c.opt内容:
style=ansi
# set default parsing to c/cpp files
mode=c
# brackets should be attached to pre-bracket lines
brackets=break
# set 6 spaces per indent
indent=spaces=4
# indent switch blocks
indent-switches
# suffix of original files should be .pre
suffix=.pre
#Add extra indentation to namespace blocks
indent-namespaces
max-instatement-indent=80
min-conditional-indent=0
http://sourceforge.net/project/showfiles.php?group_id=2319l
Windows平台下也有好多人都喜欢用SourceInsight编辑C/C++程序,但是SourceInsight没有提供对代码格式化的功能,如果将Artistic Style集成到SourceInsight中,那就可以为它扩展出代码格式化的功能了。
假定AStyle.exe的目录是“C:/ArtisticStyle/”,在该目录下有一个“c.opt”文件是用来保存配置的文件。下面简要地介绍下Artistic Style集成到SourceInsight中的方法。
1. 打开你的SourceInsight, 选择菜单“Options-->Custom Commands-->Add”, 输入Artistic Style(可以随便输入一个名字)。
2. Run中输入: C:/ArtisticStyle/Astyle.exe --options=c.opt %f
3. Dir留空,将Iconic Window, Capture Output, Parse Links in OutPut, File,then Line 四项前打上勾。
4. 然后点对话框中右侧的按钮“Menu”, Menu--->Menu-->View--><end of menu>, 右侧Insert, OK.
5. 此时在SourceInsight中的View菜单下多了个Style的子菜单选项,可以用它来对单个C/C++文件进行格式化。.
c.opt内容:
style=ansi
# set default parsing to c/cpp files
mode=c
# brackets should be attached to pre-bracket lines
brackets=break
# set 6 spaces per indent
indent=spaces=4
# indent switch blocks
indent-switches
# suffix of original files should be .pre
suffix=.pre
#Add extra indentation to namespace blocks
indent-namespaces
max-instatement-indent=80
min-conditional-indent=0
相关文章推荐
- 【转】SourceInsight 中集成Artistic Style 格式化代码 3ff0
- SourceInsight 中集成Artistic Style 格式化代码
- SourceInsight集成AStyle工具格式化C_C++代码
- Artistic Style, 一个很好用的代码格式化工具,可集成至 Source Insight.
- 【工具】在Keil μVision中集成格式化代码工具Astyle
- Source Insight中集成Uncrustify格式化代码
- Artistic Style----开源代码格式化工具
- Source Insight中集成Uncrustify格式化代码
- SourceInsight与PC-LINT集成进行代码静态分析
- [原]Visual Studio 2008集成C++代码格式化插件
- C,C++代码格式化 - artistic style
- SourceInsight与PC-LINT集成进行代码静态分析
- [原]Visual Studio 2008集成C++代码格式化插件
- Source Insight中集成Uncrustify格式化代码
- SourceInsight中集成Artistic Style
- jsbeautifier + CScript/WScript/JavaScript 编程实现 JavaScript、HTML、CSS 代码格式化 js 脚本命令行工具 并集成到 EditPlus
- Source Insight中集成Uncrustify格式化代码
- jsbeautifier + JScript.NET/JavaScript 编程实现 JavaScript、HTML、CSS 代码格式化脚本命令行工具 并集成到 EditPlus
- vc++2010代码格式化方法(使用Artistic Style,效果好,使用简单,推荐使用)
- Source Insight中集成Uncrustify格式化代码