FIX: sort done.txt

This commit is contained in:
David Beniamine
2015-07-08 11:04:55 +02:00
parent dc4bb8e856
commit ab4ecf5220

View File

@@ -73,7 +73,7 @@ function! TodoTxtRemoveCompleted()
endif
let l:done_file = l:target_dir.'/'.l:done
echo "Writing to ".l:done_file
if !filewritable(l:done_file) && !filewritable(l:target_dir)
if !filewritable(l:done_file) && !filewritable(l:target_dir)
echoerr "Can't write to file '".l:done_file."'"
return
endif
@@ -85,7 +85,7 @@ endfunction
function! TodoTxtSort()
" vim :sort is usually stable
" we sort first on contexts, then on projects and then on priority
" we sort first on contexts, then on projects and then on priority
if expand('%')=~'[Dd]one.*.txt'
silent! %s/\(x\s*\d\{4}\)-\(\d\{2}\)-\(\d\{2}\)/\1\2\3/g
sort n /^x\s*/