Hi Chirs:

vim itself can't do multitasking which would be required for this task.
However you two options:
Either use a scripting language which does (eg python) or run sh & or
such and feedback the result sending a message using gvim client server
stuff (requiring X AFAIK).

There are two scripts which try to solve this problem (I've asked the
same question some time ago)
The one is written by me (implementing different ways)
http://www.vim.org/scripts/script.php?script_id=1582

the other has been written by Luc Hermitte:
At the time of publishing the page he had comment which looked like
this:
quote : "<http://hermitte.free.fr/vim/ressources/lh-BTW.tar.gz>; (still in an 
alpha stage.)"
So you should check its current status.

If you want mine maybe you want to chekout the latest version:
git://mawercer.de/vl_repo. You're also encouraged to contact me (by
email or on irc (MarcWeber on freenode) so that I can help you set it
up. I guess the code should be cleaned up or be rewritten partially.
Anyway it does work on linux ..
I cannot check the python implementation because right now I don't have
a vim with python installed here. But the sh version does still work.
You have to remove the return 0 in s:ClientServer function to enable
those ways.
Then try something like
call vl#lib#quickfix#runtaskinbackground#RunInBGQF(['sh','-c','sleep 1; echo 
bar'], {'onFinish' : 'let g:example=1'} )
the last { } is optional. There are some other keys which you may want
to pass as well. Eg I've setup this to restart a web server or such.

HTH
Marc Weber

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

Reply via email to