diff options
author | Guangxiong Lin <[email protected]> | 2022-04-18 20:13:00 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-04-18 20:13:00 +0800 |
commit | 113ccbaf512aa08f2c46b69c466bc3305b6d126b (patch) | |
tree | 028ac7e65ab546781890b919f1ced73f2fa9ac97 | |
parent | f4b191ddafcf00d0d124a1e8ab4350d1ee2b3291 (diff) | |
download | dotfiles-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.vim | 5 |
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 |