From 8b5607d0f703f3350e1dddb9940505b535eb72ab Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 13 Sep 2013 17:30:58 +0200 Subject: Add html5 support --- autoload/htmlcomplete.vim | 861 ++++++++++++++++++++++++++++++++++++++++++++++ autoload/xml/aria.vim | 232 +++++++++++++ autoload/xml/html5.vim | 803 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1896 insertions(+) create mode 100644 autoload/htmlcomplete.vim create mode 100644 autoload/xml/aria.vim create mode 100644 autoload/xml/html5.vim (limited to 'autoload') diff --git a/autoload/htmlcomplete.vim b/autoload/htmlcomplete.vim new file mode 100644 index 00000000..6da9be24 --- /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