aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2020-12-31 09:24:03 -0700
committerCody Hiar <cody@hiar.ca>2020-12-31 09:24:03 -0700
commiteca24f8830d945359858437998690de12b9e8290 (patch)
tree8547ae5d872f16d0548944b831fa6adf67392cfc /plugin
parent4b8a03c9c19c06a5e6d000bf552ddbaf2c0e14b5 (diff)
add ripgrep inplace of ack
Diffstat (limited to 'plugin')
-rw-r--r--plugin/vim-options.vim18
1 files changed, 18 insertions, 0 deletions
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 <leader>/ :call RgSearch()<CR><c-w><c-p>
+ noremap <leader>ea :Rg <cword><CR><c-w><c-p>
+ function! RgSearch()
+ call inputsave()
+ let term = input('Search: ')
+ call inputrestore()
+ if !empty(term)
+ execute "Rg! " . term
+ endif
+ endfunction
+endif