VScode sets the language to Chinese, and solves the problem of garbled Chinese comments.

Vscode official website download address: https://code.visualstudio.com/
Plug-in official website address: https://marketplace.visualstudio.com/

1. Set the language to Chinese

In front-end development, Visual Studio Code (vscode for short) is a very useful tool, but when you open vscode for the first time, you will find that the interface is in English, which will be very unfriendly to many developers (such as me). To set it into Chinese, you only need to install a plug-in. The following are the steps.
1. Open vscode, the interface is as follows:
insert image description here
2. How to install the plug-in:
Method 1: Click here directly
insert image description here
Method 2: Press the shortcut key Ctrl+Shift+P, enter extensions in the box that appears, and press Enter.
insert image description here
Method 3: Press the shortcut key Ctrl+P, enter: ext install in the box, and press Enter.
insert image description here
After completing one of method 1, method 2 or method 3, you will come to the following interface:
insert image description here
3. Enter Chinese (Simplified) Language Pack for Visual Studio Code in the search box (basically enter Chinese and it will come out), then click install Download (you can choose Simplified Chinese and Traditional Chinese according to yourself).
insert image description here
After downloading, as shown below.
insert image description here
4. In the last step, you only need to fork off the software and reopen it to see that the interface changes from English to Chinese.
insert image description here

2. Solve the problem of garbled characters in Chinese comments

The first time you open the code with vscode, there will be a situation where Chinese comments are garbled because they cannot be recognized, similar to this:
insert image description here
to solve it, you only need to follow the steps below to set it up.
1. Click the setting button (similar to a gear) in the lower left corner of the software.
insert image description here
2. After clicking, such a menu bar will appear, click Settings.
insert image description here
3. In the search box that appears, enter: Files.autoGuessEncoding and press Enter to confirm.
insert image description here
4. Check this option.
insert image description here
5. Return to the program interface you just checked, and find that the garbled characters disappear, and the Chinese comments can be displayed normally.
insert image description here
Finish.

Guess you like

Origin blog.csdn.net/weixin_43737995/article/details/104214032