美文网首页
vscode 根据不同文件配置缩进空格

vscode 根据不同文件配置缩进空格

作者: 成神之路_be73 | 来源:发表于2021-08-23 16:45 被阅读0次
因为后期涉及到代码合并,所以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/

相关文章

网友评论

      本文标题:vscode 根据不同文件配置缩进空格

      本文链接:https://www.haomeiwen.com/subject/deeliltx.html