1.打开vs code > 文件 > 首选项 > 设置 > 将下面一段粘贴在右侧即可

// Place your settings in this file to overwrite the default settings
{
"python.formatting.provider": "yapf",
"view-in-browser.customBrowser": "chrome",
 
"files.associations": {
"*.vue": "vue"
},
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true
},
"emmet.syntaxProfiles": {
"javascript": "jsx",
"vue": "html",
"vue-html": "html"
},
"window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
// 窗口失去焦点自动保存
"files.autoSave": "off",
// 编辑粘贴自动格式化
"editor.formatOnPaste": true,
// 控制字体系列。
// "editor.fontFamily": "pingfang,Menlo, Monaco, 'Courier New', monospace",
 
// 通过使用鼠标滚轮同时按住 Ctrl 可缩放编辑器的字体
"editor.mouseWheelZoom": false,
// 行太长自动换行
"editor.wordWrap": "on",
//Windows bash终端"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
// 主体
"workbench.colorTheme": "Monokai",
"workbench.iconTheme": "vs-seti",
// eslint设置
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue",
{
"language": "vue",
"autoFix": true
}
],
// 保存自动修复
"eslint.autoFixOnSave": true,
// tab锁紧
"editor.tabSize": 2,
// 保存自动化
"editor.formatOnSave": true,
// 空格变成......
"editor.renderWhitespace": "all",
"window.zoomLevel": 0,
"vetur.format.defaultFormatter.html": "js-beautify-html"
}

vs code 代码格式化的更多相关文章

  1. vs code 代码格式化整理

    vs code格式化代码的快捷键如下:(来源于这里) On Windows Shift + Alt + F On Mac Shift + Option + F On Ubuntu Ctrl + Shi ...

  2. code blocks 如何实现一键代码格式化

    问题:code blocks 如何实现一键代码格式化 解答:直接右键,选择format use ASstyle

  3. Arch Linux下Visual Stdio Code在格式化C代码时报错

    libtinfo.so.5: cannot open shared object file: No such file or directory Arch Linux下Visual Stdio Cod ...

  4. vs code中Vue代码格式化的问题

    个人网站 https://iiter.cn 程序员导航站 开业啦,欢迎各位观众姥爷赏脸参观,如有意见或建议希望能够不吝赐教! VSCode自从更新之后,vue文件的html代码格式化就失效了,而且vu ...

  5. vs Code + Eslint + Prettier 代码格式化(vue开发)

    一.什么是Eslint 通过查看eslint官网(官网传送门),我们就可以知道,eslint就是一个用来识别 ECMAScript/JavaScript 并且按照规则给出报告的代码检测工具,主要用来检 ...

  6. astyle代码格式化

    Artistic Style 1.24 A Free, Fast and Small Automatic Formatterfor C, C++, C#, and Java Source Code 项 ...

  7. eclipse 代码清理 代码格式化 代码凝视

    Code Style包含两个方面:代码清理,代码规范化.代码清理能够參考: http://www.ibm.com/developerworks/cn/opensource/os-eclipse-cle ...

  8. Sublime Text 3下载安装以及安装HTML-CSS-JS Prettify代码格式化插件

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 Sublime Text的安装以及安装插件步骤. 下载Sublime Text 官网地址:http://www.sublimetex ...

  9. 【Java】Eclipse代码格式化-代码模板

    Eclipse代码格式化-代码模板 eclipse 代码模板_百度搜索 编码规范系列(一):Eclipse Code Templates设置 - 青葱岁月 - ITeye博客 善用Eclipse的代码 ...

随机推荐

  1. keras模型总结

    https://keras.io/zh/ https://keras.io/zh/models/about-keras-models/ 在 Keras 中有两类主要的模型:Sequential 顺序模 ...

  2. jQuery源代码框架思路

    開始计划时间读源代码,第一节jQuery框架阅读思路整理 (function(){ jQuery = function(){}; jQuery一些变量和函数和给jQuery对象加入一些方法和属性 ex ...

  3. iOS应用崩溃日志分析 iOS应用崩溃日志揭秘

    转自:http://www.raywenderlich.com/zh-hans/30818/ios%E5%BA%94%E7%94%A8%E5%B4%A9%E6%BA%83%E6%97%A5%E5%BF ...

  4. router的安装和基本配置

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. 拒绝干扰 解决Wi-Fi的最大问题

    本文转载至:http://www.ciotimes.com/net/rdjs/WI-FI/201006301920.html 射频干扰英文:RFI,(Radio Frequency Interfere ...

  6. 【Android开发-8】生命周期,Activity中打开另外一个Activity

    前言:生命中有很多人陪伴自己走过一生中的某段旅程,仅仅是有些人仅仅是某阶段出现,有些人却陪伴自己非常久.就像小学.中学.高中.大学,那些以前以为会长久拥有的,当经历过天涯各地地忙碌于生活,或如意.或失 ...

  7. mongo-java-driver

    http://mvnrepository.com/artifact/org.mongodb/mongo-java-driver/3.5.0 <!-- https://mvnrepository. ...

  8. 使用libcurl的包装库cpr发起http请求

    cpr GitHub地址https://github.com/whoshuu/cpr 简单示例:cpr_http_request.cpp #include <iostream> #incl ...

  9. UILabel与UIFont的用法和属性的一些总结

    初始化一个UILabel对象,并初始化大小 UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(100, 100, 100, 100) ...

  10. MapReduce ChainMapper/ChainReducer

    The ChainMapper class allows to use multiple Mapper classes within a single Map task.  The ChainRedu ...