From c7ac0e17fe4acb714b135f9b4ffac24351b3de56 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 21 Mar 2020 20:17:22 +0100 Subject: 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. --- ftplugin/todo.vim | 10 ++++++++-- 1 file 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('TwodoDescalate') || !maparg('-', 'n') nmap - TwodoDescalate endif -if !hasmapto('TwodoNextIncomplete') && !maparg(']u', 'n') +if !hasmapto('TwodoNextIncomplete', 'n') && !maparg(']u', 'n') nmap ]u TwodoNextIncomplete +endif + +if !hasmapto('TwodoNextIncomplete', 'o') && !maparg(']u', 'o') omap ]u TwodoNextIncomplete endif -if !hasmapto('TwodoPreviousIncomplete') && !maparg('[u', 'n') +if !hasmapto('TwodoPreviousIncomplete', 'n') && !maparg('[u', 'n') nmap [u TwodoPreviousIncomplete +endif + +if !hasmapto('TwodoPreviousIncomplete', 'o') && !maparg('[u', 'o') omap [u TwodoPreviousIncomplete endif -- cgit v1.2.3