> !xdvi -hushstdout -s 5 -geometry 1024x900+416+0 -expert %<.dvi &
> 
> which works fine from vim, but not from gvim.

I think what is happening is that Vim is creating a pseudo-terminal, running 
the 
command, and then killing the pseudo terminal (and consequently all commands 
attached to it) as soon as control is returned (which is basically immediately 
due 
to your &). I come up with this solution:

:!nohup xclock & sleep 1

The 'nohup' disconnects xclock from its controlling terminal, so it doesn't die 
when the ptty is killed. And the sleep 1 gives nohup enough time to actually 
run 
so Vim doesn't kill it with the terminal before it has managed to disconnect 
itself!

A bit of a hack, but if you just have it mapped to a key via a mapping, I guess 
it 
doesn't make any difference!

Hope this helps!

Developers: Would it perhaps be better to allocate a pseudo-terminal when the 
GUI 
starts and reuse it throughout Vim's session, much as if Vim were started from 
a 
terminal rather than creating and killing pttys every time a shell or filter is 
called? Or is this just more trouble than it's worth?

Cheers,

Ben.



Send instant messages to your online friends http://au.messenger.yahoo.com 


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui