vscode 解决格式化代码无效问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sea_snow/article/details/86133903

1、原因:

    vscode默认启用了根据文件类型自动设置tabsize的选项,

2、解决方法:   

    因此,可以通过关闭自动设置选项,防止格式覆盖。

3、如何操作

     在用户设置里添加如下配置即可: "editor.detectIndentation": false

     file->preferences->settings   搜索detect indentation

猜你喜欢

转载自blog.csdn.net/sea_snow/article/details/86133903