1. 原生代码格式化:代码编辑区右键,选择 Format use Astyle
2. 设置代码格式化快捷键:依次选择
Settings -> Editor... -> Keyboard shortcuts -> Plugins -> Source code formatter (AStyle)
在 New Shortcut 中按下预设置的快捷键,然后点击 Add
3. codeblocks代码格式化的默认风格为大括号另起一行,就像下面这样
若觉得不习惯可修改为括号在上一行
首先,Settings -> Editor... -> Source formatter -> Style -> Bracket style 修改为 Java
然后,Settings -> Editor... -> Source formatter -> Padding 在 Insert space padding around operators 前面打上勾



