Browse files

Initial import

  • Loading branch information...
0 parents commit 36b240f2437062b922a3de20294089662db4a5bb @cfcosta committed Nov 23, 2010
Showing with 88 additions and 0 deletions.
  1. +5 −0
  2. +41 −0 after/indent/html.vim
  3. +42 −0 after/syntax/html.vim
@@ -0,0 +1,5 @@
+# HTMl5-vim-minimal
+A minimal alternative to support HTML5 on vim. Unlike other alternative, it tries to do the least copypasta it can of your system syntax files, and don't create a new filetype.
+Based on the html5 syntax work by Rodrigo Machado <> and othree <>.
@@ -0,0 +1,41 @@
+" HTML5 Indentation Rules
+fun! <SID>HtmlIndentPush(tag)
+ if exists('g:html_indent_tags')
+ let g:html_indent_tags = g:html_indent_tags.'\|'.a:tag
+ else
+ let g:html_indent_tags = a:tag
+ endif
+call <SID>HtmlIndentPush('article')
+call <SID>HtmlIndentPush('aside')
+call <SID>HtmlIndentPush('audio')
+call <SID>HtmlIndentPush('canvas')
+call <SID>HtmlIndentPush('command')
+call <SID>HtmlIndentPush('datalist')
+call <SID>HtmlIndentPush('details')
+call <SID>HtmlIndentPush('dialog')
+call <SID>HtmlIndentPush('embed')
+call <SID>HtmlIndentPush('figcaption')
+call <SID>HtmlIndentPush('figure')
+call <SID>HtmlIndentPush('footer')
+call <SID>HtmlIndentPush('header')
+call <SID>HtmlIndentPush('hgroup')
+call <SID>HtmlIndentPush('keygen')
+call <SID>HtmlIndentPush('mark')
+call <SID>HtmlIndentPush('meter')
+call <SID>HtmlIndentPush('menu')
+call <SID>HtmlIndentPush('nav')
+call <SID>HtmlIndentPush('output')
+call <SID>HtmlIndentPush('progress')
+call <SID>HtmlIndentPush('time')
+call <SID>HtmlIndentPush('ruby')
+call <SID>HtmlIndentPush('rt')
+call <SID>HtmlIndentPush('rp')
+call <SID>HtmlIndentPush('section')
+call <SID>HtmlIndentPush('source')
+call <SID>HtmlIndentPush('summary')
+call <SID>HtmlIndentPush('time')
+call <SID>HtmlIndentPush('track')
+call <SID>HtmlIndentPush('video')
+call <SID>HtmlIndentPush('wbr')
@@ -0,0 +1,42 @@
+" Loading HTML5 Syntax
+" 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 36b240f

Please sign in to comment.