This commit is contained in:
Bryan Ramos 2026-05-07 11:08:36 -04:00
parent 4722ec2da4
commit bdee5567a7

10
vimrc
View file

@ -164,10 +164,12 @@ function! FzfRg()
if executable('rg') && exists(':Rg') == 2
execute 'Rg ' . escape(l:query, '|')
else
let l:grepprg = &grepprg
set grepprg=grep\ -RIn
execute 'silent grep! ' . shellescape(l:query) . ' .'
let &grepprg = l:grepprg
let l:results = system('grep -RIn -e ' . shellescape(l:query) . ' . 2>/dev/null')
if empty(l:results)
echohl WarningMsg | echom 'No matches found' | echohl None
return
endif
cgetexpr split(l:results, "\n")
copen
endif
endfunction