VSCode + Cmder integration - strange issue
Asked Answered
R

1

6

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

Renown answered 13/11, 2017 at 15:28 Comment(1)
Just a heads up, since Cmder v1.3.6, this just works fine in VS Code.Adrenocorticotropic
T
8

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"]
Teen answered 4/1, 2018 at 23:7 Comment(2)
Thanks so much, I was scouring the internet over and over again trying to get this set up. Helped me a lot.Electromagnet
Ok. Nice for help!Teen

© 2022 - 2024 — McMap. All rights reserved.