aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/todo/autoload
diff options
context:
space:
mode:
authorTeddy Wing2020-03-10 01:12:58 +0100
committerTeddy Wing2020-03-12 23:21:56 +0100
commita29a63f7ff3db981ae7fc38eace081ea4f2ad880 (patch)
tree0cc764f649bd6ddbaa7ee4d22c0769126a556cec /bundle/todo/autoload
parentdf27c8e022078abf17b1eee3babec1d4be0c4b4a (diff)
downloaddotvim-a29a63f7ff3db981ae7fc38eace081ea4f2ad880.tar.bz2
todo: Add count support to TODO movement commands
Diffstat (limited to 'bundle/todo/autoload')
-rw-r--r--bundle/todo/autoload/todo.vim18
1 files changed, 14 insertions, 4 deletions
diff --git a/bundle/todo/autoload/todo.vim b/bundle/todo/autoload/todo.vim
index d5579c1..6885b2b 100644
--- a/bundle/todo/autoload/todo.vim
+++ b/bundle/todo/autoload/todo.vim
@@ -1,9 +1,19 @@
-function! todo#NextTODO()
+function! s:MoveToTODO(search_flags)
+ let cnt = v:count1
normal! m'
- call search('TODO')
+
+ let i = 0
+ while i < cnt
+ call search('TODO', a:search_flags)
+
+ let i += 1
+ endwhile
+endfunction
+
+function! todo#NextTODO()
+ call s:MoveToTODO('')
endfunction
function! todo#PreviousTODO()
- normal! m'
- call search('TODO', 'b')
+ call s:MoveToTODO('b')
endfunction