Skip to content

Instantly share code, notes, and snippets.

@relrod
Created February 10, 2010 03:45
Show Gist options
  • Save relrod/300003 to your computer and use it in GitHub Desktop.
Save relrod/300003 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