vs code 关闭保存自动格式化 formatonsave - [vscode] - [html]

有时候Ctrl+s保存,html代码哥格式会紊乱。 造成这个原因一般是我们基本都在用的一个插件:

![](https://img2018.cnblogs.com/blog/1735896/201912/1735896-20191227104753443-1793953213.png)

解决办法
【方法一】:不用普通保存,用save without format 代码编辑页面---->按F1---->输入save without formatting---->回车
该操作可以用快捷键


**【方法二】:关闭自动格式化** 代码编辑页面---->按F1---->输入`Formatter config`---->回车---->`"onSave"`属性设置为`false`

猜你喜欢

转载自www.cnblogs.com/jaycethanks/p/12106158.html