1.mac
安装astyle:
brew install astyle
通过命令行,运行如下命令:
astyle --style=allman --indent=spaces=4 --min-conditional-indent=0 --align-pointer=type --indent-switches --break-blocks --pad-oper --pad-header --convert-tabs --mode=c -r "目录/*.cpp" "目录/*.h" -n
2.windows
安装astyle:
AStyle下载链接:Artistic Style - Browse /astyle at SourceForge.net
将Astyle的bin目录设置到系统环境变量path中。
cmd运行如下命令:
astyle --style=allman --indent=spaces=4 --min-conditional-indent=0 --align-pointer=type --indent-switches --break-blocks --pad-oper --pad-header --convert-tabs --mode=c -r "目录\*.cpp" "目录\*.h" -n

395

被折叠的 条评论
为什么被折叠?



