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". --- autoload/todo/motion.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 autoload/todo/motion.vim (limited to 'autoload') diff --git a/autoload/todo/motion.vim b/autoload/todo/motion.vim new file mode 100644 index 0000000..3ebab2d --- /dev/null +++ b/autoload/todo/motion.vim @@ -0,0 +1,13 @@ +let s:INCOMPLETE_MATCHER = '^\s*[\-_!] ' + + +function! todo#motion#NextIncomplete() + normal! m' + call search(s:INCOMPLETE_MATCHER) +endfunction + + +function! todo#motion#PreviousIncomplete() + normal! m' + call search(s:INCOMPLETE_MATCHER, 'b') +endfunction -- cgit v1.2.3