{
//删除文件确认
"explorer.confirmDelete": false,
// 主题
"workbench.iconTheme": "vscode-icons",
// 小地图
"editor.minimap.enabled": true,
// 主题风格One Dark Pro
// "workbench.colorTheme": "One Dark Pro",
//窗口大小比例
// "window.zoomLevel": 1,
// "extensions.autoUpdate": false,
// 字体大小
// "editor.fontSize": 13,
"editor.snippetSuggestions": "top",
"diffEditor.ignoreTrimWhitespace": true,
// 设置格式化缩进4格
// "prettier.tabWidth": 4,
"vetur.format.defaultFormatter.html": "prettier",
// "gitlens.advanced.messages": {
// "suppressShowKeyBindingsNotice": true
// },
// "gitlens.historyExplorer.enabled": true,
// "atomKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
//粘贴自动格式化
"editor.formatOnPaste": false,
//保存自动格式化
"editor.formatOnSave": false,
// 用来忽略工程打开的文件夹
"files.exclude": {
"**/.vscode": true,
"**/.DS_Store": true,
"**/.history":true,
"**/nbproject":true
},
// 用来忽略搜索的文件夹
"search.exclude": {
"**/node_modules/**": true,
"**/bower_components/**": true,
"**/image/**": true,
"**/*.xml": true,
"**/.history/**":true,
"**/nbproject/**":true,
"**/vscode/**":true },
// // 创建和更新代码的头部信息作者
// "fileheader.Author": "Baldwin",
// "fileheader.LastModifiedBy": "Baldwin",
}

以上是简单的示例:

实际使用中发现默认管理员、用户与工作组使用的配置均为空{},而且vscode自带git配置(不需要再下载配置插件);

但为了更加美观和智能,还是推进安装一些插件,如:主题、图标、语法校验、代码格式化、代码提示、编辑器背景色或布局等

推荐插件与配置】:https://zhuanlan.zhihu.com/p/64021066

示例1:

{ // VScode主题配置
"editor.tabSize": 2,
"editor.lineHeight": 24,
"editor.renderLineHighlight": "none",
"editor.renderWhitespace": "none",
"editor.fontFamily": "Consolas",
"editor.fontSize": 15,
"editor.cursorBlinking": "smooth",
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
// 是否允许自定义的snippet片段提示,比如自定义的vue片段开启后就可以智能提示
"editor.snippetSuggestions": "top",
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "One Dark Pro Vivid",
"workbench.startupEditor": "newUntitledFile",
"html.suggest.angular1": false,
"html.suggest.ionic": false,
"files.trimTrailingWhitespace": true,
// vetur插件格式化使用beautify内置规则
"vetur.format.defaultFormatter.html": "js-beautify-html",
// VScode 文件搜索区域配置
"search.exclude": {
"**/dist": true,
"**/build": true,
"**/elehukouben": true,
"**/.git": true,
"**/.gitignore": true,
"**/.svn": true,
"**/.DS_Store": true,
"**/.idea": true,
"**/.vscode": false,
"**/yarn.lock": true,
"**/tmp": true
},
// 排除文件搜索区域,比如node_modules(贴心的默认设置已经屏蔽了)
"files.exclude": {
"**/.idea": true,
"**/yarn.lock": true,
"**/tmp": true
},
// 配置文件关联,以便启用对应的智能提示,比如wxss使用css
"files.associations": {
"*.vue": "vue",
"*.wxss": "css"
},
// 配置emmet是否启用tab展开缩写
"emmet.triggerExpansionOnTab": true,
// 配置emmet对文件类型的支持,比如vue后缀文件按照html文件来进行emmet扩写
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html",
"javascript": "javascriptreact",
// xml类型文件默认都是单引号,开启对非单引号的emmet识别
"xml": {
"attr_quotes": "single"
}
},
// 在react的jsx中添加对emmet的支持
"emmet.includeLanguages": {
"jsx-sublime-babel-tags": "javascriptreact"
},
// 是否开启eslint检测
"eslint.enable": false,
// 文件保存时,是否自动根据eslint进行格式化
"eslint.autoFixOnSave": true,
// eslint配置文件
"eslint.options": {
"plugins": [
"html",
"javascript",
{
"language": "vue",
"autoFix": true
},
"vue"
]
},
// eslint能够识别的文件后缀类型
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue",
"typescript",
"typescriptreact"
],
// 快捷键方案,使用sublime的一套快捷键
"sublimeTextKeymap.promptV3Features": true,
// 格式化快捷键 shirt+alt+F
// prettier进行格式化时是否安装eslint配置去执行,建议false
"prettier.eslintIntegration": true,
// 如果为true,将使用单引号而不是双引号
"prettier.singleQuote": true,
// 细节,配置gitlen中git提交历史记录的信息显示情况
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
"suppressResultsExplorerNotice": false,
"suppressUpdateNotice": true,
"suppressWelcomeNotice": false
},
// 开启apicloud在vscode中的wifi真机同步
"apicloud.port": "23450",
// 设置apicloud在vscode中的wifi真机同步根目录
"apicloud.subdirectories": "/apiclouduser",
// git是否启用自动拉取
"git.autofetch": true,
"vsicons.dontShowNewVersionMessage": true,
"window.zoomLevel": 0,
"colorize.ignore_search_variables_info": true,
"files.autoSave": "afterDelay",
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
}

示例2:

{
"workbench.startupEditor": "welcomePage",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
// 是否允许自定义的snippet片段提示,比如自定义的vue片段开启后就可以智能提示
"editor.snippetSuggestions": "top",
"workbench.iconTheme": "vscode-icons",
"editor.tabSize": 2,
"eslint.validate": [
// "javascript",
"javascriptreact",
"html",
"vue",
{
"language": "html",
"autoFix": true
}
],
"eslint.autoFixOnSave": true,
"window.zoomLevel": 0,
"search.location": "panel",
"gitlens.advanced.fileHistoryFollowsRenames": false,
"peacock.favoriteColors": [
{
"name": "Angular Red",
"value": "#b52e31"
},
{
"name": "Auth0 Orange",
"value": "#eb5424"
},
{
"name": "Azure Blue",
"value": "#007fff"
},
{
"name": "C# Purple",
"value": "#68217A"
},
{
"name": "Gatsby Purple",
"value": "#639"
},
{
"name": "Go Cyan",
"value": "#5dc9e2"
},
{
"name": "Java Blue-Gray",
"value": "#557c9b"
},
{
"name": "JavaScript Yellow",
"value": "#f9e64f"
},
{
"name": "Mandalorian Blue",
"value": "#1857a4"
},
{
"name": "Node Green",
"value": "#215732"
},
{
"name": "React Blue",
"value": "#00b3e6"
},
{
"name": "Something Different",
"value": "#832561"
},
{
"name": "Vue Green",
"value": "#42b883"
}
],
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.autofetch": true
}

vscode编辑器自定义配置的更多相关文章

  1. VScode编辑器个性化配置

    一.设置方法 “文件” - > “首选项” -> "设置" 二.字体大小和缩进 "editor.tabSize": 2, "editor. ...

  2. visual studio code 编辑器的配置及快捷键等, vscode, csc

    visual studio code (vsc) 对开发node.js,javascript,python,html,golang等比较友好,同时支持git浏览及分屏对比,运行速度快,所以是值得一用的 ...

  3. 开发工具之Vscode编辑器

    Visual Studio Code(以下简称vscode)是一个轻量且强大的代码编辑器,支持Windows,OS X和Linux.内置JavaScript.TypeScript和Node.js支持, ...

  4. 百度UEditor在线编辑器的配置和图片上传

    前言 最近在项目中使用了百度UEditor富文本编辑器,配置UEditor过程中遇到了几个问题,在此记录一下解决方案和使用方法,避免以后使用UEditor出现类似的错误. 基本配置 一.下载UEdit ...

  5. 在线富文本编辑器FckEditor配置(.Net Framework 3.5)

    进入FCKeditor文件夹,编辑 fckconfig.js 文件.1.上传设置  .  var _FileBrowserLanguage         = 'php' ;         // a ...

  6. Ueditor/自定义配置

    UEditor除 了具有轻量.可定制等优点外,还始终将优化编辑操作.提升用户体验摆在了很重要的位置.在这一点上,除了对编辑器功能.性能.实现细节等不断地改进和追求 创新之外,众多灵活而人性化的自定义配 ...

  7. vscode编辑器

    插件 Auto Close Tag   自动关闭标签 Auto Rename Tag 自动修改标签 Bracket Pair Colorizer  多层括号不同颜色显示 EditorConfig fo ...

  8. 富文本编辑器 CKeditor 配置使用+上传图片

    参考文献: 富文本编辑器 CKeditor 配置使用 CKEditor与CKFinder的配置(ASP.NET环境),老版本可以参考 CKEditor+CKFinder ASP版在本地电脑中的配置  ...

  9. Vue学习笔记-VSCode安装与配置

    一  使用环境: windows 7 64位操作系统 二  VSCode安装与配置  1.下载: https://code.visualstudio.com 直接点击即可. 2. 点击按装程序,默认安 ...

随机推荐

  1. java正则表达式备忘

    最近框架和爬虫上常要处理字符串匹配和替换的场景,备忘. 非贪婪模式 比如要匹配html文本中的连接,例如a href="www.abc.com/xyz/o"需要替换为a href= ...

  2. Jmeter里http接口的执行顺序是顺序执行

    1,如果在一个线程组里则是顺序执行 2,如果不在一个线程组里,就勾选独立运行各个线程组,在一个运行结束后启动下一个线程组

  3. RabbitMQ整合Spring Booot【消费者应答模式】

    生产者代码不变,消费者: package com.toov5.Consumer; import java.io.IOException; import java.util.concurrent.Tim ...

  4. vue mpvue 上拉加载更多示例代码

    vue 上拉加载更多示例代码 可以比较简单的改为 mpvue , 去除滚动判断,直接放在 onReachBottom 周期即可. html <div id="app"> ...

  5. [LeetCode] 317. Shortest Distance from All Buildings 建筑物的最短距离

    You want to build a house on an empty land which reaches all buildings in the shortest amount of dis ...

  6. Java高级面试题整理(附答案)

    这是我收集的10道高级Java面试问题列表.这些问题主要来自 Java 核心部分 ,不涉及 Java EE 相关问题.你可能知道这些棘手的 Java 问题的答案,或者觉得这些不足以挑战你的 Java ...

  7. PHP生成短链接方法

    PHP生成短链接方法方法一:新浪提供了长链接转为短链接的API,可以把长链接转为 t.cn/xxx 这种格式的短链接. API: http://api.t.sina.com.cn/short_url/ ...

  8. Qt deletelater函数分析(1)

               生活的全部意义在于无穷地探索尚未知道的东西,在于不断地增加更多的知识.--左拉 该函数是QObject类的函数:                             ---- ...

  9. 了解一下JVM和GC工作机制

    题外话:很久没有写博客了,事情颇多,今天空闲下来,学习一下顺便写一下自己的了解,机会总是留给有准备的人,所以平常一定要注意知识的巩固和积累.知识的深度也要有一定的理解,不比别人知道的多,公司干嘛选你? ...

  10. Vue(六)插槽(2.6.0+)

    插槽在vue2.6.0开始有了新的更新 具名插槽(数据来自父组件) 子组件(定义插槽)这里版本前后没什么变化 <template> <div> <header> & ...