aboutsummaryrefslogtreecommitdiffstats
path: root/autoload/todo
diff options
context:
space:
mode:
authorTeddy Wing2020-03-21 20:55:09 +0100
committerTeddy Wing2020-03-21 20:55:09 +0100
commitc08bded55f2709aa2b0bf9829c02e06684769801 (patch)
tree54ee35c5bddb5ba37b047e4ed424251d7c6da37c /autoload/todo
parent99fe2c62624f279dc2250872da003bc43cee386b (diff)
parentc7ac0e17fe4acb714b135f9b4ffac24351b3de56 (diff)
downloadvim-twodo-c08bded55f2709aa2b0bf9829c02e06684769801.tar.bz2
Merge branch 'next-previous-incomplete-mappings'
Diffstat (limited to 'autoload/todo')
-rw-r--r--autoload/todo/motion.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/autoload/todo/motion.vim b/autoload/todo/motion.vim
new file mode 100644
index 0000000..32a7c88
--- /dev/null
+++ b/autoload/todo/motion.vim
@@ -0,0 +1,24 @@
+let s:INCOMPLETE_MATCHER = '^\s*[\-_!] '
+
+
+function! s:Incomplete(extra_search_flags)
+ let cnt = v:count1
+
+ let search_flags = 's' . a:extra_search_flags
+
+ let i = 0
+ while i < cnt
+ call search(s:INCOMPLETE_MATCHER, search_flags)
+ let i += 1
+ endwhile
+endfunction
+
+
+function! todo#motion#NextIncomplete()
+ call s:Incomplete('')
+endfunction
+
+
+function! todo#motion#PreviousIncomplete()
+ call s:Incomplete('b')
+endfunction