Permalink
Browse files

Detect HTML more aggressively

Useful for editing URLs with netrw.
  • Loading branch information...
1 parent 0fef3be commit 12e379989e3258af0934e10173386235c7d69944 @tpope committed Mar 31, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 plugin/ragtag.vim
View
@@ -23,6 +23,8 @@ endif
augroup ragtag
autocmd!
+ autocmd BufReadPost * if ! did_filetype() && getline(1)." ".getline(2).
+ \ " ".getline(3) =~? '<\%(!DOCTYPE \)\=html\>' | setf html | endif
autocmd FileType *html*,wml,jsp,gsp,mustache,smarty call s:Init()
autocmd FileType php,asp*,cf,mason,eruby,liquid,jst call s:Init()
autocmd FileType xml,xslt,xsd,docbk call s:Init()

0 comments on commit 12e3799

Please sign in to comment.