Skip to content

Instantly share code, notes, and snippets.

@duckinator
Forked from relrod/gist:300003
Created February 10, 2010 03:48
Show Gist options
  • Save duckinator/300004 to your computer and use it in GitHub Desktop.
Save duckinator/300004 to your computer and use it in GitHub Desktop.
if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
if line =~ ' HTML 3\.2'
let b:html_omni_flavor = 'html32'
elseif line =~ ' XHTML 1\.1'
let b:html_omni_flavor = 'xhtml11'
else " two-step detection with strict/frameset/transitional
if line =~ ' XHTML 1\.0'
let b:html_omni_flavor = 'xhtml10'
elseif line =~ ' HTML 4\.01'
let b:html_omni_flavor = 'html401'
elseif line =~ ' HTML 4.0\>'
let b:html_omni_flavor = 'html40'
endif
if line =~ '\<Transitional\>'
let b:html_omni_flavor .= 't'
elseif line =~ '\<Frameset\>'
let b:html_omni_flavor .= 'f'
else
let b:html_omni_flavor .= 's'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment