X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fgrep.vim;h=333a9d7214553fb08eddadc4d179876ec88ccc41;hb=9cbfa59ca421fac5422cbf0c2c52f48f8f2adb4c;hp=7154d2d44cbf8f0cdc45d602563fa440c3ca18e4;hpb=47f7d2b5f4a10a65950b0e3d5b07694bb2ce5dfa;p=dotfiles.git diff --git a/vim/.vim/plugin/grep.vim b/vim/.vim/plugin/grep.vim index 7154d2d..333a9d7 100644 --- a/vim/.vim/plugin/grep.vim +++ b/vim/.vim/plugin/grep.vim @@ -1,10 +1,8 @@ -function! s:Vim(pattern) - let ignorecase_bak=&ignorecase - set noignorecase - execute "vimgrep /" . a:pattern . "/ **/*" - copen - let &ignorecase=ignorecase_bak - let g:pylint_disable=1 -endfunction +vim9script -command! -nargs=* -complete=file Vim call s:Vim() +command! -nargs=* -complete=file Vim { + set grepprg=grep\ -Rns\ --binary-files=without-match\ --exclude-dir=.git\ --exclude-dir=.tags\ $*\ /dev/null\ . + execute "silent grep \"" .. .. "\"" + copen + redraw! +}