Sublime Forum

Terminal Plugin

#10

I’ve changed my terminal to:

"terminal": "C:\\Windows\\system32\\cmd.exe",

The terminal window loads, however it takes nearly a minute for a prompt to appear.

0 Likes

#11

[quote=“atomi”]I’ve changed my terminal to:

"terminal": "C:\\Windows\\system32\\cmd.exe",

The terminal window loads, however it takes nearly a minute for a prompt to appear.[/quote]

This bug has been fixed in version 1.1.1.

0 Likes

#12

Weird, that definitely didn’t work for me. I upgraded to 1.1.1 and have it working now, though. If anyone else is using Console2 on Windows, here’s the incantation I used in my Terminal users settings:

{ // The command to execute for the terminal, leave blank for the OS default "terminal": "C:\\Dropbox\\Software\\Console2\\Console.exe", "parameters": "-d", "."] }

Works a treat now! Thanks Will. :smile:

0 Likes

#13

I can’t get custom parameters to work on windows :stuck_out_tongue:

This open default CMD terminal in the right place but doesn’t pass the parameters.

"keys": "ctrl+alt+shift+m"],
	"command": "open_terminal_project_folder",
	"args": {
		"parameters": "middleman server --livereload"]
	}
0 Likes

#14

[quote=“firefusion”]I can’t get custom parameters to work on windows :stuck_out_tongue:

This open default CMD terminal in the right place but doesn’t pass the parameters.

"keys": "ctrl+alt+shift+m"], "command": "open_terminal_project_folder", "args": { "parameters": "middleman server --livereload"] } [/quote]

There should be one parameter per string in the parameters list:

"keys": "ctrl+alt+shift+m"],
	"command": "open_terminal_project_folder",
	"args": {
		"parameters": "middleman", "server", "--livereload"]
	}
0 Likes

#15

Still no joy. It doesn’t even pass one parameter if it reduce it to that.

I’ve tried it with cmd, powershell and running sublime in admin mode.

Windows 64bit.

0 Likes

#16

[quote=“firefusion”]Still no joy. It doesn’t even pass one parameter if it reduce it to that.

I’ve tried it with cmd, powershell and running sublime in admin mode.

Windows 64bit.[/quote]

I just took a step back and I don’t think powershell or cmd understand the arguments middleman, server or --livereload. Are you trying to run a program in powershell called middleman? Sublime Terminal doesn’t currently do that, it simply opens a terminal for you to interact with.

0 Likes

#17

Hmm. I think I see. But if I type “middleman server --livereload” into the terminal window opened from the keyboard command middleman runs fine. So I thought this was a way of passing its first command.

Btw for anyone who wants to know Middleman is a great ruby gem for webdevelopment middlemanapp.com/

0 Likes

#18

This is a nice plugin, and one I had wanted to implement for a while. We would like it if you could fork your plugin over to the SublimeText org on GitHub. Follow the link to get instructions for requesting membership to the org:
github.com/SublimeText

0 Likes

#19

[quote=“willi297”]This is a nice plugin, and one I had wanted to implement for a while. We would like it if you could fork your plugin over to the SublimeText org on GitHub. Follow the link to get instructions for requesting membership to the org:
github.com/SublimeText[/quote]

You can fork it from github.com/wbond/sublime_terminal.

0 Likes

#20

Another great plugin - good stuff! However, I’m seeing some interesting behavior… I’m not sure if I’ve got something conflicting or not. I setup my user settings for Terminal to work with sh.exe (Git Bash on Win7) as follows:

{ "terminal": "C:/Program Files (x86)/Git/bin/sh.exe", "parameters": "--login", "-i"] }
Nothing special there, just the path to sh.exe and the params needed. Now this works just fine if I hit Ctrl-Shift-T. However, if I hit the keybind while editing a PHP or HTML file, it doesn’t do anything (and nothing appears in the console). All other file types appear to be working fine.

If I take a copy of the default keybinds and add them to my user keybinds, then everything works fine. Weird! :smile:

Let me know if there’s something I can do to help you debug this on my end. In the meantime I’ll just keep a copy of the keybinds in my user keybinds file.

Thanks!

0 Likes

#21

[quote=“SeanWcom”]Another great plugin - good stuff! However, I’m seeing some interesting behavior… I’m not sure if I’ve got something conflicting or not. I setup my user settings for Terminal to work with sh.exe (Git Bash on Win7) as follows:

{ "terminal": "C:/Program Files (x86)/Git/bin/sh.exe", "parameters": "--login", "-i"] }
Nothing special there, just the path to sh.exe and the params needed. Now this works just fine if I hit Ctrl-Shift-T. However, if I hit the keybind while editing a PHP or HTML file, it doesn’t do anything (and nothing appears in the console). All other file types appear to be working fine.

If I take a copy of the default keybinds and add them to my user keybinds, then everything works fine. Weird! :smile:

Let me know if there’s something I can do to help you debug this on my end. In the meantime I’ll just keep a copy of the keybinds in my user keybinds file.

Thanks![/quote]

My guess is another plugin bound itself to that keybinding after Sublime Terminal did. I believe the ZenCoding plugin also uses ctrl+shift+t. Your keybindings, however, override the defaults for all plugins.

0 Likes

#22

Yep - ZenCoding was the culprit. I removed it since I never use it… problem solved. :smile:

Thanks!

0 Likes

#23

Is it possible to send “selected text” to the terminal(bash or console) from the sublime editing window?

For example,
If I am writing the bash script on UNIX, it’s nice to send line(s) to the terminal window for debugging code.

Is there any way of tweak to get this done?

Thanks
C

0 Likes

#24

I just installed this plugin, and I was like “Hey, I’d love to bind a keyboard shortcut to this awesome feature, say [ctrl+shift+t] . Let’s see what it does, maybe I don’t want to overwrite it.” type “Oh. Okay”.

That’s why I love this editor and its plugins !

0 Likes

#25

I’m using OS X Lion & macports & bash.

When I use sublime_terminal, Terminal.app opens in default “profile” path & NOT current open file path.

PROBLEM: To use bash In Terminal.app I needed to set “Shell opens with:” to “/opt/local/bin/bash -l” link: http://trac.macports.org/wiki/howto/bash-completion

IF i set Terminal.app “Shell opens with:” to “default login shell” -> sublime_terminal opens Terminal.app in current opened file location as it should.

Hot to fix it?

0 Likes

#26

for osx 10.11.4

{
	// 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": "/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal",

	// 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", "%CWD%"]
}
0 Likes

#27

i’m using this for gulpjs.but key ctrl + shift + t used for file recently closed.
i try chance this in sublime keymap
Preferences - > Package setting - > terminal - > Key Binding - User
[ { "keys": ["ctrl+shift+e"], "command": "open_terminal" }, { "keys": ["ctrl+shift+alt+e"], "command": "open_terminal_project_folder" } ]

but I still can not use file recently closed.

0 Likes

#28

You’ll need to place those settings in a file named Packages/Terminal/Default (Linux).sublime-keymap and restart Sublime Text. This will override the default key binding file that comes with Terminal, allowing reopen to function.

Alternatively you can add your own key binding for { "keys": ["ctrl+shift+t"], "command": "reopen_last_file" }, to your Preferences > Key Bindings – User.

0 Likes

#29

Hey @wbond , I set up my terminal settings-user to path of Console.exe but when I press the hotkeys to open the terminal in sublime text, powershell fires up, I changed the path to cmd.exe but still powershell fires up, I removed the entire “terminal” settings and still powershell only fires up. Do you have any idea what is happening?

0 Likes