chrissimpkins / glue

Glue is a plugin that joins your shell to Sublime Text in quasi-perfect harmony.
http://gluedocs.readthedocs.org/
MIT License
254 stars 10 forks source link

Ending a watch task #26

Open msguerra74 opened 9 years ago

msguerra74 commented 9 years ago

Is it possible to end or kill a running task, such as a "watch" task? Typically this is done with CTRL-C, but that doesn't seem to work. Thanks!

chrissimpkins commented 9 years ago

What platform are you on?

msguerra74 commented 9 years ago

When I was trying it, I was on my work computer which is a Mac. I also run a Windows computer at home, but haven't tried it there yet.

chrissimpkins commented 9 years ago

If understand correctly, you are referring to the CTRL-C Sublime Text keybinding that cancels a build task.

Glue does not intercept any key bindings that you have set in Sublime Text. You can use Glue to kill system processes on Unix/Linux systems by identifying the pid (e.g. ps aux | grep chrome) and then using a kill command. For more information about processes that Sublime Text spawns for build tasks, you would need to try the ST support forums. Unfortunately, I don't have the answer...

Hope this helps.

-c

msguerra74 commented 9 years ago

It's just the standard terminal/command line 'CTRL-C' that aborts a running task. This isn't actually a Sublime Text keybinding. If you've ever used Jekyll, Sass, or Grunt, they all have "watch" tasks that run continuously until you press "CTRL-C" to abort it. In any case, it sounds like this isn't an option here, but it would be super useful if it were. I think the REPL plugin for Sublime Text has a "kill" feature if you wan to check it out at: https://github.com/wuub/SublimeREPL

Thanks for your responses!

chrissimpkins commented 9 years ago

Ah I see. No you are correct that is not available. glue doesn't maintain a pipe to the running process and would not be able to kill a long running command. It fires a system command and returns with any standard output printed to the 'terminal' view. The process is on its own after that...

msguerra74 commented 9 years ago

Ok, well thanks anyway. The Atom editor has the "Terminal Status" plugin that's pretty nice, but its plugins are made differently. I'm not a programmer, so I have no idea. Thanks again!

chrissimpkins commented 9 years ago

Will check it out. Thanks for posting the info!

ArsalanDotMe commented 9 years ago

I would love to have this kill option too! I just used this plugin for the first time to start a local web-server using nodejs. Since the server has to run continuously, this plugin would always be showing status "Running command". No way to stop the server.

chrissimpkins commented 9 years ago

Thanks for the feedback!

nicosantangelo commented 9 years ago

Hi!

I don't know if it's useful (I didn't look at Glues code yet) but I wrote the Gulp package and I made a workaround just for this, if I understand correctly.

If you want, you can check the ProcessCache on the Gulp repo (or ask me if you need something).

Hope it helps!

chrissimpkins commented 9 years ago

Fantastic! I will check it out. This is a popular request

julian-weinert commented 8 years ago

:+1: