windows版:

插件:
在这里插入图片描述
在这里插入图片描述
配置:
{
“explorer.confirmDelete”: false,
“git.autofetch”: true,
“eslint.autoFixOnSave”: true,
“editor.tabSize”: 2,
“eslint.validate”: [
“javascript”,
“javascriptreact”,
{
“language”: “html”,
“autoFix”: true
},
{
“language”: “vue”,
“autoFix”: true
}
],
// “beautify.config”: {
// “brace_style”: “collapse,preserve-inline”
// },
“brace_style”: “collapse,preserve-inline”,
“files.autoSave”: “off”,
“extensions.ignoreRecommendations”: true,
“team.showWelcomeMessage”: false,
“explorer.confirmDragAndDrop”: false,
“prettier.singleQuote”: true,
“prettier.semi”: false,
“vetur.format.defaultFormatter.html”: “js-beautify-html”,
“vetur.format.defaultFormatter.vue”: “vscode-typescript”,
“vetur.format.defaultFormatter.js”: “vscode-typescript”,
“vetur.format.defaultFormatterOptions”: {
“wrap_attributes”: “force-aligned”
},
“files.associations”: {
.gql": “javascript”
},
“[vue]”: {},
“debug.allowBreakpointsEverywhere”: true,
“editor.wordWrap”: “on”,
“search.exclude”: {
/node_modules/”: true,
/bower_components/”: true,
/image/”: true,
"**/
.xml”: true,
/.history/”:true,
/nbproject/”:true,
/vscode/”:true
},
“workbench.startupEditor”: “newUntitledFile”,
“window.zoomLevel”: 0,
“javascript.validate.enable”: false,
“workbench.editor.enablePreview”: false
}

Mac版:
Mac版的vs code更加简单便捷,新下载的有格式化等操作,以下为新增的一些个人习惯。
插件:只下载了Eslint和Vetur;
配置:

{
    "editor.formatOnSave": true, //保存自动格式化
    "eslint.autoFixOnSave": true, //自动保存
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
            "language": "html",
            "autoFix": true
        },
        {
            "language": "vue",
            "autoFix": true
        }
    ],
    "workbench.startupEditor": "newUntitledFile", //vscode打开新页面
    "search.exclude": { //搜索过滤文件
        "/node_modules/": true,
        "/bower_components/": true,
        "/image/": true,
        "**/.xml": true,
        "/.history/": true,
        "/nbproject/": true,
        "/vscode/": true
    },
    "window.zoomLevel": 1, //窗口缩放比例
    //html标签属性不换行 start
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "auto", //html标签属性不换行
        }
    },
    //html标签属性不换行 end
    "editor.wordWrap": "on" //超过屏幕视图换行
}
Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐