keil Astyle 参数

一、格式化当前文件:

Astyle Current File

参数:

-n !E --style=allman --indent=spaces=4 --indent-preproc-block --pad-oper --pad-header --unpad-paren --suffix=none --align-pointer=name --lineend=linux --convert-tabs --delete-empty-lines --break-blocks -p -P --break-elseifs --verbose

二、格式化工程中的所有文件: 

Astyle All Files

参数:

$E*.c $E*.h --style=allman --indent=spaces=4 --indent-preproc-block --pad-oper --pad-header --unpad-paren --suffix=none --align-pointer=name --lineend=linux --convert-tabs --delete-empty-lines --break-blocks -p -P --break-elseifs --verbose

Note:

1.如果不喜欢 else if 换行,可以去掉参数中的--break-elseifs

原文地址:https://www.cnblogs.com/panfengyou/p/11374441.html