From e883de38e192a8a02dc78c82be72c5a660be3315 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Wed, 19 Feb 2014 22:11:21 -0800 Subject: [PATCH] Squashed 'vim/bundle/html5/' content from commit 53f6c9597 git-subtree-dir: vim/bundle/html5 git-subtree-split: 53f6c95974f2f612e3ed677334af735d3727833f --- .gitignore | 4 + CHANGES.markdown | 28 ++ Makefile | 364 +++++++++++++++ README.md | 95 ++++ autoload/htmlcomplete.vim | 861 ++++++++++++++++++++++++++++++++++++ autoload/xml/aria.vim | 232 ++++++++++ autoload/xml/html5.vim | 813 ++++++++++++++++++++++++++++++++++ config.mk | 2 + indent/html.vim | 380 ++++++++++++++++ syntax/html.vim | 113 +++++ syntax/html/aria.vim | 37 ++ syntax/html/rdfa.vim | 11 + syntax/javascript/html5.vim | 43 ++ 13 files changed, 2983 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGES.markdown create mode 100644 Makefile create mode 100644 README.md create mode 100644 autoload/htmlcomplete.vim create mode 100644 autoload/xml/aria.vim create mode 100644 autoload/xml/html5.vim create mode 100644 config.mk create mode 100644 indent/html.vim create mode 100644 syntax/html.vim create mode 100644 syntax/html/aria.vim create mode 100644 syntax/html/rdfa.vim create mode 100644 syntax/javascript/html5.vim diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab20a1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +install.log +.record +.mkrecord +*.vba diff --git a/CHANGES.markdown b/CHANGES.markdown new file mode 100644 index 0000000..80bcd36 --- /dev/null +++ b/CHANGES.markdown @@ -0,0 +1,28 @@ +# html5.vim + +## Change Log + +### Version 0.27 + +- Added inline SVG + +### Version 0.26 + +- Support multi-value attributes (Most of them are WAI-ARIA attributes) +- Some old complete function bug fix + +### Version 0.25 + +- WAI-ARIA support bug fix +- WAI-ARIA complete supports all doctypes now + +### Version 0.2 + +- attributes now must match from beginning +- fix some attr(\w*on\w*) will use jscomplete for their value +- add vim-makefile + +### Version 0.1 + +- First Version +- Add html5 dictionary file and doctype support diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7892414 --- /dev/null +++ b/Makefile @@ -0,0 +1,364 @@ +# vim:filetype=make:foldmethod=marker:fdl=0: +# +# Makefile: install/uninstall/link vim plugin files. +# Author: Cornelius +# Date: δΈ€ 3/15 22:49:26 2010 +# Version: 1.0 +# +# PLEASE DO NOT EDIT THIS FILE. THIS FILE IS AUTO-GENERATED FROM Makefile.tpl +# LICENSE {{{ +# Copyright (c) 2010 +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# }}} +# VIM RECORD FORMAT: {{{ +# { +# version => 0.2, # record spec version +# generated_by => 'Vimana-' . $Vimana::VERSION, +# install_type => 'auto', # auto , make , rake ... etc +# package => $self->package_name, +# files => \@e, +# } +# }}} + +# INTERNAL VARIABLES {{{ + +RECORD_FILE=.record +PWD=`pwd` +README_FILES=`ls -1 | grep -i readme` +WGET_OPT=-c -nv +CURL_OPT= +RECORD_SCRIPT=.mkrecord +TAR=tar czvf + +GIT_SOURCES= + +# INTERNAL FUNCTIONS {{{ +record_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + echo $(VIMRUNTIME)/$$PTYPE/$(1) >> $(2) + +# }}} + +# PUBLIC FUNCTIONS {{{ + +GIT_SOURCES= +DEPEND_DIR=/tmp/vim-deps + +# Usage: +# +# $(call install_git_sources) +# + +install_git_source = \ + PWD=$(PWD) ; \ + mkdir -p $(DEPEND_DIR) ; \ + cd $(DEPEND_DIR) ; \ + for git_uri in $(GIT_SOURCES) ; do \ + OUTDIR=$$(echo $$git_uri | perl -pe 's{^.*/}{}') ;\ + echo $$OUTDIR ; \ + if [[ -e $$OUTDIR ]] ; then \ + cd $$OUTDIR ; \ + git pull origin master && \ + make install && cd .. ; \ + else \ + git clone $$git_uri $$OUTDIR && \ + cd $$OUTDIR && \ + make install && cd .. ; \ + fi; \ + done ; + + + + +# install file by inspecting content +install_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + cp -v $(1) $(VIMRUNTIME)/$$PTYPE/$(1) + +link_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + cp -v $(1) $(VIMRUNTIME)/$$PTYPE/$(1) + +unlink_file = \ + PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\ + rm -fv $(VIMRUNTIME)/$$PTYPE/$(1) + +# fetch script from an url +fetch_url = \ + @if [[ -e $(2) ]] ; then \ + exit \ + ; fi \ + ; echo " => $(2)" \ + ; if [[ ! -z `which curl` ]] ; then \ + curl $(CURL_OPT) $(1) -o $(2) ; \ + ; elif [[ ! -z `which wget` ]] ; then \ + wget $(WGET_OPT) $(1) -O $(2) \ + ; fi \ + ; echo $(2) >> .bundlefiles + + +install_source = \ + for git_uri in $(GIT_SOURCES) ; do \ + OUTDIR=$$(echo $$git_uri | perl -pe 's{^.*/}{}') ;\ + echo $$OUTDIR ; \ + done + +# fetch script from github +fetch_github = \ + @if [[ -e $(5) ]] ; then \ + exit \ + ; fi \ + ; echo " => $(5)" \ + ; if [[ ! -z `which curl` ]] ; then \ + curl $(CURL_OPT) http://github.com/$(1)/$(2)/raw/$(3)/$(4) -o $(5) \ + ; elif [[ ! -z `which wget` ]] ; then \ + wget $(WGET_OPT) http://github.com/$(1)/$(2)/raw/$(3)/$(4) -O $(5) \ + ; fi \ + ; echo $(5) >> .bundlefiles + +# fetch script from local file +fetch_local = @cp -v $(1) $(2) \ + ; @echo $(2) >> .bundlefiles + +# 1: NAME , 2: URI +dep_from_git = \ + D=/tmp/$(1)-$$RANDOM ; git clone $(2) $$D ; cd $$D ; make install ; + +dep_from_svn = \ + D=/tmp/$(1)-$$RANDOM ; svn checkout $(2) $$D ; cd $$D ; make install ; + +# }}} +# }}} +# ======= DEFAULT CONFIG ======= {{{ + +# Default plugin name +NAME=`basename \`pwd\`` +VERSION=0.1 + +# Files to add to tarball: +DIRS=`ls -1F | grep / | sed -e 's/\///'` + +# Runtime path to install: +VIMRUNTIME=~/.vim + +# Other Files to be added: +FILES=`ls -1 | grep '.vim$$'` +MKFILES=Makefile `ls -1 | grep '.mk$$'` + +# ======== USER CONFIG ======= {{{ +# please write config in config.mk +# this will override default config +# +# Custom Name: +# +# NAME=[plugin name] +# +# Custom dir list: +# +# DIRS=autoload after doc syntax plugin +# +# Files to add to tarball: +# +# FILES= +# +# Bundle dependent scripts: +# +# bundle-deps: +# $(call fetch_github,[account id],[project],[branch],[source path],[target path]) +# $(call fetch_url,[file url],[target path]) +# $(call fetch_local,[from],[to]) + +SHELL=bash + +CONFIG_FILE=config.mk +-include ~/.vimauthor.mk +-include $(CONFIG_FILE) + +# }}} +# }}} +# ======= SECTIONS ======= {{{ +-include ext.mk + +all: install-deps install + +install-deps: + # check required binaries + [[ -n $$(which git) ]] + [[ -n $$(which bash) ]] + [[ -n $$(which vim) ]] + [[ -n $$(which wget) || -n $$(which curl) ]] + $(call install_git_sources) + +check-require: + @if [[ -n `which wget` || -n `which curl` || -n `which fetch` ]]; then echo "wget|curl|fetch: OK" ; else echo "wget|curl|fetch: NOT OK" ; fi + @if [[ -n `which vim` ]] ; then echo "vim: OK" ; else echo "vim: NOT OK" ; fi + +config: + @rm -f $(CONFIG_FILE) + @echo "NAME=" >> $(CONFIG_FILE) + @echo "VERSION=" >> $(CONFIG_FILE) + @echo "#DIRS=" + @echo "#FILES=" + @echo "" >> $(CONFIG_FILE) + @echo "bundle-deps:" >> $(CONFIG_FILE) + @echo "\t\t\$$(call fetch_github,ID,REPOSITORY,BRANCH,PATH,TARGET_PATH)" >> $(CONFIG_FILE) + @echo "\t\t\$$(call fetch_url,FILE_URL,TARGET_PATH)" >> $(CONFIG_FILE) + + +init-author: + @echo "AUTHOR=" > ~/.vimauthor.mk + +bundle-deps: + +bundle: bundle-deps + +dist: bundle mkfilelist + @$(TAR) $(NAME)-$(VERSION).tar.gz --exclude '*.svn' --exclude '.git' $(DIRS) $(README_FILES) $(FILES) $(MKFILES) + @echo "$(NAME)-$(VERSION).tar.gz is ready." + +init-runtime: + @mkdir -vp $(VIMRUNTIME) + @mkdir -vp $(VIMRUNTIME)/record + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type d | while read dir ; do \ + mkdir -vp $(VIMRUNTIME)/$$dir ; done ; fi + +release: + if [[ -n `which vimup` ]] ; then \ + fi + +pure-install: + @echo "Using Shell:" $(SHELL) + @echo "Installing" + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \ + cp -v $$file $(VIMRUNTIME)/$$file ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call install_file,$$vimfile) ; fi ; done + +install: init-runtime bundle pure-install record + + +uninstall-files: + @echo "Uninstalling" + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \ + rm -fv $(VIMRUNTIME)/$$file ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call unlink_file,$$vimfile) ; fi ; done + +uninstall: uninstall-files rmrecord + +link: init-runtime + @echo "Linking" + @if [[ -n "$(DIRS)" ]]; then find $(DIRS) -type f | while read file ; do \ + ln -sfv $(PWD)/$$file $(VIMRUNTIME)/$$file ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call link_file,$$vimfile) ; fi ; done + +mkfilelist: + @echo $(NAME) > $(RECORD_FILE) + @echo $(VERSION) >> $(RECORD_FILE) + @if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \ + echo $(VIMRUNTIME)/$$file >> $(RECORD_FILE) ; done ; fi + @echo "$(FILES)" | while read vimfile ; do \ + if [[ -n $$vimfile ]] ; then \ + $(call record_file,$$vimfile,$(RECORD_FILE)) ; fi ; done + +vimball-edit: + find $(DIRS) -type f > .tmp_list + vim .tmp_list + vim .tmp_list -c ":%MkVimball $(NAME)-$(VERSION) ." -c "q" + @rm -vf .tmp_list + @echo "$(NAME)-$(VERSION).vba is ready." + +vimball: + find $(DIRS) -type f > .tmp_list + vim .tmp_list -c ":%MkVimball $(NAME)-$(VERSION) ." -c "q" + @rm -vf .tmp_list + @echo "$(NAME)-$(VERSION).vba is ready." + +mkrecordscript: + @echo "" > $(RECORD_SCRIPT) + @echo "fun! s:mkmd5(file)" >> $(RECORD_SCRIPT) + @echo " if executable('md5')" >> $(RECORD_SCRIPT) + @echo " return system('cat ' . a:file . ' | md5')" >> $(RECORD_SCRIPT) + @echo " else" >> $(RECORD_SCRIPT) + @echo " return \"\"" >> $(RECORD_SCRIPT) + @echo " endif" >> $(RECORD_SCRIPT) + @echo "endf" >> $(RECORD_SCRIPT) + @echo "let files = readfile('.record')" >> $(RECORD_SCRIPT) + @echo "let package_name = remove(files,0)" >> $(RECORD_SCRIPT) + @echo "let script_version = remove(files,0)" >> $(RECORD_SCRIPT) + @echo "let record = { 'version' : 0.3 , 'generated_by': 'Vim-Makefile' , 'script_version': script_version , 'install_type' : 'makefile' , 'package' : package_name , 'files': [ ] }" >> $(RECORD_SCRIPT) + @echo "for file in files " >> $(RECORD_SCRIPT) + @echo " let md5 = s:mkmd5(file)" >> $(RECORD_SCRIPT) + @echo " cal add( record.files , { 'checksum': md5 , 'file': file } )" >> $(RECORD_SCRIPT) + @echo "endfor" >> $(RECORD_SCRIPT) + @echo "redir => output" >> $(RECORD_SCRIPT) + @echo "silent echon record" >> $(RECORD_SCRIPT) + @echo "redir END" >> $(RECORD_SCRIPT) + @echo "let content = join(split(output,\"\\\\n\"),'')" >> $(RECORD_SCRIPT) + @echo "let record_file = expand('~/.vim/record/' . package_name )" >> $(RECORD_SCRIPT) + @echo "cal writefile( [content] , record_file )" >> $(RECORD_SCRIPT) + @echo "cal delete('.record')" >> $(RECORD_SCRIPT) + @echo "echo \"Done\"" >> $(RECORD_SCRIPT) + + +record: mkfilelist mkrecordscript + vim --noplugin -V10install.log -c "so $(RECORD_SCRIPT)" -c "q" + @echo "Vim script record making log: install.log" +# @rm -vf $(RECORD_FILE) + +rmrecord: + @echo "Removing Record" + @rm -vf $(VIMRUNTIME)/record/$(NAME) + +clean: clean-bundle-deps + @rm -vf $(RECORD_FILE) + @rm -vf $(RECORD_SCRIPT) + @rm -vf install.log + @rm -vf *.tar.gz + +clean-bundle-deps: + @echo "Removing Bundled scripts..." + @if [[ -e .bundlefiles ]] ; then \ + rm -fv `echo \`cat .bundlefiles\``; \ + fi + @rm -fv .bundlefiles + +update: + @echo "Updating Makefile..." + @URL=http://github.com/c9s/vim-makefile/raw/master/Makefile ; \ + if [[ -n `which curl` ]]; then \ + curl $$URL -o Makefile ; \ + if [[ -n `which wget` ]]; then \ + wget -c $$URL ; \ + elif [[ -n `which fetch` ]]; then \ + fetch $$URL ; \ + fi + +version: + @echo version - $(MAKEFILE_VERSION) + +# }}} diff --git a/README.md b/README.md new file mode 100644 index 0000000..3c78eba --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +# html5.vim + +HTML5 + inline SVG omnicomplete funtion, indent and syntax for Vim. +Based on the default htmlcomplete.vim. + +## Feature + +- Support all new elements and attribute. +- Support all SVG elements +- Support [microdata][microdata]. +- Support [RDFa][RDFa]. +- Support [WAI-ARIA][aria]. + +## Install + +Use [Vundle][] or [pathogen.vim][] is recommended. + +[Vundle]:https://github.com/gmarik/vundle +[pathogen.vim]:https://github.com/tpope/vim-pathogen + +## Configure + +Disable event-handler attributes support: + + let g:html5_event_handler_attributes_complete = 0 + +Disable RDFa attributes support: + + let g:html5_rdfa_attributes_complete = 0 + +Disable microdata attributes support: + + let g:html5_microdata_attributes_complete = 0 + +Disable WAI-ARIA attribute support: + + let g:html5_aria_attributes_complete = 0 + +## Change Log + +### Version 0.27 + +- Support inline SVG + +## License + +Copyright (c) 2010-2013 Wei-Ko Kao, 2012 HT de Beer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +## References + +1. [HTML5 Spec][1] +2. [HTML5 Markup][2] +3. [Custom Data Attributes][3] +4. [microdata][4] +5. [RDFa 1.0 Rec][5] +6. [RDFa 1.1 Core WD][6] +7. [WAI-ARIA][7] +8. [IANA Language Sub Tags][8] +9. [IANA Charset][9] +10. [SVG Spec][10] + +[html5.vim]:http://www.vim.org/scripts/script.php?script_id=3236 + +[microdata]:http://dev.w3.org/html5/md/ +[RDFa]:http://www.w3.org/TR/rdfa-syntax/ +[aria]:http://www.w3.org/TR/wai-aria/ + +[1]:http://dev.w3.org/html5/spec/ +[2]:http://dev.w3.org/html5/markup/ +[3]:http://dev.w3.org/html5/spec/Overview.html#custom-data-attribute +[4]:http://dev.w3.org/html5/md/ +[5]:http://www.w3.org/TR/rdfa-syntax/#a_xhtmlrdfa_dtd +[6]:http://www.w3.org/TR/rdfa-core/ +[7]:http://www.w3.org/TR/wai-aria/ +[8]:http://www.iana.org/assignments/language-subtag-registry +[9]:http://www.iana.org/assignments/character-sets +[10]:http://www.w3.org/TR/SVG/ diff --git a/autoload/htmlcomplete.vim b/autoload/htmlcomplete.vim new file mode 100644 index 0000000..6da9be2 --- /dev/null +++ b/autoload/htmlcomplete.vim @@ -0,0 +1,861 @@ +" Vim completion script +" Language: HTML and XHTML +" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) +" Last Change: 2006 Oct 19 +" Modified: othree +" Changes: Add HTML5, WAI-ARIA support +" Last Change: 2010 Sep 25 + +if !exists('g:aria_attributes_complete') + let g:aria_attributes_complete = 1 +endif + +function! htmlcomplete#CompleteTags(findstart, base) + if a:findstart + " locate the start of the word + let line = getline('.') + let start = col('.') - 1 + let curline = line('.') + let compl_begin = col('.') - 2 + while start >= 0 && line[start - 1] =~ '\(\k\|[!:.-]\)' + let start -= 1 + endwhile + " Handling of entities {{{ + if start >= 0 && line[start - 1] =~ '&' + let b:entitiescompl = 1 + let b:compl_context = '' + return start + endif + " }}} + " Handling of ' + if 0 < searchpair(css, '', csse, 'nWb') + \ && 0 < searchpair(css, '', csse, 'nW') + " we're inside style + if getline(lnum) !~ css && getline(a:lnum) !~ csse + if restore_ic == 0 + setlocal noic + endif + if s:cssindent == '' + return cindent(a:lnum) + else + execute 'let ind = ' . s:cssindent + return ind + endif + endif + if getline(a:lnum) =~ csse + return indent(searchpair(css, '', csse, 'nWb')) + endif + endif + + if getline(lnum) =~ '\c' + " line before the current line a:lnum contains + " a closing . --> search for line before + " starting
 to restore the indent.
+        let preline = prevnonblank(search('\c
', 'bW') - 1)
+        if preline > 0
+            if restore_ic == 0
+              setlocal noic
+            endif
+
+            if 0 == match(getline(a:lnum), '^\s*HtmlIndentSum(lnum, -1)
+    let ind = ind + HtmlIndentSum(a:lnum, 0)
+
+    " Fix for conditional comment
+    if getline(a:lnum) =~ '\c'
+        let ind = ind - 1
+    endif
+
+    let lind = indent(lnum)
+
+    " for tags in s:omittable
+      " let tags_exp = '<\(' . join(tags, '\|') . '\)>'
+      " let close_tags_exp = ''
+      " if getline(a:lnum) =~ tags_exp
+        " let block_start = search('^'.repeat(' ', lind + (&sw * ind - 1)).'\S'  , 'bnW')
+        " let prev_tag = search(tags_exp, 'bW', block_start)
+        " let prev_closetag = search(close_tags_exp, 'W', a:lnum)
+        " if prev_tag && !prev_closetag
+          " let ind = ind - 1
+        " endif
+      " endif
+
+      " if getline(a:lnum) =~ ''
+        " let block_start = search('^'.repeat(' ', lind + (&sw * ind - 1)).'\S'  , 'bnW')
+        " let prev_tag = search(tags_exp, 'bW', block_start)
+        " let prev_closetag = search(close_tags_exp, 'W', a:lnum)
+        " if prev_tag && !prev_closetag
+          " let ind = ind - 1
+        " endif
+      " endif
+    " endfor
+
+    if restore_ic == 0
+        setlocal noic
+    endif
+
+    return lind + (&sw * ind)
+endfun
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" [-- EOF /indent/html.vim --]
diff --git a/syntax/html.vim b/syntax/html.vim
new file mode 100644
index 0000000..b9b4d86
--- /dev/null
+++ b/syntax/html.vim
@@ -0,0 +1,113 @@
+" Vim syntax file
+" Language:	HTML (version 5)
+" Maintainer:	Rodrigo Machado 
+" URL:		http://rm.blog.br/vim/syntax/html.vim
+" Last Change:  2009 Aug 19
+" License:      Public domain
+"               (but let me know if you like :) )
+"
+" Note: This file just adds the new tags from HTML 5
+"       and don't replace default html.vim syntax file
+"
+" Modified:     othree 
+" Changes:      update to Draft 13 January 2011
+"               add complete new attributes
+"               add microdata Attributes
+"               add bdi element
+" Modified:     htdebeer 
+" Changes:      add common SVG elements and attributes for inline SVG
+
+" HTML 5 tags
+syn keyword htmlTagName contained article aside audio canvas command
+syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
+syn keyword htmlTagName contained header hgroup keygen main mark meter menu nav output
+syn keyword htmlTagName contained progress ruby rt rp section source summary time track video data
+syn keyword htmlTagName contained template content shadow
+syn keyword htmlTagName contained wbr bdi
+
+" SVG tags
+" http://www.w3.org/TR/SVG/
+" as found in http://www.w3.org/TR/SVG/eltindex.html
+syn keyword htmlTagName contained svg 
+syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem 
+syn keyword htmlTagName contained animate animateColor animateMotion animateTransform 
+syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path
+syn keyword htmlTagName contained clipPath color-profile cursor 
+syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject
+syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence 
+syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri 
+syn keyword htmlTagName contained glyph glyphRef hkern 
+syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop
+syn keyword htmlTagName contained missing-glyph mpath 
+syn keyword htmlTagName contained text textPath tref tspan vkern
+
+syn match htmlTagName contained "\<[a-z_]\+\(\-[a-z_]\+\)\+\>"
+
+" HTML 5 arguments
+" Core Attributes
+syn keyword htmlArg contained accesskey class contenteditable contextmenu dir 
+syn keyword htmlArg contained draggable hidden id is lang spellcheck style tabindex title translate
+" Event-handler Attributes
+syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange
+syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover 
+syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange 
+syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata 
+syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
+syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange 
+syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate 
+syn keyword htmlArg contained onvolumechange onwaiting
+" XML Attributes
+syn keyword htmlArg contained xml:lang xml:space xml:base xmlns
+" new features
+" 
+syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload 
+syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
+"