zoukankan      html  css  js  c++  java
  • vscode下配置vue.js的插件

    1、vetur

    2、Vue 2 Snippets:主要加强vue的便捷写法

    3、language-stylus

    4、Auto Close Tag:自动闭合标签所用

    5、Auto Rename Tag:自动修改重命名配对的标签

    6、Bookmarks:可以对成片的代码做一些书签标记,方便后续查看

    7、Bracket Pair Colorizer:对括号进行着色,方便区分,

    8、Copy Relative Path:用于复制文件的完整路径和相对路径

    9、Path Intellisense:路径自动感知,在配置文件中配置@后我们就可以很方便快捷的引用各种文件了

    10、Vue Peek:用于Vue快速查看组件定义以及组件跳转。

    11、JavaScript (ES6) code snippets:用于快速生成ES6代码片段

    12、Material Icon Theme:Material风格的icon文件图标

    13、One Dark Pro:一款热门的主题

    14、Version Lens:显示npm,jspm,bower,dub和dotnet核心的软件包版本信息

    15、vscode-element-helper:element-ui插件

    16、Beautify:主要拿它来格式话html的

    17、StandardJS - JavaScript Standard Style:配合该插件可以自动将你的代码格式化成规范的代码。

    18、ESLint:规范代码格式的

    同时,在设置中要自己定义:

    // vscode默认启用了根据文件类型自动设置tabsize的选项
      "editor.detectIndentation": false,
      // 重新设定tabsize
      "editor.tabSize": 2,
      // #每次保存的时候自动格式化
      "editor.formatOnSave": true,
      // #每次保存的时候将代码按eslint格式进行修复
      "eslint.autoFixOnSave": true,
      // 添加 vue 支持
      "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
          "language": "vue",
          "autoFix": true
        }
      ],
      //  #让prettier使用eslint的代码格式进行校验
      "prettier.eslintIntegration": true,
      //  #去掉代码结尾的分号
      "prettier.semi": false,
      //  #使用带引号替代双引号
      "prettier.singleQuote": true,
      //  #让函数(名)和后面的括号之间加个空格
      "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
      // #这个按用户自身习惯选择
      "vetur.format.defaultFormatter.html": "js-beautify-html",
      // #让vue中的js按编辑器自带的ts格式进行格式化
      "vetur.format.defaultFormatter.js": "vscode-typescript",
      "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
          "wrap_attributes": "force-aligned"
          // #vue组件中html代码格式化样式
        }
      }
      // 格式化stylus, 需安装Manta's Stylus Supremacy插件
      //  "stylusSupremacy.insertColons": false, // 是否插入冒号
      //  "stylusSupremacy.insertSemicolons": false, // 是否插入分好
      //  "stylusSupremacy.insertBraces": false, // 是否插入大括号
      //  "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
      //  "stylusSupremacy.insertNewLineAroundBlocks": false // 两个选择器中是否换行

    19、Live Server:检测文件的保存,并自动刷新浏览器

  • 相关阅读:
    游标cursor
    SQL: EXISTS
    LeetCode Reverse Integer
    LeetCode Same Tree
    LeetCode Maximum Depth of Binary Tree
    LeetCode 3Sum Closest
    LeetCode Linked List Cycle
    LeetCode Best Time to Buy and Sell Stock II
    LeetCode Balanced Binary Tree
    LeetCode Validate Binary Search Tree
  • 原文地址:https://www.cnblogs.com/xiximayou/p/12307795.html
Copyright © 2011-2022 走看看