KEIL MDK AStyle 格式化代碼

 

添加AStyle進行代碼格式化

(1)下載AStyle:

https://sourceforge.net/projects/astyle/files/astyle/,將Astyle.exe放置keil安裝路徑下。

(2)在keil中設置:

  

    2.1【Command】填寫下載的Astyle.exe放置的路徑

如放在keil的安裝路徑下:D:\software\keil\AStyle.exe

    2.2【Arguments】設置參數示例

!E --style=allman --indent=spaces=4 --indent-preproc-block --pad-oper --pad-header --unpad-paren --suffix=none --align-pointer=name  --convert-tabs --verbose

(3)使用:

點擊 tools ---  current,即可 格式化 當前文件代碼。

附:

設置顯示tab鍵與空格鍵

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章