zoukankan      html  css  js  c++  java
  • vs code 代码格式化

    1.打开vs code > 文件 > 首选项 > 设置 > 将下面一段粘贴在右侧即可

    // Place your settings in this file to overwrite the default settings
    {
    "python.formatting.provider": "yapf",
    "view-in-browser.customBrowser": "chrome",
     
    "files.associations": {
    "*.vue": "vue"
    },
    "eslint.options": {
    "extensions": [
    ".js",
    ".vue"
    ]
    },
    "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/dist": true
    },
    "emmet.syntaxProfiles": {
    "javascript": "jsx",
    "vue": "html",
    "vue-html": "html"
    },
    "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
    // 窗口失去焦点自动保存
    "files.autoSave": "off",
    // 编辑粘贴自动格式化
    "editor.formatOnPaste": true,
    // 控制字体系列。
    // "editor.fontFamily": "pingfang,Menlo, Monaco, 'Courier New', monospace",
     
    // 通过使用鼠标滚轮同时按住 Ctrl 可缩放编辑器的字体
    "editor.mouseWheelZoom": false,
    // 行太长自动换行
    "editor.wordWrap": "on",
    //Windows bash终端"terminal.integrated.shell.windows": "C:\Program Files\Git\bin\bash.exe",
    // 主体
    "workbench.colorTheme": "Monokai",
    "workbench.iconTheme": "vs-seti",
    // eslint设置
    "eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    "vue",
    {
    "language": "vue",
    "autoFix": true
    }
    ],
    // 保存自动修复
    "eslint.autoFixOnSave": true,
    // tab锁紧
    "editor.tabSize": 2,
    // 保存自动化
    "editor.formatOnSave": true,
    // 空格变成......
    "editor.renderWhitespace": "all",
    "window.zoomLevel": 0,
    "vetur.format.defaultFormatter.html": "js-beautify-html"
    }
  • 相关阅读:
    人类历史上最智慧的169条警世箴言(句句珠玑,发人深省)
    最负责任的回答
    成大事必须依靠的五种人
    一生的伤痕
    有谁愿意陪我一程
    惜缘
    那朵美丽的格桑花,你是否依然绽放?
    今生今世只等你
    成就一生的15条黄金法则
    遇到困难挫折也不要悲观:每个人生来就是冠军(转)
  • 原文地址:https://www.cnblogs.com/AKI-LILI/p/vs.html
Copyright © 2011-2022 走看看