Skip to content
Browse files

add html5 syntax support for vim

  • Loading branch information...
1 parent 9675b52 commit 750763eb67bcdeafc067d6c7c0c623d4fdb8de38 @molawson committed Nov 1, 2012
Showing with 56 additions and 0 deletions.
  1. +56 −0 vim/syntax/html.vim
56 vim/syntax/html.vim
@@ -0,0 +1,56 @@
+" Vim syntax file
+" Language: HTML (version 5)
+" Maintainer: Rodrigo Machado <>
+" URL:
+" 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 28 August 2010
+" add complete new attributes
+" add microdata attributes
+" 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 mark meter menu nav output
+syn keyword htmlTagName contained progress time ruby rt rp section source summary time track video wbr
+" HTML 5 arguments
+" Core Attributes
+syn keyword htmlArg contained accesskey class contenteditable contextmenu dir
+syn keyword htmlArg contained draggable hidden id lang spellcheck style tabindex title
+" 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
+" new features
+" <body>
+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
+" <video>, <audio>, <source>, <track>
+syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track
+" <form>, <input>, <button>
+syn keyword htmlArg contained form autocomplete autofocus list min max step
+syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
+" <command>, <details>, <time>
+syn keyword htmlArg contained label icon open datetime pubdate
+" Custom Data Attributes
+syn match htmlArg "\<\(data(\-[a-z]\+)\+\)=" contained
+" Microdata
+syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref

0 comments on commit 750763e

Please sign in to comment.
Something went wrong with that request. Please try again.