From 25e5e7a7f759d0132b2d304299c0e3388e223e2d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 9 Aug 2021 19:37:18 +0200 Subject: projects/aodocs.vim: Use the current date in new TODO entry When creating a new TODO entry, always use the current date instead of incrementing the final 'day' segment with . That would cause issues when incrementing from "07" (results in "010" instead of "08" because it assumes it's in octal), and "08" (results in "9" without a leading zero, though I'm not sure why). --- projects/aodocs.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'projects') diff --git a/projects/aodocs.vim b/projects/aodocs.vim index fd92016..b965ce4 100644 --- a/projects/aodocs.vim +++ b/projects/aodocs.vim @@ -97,5 +97,6 @@ function! s:TodoCopyLast() ?\n\n\zs\d? " Increment day, then put the current entry at the top of the window - execute "normal! $h\zt2\" + call setline('.', strftime('%Y.%m.%d:')) + execute "normal! zt2\" endfunction -- cgit v1.2.3