How to terminate a program in vim?

350 views
Skip to first unread message

Peng Yu

unread,
Nov 27, 2008, 8:47:08 PM11/27/08
to vim_use
Hi,

Suppose I run some program vim, if it takes very long time to finish,
I can not use control-C to close it.

:some_program.exe

I'm wondering if there is any short-cut to kill a program that is
running from vim.

Thanks,
Peng

Marc Weber

unread,
Nov 27, 2008, 9:01:18 PM11/27/08
to vim...@googlegroups.com
I don't know any.. However you could try making my run task in
background script run on windows as well. It uses python to start a
background proces..

http://www.vim.org/scripts/script.php?script_id=1582

Let me know or contact me if you want to try it and have any trouble.

Consider contributing back if you fix things.

Marc

Tony Mechelynck

unread,
Nov 28, 2008, 8:34:31 AM11/28/08
to vim...@googlegroups.com

You may or may not be able to kill it by means of Ctrl-Break (in the
subprocess's window if there is one). If that doesn't work, I don't
think you kill a subprocess by anything you do in Vim; but you can do it
from the Windows Task Manager (taskman.exe, which can be loaded from the
Ctrl-Alt-Del popup) or under Linux from the KDE System Guard or the
Gnome System Monitor.

In any of the above, select the Processes tab (not the Applications
tab), sort it by process name, find the process you want to halt, select
it, and kill it. Beware: Any unsaved data in that process will be lost
forever!


Best regards,
Tony.
--
[Sir Stafford Cripps] has all the virtues I dislike and none of the
vices I admire.
-- Winston Churchill

Peng Yu

unread,
Nov 28, 2008, 4:29:57 PM11/28/08
to vim_use


On Nov 28, 7:34 am, Tony Mechelynck <antoine.mechely...@gmail.com>
wrote:
> On 28/11/08 02:47, Peng Yu wrote:
>
> > Hi,
>
> > Suppose I run some program vim, if it takes very long time to finish,
> > I can not use control-C to close it.
>
> > :some_program.exe
>
> > I'm wondering if there is any short-cut to kill a program that is
> > running from vim.
>
> > Thanks,
> > Peng
>
> You may or may not be able to kill it by means of Ctrl-Break (in the
> subprocess's window if there is one). If that doesn't work, I don't
> think you kill a subprocess by anything you do in Vim; but you can do it
> from the Windows Task Manager (taskman.exe, which can be loaded from the
> Ctrl-Alt-Del popup) or under Linux from the KDE System Guard or the
> Gnome System Monitor.
>
> In any of the above, select the Processes tab (not the Applications
> tab), sort it by process name, find the process you want to halt, select
> it, and kill it. Beware: Any unsaved data in that process will be lost
> forever!

There is no way to kill it by Ctrl-Break in linux as well?

Thanks,
Peng

Marc Weber

unread,
Nov 28, 2008, 6:00:05 PM11/28/08
to vim...@googlegroups.com
> There is no way to kill it by Ctrl-Break in linux as well?
I don't konw one.
But on linux you can try to use your favourite scripting (or shell)
language to write a small wrapper which actualle kill the program when
you hit ctrl-c. (ctrl-c does even work for most programs)..

Marc Weber

Reply all
Reply to author
Forward
0 new messages