Added shortcut to mark all tasks as done

This commit is contained in:
Leandro Freitas
2014-04-27 10:54:27 -03:00
parent a3307cb57e
commit d1aaeff366
4 changed files with 28 additions and 15 deletions

View File

@@ -31,6 +31,10 @@ function! TodoTxtMarkAsDone()
call TodoTxtPrependDate()
normal! Ix
endfunction
function! TodoTxtMarkAllAsDone()
:g!/^x /TodoTxtMarkAsDone()
endfunction
" Mappings {{{1
" Sort tasks {{{2
@@ -59,6 +63,11 @@ if !hasmapto("<leader>D",'v')
if !hasmapto("<leader>D",'v')
vnoremap <script> <silent> <buffer> <leader>D :call TodoTxtMarkAsDone()<CR>
endif
" Mark all done {{{2
if !hasmapto("DD",'n')
nnoremap <script> <silent> <buffer> DD :call TodoTxtMarkAllAsDone()<CR>
endif
" Folding {{{1
" Options {{{2