Auto update Last change in vim help files

This commit is contained in:
Kenneth Benzie 2019-03-31 23:17:02 +01:00
parent 01b027b5ac
commit bdea77f86a

View File

@ -8,6 +8,9 @@ augroup benieAugroup
" Highlight conflict markers in any filetype
au FileType * call matchadd('Todo', '^\(<<<<<<<\||||||||\|=======\|>>>>>>>\)\s\ze.*$')
" Update `Last change: <date>` on write then jump back previous position
au BufWritePost *.txt 1s/Last change: \zs.*$/\=strftime('%Y %b %d')/e|norm!``
" Read template into buffer then send line 1 to the black hold register
au BufNewFile todo.md read ~/.vim/templates/skeleton.todo.md | 1delete _
" Attempt to expand snippet named `_template` if it exists