zoukankan      html  css  js  c++  java
  • 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
    }
    

      

  • 相关阅读:
    html页面特效代码大全
    ASP.NET中个文件夹功能
    A project with an Output Type of Class Library cannot be started directly
    Chapter10“I/O设备的同步和异步”之I/O设备同步操作
    c c++ 文件操作
    linux find 文件夹下查找字符串
    c c++ sizeof
    c socket编程
    c fcntl函数
    read write 返回值
  • 原文地址:https://www.cnblogs.com/tutao1995/p/13638930.html
Copyright © 2011-2022 走看看