diff --git a/.vim/filetype.vim b/.vim/filetype.vim index 7ab5a03..09676a1 100644 --- a/.vim/filetype.vim +++ b/.vim/filetype.vim @@ -130,3 +130,14 @@ augroup end augroup rust autocmd FileType rust nnoremap lg lua rust_where_at_line() augroup end + +function DetectGoHtmlTmpl() + if expand('%:e') == "html" && search("{{") != 0 + setfiletype gohtmltmpl + endif +endfunction + +augroup filetypedetect + " gohtmltmpl + au BufRead,BufNewFile *.html call DetectGoHtmlTmpl() +augroup END