VSCode + Cmder integration - strange issue

徘徊边缘 提交于 2019-12-10 14:35:13

问题


could you tell me why while I integrate the vscode and cmder, like that:

"terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.shellArgs.windows": ["/k", "%CMDER_ROOT%\\vendor\\init.bat"]

and use mini_cmder version, everything is working fine. But if I do it the same with full version of cmder, the "Open in terminal" option from contextual menu doesen't work. Anybody know how to resolve that?

Best Regards,

crova


回答1:


Yes, to use the Cmder shell in VS Code, you need to create a vscode.bat file in your cmder path with the following contents:

@echo off
SET CurrentWorkingDirectory=%CD%
SET CMDER_ROOT=C:\cmder (your path to cmder)
CALL "%CMDER_ROOT%\vendor\init.bat"
CD /D %CurrentWorkingDirectory%

then in your VS Code user settings, add the following to your settings.json file:

"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/K", "C:\\cmder\\vscode.bat"]


来源:https://stackoverflow.com/questions/47267852/vscode-cmder-integration-strange-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!