From 7d2bc32723cf8420d7f898f9b9da724469f811dc Mon Sep 17 00:00:00 2001 From: Jersey Date: Wed, 24 Jun 2020 16:41:10 -0500 Subject: Testing template --- plugin/bujo.vim | 2 +- templates/md.skeleton | 7 +++++++ templates/todo.md | 7 ------- 3 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 templates/md.skeleton delete mode 100644 templates/todo.md diff --git a/plugin/bujo.vim b/plugin/bujo.vim index 9250608..212344e 100644 --- a/plugin/bujo.vim +++ b/plugin/bujo.vim @@ -3,7 +3,7 @@ if empty(glob('~/bujo')) call mkdir($HOME . '/bujo', 'p') endif -autocmd bufnewfile todo.md so <> "how do i insert the text file? +autocmd bufnewfile todo.md so 0r $HOME/.vim/templates/%:e.skeleton autocmd bufnewfile todo.md exe "1," . 10 . "g/Date.*/s//" .strftime("%a d %b %Y") autocmd Bufwritepre,filewritepre todo.md execute "normal ma" diff --git a/templates/md.skeleton b/templates/md.skeleton new file mode 100644 index 0000000..56d4760 --- /dev/null +++ b/templates/md.skeleton @@ -0,0 +1,7 @@ + __________ ____ ____ + /_ __/ __ \/ __ \/ __ \ + / / / / / / / / / / / / + / / / /_/ / /_/ / /_/ / +/_/ \____/_____/\____/ + +Date diff --git a/templates/todo.md b/templates/todo.md deleted file mode 100644 index 56d4760..0000000 --- a/templates/todo.md +++ /dev/null @@ -1,7 +0,0 @@ - __________ ____ ____ - /_ __/ __ \/ __ \/ __ \ - / / / / / / / / / / / / - / / / /_/ / /_/ / /_/ / -/_/ \____/_____/\____/ - -Date -- cgit v1.2.3