Update vim prefs

This commit is contained in:
Christian Nieves
2022-06-03 17:52:18 +00:00
parent 0101a69b56
commit 89aff8fc53
11 changed files with 127 additions and 78 deletions

View File

@ -0,0 +1,13 @@
Plug 'kyoh86/vim-ripgrep'
" command! -nargs=+ -complete=file Rg :call ripgrep#search(<q-args>)
command! -nargs=+ -complete=file Rg :call s:ripgrep(<q-args>)
function s:ripgrep(searchterm)
let l:dir = fnameescape(expand("%:p:h")."/")
let l:rel = ripgrep#path#rel(l:dir)
" echomsg 'DIR: ' . l:dir . '\tREL: ' . l:rel
call ripgrep#call('rg --smart-case --json ' . a:searchterm, l:dir, l:rel)
endfunction
nnoremap <leader>rg :Rg<Space>
let g:rg_root_marks = ['BUILD', 'METADATA', '.git']