Modified .vimrc and md template to match new markdown format

I started using Visual Studio Code for markdown notes and I'm trying to
keep the markdown files as agnostic as possible.  Vim will now match the
frontmatter style of VSC and (to an extent) Notable
This commit is contained in:
2019-10-09 16:36:13 -04:00
parent ec57cf008d
commit 79c82e61f8
2 changed files with 15 additions and 12 deletions

View File

@@ -1,16 +1,17 @@
:insert
---
# Title
Created:
Updated:
## Summary
tags: [ untagged ]
title:
created:
---
## Reference(s):
# Title
## Summary
___
## Reference(s)

6
.vimrc
View File

@@ -251,9 +251,11 @@ autocmd bufWritePost,filewritepost *.py execute "normal `a"
" ==> Templates: markdown documents (.md, .mkd)
autocmd BufNewFile *.md,*.mkd so $HOME/.vim/templates/md
autocmd BufNewFile *.md,*.mkd exe "g/Created:.*/s//Created: " .strftime("%c")
autocmd BufNewFile *.md,*.mkd %s/title:.*/\='title: '.expand('%:r')/e
autocmd BufNewFile *.md,*.mkd %s/\# Title.*/\='# '.expand('%:r')/e
autocmd BufNewFile *.md,*.mkd exe "g/created:.*/s//created: " .strftime("%c")
autocmd BufWritePre,filewritepre *.md,*.mkd execute "normal ma"
autocmd BufWritePre,filewritepre *.md,*.mkd exe "g/Updated:.*/s//Updated: " .strftime("%c")
"autocmd BufWritePre,filewritepre *.md,*.mkd exe "g/Updated:.*/s//Updated: " .strftime("%c")
autocmd bufWritePost,filewritepost *.md,*.mkd execute "normal `a"
" ---------------------------------------------------------------------------------------------------------------------