VS Code 配置使用
阿新 • • 發佈:2018-12-10
原來我是用Dev-C++和VS2017的,但是由於VScode的適配性更好,另外一方面,電腦儲存容量不足,不適合安裝太多的IDE,所以選擇VSC。
選擇外掛安裝:
1)c++ 2)python 3)VIM 4)markdown-in-one
優化程式碼:之前的都不多說了,直接說VSC優化。
- Visual Studio Theme and VS-icon theme
- indent-rainbow、guides
- todo-highlight、todo+
- prettier、vetur、eslint、clang、astyle
1. indent-rainbow
"indentRainbow.errorColor": "rgba(128,10,10,0.5)", "indentRainbow.colors": [ "rgba(28, 134, 238, 0.05)", "rgba(28, 134, 238, 0.08)", "rgba(30, 144, 255, 0.15)", "rgba(30, 144, 255, 0.25)", "rgba(30, 144, 255, 0.35)", ]
配色調整
2.to-do+
必須加入一個project;可以自己改顏色,自己儲存todo軌跡。
自定義提示符??暫時沒找到。
在command line 輸入 open embedded 開啟todolist
"todo.colors.types": { "TODO": "#ffcc00", "todo": "#ffcc00", "Todo": "#ffcc00", "FIXME": "#cc0000", "fixme": "#cc0000", "FixMe": "#cc0000", "FIX": "#cc0000", "BUG": "#cc0000", "UGLY": "#cc0000", "DEBUG": "#cc0000", "HACK": "#cc0000", "REVIEW": "#00ccff", "OPTIMIZE": "#00ccff", "TSC": "#00ccff", "NOTE": "#cc00cc", "IDEA": "#cc00cc", "Hint": "#54FF9F", }, "todo.file.name": "*.todo"
Hint好像還是沒法用,如果誰知道麻煩告知一聲。
3.astyle
//http://astyle.sourceforge.net/astyle.html#_Option_Files //https://blog.csdn.net/hspingcc/article/details/54602514 "astyle.executable": "C:\\Program Files (x86)\\AStyle_3.1_windows\\AStyle\\bin\\AStyle.exe", "astyle.additional_languages": [ "c", "cpp", "py", ], "astyle.cmd_options": [ "--style=java", "--indent=spaces=4", "-f", //insert line "-p", //insert space between operators "-U", "--pad-header", "--pad-oper", "--align-pointer=type", //Attach a pointer or reference operator (* or &) to either the variable type (left) or variable name (right), or place it between the type and name. "--align-reference=name", "--lineend=windows", ],
需要在官網下載安裝包,再在vsc下載外掛。
4. VIM快鍵鍵衝突修改
<c+c>
貼上板設定