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

来源:互联网 发布:打印机排版软件 编辑:程序博客网 时间:2024/06/05 05:24

在代码框里点右键,按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)