Skip to content

Instantly share code, notes, and snippets.

@gf3
Forked from rcmachado/html5.vim
Created May 5, 2010 15:27
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save gf3/390929 to your computer and use it in GitHub Desktop.
Save gf3/390929 to your computer and use it in GitHub Desktop.
vim HTML5 Syntax File
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://rm.blog.br/vim/syntax/html.vim
" Last Change: 2009 Aug 19
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
" HTML 5 tags
syn keyword htmlTagName contained article aside audio bb canvas command datagrid
syn keyword htmlTagName contained datalist details dialog embed figure footer
syn keyword htmlTagName contained header hgroup keygen mark meter nav output
syn keyword htmlTagName contained progress time ruby rt rp section time video
" HTML 5 arguments
syn keyword htmlArg contained autofocus placeholder min max step
syn keyword htmlArg contained contenteditable contextmenu draggable hidden item
syn keyword htmlArg contained itemprop list subject spellcheck
" this doesn't work because default syntax file alredy define a 'data' attribute
syn match htmlArg "\<\(data-[\-a-zA-Z0-9_]\+\)=" contained
@mjtamlyn
Copy link

Thanks! Works very nicely as .vim/after/syntax/html.vim

Copy link

ghost commented Jan 24, 2013

Thanks for this job. It helps me a lot!

@franck-eyraud
Copy link

Thank you, it has been helpful also for me !

@wamoyo
Copy link

wamoyo commented Mar 22, 2013

You Rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment