Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable <CR> remap #434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/taskwiki.txt
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,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 <CR>.

*taskwiki_use_python2*
Setting this variable to non-empty value (such as "yes") will force
taskwiki to use python2.
Expand Down
4 changes: 3 additions & 1 deletion ftplugin/vimwiki/taskwiki.vim
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ 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>"
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>
if !exists('g:taskwiki_suppress_mappings')
Expand Down