Improve todo#PrependDate to follow format

Add logic to place the completion date after the priority, if it exists,
when completing a task.
This commit is contained in:
Rene Vergara
2017-04-05 11:15:59 -05:00
parent f77215ca80
commit 484c12771e

View File

@@ -62,7 +62,11 @@ function! todo#RemovePriority()
endfunction endfunction
function! todo#PrependDate() function! todo#PrependDate()
if (getline(".") =~ '\v^\(')
execute "normal! 0f)a\<space>\<esc>l\"=strftime(\"%Y-%m-%d\")\<esc>P"
else
normal! 0"=strftime("%Y-%m-%d ") normal! 0"=strftime("%Y-%m-%d ")
P
endif endif
endfunction endfunction