if exists("*Vim") | finish | endif function! s:Vim(pattern) set grepprg=grep\ -Rns\ --binary-files=without-match\ --exclude-dir=.git\ --exclude-dir=.tags\ $*\ /dev/null\ . execute "silent grep \"" . a:pattern . "\"" copen redraw! endfunction command! -nargs=* -complete=file Vim call s:Vim()