sort by due date

This commit is contained in:
Jonathan Reeve
2015-10-25 14:45:49 -04:00
parent c13a277e2a
commit 0a917143c5
2 changed files with 8 additions and 0 deletions

View File

@@ -93,6 +93,12 @@ function! todo#txt#sort_by_date() range
execute a:firstline . "," . a:lastline . "g!/" . l:date_regex . "/m" . a:lastline
endfunction
function! todo#txt#sort_by_due_date() range
let l:date_regex = "due:\\d\\{2,4\\}-\\d\\{2\\}-\\d\\{2\\}"
execute a:firstline . "," . a:lastline . "sort /" . l:date_regex . "/ r"
execute a:firstline . "," . a:lastline . "g!/" . l:date_regex . "/m" . a:lastline
endfunction
" Increment and Decrement The Priority
:set nf=octal,hex,alpha