Add option to disable <CR> remapping

This commit is contained in:
Hektor Misplon 2023-05-21 00:25:37 +02:00 committed by Tomas Babej
parent ac9d69913d
commit e7f4335a77
2 changed files with 7 additions and 1 deletions

View file

@ -764,6 +764,10 @@ constructs.
*taskwiki_disable* *taskwiki_disable*
Setting any non-empty value for this variable will disable taskwiki. 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 <CR>.
*taskwiki_use_python2* *taskwiki_use_python2*
Setting this variable to non-empty value (such as "yes") will force Setting this variable to non-empty value (such as "yes") will force
taskwiki to use python2. taskwiki to use python2.

View file

@ -102,7 +102,9 @@ if !exists('g:taskwiki_suppress_mappings')
nmap <Plug>NoVimwikiFollowLink <Plug>VimwikiFollowLink nmap <Plug>NoVimwikiFollowLink <Plug>VimwikiFollowLink
endif endif
execute "nnoremap <silent><buffer> <CR> :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()<CR>" if !exists("g:taskwiki_disable_cr_mapping")
execute "nnoremap <silent><buffer> <CR> :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()<CR>"
endif
" Leader-related mappings. Mostly <Leader>t + <first letter of the action> " Leader-related mappings. Mostly <Leader>t + <first letter of the action>
if exists('g:taskwiki_maplocalleader') if exists('g:taskwiki_maplocalleader')