Silence all sorts

This commit is contained in:
David Beniamine
2019-02-10 18:29:59 +01:00
parent 00ecbeb8b7
commit 9d1443b663

View File

@@ -179,25 +179,25 @@ function! todo#Sort(type)
let l:last=search('^\s*x','b') let l:last=search('^\s*x','b')
let l:diff=l:last-l:first+1 let l:diff=l:last-l:first+1
" Cut the done lines " Cut the done lines
execute ':'.l:first.'d a '.l:diff silent execute ':'.l:first.'d a '.l:diff
endif endif
sort /@[a-zA-Z]*/ r silent sort /@[a-zA-Z]*/ r
sort /+[a-zA-Z]*/ r silent sort /+[a-zA-Z]*/ r
sort /\v\([A-Z]\)/ r silent sort /\v\([A-Z]\)/ r
"Now tasks without priority are at beggining, move them to the end "Now tasks without priority are at beggining, move them to the end
silent normal gg silent normal gg
let l:firstP=search('^\s*([A-Z])', 'cn') let l:firstP=search('^\s*([A-Z])', 'cn')
if l:firstP != 1 if l:firstP != 1
let num=l:firstP-1 let num=l:firstP-1
" Sort normal " Sort normal
execute ':1 d b'.num silent execute ':1 d b'.num
silent normal G"bp silent normal G"bp
endif endif
if l:first != 0 if l:first != 0
silent normal G"ap silent normal G"ap
execute ':'.l:first.','.l:last.'sort /@[a-zA-Z]*/ r' silent execute ':'.l:first.','.l:last.'sort /@[a-zA-Z]*/ r'
execute ':'.l:first.','.l:last.'sort /+[a-zA-Z]*/ r' silent execute ':'.l:first.','.l:last.'sort /+[a-zA-Z]*/ r'
execute ':'.l:first.','.l:last.'sort /\v([A-Z])/ r' silent execute ':'.l:first.','.l:last.'sort /\v([A-Z])/ r'
endif endif
endif endif
call setpos('.', oldcursor) call setpos('.', oldcursor)