Vscode设置默认终端为Cmder
1. 打开cmder进入设置
2. 定位到下图,注意划红线的部分,后续会用到,然后点击保存设置。
3. 打开vscode,点击打开终端
4. 点击选中默认配置文件,选择打开setting.json
5. 在setting.json中粘贴如下代码片段
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"Windows PowerShell": {
"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
},
"Cmder": {
"overrideName": true,
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [
"/k",
"D:\\Cmder\\vendor\\init.bat" #这里要改成你的cmder安装的根路径\\vendor\init.bat
],
"icon": "terminal-cmd"
}
},
"terminal.integrated.defaultProfile.windows": "Cmder",
注意粘贴位置
Ctrl+s保存设置后即可看到cmder被添加进可选终端