VSCode终端配置
选择默认终端
按Ctrl+Shift+P
选择Terminal: Select Default Profile。
选择Command Prompt
配置自动候改编码为UTF-8
使用VSCode打开文件菜单项输入%appdata%\code\User\settings.json配置文件,并在其中添加如下配置:
{
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": ["/K", "chcp 65001>nul"],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
}
}
?
验证
按Ctrl+Shift+` 打开新终端,输入chcp命令,配置成功后输出如下:
?