On Friday, May 11, 2012 2:02:24 AM UTC-5, zhang listar wrote:
> Hi, all.
> I am using gnu global with gvim on windows 7.
> It woks fine and but a small problem bothes me.
> 
> I write the following code in vimrc:
> 
> au BufWritePost *.[ch],*.cpp call UpdateGtags(expand('<afile>'))
> function! UpdateGtags(f)
>      let dir = fnamemodify(a:f, ':p:h')
>      exe 'silent !cd ' . dir . ' && global -u &> /dev/null &'
> endfunction
> 
> But when I try to save content to gvim, a black window of cmd blinks,
> and disappears.
> I know it's vim calls it.
> 
> I want to let the cmd window run in the background. How can I do it?
> 

You can use !start /min or !start /b to run an asynchronous task minimized or 
with no window, respectively. If you do this, you may want to call back into 
Vim with the client-server function to let Vim know you're done. See:

http://vim.wikia.com/wiki/Execute_external_programs_asynchronously_under_Windows

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to