From b1df5f1226676ae52380a214e0b13af1250951cd Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 6 May 2018 19:11:34 -0400 Subject: [PATCH] Allow mapping overrides Not bothering with the read only buffer maps for now but it would certainly make sense to. References https://github.com/tpope/vim-fugitive/issues/761 --- plugin/fugitive.vim | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 550c374..5949f0a 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -108,6 +108,31 @@ function! s:recall() abort return rev endfunction +function! s:map(mode, lhs, rhs, ...) abort + let flags = (a:0 ? a:1 : '') . (a:rhs =~# '^' ? '' : '