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
|
endfunction
|
||||||
|
|
||||||
function! todo#PrependDate()
|
function! todo#PrependDate()
|
||||||
normal! 0"=strftime("%Y-%m-%d ")
|
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
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user