尧图网站建设 尧图网络
  • 首页
  • 关于我们
  • 服务项目
  • 案例展示
  • 建站流程
  • 资讯中心
  • 联系我们
首页/资讯中心/详情

记一次vscode 自动格式化保存经历

记一次vscode 自动格式化保存经历
📅 发布时间:2026/6/19 15:36:40

原因是某个插件在保存文本时会自动格式 导致我的条件顺序不对

文件 → 首选项 → 设置 → 右上角「打开设置(json)」
在 .vscode/settings.json

原:

{"editor.fontLigatures": false,"editor.mouseWheelZoom": true,"python.analysis.completeFunctionParens": true,"terminal.integrated.defaultProfile.windows": "Windows PowerShell","workbench.colorTheme": "Visual Studio Light","terminal.integrated.profiles.windows": {"PowerShell": {"source": "PowerShell","icon": "terminal-powershell"},"Command Prompt": {"path": ["${env:windir}\\Sysnative\\cmd.exe","${env:windir}\\System32\\cmd.exe"],"args": [],"icon": "terminal-cmd"},"Git Bash": {"source": "Git Bash"},"Windows PowerShell": {"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"}}
}

 

 

将

{"editor.fontLigatures": false,"editor.mouseWheelZoom": true,"python.analysis.completeFunctionParens": true,"terminal.integrated.defaultProfile.windows": "Windows PowerShell","workbench.colorTheme": "Visual Studio Light","terminal.integrated.profiles.windows": {"PowerShell": {"source": "PowerShell","icon": "terminal-powershell"},"Command Prompt": {"path": ["${env:windir}\\Sysnative\\cmd.exe","${env:windir}\\System32\\cmd.exe"],"args": [],"icon": "terminal-cmd"},"Git Bash": {"source": "Git Bash"},"Windows PowerShell": {"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"}},// ===== 下面新增:强制关闭所有插件的「保存时格式化」====="editor.formatOnSave": false,"prettier.formatOnSave": false,"prettier.requireConfig": true,"eslint.format.enable": false,"editor.codeActionsOnSave": {"source.fixAll.eslint": "never","source.fixAll": "never"}
}

 

相关新闻

  • 2025年11月美白精华产品推荐榜单:五大热门产品深度对比分析
  • Oracle数据库异常断电后无法启动?
  • 2025年11月膨润土厂家推荐榜单:五家优质企业综合对比分析

最新新闻

  • 3步解锁老旧Mac新生命:OpenCore Legacy Patcher终极升级指南
  • 2026宜昌非急救转运救护车TOP5盘点|宜荆荆同城、长江跨江、三峡山地、院区转诊首选康跃转运 - 吉修匠
  • 2026年湖北百合种植基地推荐排行榜:百合技术/百合回收/百合种苗案例参考 - 新闻快传
  • 告别龟速与超时:全方位解决 git clone 网络难题的实战指南
  • 嵌入式MCU电气特性与FLASH操作深度解析:从数据手册到稳定设计
  • 2026 郑州八大装修公司综合实力排行榜 - GrowthUME

日新闻

  • 5分钟掌握Python进化算法:Geatpy高性能优化工具完全指南
  • Microchip 24AA044 EEPROM选型与应用全指南:从参数解析到实战编程
  • 华为的鸿蒙到底有多牛?为什么称作遥遥领先?

周新闻

  • 3步解锁iOS设备:applera1n激活锁绕过完全指南
  • 39 2026 人工智能证书终极盘点,普通人选 AI 证书可以从这些方向入手
  • Redis 暴露公网有多危险?从端口检查到补救步骤

月新闻

  • 【总结】入门篇:50句话让你记住架构核心概念
  • WeChatMsg技术方案解析:实现Mac微信数据自主管理的完整解决方案
  • WeChatMsg:革新性微信数据备份方案,打造你的专属数字记忆库

关于尧图

  • 公司简介
  • 团队介绍
  • 企业文化
  • 荣誉资质

服务项目

  • 定制开发
  • 电商建站
  • UI 设计
  • 运维服务

快速链接

  • 案例展示
  • 建站流程
  • 常见问题
  • 资讯中心

联系方式

  • 📍北京市朝阳区互联网产业园 A 座 10 层
  • 📞400-888-8888
  • ✉️contact@rkmt.cn
  • 🕐周一至周日 9:00-21:00

© 2024 北京尧图网络科技有限公司 版权所有 | 京 ICP 备 XXXXXXXX 号