From e7f4335a777b47cf6896651187ce2b9a64b06825 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Sun, 21 May 2023 00:25:37 +0200 Subject: [PATCH] Add option to disable remapping --- doc/taskwiki.txt | 4 ++++ ftplugin/vimwiki/taskwiki.vim | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/taskwiki.txt b/doc/taskwiki.txt index 518b710..666fcee 100644 --- a/doc/taskwiki.txt +++ b/doc/taskwiki.txt @@ -764,6 +764,10 @@ constructs. *taskwiki_disable* Setting any non-empty value for this variable will disable taskwiki. +*taskwiki_disable_cr_mapping* + Setting any non-empty value for this variable will prevent taskwiki + from remapping . + *taskwiki_use_python2* Setting this variable to non-empty value (such as "yes") will force taskwiki to use python2. diff --git a/ftplugin/vimwiki/taskwiki.vim b/ftplugin/vimwiki/taskwiki.vim index 4bd67d8..10aa2e9 100644 --- a/ftplugin/vimwiki/taskwiki.vim +++ b/ftplugin/vimwiki/taskwiki.vim @@ -102,7 +102,9 @@ if !exists('g:taskwiki_suppress_mappings') nmap NoVimwikiFollowLink VimwikiFollowLink endif - execute "nnoremap :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()" + if !exists("g:taskwiki_disable_cr_mapping") + execute "nnoremap :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()" + endif " Leader-related mappings. Mostly t + if exists('g:taskwiki_maplocalleader')