Skip to content

Commit 0ee63dd

Browse files
nadavspitbabej
authored andcommitted
Apply g:taskwiki_suppress_mappings to <cr> mapping
Up until now, g:taskwiki_suppress_mappings could be used to supress the leader keys, but it did nothing to the <cr> mapping (task_info_or_vimwiki_follow_link())
1 parent 7a74ad8 commit 0ee63dd

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

ftplugin/vimwiki/taskwiki.vim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ execute "command! -buffer -range TaskWikiChooseTag :<line1>,<line2>" . g
9696
" Meta commands
9797
execute "command! -buffer TaskWikiInspect :" . g:taskwiki_py . "Meta().inspect_viewport()"
9898

99-
" Disable <CR> as VimwikiFollowLink
100-
if !hasmapto('<Plug>VimwikiFollowLink')
101-
nmap <Plug>NoVimwikiFollowLink <Plug>VimwikiFollowLink
102-
endif
99+
if !exists('g:taskwiki_suppress_mappings')
100+
" Disable <CR> as VimwikiFollowLink
101+
if !hasmapto('<Plug>VimwikiFollowLink')
102+
nmap <Plug>NoVimwikiFollowLink <Plug>VimwikiFollowLink
103+
endif
103104

104-
execute "nnoremap <silent><buffer> <CR> :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()<CR>"
105+
execute "nnoremap <silent><buffer> <CR> :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()<CR>"
105106

106-
" Leader-related mappings. Mostly <Leader>t + <first letter of the action>
107-
if !exists('g:taskwiki_suppress_mappings')
108-
if exists('g:taskwiki_maplocalleader')
107+
" Leader-related mappings. Mostly <Leader>t + <first letter of the action>
108+
if exists('g:taskwiki_maplocalleader')
109109
let maplocalleader = g:taskwiki_maplocalleader
110110
else
111111
if exists('g:mapleader')

0 commit comments

Comments
 (0)