On 25/01/09 14:54, Wincent Colaiuta wrote: > I've set up a function that at its core does this: > > cexpr system("command that takes a long time to run") > > Until the long-running process returns I can't interact with Vim -- > which is fine and expected behaviour -- but I am wondering if there is > any way of displaying some kind of progress indication in the > meantime, even if it is just a static message like "Running foo..." > > The closest I have found so far is this page: > > http://vim.wikia.com/wiki/Background_grep_searches > > But that's a completely different approach: let the process run in the > background, continue to work with Vim, an then manually pull up the > results at some later time. > > Are there any plug-ins out there that handle long-running external > processes in an elegant way that somebody can recommend for me to look > at and see what they do? > > Cheers, > Wincent
What about if 1 " has arithmetic evaluation compiled-in function System(command, ...) redraw if a:0 == 0 echomsg a:command let rv = system(a:command) else echomsg a:command '<' a:1 let rv = system(a:command, a:1) endif echo a:command ': Done' return rv endfunction abbrev system( System( abbrev sys( system( endif (untested)? Best regards, Tony. -- You buttered your bread, now lie in it. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---