• vscode 配置文件


    {
      // 換行
      "editor.wordWrap": "on",
      // 代码缩进修改成2个空格
      "editor.tabSize": 4,
      // 不檢查縮進,保存后統一按設置項來設置
      "editor.detectIndentation": false,
      //保存的时候自动格式化
      "editor.formatOnSave": true,
      // 字體大小
      "editor.fontSize": 14,
      // 設置行高
      "editor.lineHeight": 24,
      // 主題
      // "workbench.colorTheme": "Visual Studio Light",
      // 左側工具欄是否可見
      // "workbench.activityBar.visible": true,
      // 控制何时自动保存已更新文件。接受的值: "off"、"afterDelay"、"onFocusChange" (编辑器失去焦点)、"onWindowChange" (窗口失去焦点)。如果设置为 "afterDelay",可在 "files.autoSaveDelay" 中配置延迟时间。
      "files.autoSave": "onFocusChange",
      // "files.autoSaveDelay": 3000,
      // 让prettier使用eslint的代码格式进行校验
      // "prettier.eslintIntegration": true,
      // 去掉代码结尾的分号
      "prettier.semi": true,
      // 使用带引号替代双引号
      "prettier.singleQuote": true,
      // 启用后,按下 TAB 键,将展开 Emmet 缩写。
      "emmet.triggerExpansionOnTab": true,
      // js設置單引號
      "javascript.preferences.quoteStyle": "single",
      // 让函数(名)和后面的括号之间加个空格
      "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
      // html格式化
      "vetur.format.defaultFormatter.html": "prettier",
      // 使用eslint 風格使用standard 進行代碼規則限制
      "eslint.autoFixOnSave": true,
      "eslint.validate": [
          "javascript",
          {
              "language": "vue",
              "autoFix": true
          },
          "html",
          "vue"
      ],
      //自动保存信息
      // By default, create file  username
      "fileheader.Author": "you name",
      // By default, update file  username.
      "fileheader.LastModifiedBy": "you name",
      // By default, common template. Do not modify it!!!!!
      "fileheader.tpl": "/*
     * @Author: {author}
     * @Date: {createTime}
     * @Last Modified by: {lastModifiedBy}
     * @Last Modified time: {updateTime}
     */
    ",
      "editor.quickSuggestions": {
          "strings": true
      },
      // vue组件中html代码格式化样式
      "vetur.format.defaultFormatterOptions": {
          "js-beautify-html": {
              "wrap_attributes": "force-aligned"
          },
          "prettyhtml": {
              "printWidth": 160, // No line exceeds 160 characters
              "singleQuote": false // Prefer double quotes over single quotes
          },
          "prettier": {
              "printWidth": 300,
              "semi": false,
              "singleQuote": true
          }
    },
    "[vue]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    }
    }
    

      .prettierrc 文件

    {
        "singleQuote": true,
        "semi": false
    }
    

      

  • 相关阅读:
    【题解】洛谷P1896 [SCOI2005] 互不侵犯(状压DP)
    [BZOJ4383][POI2015] Pustynia-[线段树+dp+拓扑排序]
    [agc016E]Poor Turkeys
    [arc082E]ConvexScore-[凸包]
    [BZOJ4011][HNOI2015]落忆枫音-[dp乱搞+拓扑排序]
    [arc062E]Building Cubes with AtCoDeer
    [arc079F]Namori Grundy
    [agc006F]Blackout
    [BZOJ4444][SCOI2015]国旗计划-[ST表]
    [BZOJ1007][HNOI2008]水平可见直线-[凸包]
  • 原文地址:https://www.cnblogs.com/tutao1995/p/13638930.html
Copyright © 2020-2023  润新知