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:
2. How to install the plug-in:
Method 1: Click here directly
Method 2: Press the shortcut key Ctrl+Shift+P, enter extensions in the box that appears, and press Enter.
Method 3: Press the shortcut key Ctrl+P, enter: ext install in the box, and press Enter.
After completing one of method 1, method 2 or method 3, you will come to the following interface:
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).
After downloading, as shown below.
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.
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:
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.
2. After clicking, such a menu bar will appear, click Settings.
3. In the search box that appears, enter: Files.autoGuessEncoding and press Enter to confirm.
4. Check this option.
5. Return to the program interface you just checked, and find that the garbled characters disappear, and the Chinese comments can be displayed normally.
Finish.