Vscode-python Advanced Configuration Chinese garbled
Chinese garbled, online a bunch of solutions, but there is no effective effect.
Before the Python script, add:
# -*- coding:utf-8 -*-
The print output is not garbled when the console output is not true. But at this point the output of Os.system () is normal,
If you use debugging to output the opposite result: the print output is normal, but the terminal output is garbled.
Workaround: Try not to use Chinese
All right, no eggs! Please advise any small partner who has a solution.
Automatically add text first notes
You need to install Vscode-fileheader at this time
Configuration is required after installation:
Files--Preferences--settings
Open Setting.json, search for Fileheader, and locate the following settings:
// By default, create file username "fileheader.Author": "mikey.zhaopeng", // By default, common template. Do not modify it!!!!! "fileheader.tpl": "/*\r\n * @Author: {author} \r\n * @Date: {createTime} \r\n * @Last Modified by: {lastModifiedBy} \r\n * @Last Modified time: {updateTime} \r\n */\r\n", // By default, update file username. "fileheader.LastModifiedBy": "mikey.zhaopeng",
Then make your changes:
// By default, create file username 此处更改为你的用户名 "fileheader.Author": "Yanta", // By default, common template. Do not modify it!!!!! "fileheader.tpl": "#!/usr/bin/env python \r\n# -*- coding:utf-8 -*- \r\n‘‘‘\r\n * @Author: {author} \r\n * @Date: {createTime} \r\n * @Last Modified by: {lastModifiedBy} \r\n * @Last Modified time: {updateTime} \r\n * @Desc: \r\n‘‘‘\r\n", // By default, update file username. 此处更改为你的用户名 "fileheader.LastModifiedBy": "Yanta", "workbench.iconTheme": "vscode-icons"
You will need to restart Vscode after you have changed the above configuration, otherwise the changes will not be applied.
After restarting the new file, press the shortcut key: Ctrl+alt+i, will automatically fill in the beginning of the script comment content.
Insufficient
File-header currently unable to automatically add the comment section, and can not like Vim automatically recognize the script type, and then automatically insert the corresponding text first note.
Annotations can only be treated equally for all script files.
File icon
Add the file icon plugin, in fact, just to look good.
Direct search: Vscode-icons installation.
Vscode-python Advanced Configuration