因为后期涉及到代码合并,所以html结构决定保留缩进4, 其它文件设为缩进2
"[javascript]": {
"editor.insertSpaces": true,
"editor.tabSize": 2
},
"[css]": {
"editor.insertSpaces": true,
"editor.tabSize": 2
},
"[scss]": {
//"editor.defaultFormatter": "michelemelluso.code-beautifier",/ 需安装 sass Formatter插件
"editor.defaultFormatter": "esbenp.prettier-vscode", // 需安装 prettier插件(个人觉得这个好用)
"editor.insertSpaces": true,
"editor.tabSize": 2
},
"[html]": {
"editor.insertSpaces": true,
"editor.tabSize": 4
},
参考文章:
https://segmentfault.com/q/1010000019673775/a-1020000019674091
https://blog.csdn.net/cuk0051/article/details/108341256
https://www.cqzhong.cn/sm5cgu/
网友评论