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

在代码框里点右键,按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)
————————————————
版权声明:本文为CSDN博主「淼淼1111」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u010112268/article/details/81106192

posted @ 2021-10-16 19:34  江北一滴水  阅读(700)  评论(0编辑  收藏  举报