From 113ccbaf512aa08f2c46b69c466bc3305b6d126b Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Mon, 18 Apr 2022 20:13:00 +0800 Subject: Map :grep only when there is no other mapping (vim) --- .vim/after/plugin/grep.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 g :grep! =expand('') -nnoremap fr :grep! + +if maparg('fr', 'n') == '' + nnoremap fr :grep! +endif -- cgit v1.2.3