VSCode + Cmder integration - strange issue

2019-06-26 05:30发布

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条回答
可以哭但决不认输i
2楼-- · 2019-06-26 06:00

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"]
查看更多
登录 后发表回答