aboutsummaryrefslogtreecommitdiffstats
path: root/projects/aodocs.vim
diff options
context:
space:
mode:
authorTeddy Wing2021-08-09 19:37:18 +0200
committerTeddy Wing2021-08-29 19:22:58 +0200
commit25e5e7a7f759d0132b2d304299c0e3388e223e2d (patch)
tree466975f9fe412fd7ac2cfaeb605ec0b35b872015 /projects/aodocs.vim
parent0e4365a2081ff83fd65f8c92109a82e360ffa54c (diff)
downloaddotvim-25e5e7a7f759d0132b2d304299c0e3388e223e2d.tar.bz2
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 <C-a>. 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).
Diffstat (limited to 'projects/aodocs.vim')
-rw-r--r--projects/aodocs.vim3
1 files changed, 2 insertions, 1 deletions
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\<C-a>zt2\<C-e>"
+ call setline('.', strftime('%Y.%m.%d:'))
+ execute "normal! zt2\<C-e>"
endfunction