blob: cc8a84ec50ca745283080f61d9f3295c78c91bb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
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')
endif
" Open the bujo todo list file
function s:OpenTodo()
"30 makes it open at width 30
exe ":30vs ~/bujo/todo.md"
endfunction
if !exists(":Todo")
command Todo :call s:OpenTodo()
endif
|