Source Insight 代码格式化设置

本文介绍如何在SourceInsight中集成Astyle代码美化工具,包括自定义命令配置及快捷键设置步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

工具版本号下载地址
Source Insight4.0https://download.youkuaiyun.com/download/wza1314258/10187367
Astyle http://sourceforge.net/projects/astyle/

 

 

 

 

1. 自定义命令配置

  1. 下载上方 SourceInsight 和 Astyle 工具;
  2.  Tools -> Custom Commands;
  3. Add 一个自定义命令 : Astyle;
  4. 通过 Browser 找到  Astyle.exe 的路径;
  5. 配置 Astyle.exe 启动参数 :  --style=ansi -s4 -S -N -L -m0 -M40 --convert-tabs --suffix=.pre %f 
  6. 我的配置为 Run: "D:\Program Files (x86)\Source Insight 4.0\plugs\AStyle_3.1_windows\AStyle\bin\AStyle.exe"  --style=ansi -s4 -S -N -L -m0 -M40 --convert-tabs --suffix=.pre %f
  7. 配置参数可参考 :

                                    

     

 

2. 快捷键设置

  1. Option -> Key Assignments;
  2. 通过 Command 窗口查询出新增的 Astyle 指令;
  3. 点击 Assign New Key... 后,直接在键盘上按出自己喜欢的组合键即可; 

    

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值