From 90e5518188c66bbdb40398a7f0c88ca1f1115958 Mon Sep 17 00:00:00 2001 From: Jersey Date: Wed, 24 Jun 2020 14:44:33 -0500 Subject: adding date to todo --- plugin/bujo.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plugin/bujo.vim b/plugin/bujo.vim index 01f17a5..cc8a84e 100644 --- a/plugin/bujo.vim +++ b/plugin/bujo.vim @@ -1,6 +1,17 @@ +autocmd BufWritePre,FileWritePre todo.md ks|call LastMod()|'s +fun LastMod() + if line("$") > 20 + let l = 20 + else + let l = line("$") + endif + exe "1," . l . "g/Date: /s/Date: .*/Date: " . + \ strftime("%Y %b %d") +endfun + +"Make bujo directory if it doesn't exist" if empty(glob('~/bujo')) call mkdir($HOME . '/bujo', 'p') - exe "!mv ./../templates/todo.md ~/bujo/" endif " Open the bujo todo list file -- cgit v1.2.3