On Thu, 22 Jun 2006, Ajay Gupta wrote:

(Re-sending because it didnt appear the first time)

Hello all.

I have included the following function in my .vimrc:

function! CScope_Refresh()
             set nocsverb
             cs kill 0
              " Following find searches for .c and .h files
             !find $PWD -name \*.[ch] > files && cscope -b -i files
              " This one searches for cpp files as well.
              " !find $PWD| grep [\\.p][chp]$ > files && cscope -b -i files
             cs add .
             set csverb
endfunction

The problem is that when I execute this function (thru some shortcut
key), after 'find' the shell waits for me to press 'Enter' to
continue. I just want to return to vim to where I was (Lets assume
that the command always succeeds).

Is there anything I can do to effect this?

Append "silent" in front of ! as in

  silent !find $PWD -name \*.[ch] > files && cscope -b -i files

See

  :help :silent

HTH.
--
Gerald

Reply via email to