Add command and map to jump to the next unfinished task.

Introduce the command `VimwikiNextTask` and the mapping `gnt` to jump to
the next unfinished task.
This commit is contained in:
Henry Qin
2019-02-27 19:45:39 -08:00
parent b849a411e3
commit 3f7f85cfc6
3 changed files with 20 additions and 0 deletions

View File

@ -1156,6 +1156,11 @@ function! vimwiki#base#update_listing_in_buffer(strings, start_header,
call winrestview(winview_save)
endfunction
function! vimwiki#base#find_next_task()
let taskRegex = vimwiki#vars#get_syntaxlocal('rxListItemWithoutCB')
\ . '\+\(\[ \]\s\+\)\zs'
call vimwiki#base#search_word(taskRegex, '')
endfunction
function! vimwiki#base#find_next_link()
call vimwiki#base#search_word(vimwiki#vars#get_syntaxlocal('rxAnyLink'), '')