工具 版本号 下载地址
Source Insight 4.0 https://download.csdn.net/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. 配置参数可参考 :

                                    

     Source Insight 代码格式化设置

 

2. 快捷键设置

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

    Source Insight 代码格式化设置

相关文章:

  • 2021-05-30
  • 2021-05-18
  • 2021-12-12
  • 2022-01-18
  • 2021-05-10
  • 2021-09-26
猜你喜欢
  • 2021-04-10
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-12-22
  • 2021-05-08
相关资源
相似解决方案