我用的是:
C:\astyle\bin\Astyle.exe --style=ansi –s4 -S -N -L -m0 -M40 -U --convert-tabs --suffix=.pre %f
可以在Source Insight中安装这个外部命令,具体如下:
点option→custom commands,点右边的Add,按提示输入一个名字如:Format with Astyle,Run中输入刚才的命令行。
![clip_image002](https://i-blog.csdnimg.cn/blog_migrate/805ec6bc35b4e2e7eb2dc3ace989cc9b.jpeg)
最后可以Option→Key Assignments中绑定一个快捷键,如下图所示:
![clip_image004](https://i-blog.csdnimg.cn/blog_migrate/752b19a024fc7c370c83422115e57949.jpeg)