Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode + Cmder integration - strange issue

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

like image 212
Crova Avatar asked Nov 13 '17 15:11

Crova


1 Answers

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"]
like image 92
Adson Cicilioti Avatar answered Nov 01 '22 04:11

Adson Cicilioti