diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index 099e5a2..fe2afbe 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -89,6 +89,10 @@ function! TodoTxtSortByProject() range execute a:firstline . "," . a:lastline . "sort /\\(^\\| \\)\\zs+[^[:blank:]]\\+/ r" endfunction +function! TodoTxtSortByDate() range + execute a:firstline . "," . a:lastline . "sort! /\\d\\{2,4\\}-\\d\\{2\\}-\\d\\{2\\}/ r" +endfunction + " Mappings {{{1 " Sort tasks {{{2 if !hasmapto("s",'n') @@ -115,6 +119,14 @@ if !hasmapto("s+",'v') vnoremap