我试图使用astyle风格化我的代码,但是当涉及到

some_structure[some_index].
    method_call(some_parameters);

它将变成
some_structure[some_index].
method_call(some_parameters);

我正在使用--style = ansi。我没有在帮助文件中看到任何相应的选项。

你能帮我吗?

最佳答案

由于换行,astyle无法识别和缩进代码,即使具有大量选项的Uncrustify(http://uncrustify.sourceforge.net/)也无法识别和缩进。

您可以使用UniversalIndentGUI(http://universalindent.sourceforge.net/)实时查看所做的更改,并为您喜欢的代码美化器保存配置文件。

09-09 23:41
查看更多