在scite编辑器中使用astyle格式化c代码

时间:2022-07-24
本文章向大家介绍在scite编辑器中使用astyle格式化c代码,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

用 vc6 很喜欢 alt+F8 的功能. 能够格式化代码. scite 没有这个功能. 今天看它的配置文件发现这么两行:

command.name.0.*.cxx=Indent command.0.*.cxx=astyle -tapO $(FileNameExt)

用来缩进的? 查了一下 astyle, 原来就是这个功能. 下载了 astyle 1.19, 修改了一下配置文件 cpp.properties, 如下:

command.name.0.*.cpp=Indent
 command.0.*.cpp=astyle --style=ansi $(FileNameExt)
command.name.0.*.c=Indent
 command.0.*.c=astyle -tapO $(FileNameExt)

scite 更好用了.

运用上面的方法,可以在tools工具栏中出现C选项,可以方便使用astyle了。

环境:

sciteru(俄国人版本)

astyle3.1.