问题:代码主题美化以及代码自动格式化
入坑STM32开发板学习以来,一直无法适应keil默认的主题和代码格式,以及没有VS Code那种自动格式化代码。
1.代码主题美化:
本人也比较喜欢 Sublime Text
的风格
因此参考了这位朋友的方案
为 Keil 更换 Sublime Text Molokai 主题
为方便使用,避免百度网盘登陆的麻烦,附上https下载地址:
https://home.shubo6.cn:5001/sharing/6eGbHkBGU
2.使用Astyle美化代码格式:
下载Astyle:
官网地址:http://astyle.sourceforge.net/
下载地址1: https://sourceforge.net/projects/astyle/
https下载地址: https://home.shubo6.cn:5001/sharing/DRnMc0ckg
添加Astyle到keil:
解压下载好的Astyle,在bin目录下有一个Astyle.exe文件将其复制到keil的安装目录下
在keil的Tools下拉菜单栏中单击Customize Tools Menu
然后创建新的Menu
在此记下一个我比较喜欢的风格:
!E --style=ansi -D -U -k1 -c -n -M -W -S -w --indent=spaces=4 --align-pointer=type --align-pointer=name --indent-switches --indent=tab --break-blocks=all --indent-col1-comments --indent=tab --indent-switches
至此代码自动格式化功能配置完成