From eca24f8830d945359858437998690de12b9e8290 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 31 Dec 2020 09:24:03 -0700 Subject: add ripgrep inplace of ack --- plugin/vim-options.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index f24d7d8..45106b9 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -417,3 +417,21 @@ if !empty(glob($EditorDir.'plugged/bullets.vim/plugin/bullets.vim')) \] endif "----------------------------------------------------------------------------------------------------------------------- + + + +"----------------------------------------------------------------------------------------------------------------------- +" RG Searching +"----------------------------------------------------------------------------------------------------------------------- +if !empty(glob($EditorDir.'plugged/vim-ripgrep/plugin/vim-ripgrep.vim')) + nnoremap / :call RgSearch() + noremap ea :Rg + function! RgSearch() + call inputsave() + let term = input('Search: ') + call inputrestore() + if !empty(term) + execute "Rg! " . term + endif + endfunction +endif -- cgit v1.2.3