]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/plugin/grep.vim
Move to vim9script
[dotfiles.git] / vim / .vim / plugin / grep.vim
index 7154d2d44cbf8f0cdc45d602563fa440c3ca18e4..333a9d7214553fb08eddadc4d179876ec88ccc41 100644 (file)
@@ -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(<q-args>)
+command! -nargs=* -complete=file Vim {
+    set grepprg=grep\ -Rns\ --binary-files=without-match\ --exclude-dir=.git\ --exclude-dir=.tags\ $*\ /dev/null\ .
+    execute "silent grep \"" .. <q-args> .. "\""
+    copen
+    redraw!
+}