Get to partly working state on my template autocmd

It doesn't currently take me to the marker so I have stoped it deleting
the first on load. It now takes me to the firt line and I have to push
i<space><space> to go to my first mark.
This commit is contained in:
Jonathan Hodgson 2017-04-22 09:55:25 +01:00
parent cd7086d356
commit c6e3829c62

9
.vimrc
View file

@ -82,9 +82,10 @@ function! NextMark()
endfunction
function! NewHtml()
execute "normal! :read ~/Templates/html"
execute "normal! ggdd"
call NextMark()
read ~/Templates/html
normal! ggdd
setlocal filetype=html
"call NextMark()
endfunction
" Mappings {{{1
@ -182,7 +183,7 @@ augroup END
"
augroup new_html
autocmd!
autocmd BufNew *.html call NewHtml()
autocmd BufNew,BufNewFile *.html call NewHtml()
augroup END
"
augroup file_vim