diff options
author | Teddy Wing | 2020-03-21 20:17:22 +0100 |
---|---|---|
committer | Teddy Wing | 2020-03-21 20:17:22 +0100 |
commit | c7ac0e17fe4acb714b135f9b4ffac24351b3de56 (patch) | |
tree | 54ee35c5bddb5ba37b047e4ed424251d7c6da37c | |
parent | 374682458aeecb6b02cd88a612201feca8a0be12 (diff) | |
download | vim-twodo-c7ac0e17fe4acb714b135f9b4ffac24351b3de56.tar.bz2 |
Add conditions for `[u` `]u` default omaps
I put these in the normal mode conditions for ease of testing and
implementation. Now check the mappings properly.
-rw-r--r-- | ftplugin/todo.vim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index 22880ac..e7664d8 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -52,12 +52,18 @@ if !hasmapto('<Plug>TwodoDescalate') || !maparg('<leader>-', 'n') nmap <silent> <buffer> <leader>- <Plug>TwodoDescalate endif -if !hasmapto('<Plug>TwodoNextIncomplete') && !maparg(']u', 'n') +if !hasmapto('<Plug>TwodoNextIncomplete', 'n') && !maparg(']u', 'n') nmap <buffer> ]u <Plug>TwodoNextIncomplete +endif + +if !hasmapto('<Plug>TwodoNextIncomplete', 'o') && !maparg(']u', 'o') omap <buffer> ]u <Plug>TwodoNextIncomplete endif -if !hasmapto('<Plug>TwodoPreviousIncomplete') && !maparg('[u', 'n') +if !hasmapto('<Plug>TwodoPreviousIncomplete', 'n') && !maparg('[u', 'n') nmap <buffer> [u <Plug>TwodoPreviousIncomplete +endif + +if !hasmapto('<Plug>TwodoPreviousIncomplete', 'o') && !maparg('[u', 'o') omap <buffer> [u <Plug>TwodoPreviousIncomplete endif |