Replace vscode terminal with cmder

If you’re using vscode on windows and use command line quite a lot you probably already like the convenient integrated terminal. If like me you happen to also use git command lines frequently you probably already use an alternative terminal such as Cmder.
image

One cool thing with vscode is that you can actually replace the default terminal that happens to be the well known cmd.exe whom has no git integration.
If you try to directly add the path to cmder in your user settings "terminal.integrated.shell.windows": "C:\\Program Files\\cmder_mini\\Cmder.exe" you will end with a behaviour where cmder opens in a new window.


To correctly use cmder with vscode first go to the folder where you’ve installer cmder (in my case it’s C:\Program Files\cmder_mini) and create a file named vscode.bat.
image

In this file paste the following code (replace the CMDER_ROOT path with your path to your cmder folder) :

@echo off
SET CMDER_ROOT=C:\Program Files\cmder_mini
"%CMDER_ROOT%\vendor\init.bat"

Now open vscode and hit F1 and type “user settings”.
image


Append the following to your JSON user settings (adjust path to the .bat file if needed):

"terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/K", "C:\\Program Files\\cmder_mini\\vscode.bat"],

image

Restart vscode, you should now have cmder embedded in vscode.
image

Comments