一、格式化当前文件:

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

相关文章:

  • 2021-09-26
  • 2021-10-31
  • 2021-08-03
  • 2022-12-23
  • 2022-01-09
  • 2022-01-14
  • 2022-12-23
  • 2021-11-03
猜你喜欢
  • 2021-09-29
  • 2021-10-17
  • 2021-08-12
  • 2021-12-08
  • 2022-12-23
  • 2021-04-27
  • 2021-05-15
相关资源
相似解决方案