X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fgrep.vim;h=333a9d7214553fb08eddadc4d179876ec88ccc41;hb=9cbfa59ca421fac5422cbf0c2c52f48f8f2adb4c;hp=140f8fcf89578b58521fc83a23bdbbee0b74059d;hpb=e21853080f5005ad6c6b548146d339abd197f28e;p=dotfiles.git diff --git a/vim/.vim/plugin/grep.vim b/vim/.vim/plugin/grep.vim index 140f8fc..333a9d7 100644 --- a/vim/.vim/plugin/grep.vim +++ b/vim/.vim/plugin/grep.vim @@ -1,10 +1,8 @@ -if exists("*Vim") | finish | endif +vim9script -function! s:Vim(pattern) +command! -nargs=* -complete=file Vim { set grepprg=grep\ -Rns\ --binary-files=without-match\ --exclude-dir=.git\ --exclude-dir=.tags\ $*\ /dev/null\ . - execute "silent grep \"" . a:pattern . "\"" + execute "silent grep \"" .. .. "\"" copen redraw! -endfunction - -command! -nargs=* -complete=file Vim call s:Vim() +}