vue + vscode 插件

5 篇文章 0 订阅
4 篇文章 1 订阅

1.Chinese (Simplified) Language Pack for Visual Studio Code(汉化)

2.Bracket Pair Colorizer(给代码中的括号添加亮色)

3.Auto Close Tag (自动补全标签 必备)

4.Auto Rename Tag (修改标签名 自动同步修改闭合标签的标签名 必备)

5.Class autocomplete for HTML (自动补全class=“” 属性)

6.浏览器调试 - debugger for chrome F5
在这里插入图片描述

{
  // 使用 IntelliSense 了解相关属性。
  // 悬停以查看现有属性的描述。
  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "pwa-chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:8080",
      "webRoot": "${workspaceFolder}/wwwroot"
    }
  ]
}

7.Git Graph(查看git提交历史 现在所处分支 提交内容明细 以及回滚删除分支等操作)
8.Beautify (美化代码)
9.JavaScript (ES6) code snippets (es6代码快捷键)
10.Vetur(高亮Vue代码 格式化代码等)
11.微信小程序开发工具、微信小程序扩展 (开发微信小程序代码 包含提供模拟器、预览、打包上传、代码补全、语法高亮、项目模版等功能)
12.格式化插件Prettier-Code Formatter

/*  prettier的配置 */
    "prettier.printWidth": 100, // 超过最大值换行
    "prettier.tabWidth": 4, // 缩进字节数
    "prettier.useTabs": false, // 缩进不使用tab,使用空格
    "prettier.semi": true, // 句尾添加分号
    "prettier.singleQuote": true, // 使用单引号代替双引号
    "prettier.proseWrap": "preserve", // 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
    "prettier.arrowParens": "avoid", //  (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号
    "prettier.bracketSpacing": true, // 在对象,数组括号与文字之间加空格 "{ foo: bar }"
    "prettier.disableLanguages": ["vue"], // 不格式化vue文件,vue文件的格式化单独设置
    "prettier.endOfLine": "auto", // 结尾是 \n \r \n\r auto
    "prettier.eslintIntegration": false, //不让prettier使用eslint的代码格式进行校验
    "prettier.htmlWhitespaceSensitivity": "ignore",
    "prettier.ignorePath": ".prettierignore", // 不使用prettier格式化的文件填写在项目的.prettierignore文件中
    "prettier.jsxBracketSameLine": false, // 在jsx中把'>' 是否单独放一行
    "prettier.jsxSingleQuote": false, // 在jsx中使用单引号代替双引号
    "prettier.parser": "babylon", // 格式化的解析器,默认是babylon
    "prettier.requireConfig": false, // Require a 'prettierconfig' to format prettier
    "prettier.stylelintIntegration": false, //不让prettier使用stylelint的代码格式进行校验
    "prettier.trailingComma": "es5", // 在对象或数组最后一个元素后面是否加逗号(在ES5中加尾逗号)
    "prettier.tslintIntegration": false,
    "terminal.integrated.allowMnemonics": true,
    "terminal.integrated.automationShell.linux": "" // 不让prettier使用tslint的代码格式进行校验
///报错的话,检查一下有没有用逗号与上一项设置分隔

13.添加koroFileHeader 插件,安装(多人开发必备,防止扯皮)
进入设置setting.json文件
在这里插入图片描述

"fileheader.configObj": {undefined
        "autoAdd": false,  // 阻止自动保存添加头部注释
        "prohibitAutoAdd": ["md","json"]
    },
    "fileheader.customMade": { // 文件头部注释
        "Description": "",  // 文件描述
        "Author": "Dragon",  // 第一次创建文件作者
        "Email": "123@123.com", // 邮箱
        "Date": "Do not edit", // 创建时间
        "LastEditTime": "Do not edit", // 修改时间
        "LastEditors": "Dragon"  // 最后修改人
    },
	"fileheader.cursorMode": { //函数注释
	"description":"", // 方法
	"Author": "Dragon",  // 作者
	"param ":"",
	"return":""
},

文件头部添加注释:快捷键:window:ctrl+alt+i,mac:ctrl+cmd+i
在光标处添加函数注释:快捷键:window:ctrl+alt+t,mac:ctrl+cmd+t

完整的settin.json配置文件,如下

{
  "fileheader.configObj": {
    "autoAdd": false, // 阻止自动保存添加头部注释
    "prohibitAutoAdd": ["md", "json"]
  },
  "fileheader.customMade": {
    // 文件头部注释
    "Description": "", // 文件描述
    "Author": "Dragon", // 第一次创建文件作者
    "Email": "123@123.com",
    "Date": "Do not edit", // 创建时间
    "LastEditTime": "Do not edit", // 修改时间
    "LastEditors": "刘龙Dragon" // 最后修改人
  },
  "fileheader.cursorMode": {
    //函数注释
    "description": "", // 方法
    "Author": "Dragon", // 作者
    "param ": "",
    "return": ""
  },
  "editor.fontSize": 22,
  "editor.tabSize": 2,
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "explorer.confirmDelete": false,
  // #让函数(名)和后面的括号之间加个空格
  "javascript.format.insertSpaceBeforeFunctionParenthesis": false,
  "explorer.confirmDragAndDrop": false,
  "javascript.preferences.quoteStyle": "single",
  "typescript.preferences.quoteStyle": "single",
  // 100 列后换行
  "editor.wordWrapColumn": 100,
  // 保存时格式化
  "editor.formatOnSave": true,
  // 开启 vscode 文件路径导航
  "breadcrumbs.enabled": true,
  // prettier 设置语句末尾不加分号
  "prettier.semi": false,
  // prettier  设置语句末尾不引号
  // "prettier.trailingComma": "none",
  // prettier 设置强制单引号
  "prettier.singleQuote": true,

  // 注释后面加空格
  "prettier.eslintIntegration": true,
  // 选择 vue 文件中 template 的格式化工具
  "vetur.format.defaultFormatter.html": "prettyhtml",
  // 显示 markdown 中英文切换时产生的特殊字符
  "editor.renderControlCharacters": true,
  // vetur 的自定义设置
  "vetur.format.defaultFormatterOptions": {
    "prettier": {
      "singleQuote": true,
      "semi": false
    }
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[vue]": {
    "editor.defaultFormatter": "octref.vetur"
  },
  "less.compile": {
    // "outExt": ".wxss"
  },
  "files.associations": {
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript"
  },
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "minapp-vscode.disableAutoConfig": true,
  "code-runner.executorMap": {
    "code-runner.runInTerminal": true
  },
  "dart.checkForSdkUpdates": false,
  "window.zoomLevel": 1,
  "bracketPairColorizer.depreciation-notice": false,
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  }
}

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小小并不小

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值