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:
@@ -62,7 +62,11 @@ function! todo#RemovePriority()
|
||||
endfunction
|
||||
|
||||
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 ")
|
||||
P
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user