Skip to content

Commit

Permalink
Detect HTML more aggressively
Browse files Browse the repository at this point in the history
Useful for editing URLs with netrw.
  • Loading branch information
tpope committed Mar 31, 2014
1 parent 0fef3be commit 12e3799
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/ragtag.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 12e3799

Please sign in to comment.