Skip to content

Commit

Permalink
Apply g:taskwiki_suppress_mappings to <cr> mapping
Browse files Browse the repository at this point in the history
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())
  • Loading branch information
nadavspi authored and tbabej committed Feb 29, 2024
1 parent 7a74ad8 commit 0ee63dd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ftplugin/vimwiki/taskwiki.vim
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ execute "command! -buffer -range TaskWikiChooseTag :<line1>,<line2>" . g
" Meta commands
execute "command! -buffer TaskWikiInspect :" . g:taskwiki_py . "Meta().inspect_viewport()"

" Disable <CR> as VimwikiFollowLink
if !hasmapto('<Plug>VimwikiFollowLink')
nmap <Plug>NoVimwikiFollowLink <Plug>VimwikiFollowLink
endif
if !exists('g:taskwiki_suppress_mappings')
" Disable <CR> as VimwikiFollowLink
if !hasmapto('<Plug>VimwikiFollowLink')
nmap <Plug>NoVimwikiFollowLink <Plug>VimwikiFollowLink
endif

execute "nnoremap <silent><buffer> <CR> :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()<CR>"
execute "nnoremap <silent><buffer> <CR> :" . g:taskwiki_py . "Mappings.task_info_or_vimwiki_follow_link()<CR>"

" Leader-related mappings. Mostly <Leader>t + <first letter of the action>
if !exists('g:taskwiki_suppress_mappings')
if exists('g:taskwiki_maplocalleader')
" Leader-related mappings. Mostly <Leader>t + <first letter of the action>
if exists('g:taskwiki_maplocalleader')
let maplocalleader = g:taskwiki_maplocalleader
else
if exists('g:mapleader')
Expand Down

0 comments on commit 0ee63dd

Please sign in to comment.