From 6a9876afd797eb306f63cda250bc2815d3f3ceef Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 15 Mar 2020 16:08:59 +0100 Subject: Add mappings to move to the next and previous to-do `[u` and `]u` for "unfinished". --- ftplugin/todo.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ftplugin') diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index f392c94..a223984 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -3,6 +3,8 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 +" TODO: Add no_plugin_mappings or whatever + nnoremap TwodoNewTodoBelow o- nnoremap TwodoNewTodoAbove O- @@ -13,6 +15,9 @@ nnoremap TwodoRemoveOldTodos :g/^\s*[vx] /d \| nohl nnoremap TwodoEscalate :call todo#Escalate() nnoremap TwodoDescalate :call todo#Descalate() +nnoremap TwodoNextIncomplete :call todo#motion#NextIncomplete() +nnoremap TwodoPreviousIncomplete :call todo#motion#PreviousIncomplete() + if !hasmapto('TwodoNewTodoBelow') || !maparg('n', 'n') nmap n TwodoNewTodoBelow endif @@ -44,3 +49,11 @@ endif if !hasmapto('TwodoDescalate') || !maparg('-', 'n') nmap - TwodoDescalate endif + +if !hasmapto('TwodoNextIncomplete') && !maparg(']u', 'n') + nmap ]u TwodoNextIncomplete +endif + +if !hasmapto('TwodoPreviousIncomplete') && !maparg('[u', 'n') + nmap [u TwodoPreviousIncomplete +endif -- cgit v1.2.3