aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/todo
diff options
context:
space:
mode:
authorTeddy Wing2020-03-15 16:08:59 +0100
committerTeddy Wing2020-03-15 16:11:16 +0100
commit6a9876afd797eb306f63cda250bc2815d3f3ceef (patch)
tree32a5ea544eff632af1ba3b7d1228fff10bf58ec5 /autoload/todo
parent99fe2c62624f279dc2250872da003bc43cee386b (diff)
downloadvim-twodo-6a9876afd797eb306f63cda250bc2815d3f3ceef.tar.bz2
Add mappings to move to the next and previous to-do
`[u` and `]u` for "unfinished".
Diffstat (limited to 'autoload/todo')
-rw-r--r--autoload/todo/motion.vim13
1 files changed, 13 insertions, 0 deletions
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