zoukankan      html  css  js  c++  java
  • VS Code 设置缩进为4个空格

    VS Code默认缩进为2两个空格,修改为4个空格的方法。

    一、首选项->设置,设置"editor.detectIndentation": false

    二、ctrl+shift+x 打开插件下载页面,搜索beautify插件下载

    三、在用户配置中,配置beautify(用户配置打开方式见步骤一)

    {
        "beautify.language": {
            "js": {
                "type": [
                    "javascript",
                    "json"
                ],
                "filename": [
                    ".jshintrc",
                    ".jsbeautify"
                ]
            },
            "css": [
                "css",
                "scss",
                "less"
            ],
            "html": [
                "htm",
                "html",
                "vue"
            ]
        },
        "[html]": {
            "editor.defaultFormatter": "vscode.html-language-features"
        },
        "less.lint.validProperties": [
            ""compress": false",
            ""sourceMap": false"
        ],
        "less.compile": {
            "compress": false,
            "sourceMap": false,
            "out": true, 
            "outExt": ".css", 
        },
        "git.ignoreMissingGitWarning": true,
        "[css]": {
            "editor.defaultFormatter": "esbenp.prettier-vscode"
        },
        "[javascript]": {
            "editor.defaultFormatter": "HookyQR.beautify"
        },
        "beautify.config": {
            "brace_style":"collapse,preserve-inline",
            "indent_size": 4
        },
        "editor.detectIndentation": false
    }
    

      

    .

  • 相关阅读:
    备份
    Android资料之-EditText中的inputType
    trim() 是什么意思?
    两数相加
    点击edittext并显示其内容
    php 返回上一页并刷新
    sql one
    sql 语句 查询两个字段都相同的方法
    我为什么喜欢Go语言123123
    数据字典
  • 原文地址:https://www.cnblogs.com/jianxian/p/12802385.html
Copyright © 2011-2022 走看看