当前位置: 首页 > news >正文

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

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

文件 → 首选项 → 设置 → 右上角「打开设置(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"}
}

 

http://www.jsqmd.com/news/28362/

相关文章:

  • 2025年11月美白精华专业评测榜:基于成分与实测数据的客观排行
  • 退役高二选手的CSP2025游记
  • 2025年唐卡装饰权威深度解析与推荐:家装资金安全与数字化服务新标杆
  • 2025年11月美白精华产品推荐榜单:五大热门产品深度对比分析
  • 2025年11月人形机器人落地商推荐榜:基于行业白皮书与多维度数据的权威分析
  • Oracle数据库异常断电后无法启动?
  • 轻松打造自己的专属输入法
  • Oracle 11g数据泵一键备份脚本,无需授权
  • 实践!Oracle 11g 数据库级别最佳参数优化
  • 2025年11月膨润土厂家推荐榜单:五家优质企业综合对比分析
  • 深入解析Oracle SQL调优健康检查工具(SQLHC):从原理到实战优化
  • Oracle数据库远程无法连接怎么办?
  • Oracle手工完全恢复的几种方式
  • 2025年11月膨润土厂家推荐榜单:权威测评与综合排名分析
  • Windows版本Oracle 11g一键巡检脚本
  • 2025年11月污水环保设备厂家排行对比:专业顾问视角的深度评测分析
  • 力扣|二叉树|二叉搜索树最近节点查询|二叉搜索树中第k小元素
  • 2025年11月大型挖掘机品牌综合排名:专业对比与选购建议
  • 升鲜宝供应链管理系统-生鲜配送系统_分拣端界面重构设计(一)
  • 2025年11月大型挖掘机品牌推荐榜单:五大品牌实力对比分析
  • 2025 年 11 月保湿贴片面膜,修护贴片面膜,抗衰老贴片面膜厂家最新推荐,专业制造与品牌保障口碑之选
  • Codeforces Round 1023 (Div. 2)
  • 2025 年 11 月美白贴片面膜,抗皱贴片面膜,紧致贴片面膜厂家最新推荐,产能、专利、环保三维数据透视
  • 2025 年 11 月保湿贴片面膜,抗皱贴片面膜,修护贴片面膜厂家最新推荐,精准检测与稳定性能深度解析
  • 2025 年 11 月美白贴片面膜,补水贴片面膜,紧致贴片面膜厂家最新推荐,技术实力与市场口碑深度解析
  • CH5xx BLE低功耗使用GPIO唤醒
  • 2025 年 11 月美白贴片面膜,抗衰老贴片面膜,补水贴片面膜厂家最新推荐,高性能与可靠性兼具的优质品牌
  • 启动的时候出现错误 (exit code -1073741819 (0xc0000005) )?报错0xC0000005的可能原因?
  • vscode判断当前是否为debug模式
  • 计算机网络学习分享1