From 2faa156aaec7f5750c7c7a1abb04dcdfdc83c99c Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Mon, 10 Jun 2019 10:23:34 +0100 Subject: [PATCH] Only add help autocmd's in help buffers --- plugin/autocmds.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/autocmds.vim b/plugin/autocmds.vim index 8b16cfb..5dcdcfa 100644 --- a/plugin/autocmds.vim +++ b/plugin/autocmds.vim @@ -8,8 +8,9 @@ augroup benieAugroup " Highlight conflict markers in any filetype au FileType * call matchadd('Todo', '^\(<<<<<<<\||||||||\|=======\|>>>>>>>\)\s\ze.*$') - " Update `Last change: ` on write then jump back previous position - au BufWritePost *.txt silent! call do#last_change() + " Update `Last change: ` on write & go back previous cursor position + au FileType help au BufWritePre + \ 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 _