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

好吧,我有代码格式的强迫症,代码不整齐,我看的都头疼,之前一直喜欢用SourceStyler C++的,但是这个在win7下貌似不能使用,只能转向astyle了.

http://www.cnblogs.com/xuxm2007/archive/2010/09/21/1832686.html

关于参数的话,差不过够用就行,不用非得调的那么精细,比较重要的是要看代码啊,不是这玩意

下面的url也是值得参考的:

http://www.cppblog.com/jerryma/archive/2012/02/02/164813.html

http://astyle.sourceforge.net/astyle.html

http://www.cnblogs.com/redspider110/archive/2012/06/22/2558563.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

自己测试过的:

 "D:\Program Files\AStyle\bin\AStyle.exe"  --style=ansi -s4 -C -S -N -L -w -Y -p -H -k3 -W3 -m0 -M40 --convert-tabs --suffix=none %f 

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

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

在source insight中集成astyle的更多相关文章

  1. Source Insight 中使用 AStyle 代码格式工具

    Source Insight 中使用 AStyle 代码格式工具 彭会锋 2015-05-19 23:26:32     Source Insight是较好的代码阅读和编辑工具,不过source in ...

  2. AStyle代码格式工具在source insight中的使用

    一.AStyle下载路径 Astyle为开源项目,支持C/C++和java的代码格式化 Home Page: http://astyle.sourceforge.net/ Project Page:  ...

  3. source insight 中tab键的设置

    转:http://xinzero.com/source-insight-code-alignment-ended.html source insight代码对齐Tab键终极版 以前也写过一个sourc ...

  4. source insight中的快捷键总结

    1.快捷键 1,Shift+F8高亮显示指定字符. 2,Ctrl+F找出来的结果用F4,F3前进后退查找. 3,Alt+,后退alt+.前进查找关键字. 4,Alt+G或者F5跳转到某个固定的行号. ...

  5. Source Insight 中调用Notepad++

    options>custom commands 指令为 "E:\Program Files (x86)\Notepad++\notepad++.exe" %f 其中%f表示S ...

  6. Source Insight 中的 Auto Indenting

    编码过程中,希望输入花括号时能自动对齐,Source Insigth 应如何设置? 先来看一下Source Insight 中的帮助. “ Auto Indenting The auto-indent ...

  7. Source insight 中 标题栏路径显示完整路径的方法

    在source insight 的标题栏中显示完整路径名的方法.Options -> Preferences -> Display -> Trim long path names w ...

  8. Source Insight中的多行注释

    转自:http://www.cnblogs.com/dongzhiquan/archive/2013/03/04/2943448.html 我们经常要对一整段代码进行注释,很多代码编辑器都提供了这样的 ...

  9. ubuntu14.04中 gedit 凝视能显示中文,而source insight中显示为乱码的解决的方法

    1.乱码显示情况: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcjc3NjgzOTYy/font/5a6L5L2T/fontsize/400/fill/ ...

随机推荐

  1. iOS 中 为UIView添加背景图片

    创建UIImage的方法有两种: UIImage *image = [UIImageimageNamed:@"image.jpg"];//这种不释放内存,要缓存 NSString ...

  2. Thinkphp .htaccess 与 httpd.ini文件重定向转换问题

    .htaccess 文件内容 RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !- ...

  3. atom 折腾记(转载的)

    http://www.bkjia.com/webzh/999078.html

  4. lol 正在刷leetcode

    letcode easy 刷了90%了 我要写个随笔庆祝下 挑着做的太不要脸了,接下来要做剩下的了 :) 剩下的决定直接参考答案了 :) 有些答案看着也好迷糊.水平太差了.(英文水平差,看不懂题目.. ...

  5. centos7精简版(minimal)killall: command not found

    centos7精简版(minimal)运行killall命令提示 command not found 是由于没有安装psmisc所致 Psmisc软件包包含三个帮助管理/proc目录的程序. 安装下列 ...

  6. Java for LeetCode 223 Rectangle Area

    Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined b ...

  7. mybatis跨XML引用

    resultMap中association标签的select属性使用嵌套查询的时候需要引用其它xml文件的配置 此时可以用要引用xml的namespace.引用select的ID 如 <resu ...

  8. 【Git】笔记4 分支管理1

    1.创建与合并分支 一开始的时候,master分支是一条线,Git用master指向最新的提交,再用HEAD指向master,就能确定当前分支,以及当前分支的提交点: 每次提交,master分支都会向 ...

  9. JS图表插件(柱形图、饼状图、折线图)

    http://www.open-open.com/lib/view/open1406378625726.html

  10. qt_计算器的简单实现

    //阶乘不知道怎么实现不了/(ㄒoㄒ)/~~,以后慢慢调试吧......... //转换为后缀表达式,实现最主要功能 void MainWindow::toPostfix () { QString e ...