打造完美编辑器--VS code

栏目: CSS · 发布时间: 4年前

主题设置

One Dark Pro
vscode-icons

格式化

  • Prettier

代码检查

ESLint
TSLint
Stylelint
Markdownlint

自动补全

Auto Close Tag
Auto Rename Tag
Path Intellisense
Path Autocomplete

功能扩展

  • Chinese (Simplified) Language Pack for Visual Studio Code : 设置中文
  • Live Server : 一键在本地启动服务器
  • Vetur : Vue 语法格式支持:
  • Sass : Sass 支持:
  • Settings Sync : 同步编辑器配置
  • koro1FileHeader : 注释模板
  • Reactjs code snippets : React 代码提示
  • React Redux ES6 Snippets : react-redux 代码提示
  • EditorConfig for VS Code : 统一不同编辑器的代码风格
  • koroFileHeader : 在 vscode 中用于生成文件头部注释和函数注释的插件
  • language-stylus : stylus 语言支持,支持 .styl 格式文件
  • Markdown PDF : Markdown 生成 PDF 文件
  • settings Sync : 云同步 VS code 编辑器配置
  • LeetCode : 使用 LeetCode 和中国力扣题库
  • Go : 支持 GoLang

小程序插件

minapp
Dot Template

Flutter

  • Dart : Dart 语言支持
  • Flutter : Flutter 框架

自定义配置(User Settings)

{
  "editor.fontFamily": "Menlo, Consolas, 'Courier New', monospace",
  "editor.fontLigatures": true,
  "editor.fontSize": 24,
  "editor.fontWeight": "500",
  "editor.lineHeight": 24,
  "editor.lineNumbers": "on",
  "editor.minimap.enabled": false,
  "editor.renderIndentGuides": false,
  "editor.rulers": [120],
  "editor.formatOnPaste": true,
  "workbench.colorTheme": "One Dark Pro",
  "explorer.confirmDelete": false,
  "terminal.integrated.fontFamily": "monospace",
  "editor.formatOnType": false,
  "editor.formatOnSave": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "html",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    },
    {
      "language": "typescript",
      "autoFix": true
    },
    "typescriptreact"
  ],
  "eslint.options": {
    "plugins": ["html"]
  },
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "name": "Comments",
        "scope": "comment, punctuation.definition.comment",
        "settings": {
          "fontStyle": ""
        }
      },
      {
        "name": "js/ts italic",
        "scope": "entity.other.attribute-name.js,entity.other.attribute-name.ts,entity.other.attribute-name.jsx,entity.other.attribute-name.tsx,variable.parameter,variable.language.super",
        "settings": {
          "fontStyle": ""
        }
      },
      {
        "name": "js ts this",
        "scope": "var.this,variable.language.this.js,variable.language.this.ts,variable.language.this.jsx,variable.language.this.tsx",
        "settings": {
          "fontStyle": ""
        }
      }
    ]
  },
  "files.autoSave": "off",
  "window.zoomLevel": 0,
  "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
  "search.location": "panel",
  // prettier插件 自动化格式代码设置
  "prettier.eslintIntegration": true,
  "prettier.singleQuote": true, // 强制单引号
  "prettier.trailingComma": "none", // 尾随逗号
  "prettier.semi": false, // 结尾不加分号
  "prettier.tabWidth": 2, // 2格缩进
  "prettier.arrowParens": "always", // 围绕箭头函数参数强制使用括号
  "editor.detectIndentation": false,
  "editor.tabCompletion": "on",
  "liveServer.settings.donotShowInfoMsg": true,
  "typescript.updateImportsOnFileMove.enabled": "always",
  // vetur格式化插件的配置
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatter.ts": "vscode-typescript",
  "vetur.format.options.tabSize": 2,
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_attributes": "force-aligned"
    },
    "prettyhtml": {
      "printWidth": 100,
      "singleQuote": true,
      "wrapAttributes": false,
      "sortAttributes": false
    }
  },
  "vetur.validation.template": false,
  "files.associations": {
    "*.json": "jsonc",
    "*.cjson": "jsonc",
    "*.wxss": "css",
    "*.wxs": "javascript"
  },
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "minapp-vscode.disableAutoConfig": true,
  "sync.gist": "e9ec7974d53f0325e050467baabafc3a",

  // koroFileHeader插件配置修改
  // "fileheader.configObj": {
  //     "createFileTime": true,
  //     "timeNoDetail": true
  // },
  // 头部注释
  "fileheader.customMade": {
    "Description": "file content",
    "Author": "tgb",
    "Date": "Do not edit",
    "LastEditors": "tgb",
    "LastEditTime": "Do not edit"
  },
  "javascript.updateImportsOnFileMove.enabled": "never",
  "editor.tabSize": 2,
  "explorer.confirmDragAndDrop": false,
  "javascript.implicitProjectConfig.experimentalDecorators": true,
  "workbench.iconTheme": "vscode-icons"
}

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

免费

免费

克里斯•安德森 / 蒋旭峰、冯斌、璩静 / 中信出版社 / 2012-10 / 68.00元

一种商业模式既可以统摄未来的市场,也可以挤垮当前的市场——在我们这个现代经济社会里,这并不是一件不可能的事情。 “免费”就是这样的一种商业模式,它所代表的正是数字化网络时代的商业未来。 在《免费》这本书中,克里斯•安德森认为,新型的“免费”并不是一种左口袋出、右口袋进的营销伎俩,而是一种把货物和服务的成本压低到零的新型卓越能力。在20世纪“免费”是一种强有力的推销手段,而在21世纪它已经成为......一起来看看 《免费》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具