X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fgrep.vim;h=e0878e7e2186e0fad352054a25b88cb79244b270;hb=HEAD;hp=f7a5f126d6e75f8eeadd34aabe30a9f2040af1ce;hpb=cd92e3fbc02d558ac881167af0ae474b91804d96;p=dotfiles.git diff --git a/vim/.vim/plugin/grep.vim b/vim/.vim/plugin/grep.vim index f7a5f12..333a9d7 100644 --- a/vim/.vim/plugin/grep.vim +++ b/vim/.vim/plugin/grep.vim @@ -1,11 +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! - let g:pylint_disable=1 -endfunction - -command! -nargs=* -complete=file Vim call s:Vim() +}