Add HTML syntax file

12a2e789265c91303be6b00c18f74d765e81a3ca
For HTML 5 support.
Alexis Sellier committed ago 1 parent 08e78d1a
.vim/syntax/html.vim added +56 -0
1 +
" Vim syntax file
2 +
" Language:	HTML (version 5)
3 +
" Maintainer:	Rodrigo Machado <rcmachado@gmail.com>
4 +
" URL:		http://rm.blog.br/vim/syntax/html.vim
5 +
" Last Change:  2009 Aug 19
6 +
" License:      Public domain
7 +
"               (but let me know if you like :) )
8 +
"
9 +
" Note: This file just adds the new tags from HTML 5
10 +
"       and don't replace default html.vim syntax file
11 +
"
12 +
" Modified:     othree <othree@gmail.com>
13 +
" Changes:      update to Draft 28 August 2010
14 +
"               add complete new attributes
15 +
"               add microdata attributes
16 +
17 +
" HTML 5 tags
18 +
syn keyword htmlTagName contained article aside audio canvas command
19 +
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
20 +
syn keyword htmlTagName contained header hgroup keygen mark meter menu nav output
21 +
syn keyword htmlTagName contained progress time ruby rt rp section source summary time track video wbr
22 +
23 +
" HTML 5 arguments
24 +
" Core Attributes
25 +
syn keyword htmlArg contained accesskey class contenteditable contextmenu dir 
26 +
syn keyword htmlArg contained draggable hidden id lang spellcheck style tabindex title
27 +
" Event-handler Attributes
28 +
syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange 
29 +
syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover 
30 +
syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange 
31 +
syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata 
32 +
syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
33 +
syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange 
34 +
syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate 
35 +
syn keyword htmlArg contained onvolumechange onwaiting
36 +
" XML Attributes
37 +
syn keyword htmlArg contained xml:lang xml:space xml:base
38 +
" new features
39 +
" <body>
40 +
syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload 
41 +
syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
42 +
" <video>, <audio>, <source>, <track>
43 +
syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track
44 +
" <form>, <input>, <button>
45 +
syn keyword htmlArg contained form autocomplete autofocus list min max step
46 +
syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
47 +
" <command>, <details>, <time>
48 +
syn keyword htmlArg contained label icon open datetime pubdate
49 +
50 +
" Custom Data Attributes
51 +
" http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data
52 +
syn match   htmlArg "\<\(data(\-[a-z]\+)\+\)=" contained
53 +
54 +
" Microdata
55 +
" http://dev.w3.org/html5/md/
56 +
syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref