DEV Community

Andrew
Andrew

Posted on

How to setup Cmder in VSCode in 2021

"terminal.integrated.profiles.windows": {
    "Cmder": {
      "path": "${env:windir}\\System32\\cmd.exe",
      "args": ["/k", "C:\\cmder\\vendor\\bin\\vscode_init.cmd"]
    }
  },
  "terminal.integrated.defaultProfile.windows": "Cmder",
Enter fullscreen mode Exit fullscreen mode

Step 1: Download Cmder
Step 2: Save Cmder to C:\ drive
Step 3: Open Settings.json in VSCode
Step 4: Create VSCode Integrated Terminal Settings

"terminal.integrated.profiles.windows": {
    "Cmder": {
      "path": "${env:windir}\\System32\\cmd.exe",
      "args": ["/k", "C:\\cmder\\vendor\\bin\\vscode_init.cmd"]
    }
  },
Enter fullscreen mode Exit fullscreen mode

This will initialize the default command prompt with the argument of vscode_init.cmd

OPTIONAL: Set Cmder as default integrated terminal

  "terminal.integrated.defaultProfile.windows": "Cmder",
Enter fullscreen mode Exit fullscreen mode

Common Use Case: Multiple Integrated Terminals

For using multiple integrated terminals Powershell, Git Bash, or the regular command prompt

"terminal.integrated.profiles.windows": {
    "PowerShell": { "source": "PowerShell", "icon": "terminal-powershell" },
    "CommandPrompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "icon": "terminal-cmd"
    },
    "GitBash": {
      "path": ["C:\\Program Files\\Git\\bin\\bash.exe"],
      "source": "Git Bash",
      "icon": "terminal-bash"
    },
    "Cmder": {
      "path": "${env:windir}\\System32\\cmd.exe",
      "args": ["/k", "C:\\cmder\\vendor\\bin\\vscode_init.cmd"]
    }
  },
// Choose Default Terminal
// "terminal.integrated.defaultProfile.windows": "Cmder"
// "terminal.integrated.defaultProfile.windows": "GitBash"
// "terminal.integrated.defaultProfile.windows": "CommandPrompt"
// "terminal.integrated.defaultProfile.windows": "PowerShell",
Enter fullscreen mode Exit fullscreen mode

// End

To Learn More:

Top comments (4)

Collapse
 
abdielsudiro profile image
Inline Assembly

Thanks, this work for me too. Since I use Cmder from Laragon, I edit the path as follow:

"terminal.integrated.profiles.windows": {
"Cmder": {
"path": "${env:windir}\\System32\\cmd.exe",
"args": ["/k", "C:\\laragon\\bin\\cmder\\vendor\\bin\\vscode_init.cmd"]
}
},
"terminal.integrated.defaultProfile.windows": "Cmder",

Collapse
 
soozoodimp profile image
SooZoodimp

Thanks for the code ...
although this "args" didn't work for me (maybe I have older CMDER?). Couldn't see the path ... (even if this .bat file is there)

Instead ... this path - I had in (now deprecated) parameter "terminal.integrated.shellArgs.windows" - worked:

"args": ["/k", "C:\cmder_mini\vendor\init.bat"]

Collapse
 
mi1an profile image
mi1an • Edited

Thanks.. Works fine.. 😍

Collapse
 
petsto profile image
Petar Stoyanov

Magic. Thank you fine sir!