Change the first line of html, css, js code to 2 spaces indent in vscode

1. First find the setting in the sitting corner

Insert picture description here

2. Then find this thing and change it to 2

Insert picture description here

3. If the following plugins are installed

Insert picture description here

4. Press F1 to find the formatter.config file

Insert picture description here

5. Change all the index_size values ​​to 2

"indent_size": 2,

6. Then turn off vscode and reopen it, the indentation becomes 2

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45773503/article/details/113661986