vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit 527ca1b7a102b5b64d35ce86f2d6f7c6dbbbc017
parent ea4a5e3bb2dbbf5123b271e1dfff2a9ecd9220fb
Author: David Sierra DiazGranados <davidsierradz@gmail.com>
Date:   Mon, 19 Oct 2020 21:30:28 -0500

Allow overwriting insert mode maps (#1030)

According to `:h hasmapto()` if we don't pass the mode as an argument
then only normal, visual and operator-pending modes are checked.

Lets pass the mode explicitly to allow overwriting insert mode mappings.
Diffstat:
Mautoload/vimwiki/u.vim | 4++--
Mdoc/vimwiki.txt | 1+
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/autoload/vimwiki/u.vim b/autoload/vimwiki/u.vim @@ -212,7 +212,7 @@ endfunc function! vimwiki#u#map_key(mode, key, plug, ...) abort if a:0 && a:1 == 2 " global mappings - if !hasmapto(a:plug) && maparg(a:key, a:mode) ==# '' + if !hasmapto(a:plug, a:mode) && maparg(a:key, a:mode) ==# '' exe a:mode . 'map ' . a:key . ' ' . a:plug endif elseif a:0 && a:1 == 1 @@ -220,7 +220,7 @@ function! vimwiki#u#map_key(mode, key, plug, ...) abort exe a:mode . 'map <buffer> ' . a:key . ' ' . a:plug else " vimwiki buffer mappings - if !hasmapto(a:plug) + if !hasmapto(a:plug, a:mode) exe a:mode . 'map <buffer> ' . a:key . ' ' . a:plug endif endif diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt @@ -3900,6 +3900,7 @@ Fixed:~ * PR #919: Fix duplicate helptag * PR #959: Fix :VimwikiNextTask * PR #986: Fix typo in help file + * PR #1030: Allow overwriting insert mode mappings 2.5 (2020-05-26)~