randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.38k stars 84 forks source link

How to open terminus with Cmder ? #283

Open kcvinker opened 3 years ago

kcvinker commented 3 years ago

Hi, How to open terminus with Cmder ? I did this in settings file. But didn't worked. [ {"default_config": { "windows": "Cmder" } , "shell_configs" : [ { "name": "Cmder", "cmd": ["cmd.exe", "/k", "%CMDER_ROOT%\\vendor\\init.bat"], "env": {}, "enable": true, "platforms": ["windows"] }, { "name": "Command Prompt", "cmd": "cmd.exe", "env": {}, "enable": false, "platforms": ["windows"] }, ], }, ]

randy3k commented 3 years ago

Did you set the variable CMDER_ROOT in system settings?

kcvinker commented 3 years ago

Yes.

randy3k commented 3 years ago

That it should work. What error did you see?

Rourke101 commented 2 years ago

I don't think that's the way. What I did was this in the Settings file:

    {
    "shell_configs": [
    ...
        {
            "name": "Cmder",
            "cmd": ["cmd.exe", "/k", "C:\\Program Files\\cmder\\vendor\\init.bat"],
            "env": {},
            "enable": true,
            "default": true,
            "platforms": ["windows"]
        },
    ...
    ],    
    }
scillidan commented 1 year ago

It works on my PC, and my setting: shortcut key:

[
    { "keys": ["alt+1"], "command": "toggle_terminus_panel", "args": { "cmd": ["cmd.exe", "/k", "%CMDER_ROOT%\\vendor\\init.bat"], "cwd": "${file_path:${folder}}" } },
    { "keys": ["alt+2"], "command": "terminus_open", "args": { "cmd": ["cmd.exe", "/k", "%CMDER_ROOT%\\vendor\\init.bat"], "cwd": "${file_path:${folder}}", "title": "cmder" } },
    { "keys": ["alt+w"], "command": "terminus_close", "context": [{ "key": "terminus_view"}] },]

package settings > Terminus > command palette: refer to https://www.geeksforgeeks.org/how-to-use-terminal-in-sublime-text-editor/


[
   {
        "caption": "Terminal (panel)",
        "command": "terminus_open",
        "args"   : {
           "cmd": "Cmder.exe",
           "cwd": "${file_path:${folder}}",
           "title": "Command Prompt",
           "panel_name": "Terminus"
        }
   },
]