if exists("*Vmg") | finish | endif function! s:Vmg(pattern) silent execute 'Ggrep "' . a:pattern . '"' copen redraw! endfunction command! -nargs=* -complete=file Vmg call s:Vmg()