From 0ee63dd1f5d80be3296f14070211f4ade96d0e36 Mon Sep 17 00:00:00 2001 From: Nadav Spiegelman Date: Sun, 27 Aug 2023 21:10:46 -0400 Subject: [PATCH] Apply g:taskwiki_suppress_mappings to mapping Up until now, g:taskwiki_suppress_mappings could be used to supress the leader keys, but it did nothing to the mapping (task_info_or_vimwiki_follow_link()) --- ftplugin/vimwiki/taskwiki.vim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ftplugin/vimwiki/taskwiki.vim b/ftplugin/vimwiki/taskwiki.vim index d3af01cbc..d4cd3b6b6 100644 --- a/ftplugin/vimwiki/taskwiki.vim +++ b/ftplugin/vimwiki/taskwiki.vim @@ -96,16 +96,16 @@ execute "command! -buffer -range TaskWikiChooseTag :," . g " Meta commands execute "command! -buffer TaskWikiInspect :" . g:taskwiki_py . "Meta().inspect_viewport()" -" Disable as VimwikiFollowLink -if !hasmapto('VimwikiFollowLink') - nmap NoVimwikiFollowLink VimwikiFollowLink -endif +if !exists('g:taskwiki_suppress_mappings') + " Disable as VimwikiFollowLink + if !hasmapto('VimwikiFollowLink') + nmap NoVimwikiFollowLink VimwikiFollowLink + endif -execute "nnoremap :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()" + execute "nnoremap :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()" -" Leader-related mappings. Mostly t + -if !exists('g:taskwiki_suppress_mappings') - if exists('g:taskwiki_maplocalleader') + " Leader-related mappings. Mostly t + + if exists('g:taskwiki_maplocalleader') let maplocalleader = g:taskwiki_maplocalleader else if exists('g:mapleader')