From b6405d890822ebbdb5e34254b6502ab0168800b6 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 25 Mar 2022 17:50:32 -0400 Subject: [PATCH] Provide literally named maps For every map X, also provide a map fugitive:X. References: https://github.com/tpope/vim-fugitive/issues/1425 --- autoload/fugitive.vim | 10 +++++++--- plugin/fugitive.vim | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 60d4327..d420ed3 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -208,9 +208,13 @@ let s:nowait = v:version >= 704 ? '' : '' function! s:Map(mode, lhs, rhs, ...) abort let maps = [] + let unique = a:0 && a:1 =~# '' + let flags = substitute(a:0 ? a:1 : '', '', '', '') . (a:rhs =~# '' ? '' : '