cmder icon indicating copy to clipboard operation
cmder copied to clipboard

how to open specail directory? in sublime Terminal plugin?

Open atian25 opened this issue 12 years ago • 8 comments

I'm using sublime text 3 with Terminal,

{
    // The command to execute for the terminal, leave blank for the OS default
    // On OS X the terminal can be set to iTerm.sh to execute iTerm
    //"terminal": "",
    "terminal": "D:\\Tool\\cmder\\Cmder.exe",

    // A list of default parameters to pass to the terminal, this can be
    // overridden by passing the "parameters" key with a list value to the args
    // dict when calling the "open_terminal" or "open_terminal_project_folder"
    // commands
    "parameters": []
}

but, it always open c:\Users\TZ

atian25 avatar Jan 26 '14 03:01 atian25

Hi @atian25,

By default cmder opens in a user's profile. You can either change this setting system wide (I have never tried this so I can't provide instructions) or you can use the /START parameter when launching cmder.

It looks like you can configure the Terminal plugin to pass the /START parameter using the parameters array. For example, if you would like cmder to open in your c:\ directory Terminal's configuration would look something like:

{
    // The command to execute for the terminal, leave blank for the OS default
    // On OS X the terminal can be set to iTerm.sh to execute iTerm
    //"terminal": "",
    "terminal": "D:\\Tool\\cmder\\Cmder.exe",

    // A list of default parameters to pass to the terminal, this can be
    // overridden by passing the "parameters" key with a list value to the args
    // dict when calling the "open_terminal" or "open_terminal_project_folder"
    // commands
    "parameters": ["/START", "c:/"]
}

pwiesner avatar Jan 28 '14 04:01 pwiesner

I means how to open the special project directory from sublime. when using sublime plugin Terminal with cmd:

  1. open a file such as 'd:\my-project\src\main.js'
  2. press Terminal key ctrl+shift+t
  3. it will open cmd and auto jump to the folder d:\my-project\src
  4. so I expect cmder can do the same thing

atian25 avatar Feb 07 '14 03:02 atian25

Replace "c:/" with "%CWD%". If that does not work, I would try asking your question in the Terminal plugin's forum.

pwiesner avatar Feb 07 '14 03:02 pwiesner

yes, it works! thanks.

atian25 avatar Feb 07 '14 03:02 atian25

Thanks for this! I've been searching for that info for hours! Where can we find some documentation about that START parameter or other parameters available to Cmdr? Didn't find "official" or "complete" or even "quite complete" Cmdr documentation out there.

fversepuy avatar Aug 07 '14 19:08 fversepuy

Thanks @pwiesner , It worked for me. The best part is that we can also use Ctrl+Shift+t also :)

vishnuaniyan avatar Mar 07 '15 17:03 vishnuaniyan

Thank you so much. I was nearing my wit's end. For reference, this behavior of Terminal is documented here.

babhishek21 avatar Oct 15 '15 03:10 babhishek21

@pwiesner how to set "parameters": ["/START","xxxxx"] in mac?

xnathanh avatar May 02 '16 23:05 xnathanh