vue文件代码缩进以及格式化代码 [自定义]

文件->首选项->设置->
找到setting.json 替换以下内容.

{
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 3000,
    "files.associations": {
        "vue-html": "html",
        "vue": "html"
    },
    "editor.tabSize": 4,
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "editor.formatOnPaste": true,
    "editor.formatOnType": true,
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "editor.detectIndentation": false,
    "window.zoomLevel": 0,
    "vetur.format.options.tabSize": 4,
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "auto"
        },
        "prettyhtml": {
            "printWidth": 100,
            "singleQuote": false,
            "wrapAttributes": false,
            "sortAttributes": false
        }
    }
}

你可能感兴趣的:(vue)