diff --git a/autoload/todo.vim b/autoload/todo.vim index 8c228af..9e21886 100644 --- a/autoload/todo.vim +++ b/autoload/todo.vim @@ -62,7 +62,11 @@ function! todo#RemovePriority() endfunction function! todo#PrependDate() - normal! 0"=strftime("%Y-%m-%d ") P + if (getline(".") =~ '\v^\(') + execute "normal! 0f)a\\l\"=strftime(\"%Y-%m-%d\")\P" + else + normal! 0"=strftime("%Y-%m-%d ") P + endif endfunction function! todo#ToggleMarkAsDone(status)