vc code

1,221 阅读2分钟

vc code 设置:

{
  "editor.fontSize": 14,
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/.vscode": true,
    "**/.project": true,
    "**/node_modules": true,
    "**/.DS_Store": true
  },
  "workbench.iconTheme": "vscode-icons",
  "editor.tabSize": 2,
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    "**/dist": true
  },
  "extensions.autoUpdate": true,
  "editor.renderWhitespace": "none",
  "editor.cursorBlinking": "smooth",
  "terminal.integrated.cursorStyle": "line",
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
  },
  "gulp.autoDetect": "off",
  "jake.autoDetect": "off",
  "grunt.autoDetect": "off",
  "terminal.integrated.cursorBlinking": true,
  "extensions.ignoreRecommendations": true,
  "php.suggest.basic": false,
  "php.validate.enable": false,
  "scss.validate": false,
  "less.validate": false,
  "window.zoomLevel": 0,
  "px-to-rem.px-per-rem": 20,
  "editor.minimap.enabled": true,
  "beautify.language": {
    "js": {
      "type": [
        "javascript",
        "json"
      ],
      "filename": [
        ".jshintrc",
        ".jsbeautify"
      ]
    },
    "css": [
      "css",
      "scss"
    ],
    "html": [
      "htm",
      "html",
      "vue"
    ]
  },
  "emmet.includeLanguages": {
    "vue-html": "html",
    "vue": "html",
    "wxml": "html"
  },
  "editor.renderControlCharacters": false,
  "workbench.panel.location": "bottom",
  "beautify.config": {
    "indent_size": 2
  },
  "explorer.confirmDelete": false,
  "workbench.activityBar.visible": true,
  "workbench.statusBar.visible": true,
  "workbench.sideBar.location": "right",
  "window.menuBarVisibility": "toggle",
  "files.trimTrailingWhitespace": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "html",
    "shtml"
  ],
  "eslint.options": {
    "configFile": "D:/code/.eslintrc.json",
    "plugins": ["html", "backbone", "requirejs"]
  },
  "markdown.extension.toc.orderedList": true,
  "files.associations": {
    "*.jsp": "jsp",
    "*.wxss": "css",
    "*.wxml": "wxml",
    "*.cjson": "jsonc",
    "*.wxs": "javascript"
  },
  "gitlens.advanced.messages": {
    "suppressCommitHasNoPreviousCommitWarning": false,
    "suppressCommitNotFoundWarning": false,
    "suppressFileNotUnderSourceControlWarning": true,
    "suppressGitVersionWarning": false,
    "suppressLineUncommittedWarning": false,
    "suppressNoRepositoryWarning": true,
    "suppressResultsExplorerNotice": false,
    "suppressShowKeyBindingsNotice": true,
    "suppressUpdateNotice": false,
    "suppressWelcomeNotice": true
  },
  "svn.multipleFolders.ignore": [
    "**/.git/**",
    "**/.hg/**",
    "**/vendor/**",
    "**/node_modules/**",
    "**/.vscode/**"
  ],
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "gitlens.keymap": "chorded",
  "terminal.integrated.confirmOnExit": true,
  "terminal.integrated.shell.windows": "C:\\Program Files (x86)\\Git\\bin\\bash.exe",
  "java.home": "C:\\Program Files\\Java\\jdk1.8.0_73",
  "java.errors.incompleteClasspath.severity": "ignore",
  "diffEditor.ignoreTrimWhitespace": true,
  "html.validate.styles": false,
  "markdown.extension.print.absoluteImgPath": false,
  "previewjsdoc.conf": {
    "plugins": ["plugins/markdown"],
    "recurseDepth": 10,
    "source": {
      "includePattern": ".+\\.js(doc|x)?$",
      "include": ["public"],
      "excludePattern": "(^|\\/|\\\\)_"
    },
    "sourceType": "module",
    "tags": {
      "allowUnknownTags": true,
      "dictionaries": [
        "jsdoc",
        "closure"
      ]
    },
    "templates": {
      "cleverLinks": false,
      "monospaceLinks": false
    },
    "opts": {
      "encoding": "utf8",
      "recurse": true,
      "destination": "D:\\code\\jsdoc\\"
    },
    "markdown": {
      "tags": ["MK"]
    }
  },
  "previewjsdoc.output": "D:\\code\\jsdoc\\",
  "previewjsdoc.port": 7010,
  "explorer.confirmDragAndDrop": false,
  "markdown.extension.preview.autoShowPreviewToSide": true,
  "json.trace.server": "messages",
  "minapp-vscode.disableAutoConfig": true,
  "npm.enableScriptExplorer": true,
  "breadcrumbs.enabled": true,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "git.confirmSync": false,
  "git.autofetch": true,
  "html.format.wrapAttributes": "aligned-multiple",
  "git.enableSmartCommit": true,
  "terminal.integrated.rendererType": "dom",
  "workbench.colorTheme": "Solarized Light"
}

Eslint 配置:

"./.eslintrc.json"

{
  "env": {
    "browser": true,
    "commonjs": true,
    "jquery": true,
    "es6": true,
    "node": true,
    "amd": true
  },
  "parserOptions": {
    "ecmaVersion": 6,
    "ecmaFeatures": {
      "experimentalObjectRestSpread": true,
      "jsx": true
    },
    "sourceType": "module"
  },
  "globals": {
    "common": true,
    "App": true,
    "wx": false,
    "$": true,
    "Page":false,
    "global":true,
    "Component":true
  },
  "plugins": [
    "vuefix",
    "html",
    "backbone",
    "requirejs"
  ],
  "extends": ["plugin:backbone/recommended", "plugin:requirejs/recommended"],
  "rules": {
    "vuefix/vuefix": [2, {
      "auto": true
    }],
    "no-const-assign": "warn",
    "no-this-before-super": "warn",
    "no-undef": "warn",
    "no-self-assign": 2,
    "no-self-compare": 2,
    "constructor-super": "warn",
    "valid-typeof": "warn",
    "backbone/collection-model": 1,
    "backbone/defaults-on-top": 1,
    "backbone/model-defaults": 1,
    "backbone/no-constructor": 1,
    "backbone/no-native-jquery": 1,
    "no-use-before-define": 0,
    "global-require": 1
  },
  "settings": {
    "html/html-extensions": [".html", ".shtml",".wxml"]
  }
}

使用了一些插件,可能需要下载.

Markdown 样式修正:
"./md.css"

html,body{
  width:800px;
  margin: 0 auto;
  color: #4d4e53;
  background: #fff;
}
body{
  padding-bottom:50px;
  padding-top:30px;
}
h1,h2{
  text-align: center
}

h1,h2{
  font-size: 24px;
}
h3{
  font-size: 20px;
}
h4{
  font-size: 16px;
}
hr{
  border-bottom: 1px solid #d9d9d9;
  height: 0;
}

code{
  background:#d9d9d9;
  border-radius: 2px;
  color: brown;
}

.hljs code > div{
  background:#d9d9d9;
  border-radius: 8px;
}

svg{
  margin: 0 auto;
  display: block;
}

g{
  text-align: center;
}
table{
  border: 1px solid black;
}

table>thead>tr>th{
  border-right: 1px solid rgb(207, 207, 207);
}

table>thead>tr>th:nth-last-child(1){
  border-right:none;
}

table>tbody>tr>td{
  border-right: 1px solid rgb(207, 207, 207);
}

table>tbody>tr>td:nth-last-child(1){
  border-right: none;
}

table > tbody > tr + tr > td {
  border-top: 1px solid rgb(207, 207, 207);
}
blockquote{
  background: blanchedalmond;
}
.hljs-comment, .hljs-quote {
  color: #017402;
}

主要是长期积累的VCcode 配置以及VCcode.常用前端插件配置.

VCcode常用插件有:

  1. Beautify (代码格式化插件)
  2. Debugger for Chrome
  3. Document This (JSDos插件)
  4. ESLint (Js代码监控)
  5. GitLens (git插件,比VCcode自带的多了很多功能)
  6. HTML5 Snippets (完整的HTMl标签提示)
  7. Import Cost (自动计算引用包的大小)
  8. JavaScript Snippet Pack (JS提示包)
  9. Markdown All in One (markdown 多合一功能扫插件)
  10. Markdown Preview Mermaid Support (markdown流程图插件)
  11. minapp (wx小程序插件)
  12. npm support (npm 功能增强)
  13. Output Colorizer (终端文本框着色)
  14. Path Intellisense (路径引入自动补全)
  15. SVN (vccode中的SVN插件)
  16. vscode-icons (资源管理器文件图标美化)

如 git svn 等.. 必须先安装源程序.其在VScode中,仅仅是引入一些简化或者视图,命令和快捷键等...便利操作,与VScode兼容.并不是直接下载了这些软件.