diff options
| -rw-r--r-- | bundle/todo/autoload/todo.vim | 18 | ||||
| -rw-r--r-- | bundle/todo/plugin/todo.vim | 4 | 
2 files changed, 16 insertions, 6 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 diff --git a/bundle/todo/plugin/todo.vim b/bundle/todo/plugin/todo.vim index a27171f..f4358a6 100644 --- a/bundle/todo/plugin/todo.vim +++ b/bundle/todo/plugin/todo.vim @@ -4,8 +4,8 @@ endif  let g:loaded_todo = 1 -nnoremap <silent> <Plug>(todo-previous) :call todo#PreviousTODO()<CR> -nnoremap <silent> <Plug>(todo-next) :call todo#NextTODO()<CR> +nnoremap <silent> <Plug>(todo-previous) :<C-u>call todo#PreviousTODO()<CR> +nnoremap <silent> <Plug>(todo-next) :<C-u>call todo#NextTODO()<CR>  if !hasmapto('<Plug>(todo-previous)', 'n') && !maparg('[t', 'n') | 
