vscode sets tab to four spaces

1. General setting method:

code->Preferences->Settings.

Search for 'tab size' and change the value to "4". (Setting if it doesn't work, look back. If it does, it doesn't hurt to go further down)

Note: Remove the "Detect Indentation" setting, otherwise vscode will automatically guess the number of spaces in the tab based on the file content. That is to say, the calculation result may not be the value you set.

(This is very deceitful, and it took a long time to find out that this is the problem.)

 

2, Chinese garbled characters

This method is only applicable to non-UTF-8 files, which are automatically set to UTF-8 encoding by icode, and the original Chinese may appear garbled. At this time, you need to turn off automatic detection and set the file encoding to UTF-8.

 

Guess you like

Origin blog.csdn.net/abbcccdde/article/details/106770476
Recommended