sourceinsight代码格式化工具使用

sourceinsight代码格式化工具使用

2023年7月9日发(作者:)

sourceinsight代码格式化⼯具使⽤source insight 代码格式化(Astyle)source insight 代码格式化是通过Astyle实现1. 下载Astyle2. Source Insight 4.0设置Astyle在Souce insight上选择Tools->Custom Commands,点击Add,输⼊Astyle,点击OK。在Run中查找Astyle路径:如下"D:Program Files (x86)Source Insight "在路径后⾯添加格式化信息,取消Output所有选项,取消Control所有选项。 --style=ansi -S -N -L -xC80 -z2 --convert-tabs -H -p -U --align-pointer=name --quiet --suffix=none %f3. Source Insight 4.0设置Astyle菜单在Source insight选择Options->Menu Assignments,在Command中选择Astyle,在Menu中选择work,在Menu Contents中选择Toolbars,然后点击Insert,点击OK,完成。Astyle参数Astyle提供了很多参数供⼤家使⽤,通过配置这些参数,我们可以将⽂件格式化成我们想要的形式。使⽤的是--style=ansi -S -N -L -xC80 -z2 -H -p -U --align-pointer=name --suffix=none --quiet配置-S-N-L-xC80-convert-tabs-H-p-U—align-pointer=name–suffix=none含义”case XXX”需要缩进namespace中的内容缩进缩进label,让label⽐当前的内容先前⼀个缩进距离,⽽不是通通靠左最长80个字符将tab转换为合适长度的空格在if for等关键字后⾯,加⼀个空格在操作符两边加空格去掉()内部不必要的空格让*更靠近变量名不备份原始⽂件更多的参数,可以直接在命令⾏中输⼊astyle --help

发布者:admin,转转请注明出处:http://www.yc00.com/xiaochengxu/1688903560a182143.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信