aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-18 20:13:00 +0800
committerGuangxiong Lin <[email protected]>2022-04-18 20:13:00 +0800
commit113ccbaf512aa08f2c46b69c466bc3305b6d126b (patch)
tree028ac7e65ab546781890b919f1ced73f2fa9ac97
parentf4b191ddafcf00d0d124a1e8ab4350d1ee2b3291 (diff)
downloaddotfiles-113ccbaf512aa08f2c46b69c466bc3305b6d126b.tar.gz
dotfiles-113ccbaf512aa08f2c46b69c466bc3305b6d126b.tar.bz2
dotfiles-113ccbaf512aa08f2c46b69c466bc3305b6d126b.zip
Map :grep only when there is no other mapping (vim)
-rw-r--r--.vim/after/plugin/grep.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/.vim/after/plugin/grep.vim b/.vim/after/plugin/grep.vim
index 3d80ebb..6210a31 100644
--- a/.vim/after/plugin/grep.vim
+++ b/.vim/after/plugin/grep.vim
@@ -4,4 +4,7 @@ if executable('rg')
endif
nnoremap <leader><leader>g :grep! <c-r>=expand('<cword>')<cr><cr>
-nnoremap <leader>fr :grep!<space>
+
+if maparg('<leader>fr', 'n') == ''
+ nnoremap <leader>fr :grep!<space>
+endif