From 3fb4d22be7a5eb7b60720c2756fc0da664372e5c Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Sun, 4 Sep 2022 20:52:27 -0400 Subject: [PATCH] change fzf grep shorcut --- .vimrc.bundles | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.vimrc.bundles b/.vimrc.bundles index a3464df..3502f4c 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -204,17 +204,14 @@ endif noremap f :Files - - command! -bang -nargs=* Rrg - \ call fzf#vim#grep( - \ 'grep -R --line-number --exclude-dir=".git;.svn" --color=always -- '.shellescape(), 1, - \ fzf#vim#with_preview(), 0) " check if ripgrep is installed - if executable('rg') - noremap rg :Rg - else - noremap rg :Rrg + if ! executable('rg') + command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'grep -R --line-number --exclude-dir=".git;.svn" --color=always -- '.shellescape(), 1, + \ fzf#vim#with_preview(), 0) endif + noremap r :Rg " } " neoclide/coc.nvim {