diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index 2cc7958..d3ec73a 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -18,18 +18,17 @@ setlocal wrapmargin=0 " Functions {{{! function! s:TodoTxtRemovePriority() - normal! da) - :s/^\s\+//g + :s/^(\w)\s\+//ge endfunction -function! s:TodoTxtPrependDate() +function! TodoTxtPrependDate() normal! 0"=strftime("%Y-%m-%d ") P endfunction function! TodoTxtMarkAsDone() call s:TodoTxtRemovePriority() - call s:TodoTxtPrependDate() - normal! Ix  + call TodoTxtPrependDate() + normal! Ix endfunction " Mappings {{{1 @@ -39,16 +38,16 @@ if !hasmapto("s",'n') endif " Insert date {{{2 -if !hasmapto("d",'n') - nnoremap