美文网首页
VSCODE 自动保存时缩进4个

VSCODE 自动保存时缩进4个

作者: camy | 来源:发表于2021-10-02 13:55 被阅读0次

每次保存时,自动修改格式添加4个空格,想修改成2个,因为eslint是两个空格缩进。
vscode->settings->Code Actions On Save-> setting.json

1 添加:

    "editor.tabSize": 2,

2 If doesn't work

Go to: settings > workspace settings > Text editor
search Editor: Detect Indentation
uncheck 'Detect Indentation' to stick to your default setting.

相关文章

网友评论

      本文标题:VSCODE 自动保存时缩进4个

      本文链接:https://www.haomeiwen.com/subject/patmnltx.html