一、tab
一律用4
个空格
-
不要检测到第一个是
tab
就后面都用tab
,这样会覆盖默认设置。 -
tabSize
查找,取消tab size/spaces automatically detected when a file is opened.
二、显示空格和tab
renderControlCharacters
查找,选中勾选框,即可显示tab
.renderWhitespace
查找,选择all
,即可显示空格.
三、或者json
脚本里面添加:
"editor.detectIndentation": false, //不检测到第一个是tab后面都用tab
"editor.renderControlCharacters": true, //显示制表符是→
"editor.renderWhitespace": "all", //显示4个空格是....
"editor.tabSize": 4, //tab设置为4个空格
四、C/C++
设置成Google
编码规范
setting
查找Clang_format_fallback Style
- 将默认
visual studio
修改为{ BasedOnStyle: Google, IndentWidth: 4}