]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/plugin/grep.vim
Move to vim9script
[dotfiles.git] / vim / .vim / plugin / grep.vim
index 140f8fcf89578b58521fc83a23bdbbee0b74059d..333a9d7214553fb08eddadc4d179876ec88ccc41 100644 (file)
@@ -1,10 +1,8 @@
-if exists("*<SID>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 \"" .. <q-args> .. "\""
     copen
     redraw!
-endfunction
-
-command! -nargs=* -complete=file Vim call s:Vim(<q-args>)
+}