在代码框里点右键,按Format use Astyle就会自动代码格式化了

但是它默认的风格是大括号另起一行,很不习惯,实际上是可以改的


1.Setting->Editor->Source Formatter->style->Bracket style 修改成Java

2.Setting->Editor->Source Formatter->Formatting->Insert space padding around operators 打勾


这样格式化出来的代码就很好看了


添加AStyle快捷键:

Settings -> Editor -> Keyboard shortcuts -> Plugins -> Source code formatter(AStyle)

Codeblocks自动代码格式化+快捷键

相关文章:

  • 2021-05-24
  • 2021-12-30
  • 2021-11-03
  • 2022-02-22
  • 2021-12-09
  • 2021-05-23
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2021-11-27
  • 2021-09-13
  • 2021-12-11
  • 2022-12-23
  • 2021-05-26
  • 2021-04-15
相关资源
相似解决方案