Conflicts:
	ftplugin/todo.vim
This commit is contained in:
David Beniamine
2015-02-01 23:59:09 +01:00

View File

@@ -76,10 +76,18 @@ function! TodoTxtRemoveCompleted()
:g/^x /call add(l:completed, getline(line(".")))|d
call s:AppendToFile(l:done_file, l:completed)
endfunction
function! TodoTxtSort()
" vim :sort is usually stable
" we sort first on contexts, then on projects and then on priority
:sort /@[a-zA-Z]*/ r
:sort /+[a-zA-Z]*/ r
:sort /\v\([A-Z]\)/ r
endfunction
" Mappings {{{1
" Sort tasks {{{2
if !hasmapto("<localleader>s",'n')
if !hasmapto("<localleader>s",'n')
nnoremap <script> <silent> <buffer> <leader>s :call TodoTxtSort()<CR>
endif