augroup benieAugroup " Clear all autocmd's in this group autocmd! " Reopening a file at last curson position au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") \ | exe "normal! g'\"" | endif " Highlight conflict markers in any filefile au FileType * :call matchadd('Todo', '^\(<<<<<<<\||||||||\|=======\|>>>>>>>\)\s\ze.*$') " Read template into buffer and send line 1 to the black hold register au BufNewFile todo.md read ~/.vim/templates/skeleton.todo.md | 1delete _ augroup END