Browse Source

Replace html5-vim code with submodule

Alois Mahdal 7 years ago
parent
commit
268da48c5b

+ 3
- 0
.gitmodules View File

@@ -34,3 +34,6 @@
34 34
 [submodule "dotfiles/vim/bundle/vim-gitgutter"]
35 35
 	path = dotfiles/vim/bundle/vim-gitgutter
36 36
 	url = git://github.com/airblade/vim-gitgutter.git
37
+[submodule "dotfiles/vim/bundle/html5.vim"]
38
+	path = dotfiles/vim/bundle/html5.vim
39
+	url = https://github.com/othree/html5.vim

+ 1
- 0
dotfiles/vim/bundle/html5.vim

@@ -0,0 +1 @@
1
+Subproject commit fc64e3d0de438a02dcfbe9d6fc7d73dbf721ce21

+ 0
- 4
dotfiles/vim/bundle/html5.vim/.gitignore View File

@@ -1,4 +0,0 @@
1
-install.log
2
-.record
3
-.mkrecord
4
-*.vba

+ 0
- 28
dotfiles/vim/bundle/html5.vim/CHANGES.markdown View File

@@ -1,28 +0,0 @@
1
-# html5.vim
2
-
3
-## Change Log
4
-
5
-### Version 0.27
6
-
7
-- Added inline SVG
8
-
9
-### Version 0.26
10
-
11
-- Support multi-value attributes (Most of them are WAI-ARIA attributes)
12
-- Some old complete function bug fix
13
-
14
-### Version 0.25
15
-
16
-- WAI-ARIA support bug fix
17
-- WAI-ARIA complete supports all doctypes now
18
-
19
-### Version 0.2
20
-
21
-- attributes now must match from beginning
22
-- fix some attr(\w*on\w*) will use jscomplete for their value
23
-- add vim-makefile
24
-
25
-### Version 0.1
26
-
27
-- First Version
28
-- Add html5 dictionary file and doctype support

+ 0
- 364
dotfiles/vim/bundle/html5.vim/Makefile View File

@@ -1,364 +0,0 @@
1
-# vim:filetype=make:foldmethod=marker:fdl=0:
2
-#
3
-# Makefile: install/uninstall/link vim plugin files.
4
-# Author: Cornelius <cornelius.howl@gmail.com>
5
-# Date:   一  3/15 22:49:26 2010
6
-# Version:  1.0
7
-#
8
-# PLEASE DO NOT EDIT THIS FILE. THIS FILE IS AUTO-GENERATED FROM Makefile.tpl
9
-# LICENSE {{{
10
-# Copyright (c) 2010 <Cornelius (c9s)>
11
-#
12
-# Permission is hereby granted, free of charge, to any person
13
-# obtaining a copy of this software and associated documentation
14
-# files (the "Software"), to deal in the Software without
15
-# restriction, including without limitation the rights to use,
16
-# copy, modify, merge, publish, distribute, sublicense, and/or sell
17
-# copies of the Software, and to permit persons to whom the
18
-# Software is furnished to do so, subject to the following
19
-# conditions:
20
-#
21
-# The above copyright notice and this permission notice shall be
22
-# included in all copies or substantial portions of the Software.
23
-#
24
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
26
-# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
28
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
29
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
31
-# OTHER DEALINGS IN THE SOFTWARE.
32
-# }}}
33
-# VIM RECORD FORMAT: {{{
34
-# {
35
-#           version => 0.2,    # record spec version
36
-#           generated_by => 'Vimana-' . $Vimana::VERSION,
37
-#           install_type => 'auto',    # auto , make , rake ... etc
38
-#           package => $self->package_name,
39
-#           files => \@e,
40
-# }
41
-# }}}
42
-
43
-# INTERNAL VARIABLES {{{
44
-
45
-RECORD_FILE=.record
46
-PWD=`pwd`
47
-README_FILES=`ls -1 | grep -i readme`
48
-WGET_OPT=-c -nv
49
-CURL_OPT=
50
-RECORD_SCRIPT=.mkrecord
51
-TAR=tar czvf
52
-
53
-GIT_SOURCES=
54
-
55
-# INTERNAL FUNCTIONS {{{
56
-record_file = \
57
-		PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\
58
-		echo $(VIMRUNTIME)/$$PTYPE/$(1) >> $(2)
59
-
60
-# }}}
61
-
62
-# PUBLIC FUNCTIONS {{{
63
-
64
-GIT_SOURCES=
65
-DEPEND_DIR=/tmp/vim-deps
66
-
67
-# Usage:
68
-#
69
-# 		$(call install_git_sources)
70
-#
71
-
72
-install_git_source = \
73
-		PWD=$(PWD) ; \
74
-		mkdir -p $(DEPEND_DIR) ; \
75
-		cd $(DEPEND_DIR) ; \
76
-		for git_uri in $(GIT_SOURCES) ; do \
77
-			OUTDIR=$$(echo $$git_uri | perl -pe 's{^.*/}{}') ;\
78
-			echo $$OUTDIR ; \
79
-			if [[ -e $$OUTDIR ]] ; then \
80
-				cd $$OUTDIR ; \
81
-				git pull origin master && \
82
-				make install && cd .. ; \
83
-			else \
84
-				git clone $$git_uri $$OUTDIR && \
85
-				cd $$OUTDIR && \
86
-				make install && cd .. ; \
87
-			fi; \
88
-		done ;
89
-
90
-
91
-
92
-
93
-# install file by inspecting content
94
-install_file = \
95
-		PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\
96
-		cp -v $(1) $(VIMRUNTIME)/$$PTYPE/$(1)
97
-
98
-link_file = \
99
-		PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\
100
-		cp -v $(1) $(VIMRUNTIME)/$$PTYPE/$(1)
101
-
102
-unlink_file = \
103
-		PTYPE=`cat $(1) | perl -nle 'print $$1 if /^"\s*script\s*type:\s*(\S*)$$/i'` ;\
104
-		rm -fv $(VIMRUNTIME)/$$PTYPE/$(1)
105
-
106
-# fetch script from an url
107
-fetch_url = \
108
-		@if [[ -e $(2) ]] ; then 				\
109
-			exit								\
110
-		; fi	 							    \
111
-		; echo " => $(2)"						\
112
-		; if [[ ! -z `which curl` ]] ; then   \
113
-			curl $(CURL_OPT) $(1) -o $(2) ;					\
114
-		; elif [[ ! -z `which wget` ]] ; then 	\
115
-			wget $(WGET_OPT) $(1) -O $(2)  				    \
116
-		; fi  									\
117
-		; echo $(2) >> .bundlefiles
118
-
119
-
120
-install_source = \
121
-		for git_uri in $(GIT_SOURCES) ; do \
122
-			OUTDIR=$$(echo $$git_uri | perl -pe 's{^.*/}{}') ;\
123
-			echo $$OUTDIR ; \
124
-		done
125
-
126
-# fetch script from github
127
-fetch_github = \
128
-		@if [[ -e $(5) ]] ; then 				\
129
-			exit								\
130
-		; fi	 							    \
131
-		; echo " => $(5)"						\
132
-		; if [[ ! -z `which curl` ]] ; then                        	    \
133
-			curl $(CURL_OPT) http://github.com/$(1)/$(2)/raw/$(3)/$(4) -o $(5)      \
134
-		; elif [[ ! -z `which wget` ]] ; then                               \
135
-			wget $(WGET_OPT) http://github.com/$(1)/$(2)/raw/$(3)/$(4) -O $(5)  \
136
-		; fi									\
137
-		; echo $(5) >> .bundlefiles
138
-
139
-# fetch script from local file
140
-fetch_local = @cp -v $(1) $(2) \
141
-		; @echo $(2) >> .bundlefiles
142
-
143
-# 1: NAME , 2: URI
144
-dep_from_git = \
145
-		D=/tmp/$(1)-$$RANDOM ; git clone $(2) $$D ; cd $$D ; make install ; 
146
-
147
-dep_from_svn = \
148
-		D=/tmp/$(1)-$$RANDOM ; svn checkout $(2) $$D ; cd $$D ; make install ;
149
-
150
-# }}}
151
-# }}}
152
-# ======= DEFAULT CONFIG ======= {{{
153
-
154
-# Default plugin name
155
-NAME=`basename \`pwd\``
156
-VERSION=0.1
157
-
158
-# Files to add to tarball:
159
-DIRS=`ls -1F | grep / | sed -e 's/\///'`
160
-
161
-# Runtime path to install:
162
-VIMRUNTIME=~/.vim
163
-
164
-# Other Files to be added:
165
-FILES=`ls -1 | grep '.vim$$'`
166
-MKFILES=Makefile `ls -1 | grep '.mk$$'`
167
-
168
-# ======== USER CONFIG ======= {{{
169
-#   please write config in config.mk
170
-#   this will override default config
171
-#
172
-# Custom Name:
173
-#
174
-# 	NAME=[plugin name]
175
-#
176
-# Custom dir list:
177
-#
178
-# 	DIRS=autoload after doc syntax plugin 
179
-#
180
-# Files to add to tarball:
181
-#
182
-# 	FILES=
183
-# 
184
-# Bundle dependent scripts:
185
-#
186
-# 	bundle-deps:
187
-# 	  $(call fetch_github,[account id],[project],[branch],[source path],[target path])
188
-# 	  $(call fetch_url,[file url],[target path])
189
-# 	  $(call fetch_local,[from],[to])
190
-
191
-SHELL=bash
192
-
193
-CONFIG_FILE=config.mk
194
--include ~/.vimauthor.mk
195
--include $(CONFIG_FILE)
196
-
197
-# }}}
198
-# }}}
199
-# ======= SECTIONS ======= {{{
200
--include ext.mk
201
-
202
-all: install-deps install
203
-
204
-install-deps:
205
-	# check required binaries
206
-	[[ -n $$(which git) ]]
207
-	[[ -n $$(which bash) ]]
208
-	[[ -n $$(which vim) ]]
209
-	[[ -n $$(which wget) || -n $$(which curl) ]]
210
-	$(call install_git_sources)
211
-
212
-check-require:
213
-	@if [[ -n `which wget` || -n `which curl` || -n `which fetch` ]]; then echo "wget|curl|fetch: OK" ; else echo "wget|curl|fetch: NOT OK" ; fi
214
-	@if [[ -n `which vim` ]] ; then echo "vim: OK" ; else echo "vim: NOT OK" ; fi
215
-
216
-config:
217
-	@rm -f $(CONFIG_FILE)
218
-	@echo "NAME="                                                                                      >> $(CONFIG_FILE)
219
-	@echo "VERSION="                                                                                           >> $(CONFIG_FILE)
220
-	@echo "#DIRS="
221
-	@echo "#FILES="
222
-	@echo ""                                                                                           >> $(CONFIG_FILE)
223
-	@echo "bundle-deps:"                                                                               >> $(CONFIG_FILE)
224
-	@echo "\t\t\$$(call fetch_github,ID,REPOSITORY,BRANCH,PATH,TARGET_PATH)" >> $(CONFIG_FILE)
225
-	@echo "\t\t\$$(call fetch_url,FILE_URL,TARGET_PATH)"                                           >> $(CONFIG_FILE)
226
-
227
-
228
-init-author:
229
-	@echo "AUTHOR=" > ~/.vimauthor.mk
230
-
231
-bundle-deps:
232
-
233
-bundle: bundle-deps
234
-
235
-dist: bundle mkfilelist
236
-	@$(TAR) $(NAME)-$(VERSION).tar.gz --exclude '*.svn' --exclude '.git' $(DIRS) $(README_FILES) $(FILES) $(MKFILES)
237
-	@echo "$(NAME)-$(VERSION).tar.gz is ready."
238
-
239
-init-runtime:
240
-	@mkdir -vp $(VIMRUNTIME)
241
-	@mkdir -vp $(VIMRUNTIME)/record
242
-	@if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type d | while read dir ;  do \
243
-			mkdir -vp $(VIMRUNTIME)/$$dir ; done ; fi
244
-
245
-release:
246
-	if [[ -n `which vimup` ]] ; then \
247
-	fi
248
-
249
-pure-install:
250
-	@echo "Using Shell:" $(SHELL) 
251
-	@echo "Installing"
252
-	@if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \
253
-			cp -v $$file $(VIMRUNTIME)/$$file ; done ; fi
254
-	@echo "$(FILES)" | while read vimfile ; do \
255
-		if [[ -n $$vimfile ]] ; then \
256
-			$(call install_file,$$vimfile) ; fi ; done
257
-
258
-install: init-runtime bundle pure-install record
259
-
260
-
261
-uninstall-files:
262
-	@echo "Uninstalling"
263
-	@if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \
264
-			rm -fv $(VIMRUNTIME)/$$file ; done ; fi
265
-	@echo "$(FILES)" | while read vimfile ; do \
266
-		if [[ -n $$vimfile ]] ; then \
267
-			$(call unlink_file,$$vimfile) ; fi ; done
268
-
269
-uninstall: uninstall-files rmrecord
270
-
271
-link: init-runtime
272
-	@echo "Linking"
273
-	@if [[ -n "$(DIRS)" ]]; then find $(DIRS) -type f | while read file ; do \
274
-			ln -sfv $(PWD)/$$file $(VIMRUNTIME)/$$file ; done ; fi
275
-	@echo "$(FILES)" | while read vimfile ; do \
276
-		if [[ -n $$vimfile ]] ; then \
277
-			$(call link_file,$$vimfile) ; fi ; done
278
-
279
-mkfilelist:
280
-	@echo $(NAME) > $(RECORD_FILE)
281
-	@echo $(VERSION) >> $(RECORD_FILE)
282
-	@if [[ -n "$(DIRS)" ]] ; then find $(DIRS) -type f | while read file ; do \
283
-			echo $(VIMRUNTIME)/$$file >> $(RECORD_FILE) ; done ; fi
284
-	@echo "$(FILES)" | while read vimfile ; do \
285
-		if [[ -n $$vimfile ]] ; then \
286
-			$(call record_file,$$vimfile,$(RECORD_FILE)) ; fi ; done
287
-
288
-vimball-edit:
289
-	find $(DIRS) -type f > .tmp_list
290
-	vim .tmp_list
291
-	vim .tmp_list -c ":%MkVimball $(NAME)-$(VERSION) ." -c "q"
292
-	@rm -vf .tmp_list
293
-	@echo "$(NAME)-$(VERSION).vba is ready."
294
-
295
-vimball:
296
-	find $(DIRS) -type f > .tmp_list
297
-	vim .tmp_list -c ":%MkVimball $(NAME)-$(VERSION) ." -c "q"
298
-	@rm -vf .tmp_list
299
-	@echo "$(NAME)-$(VERSION).vba is ready."
300
-
301
-mkrecordscript:
302
-		@echo ""  >  $(RECORD_SCRIPT)
303
-		@echo "fun! s:mkmd5(file)"  >> $(RECORD_SCRIPT)
304
-		@echo "  if executable('md5')"  >> $(RECORD_SCRIPT)
305
-		@echo "    return system('cat ' . a:file . ' | md5')"  >> $(RECORD_SCRIPT)
306
-		@echo "  else"  >> $(RECORD_SCRIPT)
307
-		@echo "    return \"\""  >> $(RECORD_SCRIPT)
308
-		@echo "  endif"  >> $(RECORD_SCRIPT)
309
-		@echo "endf"  >> $(RECORD_SCRIPT)
310
-		@echo "let files = readfile('.record')"  >> $(RECORD_SCRIPT)
311
-		@echo "let package_name = remove(files,0)"  >> $(RECORD_SCRIPT)
312
-		@echo "let script_version      = remove(files,0)"  >> $(RECORD_SCRIPT)
313
-		@echo "let record = { 'version' : 0.3 , 'generated_by': 'Vim-Makefile' , 'script_version': script_version , 'install_type' : 'makefile' , 'package' : package_name , 'files': [  ] }"  >> $(RECORD_SCRIPT)
314
-		@echo "for file in files "  >> $(RECORD_SCRIPT)
315
-		@echo "  let md5 = s:mkmd5(file)"  >> $(RECORD_SCRIPT)
316
-		@echo "  cal add( record.files , {  'checksum': md5 , 'file': file  } )"  >> $(RECORD_SCRIPT)
317
-		@echo "endfor"  >> $(RECORD_SCRIPT)
318
-		@echo "redir => output"  >> $(RECORD_SCRIPT)
319
-		@echo "silent echon record"  >> $(RECORD_SCRIPT)
320
-		@echo "redir END"  >> $(RECORD_SCRIPT)
321
-		@echo "let content = join(split(output,\"\\\\n\"),'')"  >> $(RECORD_SCRIPT)
322
-		@echo "let record_file = expand('~/.vim/record/' . package_name )"  >> $(RECORD_SCRIPT)
323
-		@echo "cal writefile( [content] , record_file )"  >> $(RECORD_SCRIPT)
324
-		@echo "cal delete('.record')"  >> $(RECORD_SCRIPT)
325
-		@echo "echo \"Done\""  >> $(RECORD_SCRIPT)
326
-
327
-
328
-record: mkfilelist mkrecordscript
329
-	vim --noplugin -V10install.log -c "so $(RECORD_SCRIPT)" -c "q"
330
-	@echo "Vim script record making log: install.log"
331
-#	@rm -vf $(RECORD_FILE)
332
-
333
-rmrecord:
334
-	@echo "Removing Record"
335
-	@rm -vf $(VIMRUNTIME)/record/$(NAME)
336
-
337
-clean: clean-bundle-deps
338
-	@rm -vf $(RECORD_FILE)
339
-	@rm -vf $(RECORD_SCRIPT)
340
-	@rm -vf install.log
341
-	@rm -vf *.tar.gz
342
-
343
-clean-bundle-deps:
344
-	@echo "Removing Bundled scripts..."
345
-	@if [[ -e .bundlefiles ]] ; then \
346
-		rm -fv `echo \`cat .bundlefiles\``; \
347
-	fi
348
-	@rm -fv .bundlefiles
349
-
350
-update:
351
-	@echo "Updating Makefile..."
352
-	@URL=http://github.com/c9s/vim-makefile/raw/master/Makefile ; \
353
-	if [[ -n `which curl` ]]; then \
354
-		curl $$URL -o Makefile ; \
355
-	if [[ -n `which wget` ]]; then \
356
-		wget -c $$URL ; \
357
-	elif [[ -n `which fetch` ]]; then \
358
-		fetch $$URL ; \
359
-	fi
360
-
361
-version:
362
-	@echo version - $(MAKEFILE_VERSION)
363
-
364
-# }}}

+ 0
- 95
dotfiles/vim/bundle/html5.vim/README.md View File

@@ -1,95 +0,0 @@
1
-# html5.vim
2
-
3
-HTML5 + inline SVG omnicomplete funtion, indent and syntax for Vim.
4
-Based on the default htmlcomplete.vim.
5
-
6
-## Feature
7
-
8
-- Support all new elements and attribute.
9
-- Support all SVG elements
10
-- Support [microdata][microdata].
11
-- Support [RDFa][RDFa].
12
-- Support [WAI-ARIA][aria].
13
-
14
-## Install
15
-
16
-Use [Vundle][] or [pathogen.vim][] is recommended.
17
-
18
-[Vundle]:https://github.com/gmarik/vundle
19
-[pathogen.vim]:https://github.com/tpope/vim-pathogen
20
-
21
-## Configure
22
-
23
-Disable event-handler attributes support:
24
-
25
-    let g:html5_event_handler_attributes_complete = 0
26
-
27
-Disable RDFa attributes support:
28
-
29
-    let g:html5_rdfa_attributes_complete = 0
30
-
31
-Disable microdata attributes support:
32
-
33
-    let g:html5_microdata_attributes_complete = 0
34
-
35
-Disable WAI-ARIA attribute support:
36
-
37
-    let g:html5_aria_attributes_complete = 0
38
-
39
-## Change Log
40
-
41
-### Version 0.27
42
-
43
-- Support inline SVG
44
-
45
-## License
46
-
47
-Copyright (c) 2010-2013 Wei-Ko Kao, 2012 HT de Beer
48
-
49
-Permission is hereby granted, free of charge, to any person obtaining a copy
50
-of this software and associated documentation files (the "Software"), to deal
51
-in the Software without restriction, including without limitation the rights
52
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53
-copies of the Software, and to permit persons to whom the Software is
54
-furnished to do so, subject to the following conditions:
55
-
56
-The above copyright notice and this permission notice shall be included in
57
-all copies or substantial portions of the Software.
58
-
59
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
65
-THE SOFTWARE.
66
-
67
-## References
68
- 
69
-1. [HTML5 Spec][1]
70
-2. [HTML5 Markup][2]
71
-3. [Custom Data Attributes][3]
72
-4. [microdata][4]
73
-5. [RDFa 1.0 Rec][5]
74
-6. [RDFa 1.1 Core WD][6]
75
-7. [WAI-ARIA][7]
76
-8. [IANA Language Sub Tags][8]
77
-9. [IANA Charset][9]
78
-10. [SVG Spec][10]
79
-
80
-[html5.vim]:http://www.vim.org/scripts/script.php?script_id=3236
81
-
82
-[microdata]:http://dev.w3.org/html5/md/
83
-[RDFa]:http://www.w3.org/TR/rdfa-syntax/
84
-[aria]:http://www.w3.org/TR/wai-aria/
85
-
86
-[1]:http://dev.w3.org/html5/spec/
87
-[2]:http://dev.w3.org/html5/markup/
88
-[3]:http://dev.w3.org/html5/spec/Overview.html#custom-data-attribute
89
-[4]:http://dev.w3.org/html5/md/
90
-[5]:http://www.w3.org/TR/rdfa-syntax/#a_xhtmlrdfa_dtd
91
-[6]:http://www.w3.org/TR/rdfa-core/
92
-[7]:http://www.w3.org/TR/wai-aria/
93
-[8]:http://www.iana.org/assignments/language-subtag-registry
94
-[9]:http://www.iana.org/assignments/character-sets 
95
-[10]:http://www.w3.org/TR/SVG/

+ 0
- 861
dotfiles/vim/bundle/html5.vim/autoload/htmlcomplete.vim View File

@@ -1,861 +0,0 @@
1
-" Vim completion script
2
-" Language:	HTML and XHTML
3
-" Maintainer:	Mikolaj Machowski ( mikmach AT wp DOT pl )
4
-" Last Change:	2006 Oct 19
5
-" Modified:     othree <othree@gmail.com>
6
-" Changes:      Add HTML5, WAI-ARIA support
7
-" Last Change:	2010 Sep 25
8
-
9
-if !exists('g:aria_attributes_complete')
10
-    let g:aria_attributes_complete = 1
11
-endif
12
-
13
-function! htmlcomplete#CompleteTags(findstart, base)
14
-  if a:findstart
15
-    " locate the start of the word
16
-    let line = getline('.')
17
-    let start = col('.') - 1
18
-	let curline = line('.')
19
-	let compl_begin = col('.') - 2
20
-    while start >= 0 && line[start - 1] =~ '\(\k\|[!:.-]\)'
21
-		let start -= 1
22
-    endwhile
23
-	" Handling of entities {{{
24
-	if start >= 0 && line[start - 1] =~ '&'
25
-		let b:entitiescompl = 1
26
-		let b:compl_context = ''
27
-		return start
28
-	endif
29
-	" }}}
30
-	" Handling of <style> tag {{{
31
-	let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
32
-	let styleend   = searchpair('<style\>', '', '<\/style\>', "nW")
33
-	if stylestart != 0 && styleend != 0
34
-		if stylestart <= curline && styleend >= curline
35
-			let start = col('.') - 1
36
-			let b:csscompl = 1
37
-			while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
38
-				let start -= 1
39
-			endwhile
40
-		endif
41
-	endif
42
-	" }}}
43
-	" Handling of <script> tag {{{
44
-	let scriptstart = searchpair('<script\>', '', '<\/script\>', "bnW")
45
-	let scriptend   = searchpair('<script\>', '', '<\/script\>', "nW")
46
-	if scriptstart != 0 && scriptend != 0
47
-		if scriptstart <= curline && scriptend >= curline
48
-			let start = col('.') - 1
49
-			let b:jscompl = 1
50
-			let b:jsrange = [scriptstart, scriptend]
51
-			while start >= 0 && line[start - 1] =~ '\k'
52
-				let start -= 1
53
-			endwhile
54
-			" We are inside of <script> tag. But we should also get contents
55
-			" of all linked external files and (secondary, less probably) other <script> tags
56
-			" This logic could possible be done in separate function - may be
57
-			" reused in events scripting (also with option could be reused for
58
-			" CSS
59
-			let b:js_extfiles = []
60
-			let l = line('.')
61
-			let c = col('.')
62
-			call cursor(1,1)
63
-			while search('<\@<=script\>', 'W') && line('.') <= l
64
-				if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
65
-					let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
66
-					if filereadable(sname)
67
-						let b:js_extfiles += readfile(sname)
68
-					endif
69
-				endif
70
-			endwhile
71
-			call cursor(1,1)
72
-			let js_scripttags = []
73
-			while search('<script\>', 'W') && line('.') < l
74
-				if matchstr(getline('.'), '<script[^>]*src') == ''
75
-					let js_scripttag = getline(line('.'), search('</script>', 'W'))
76
-					let js_scripttags += js_scripttag
77
-				endif
78
-			endwhile
79
-			let b:js_extfiles += js_scripttags
80
-			call cursor(l,c)
81
-			unlet! l c
82
-		endif
83
-	endif
84
-	" }}}
85
-	if !exists("b:csscompl") && !exists("b:jscompl")
86
-		let b:compl_context = getline('.')[0:(compl_begin)]
87
-		if b:compl_context !~ '<[^>]*$'
88
-			" Look like we may have broken tag. Check previous lines.
89
-			let i = 1
90
-			while 1
91
-				let context_line = getline(curline-i)
92
-				if context_line =~ '<[^>]*$'
93
-					" Yep, this is this line
94
-					let context_lines = getline(curline-i, curline-1) + [b:compl_context]
95
-					let b:compl_context = join(context_lines, ' ')
96
-					break
97
-				elseif context_line =~ '>[^<]*$' || i == curline
98
-					" We are in normal tag line, no need for completion at all
99
-					" OR reached first line without tag at all
100
-					let b:compl_context = ''
101
-					break
102
-				endif
103
-				let i += 1
104
-			endwhile
105
-			" Make sure we don't have counter
106
-			unlet! i
107
-		endif
108
-		let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
109
-
110
-		" Return proper start for on-events. Without that beginning of
111
-		" completion will be badly reported
112
-		if b:compl_context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
113
-			let start = col('.') - 1
114
-			while start >= 0 && line[start - 1] =~ '\k'
115
-				let start -= 1
116
-			endwhile
117
-		endif
118
-		" If b:compl_context begins with <? we are inside of PHP code. It
119
-		" wasn't closed so PHP completion passed it to HTML
120
-		if &filetype =~? 'php' && b:compl_context =~ '^<?'
121
-			let b:phpcompl = 1
122
-			let start = col('.') - 1
123
-			while start >= 0 && line[start - 1] =~ '[a-zA-Z_0-9\x7f-\xff$]'
124
-				let start -= 1
125
-			endwhile
126
-		endif
127
-	else
128
-		let b:compl_context = getline('.')[0:compl_begin]
129
-	endif
130
-    return start
131
-  else
132
-	" Initialize base return lists
133
-    let res = []
134
-    let res2 = []
135
-	" a:base is very short - we need context
136
-	let context = b:compl_context
137
-	" Check if we should do CSS completion inside of <style> tag
138
-	" or JS completion inside of <script> tag or PHP completion in case of <?
139
-	" tag AND &ft==php
140
-	if exists("b:csscompl")
141
-		unlet! b:csscompl
142
-		let context = b:compl_context
143
-		unlet! b:compl_context
144
-		return csscomplete#CompleteCSS(0, context)
145
-	elseif exists("b:jscompl")
146
-		unlet! b:jscompl
147
-		return javascriptcomplete#CompleteJS(0, a:base)
148
-	elseif exists("b:phpcompl")
149
-		unlet! b:phpcompl
150
-		let context = b:compl_context
151
-		return phpcomplete#CompletePHP(0, a:base)
152
-	else
153
-		if len(b:compl_context) == 0 && !exists("b:entitiescompl")
154
-			return []
155
-		endif
156
-		let context = matchstr(b:compl_context, '.\zs.*')
157
-	endif
158
-	unlet! b:compl_context
159
-	" Entities completion {{{
160
-	if exists("b:entitiescompl")
161
-		unlet! b:entitiescompl
162
-
163
-		if !exists("b:html_doctype")
164
-			call htmlcomplete#CheckDoctype()
165
-		endif
166
-		if !exists("b:html_omni")
167
-			"runtime! autoload/xml/xhtml10s.vim
168
-			call htmlcomplete#LoadData()
169
-		endif
170
-        if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
171
-            call htmlcomplete#LoadAria()
172
-        endif
173
-
174
-	    let entities =  b:html_omni['vimxmlentities']
175
-
176
-		if len(a:base) == 1
177
-			for m in entities
178
-				if m =~ '^'.a:base
179
-					call add(res, m.';')
180
-				endif
181
-			endfor
182
-			return res
183
-		else
184
-			for m in entities
185
-				if m =~? '^'.a:base
186
-					call add(res, m.';')
187
-				elseif m =~? a:base
188
-					call add(res2, m.';')
189
-				endif
190
-			endfor
191
-
192
-			return res + res2
193
-		endif
194
-
195
-
196
-	endif
197
-	" }}}
198
-	if context =~ '>'
199
-		" Generally if context contains > it means we are outside of tag and
200
-		" should abandon action - with one exception: <style> span { bo
201
-		if context =~ 'style[^>]\{-}>[^<]\{-}$'
202
-			return csscomplete#CompleteCSS(0, context)
203
-		elseif context =~ 'script[^>]\{-}>[^<]\{-}$'
204
-			let b:jsrange = [line('.'), search('<\/script\>', 'nW')]
205
-			return javascriptcomplete#CompleteJS(0, context)
206
-		else
207
-			return []
208
-		endif
209
-	endif
210
-
211
-	" If context contains > it means we are already outside of tag and we
212
-	" should abandon action
213
-	" If context contains white space it is attribute.
214
-	" It can be also value of attribute.
215
-	" We have to get first word to offer proper completions
216
-	if context == ''
217
-		let tag = ''
218
-	else
219
-		let tag = split(context)[0]
220
-		" Detect if tag is uppercase to return in proper case,
221
-		" we need to make it lowercase for processing
222
-		if tag =~ '^\u*$'
223
-			let uppercase_tag = 1
224
-			let tag = tolower(tag)
225
-		else
226
-			let uppercase_tag = 0
227
-		endif
228
-	endif
229
-	" Get last word, it should be attr name
230
-	let attr = matchstr(context, '\S\+="[^"]*$')
231
-    if attr == ''
232
-        let attr = matchstr(context, '.*\s\zs.*')
233
-    endif
234
-	" Possible situations where any prediction would be difficult:
235
-	" 1. Events attributes
236
-	if context =~ '\s'
237
-		" Sort out style, class, and on* cases
238
-		if context =~? "\\s\\(on[a-z]+\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
239
-			" Id, class completion {{{
240
-			if context =~? "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
241
-				if context =~? "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
242
-					let search_for = "class"
243
-				elseif context =~? "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
244
-					let search_for = "id"
245
-				endif
246
-				" Handle class name completion
247
-				" 1. Find lines of <link stylesheet>
248
-				" 1a. Check file for @import
249
-				" 2. Extract filename(s?) of stylesheet,
250
-				call cursor(1,1)
251
-				let head = getline(search('<head\>'), search('<\/head>'))
252
-				let headjoined = join(copy(head), ' ')
253
-				if headjoined =~ '<style'
254
-					" Remove possibly confusing CSS operators
255
-					let stylehead = substitute(headjoined, '+>\*[,', ' ', 'g')
256
-					if search_for == 'class'
257
-						let styleheadlines = split(stylehead)
258
-						let headclasslines = filter(copy(styleheadlines), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
259
-					else
260
-						let stylesheet = split(headjoined, '[{}]')
261
-						" Get all lines which fit id syntax
262
-						let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
263
-						" Filter out possible color definitions
264
-						call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
265
-						" Filter out complex border definitions
266
-						call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
267
-						let templines = join(classlines, ' ')
268
-						let headclasslines = split(templines)
269
-						call filter(headclasslines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
270
-					endif
271
-					let internal = 1
272
-				else
273
-					let internal = 0
274
-				endif
275
-				let styletable = []
276
-				let secimportfiles = []
277
-				let filestable = filter(copy(head), "v:val =~ '\\(@import\\|link.*stylesheet\\)'")
278
-				for line in filestable
279
-					if line =~ "@import"
280
-						let styletable += [matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")]
281
-					elseif line =~ "<link"
282
-						let styletable += [matchstr(line, "href\\s*=\\s*[\"']\\zs\\f\\+\\ze")]
283
-					endif
284
-				endfor
285
-				for file in styletable
286
-					if filereadable(file)
287
-						let stylesheet = readfile(file)
288
-						let secimport = filter(copy(stylesheet), "v:val =~ '@import'")
289
-						if len(secimport) > 0
290
-							for line in secimport
291
-								let secfile = matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")
292
-								let secfile = fnamemodify(file, ":p:h").'/'.secfile
293
-								let secimportfiles += [secfile]
294
-							endfor
295
-						endif
296
-					endif
297
-				endfor
298
-				let cssfiles = styletable + secimportfiles
299
-				let classes = []
300
-				for file in cssfiles
301
-					if filereadable(file)
302
-						let stylesheet = readfile(file)
303
-						let stylefile = join(stylesheet, ' ')
304
-						let stylefile = substitute(stylefile, '+>\*[,', ' ', 'g')
305
-						if search_for == 'class'
306
-							let stylesheet = split(stylefile)
307
-							let classlines = filter(copy(stylesheet), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
308
-						else
309
-							let stylesheet = split(stylefile, '[{}]')
310
-							" Get all lines which fit id syntax
311
-							let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
312
-							" Filter out possible color definitions
313
-							call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
314
-							" Filter out complex border definitions
315
-							call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
316
-							let templines = join(classlines, ' ')
317
-							let stylelines = split(templines)
318
-							let classlines = filter(stylelines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
319
-
320
-						endif
321
-                        " We gathered classes definitions from all external files
322
-                        let classes += classlines
323
-					endif
324
-				endfor
325
-				if internal == 1
326
-					let classes += headclasslines
327
-				endif
328
-
329
-				if search_for == 'class'
330
-					let elements = {}
331
-					for element in classes
332
-						if element =~ '^\.'
333
-							let class = matchstr(element, '^\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
334
-							let class = substitute(class, ':.*', '', '')
335
-							if has_key(elements, 'common')
336
-								let elements['common'] .= ' '.class
337
-							else
338
-								let elements['common'] = class
339
-							endif
340
-						else
341
-							let class = matchstr(element, '[a-zA-Z1-6]*\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
342
-							let tagname = tolower(matchstr(element, '[a-zA-Z1-6]*\ze.'))
343
-							if tagname != ''
344
-								if has_key(elements, tagname)
345
-									let elements[tagname] .= ' '.class
346
-								else
347
-									let elements[tagname] = class
348
-								endif
349
-							endif
350
-						endif
351
-					endfor
352
-
353
-					if has_key(elements, tag) && has_key(elements, 'common')
354
-						let values = split(elements[tag]." ".elements['common'])
355
-					elseif has_key(elements, tag) && !has_key(elements, 'common')
356
-						let values = split(elements[tag])
357
-					elseif !has_key(elements, tag) && has_key(elements, 'common')
358
-						let values = split(elements['common'])
359
-					else
360
-						return []
361
-					endif
362
-
363
-				elseif search_for == 'id'
364
-					" Find used IDs
365
-					" 1. Catch whole file
366
-					let filelines = getline(1, line('$'))
367
-					" 2. Find lines with possible id
368
-					let used_id_lines = filter(filelines, 'v:val =~ "id\\s*=\\s*[\"''][a-zA-Z0-9_-]\\+"')
369
-					" 3a. Join all filtered lines
370
-					let id_string = join(used_id_lines, ' ')
371
-					" 3b. And split them to be sure each id is in separate item
372
-					let id_list = split(id_string, 'id\s*=\s*')
373
-					" 4. Extract id values
374
-					let used_id = map(id_list, 'matchstr(v:val, "[\"'']\\zs[a-zA-Z0-9_-]\\+\\ze")')
375
-					let joined_used_id = ','.join(used_id, ',').','
376
-
377
-					let allvalues = map(classes, 'matchstr(v:val, ".*#\\zs[a-zA-Z0-9_-]\\+")')
378
-
379
-					let values = []
380
-
381
-					for element in classes
382
-						if joined_used_id !~ ','.element.','
383
-							let values += [element]
384
-						endif
385
-
386
-					endfor
387
-
388
-				endif
389
-
390
-				" We need special version of sbase
391
-				let classbase = matchstr(context, ".*[\"']")
392
-				let classquote = matchstr(classbase, '.$')
393
-
394
-				let entered_class = matchstr(attr, ".*=\\s*[\"']\\zs.*")
395
-
396
-				for m in sort(values)
397
-					if m =~? '^'.entered_class
398
-						call add(res, m . classquote)
399
-					elseif m =~? entered_class
400
-						call add(res2, m . classquote)
401
-					endif
402
-				endfor
403
-
404
-				return res + res2
405
-
406
-			elseif context =~? "style\\s*=\\s*[\"'][^\"']*$"
407
-				return csscomplete#CompleteCSS(0, context)
408
-
409
-			endif
410
-			" }}}
411
-			" Complete on-events {{{
412
-			if context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
413
-				" We have to:
414
-				" 1. Find external files
415
-				let b:js_extfiles = []
416
-				let l = line('.')
417
-				let c = col('.')
418
-				call cursor(1,1)
419
-				while search('<\@<=script\>', 'W') && line('.') <= l
420
-					if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
421
-						let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
422
-						if filereadable(sname)
423
-							let b:js_extfiles += readfile(sname)
424
-						endif
425
-					endif
426
-				endwhile
427
-				" 2. Find at least one <script> tag
428
-				call cursor(1,1)
429
-				let js_scripttags = []
430
-				while search('<script\>', 'W') && line('.') < l
431
-					if matchstr(getline('.'), '<script[^>]*src') == ''
432
-						let js_scripttag = getline(line('.'), search('</script>', 'W'))
433
-						let js_scripttags += js_scripttag
434
-					endif
435
-				endwhile
436
-				let b:js_extfiles += js_scripttags
437
-
438
-				" 3. Proper call for javascriptcomplete#CompleteJS
439
-				call cursor(l,c)
440
-				let js_context = matchstr(a:base, '\k\+$')
441
-				let js_shortcontext = substitute(a:base, js_context.'$', '', '')
442
-				let b:compl_context = context
443
-				let b:jsrange = [l, l]
444
-				unlet! l c
445
-				return javascriptcomplete#CompleteJS(0, js_context)
446
-
447
-			endif
448
-
449
-			" }}}
450
-			let stripbase = matchstr(context, ".*\\(on[a-zA-Z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
451
-			" Now we have context stripped from all chars up to style/class.
452
-			" It may fail with some strange style value combinations.
453
-			if stripbase !~ "[\"']"
454
-				return []
455
-			endif
456
-		endif
457
-		" Value of attribute completion {{{
458
-		" If attr contains =\s*[\"'] we catched value of attribute
459
-		if attr =~ "=\s*[\"']" || attr =~ "=\s*$"
460
-			" Let do attribute specific completion
461
-			let attrname = matchstr(attr, '.*\ze\s*=')
462
-			let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*")
463
-			let values = []
464
-			" Load data {{{
465
-			if !exists("b:html_doctype")
466
-				call htmlcomplete#CheckDoctype()
467
-			endif
468
-			if !exists("b:html_omni")
469
-				"runtime! autoload/xml/xhtml10s.vim
470
-				call htmlcomplete#LoadData()
471
-			endif
472
-            if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
473
-                call htmlcomplete#LoadAria()
474
-            endif
475
-			" }}}
476
-			if attrname == 'href'
477
-				" Now we are looking for local anchors defined by name or id
478
-				if entered_value =~ '^#'
479
-					let file = join(getline(1, line('$')), ' ')
480
-					" Split it be sure there will be one id/name element in
481
-					" item, it will be also first word [a-zA-Z0-9_-] in element
482
-					let oneelement = split(file, "\\(meta \\)\\@<!\\(name\\|id\\)\\s*=\\s*[\"']")
483
-					for i in oneelement
484
-						let values += ['#'.matchstr(i, "^[a-zA-Z][a-zA-Z0-9%_-]*")]
485
-					endfor
486
-				endif
487
-			else
488
-				if has_key(b:html_omni, tag) && has_key(b:html_omni[tag][1], attrname)
489
-					let values = b:html_omni[tag][1][attrname]
490
-                elseif attrname =~ '^aria-' && exists("b:aria_omni") && has_key(b:aria_omni['aria_attributes'], attrname)
491
-					let values = b:aria_omni['aria_attributes'][attrname]
492
-				else
493
-					return []
494
-				endif
495
-			endif
496
-
497
-			if len(values) == 0
498
-				return []
499
-            endif
500
-
501
-			" We need special version of sbase
502
-			let attrbase = matchstr(context, ".*[\"']")
503
-			let attrquote = matchstr(attrbase, '.$')
504
-			if attrquote !~ "['\"]"
505
-				let attrquoteopen = '"'
506
-                let attrquote = '"'
507
-			else
508
-				let attrquoteopen = ''
509
-            endif
510
-            " Multi value attributes don't need ending quote
511
-            let info = ''
512
-            if has_key(b:html_omni['vimxmlattrinfo'], attrname)
513
-                let info = b:html_omni['vimxmlattrinfo'][attrname][0]
514
-            elseif exists("b:aria_omni") && has_key(b:aria_omni['vimariaattrinfo'], attrname)
515
-                let info = b:aria_omni['vimariaattrinfo'][attrname][0]
516
-            endif
517
-            if info =~ "^\\*"
518
-                let attrquote = ''
519
-            endif
520
-
521
-            if len(entered_value) > 0
522
-                if entered_value =~ "\\s$"
523
-                    let entered_value = ''
524
-                else
525
-                    let entered_value = split(entered_value)[-1]
526
-                endif
527
-            endif
528
-			for m in values
529
-				" This if is needed to not offer all completions as-is
530
-				" alphabetically but sort them. Those beginning with entered
531
-				" part will be as first choices
532
-				if m =~ '^'.entered_value
533
-					call add(res, attrquoteopen . m . attrquote)
534
-				elseif m =~ entered_value
535
-					call add(res2, attrquoteopen . m . attrquote)
536
-				endif
537
-			endfor
538
-
539
-			return res + res2
540
-
541
-		endif
542
-		" }}}
543
-		" Attribute completion {{{
544
-		" Shorten context to not include last word
545
-		let sbase = matchstr(context, '.*\ze\s.*')
546
-
547
-		" Load data {{{
548
-		if !exists("b:html_doctype")
549
-			call htmlcomplete#CheckDoctype()
550
-		endif
551
-		if !exists("b:html_omni")
552
-			call htmlcomplete#LoadData()
553
-		endif
554
-        if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
555
-            call htmlcomplete#LoadAria()
556
-        endif
557
-		" }}}
558
-
559
-		if has_key(b:html_omni, tag)
560
-			let attrs = keys(b:html_omni[tag][1])
561
-		else
562
-			return []
563
-        endif
564
-        if exists("b:aria_omni")
565
-            let roles = []
566
-            if has_key(b:aria_omni['default_role'], tag)
567
-                let roles = [b:aria_omni['default_role'][tag]]
568
-            endif
569
-            if context =~ 'role='
570
-                let start = matchend(context, "role=['\"]")
571
-                let end   = matchend(context, "[a-z ]\\+['\"]", start)
572
-                if start != -1 && end != -1
573
-                    let roles = split(strpart(context, start, end-start-1), " ")
574
-                endif
575
-            endif
576
-            for i in range(len(roles))
577
-                let role = roles[i]
578
-                if has_key(b:aria_omni['role_attributes'], role)
579
-                    let attrs = extend(attrs, b:aria_omni['role_attributes'][role])
580
-                endif
581
-            endfor
582
-        endif
583
-
584
-		for m in sort(attrs)
585
-			if m =~ '^'.attr
586
-				call add(res, m)
587
-			elseif m =~ attr
588
-				call add(res2, m)
589
-			endif
590
-		endfor
591
-		"let menu = res + res2
592
-		let menu = res
593
-		if has_key(b:html_omni, 'vimxmlattrinfo') || (exists("b:aria_omni") && has_key(b:aria_omni, 'vimariaattrinfo'))
594
-			let final_menu = []
595
-			for i in range(len(menu))
596
-				let item = menu[i]
597
-				if has_key(b:html_omni['vimxmlattrinfo'], item)
598
-					let m_menu = b:html_omni['vimxmlattrinfo'][item][0]
599
-					let m_info = b:html_omni['vimxmlattrinfo'][item][1]
600
-                elseif exists("b:aria_omni") && has_key(b:aria_omni['vimariaattrinfo'], item)
601
-					let m_menu = b:aria_omni['vimariaattrinfo'][item][0]
602
-					let m_info = b:aria_omni['vimariaattrinfo'][item][1]
603
-                else
604
-					let m_menu = ''
605
-					let m_info = ''
606
-                endif
607
-                if item =~ '^aria-' && exists("b:aria_omni")
608
-                    if len(b:aria_omni['aria_attributes'][item]) > 0 && b:aria_omni['aria_attributes'][item][0] =~ '^\(BOOL\|'.item.'\)$'
609
-                        let item = item
610
-                        let m_menu = 'Bool'
611
-                    else
612
-                        let item .= '="'
613
-                    endif
614
-                else
615
-                    if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
616
-                        let item = item
617
-                        let m_menu = 'Bool'
618
-                    else
619
-                        let item .= '="'
620
-                    endif
621
-                endif
622
-				let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
623
-			endfor
624
-		else
625
-			let final_menu = []
626
-			for i in range(len(menu))
627
-				let item = menu[i]
628
-				if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
629
-					let item = item
630
-				else
631
-					let item .= '="'
632
-				endif
633
-				let final_menu += [item]
634
-			endfor
635
-			return final_menu
636
-
637
-		endif
638
-		return final_menu
639
-
640
-	endif
641
-	" }}}
642
-	" Close tag {{{
643
-	let b:unaryTagsStack = "area base br col command embed hr img input keygen link meta param source track wbr"
644
-	if context =~ '^\/'
645
-		if context =~ '^\/.'
646
-			return []
647
-		else
648
-			let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
649
-			return [opentag.">"]
650
-		endif
651
-	endif
652
-	" }}}
653
-	" Load data {{{
654
-	if !exists("b:html_doctype")
655
-		call htmlcomplete#CheckDoctype()
656
-	endif
657
-	if !exists("b:html_omni")
658
-		"runtime! autoload/xml/xhtml10s.vim
659
-		call htmlcomplete#LoadData()
660
-	endif
661
-    if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
662
-        call htmlcomplete#LoadAria()
663
-    endif
664
-	" }}}
665
-	" Tag completion {{{
666
-	" Deal with tag completion.
667
-	let opentag = tolower(xmlcomplete#GetLastOpenTag("b:unaryTagsStack"))
668
-	" MM: TODO: GLOT works always the same but with some weird situation it
669
-	" behaves as intended in HTML but screws in PHP
670
-	if opentag == '' || &filetype == 'php' && !has_key(b:html_omni, opentag)
671
-		" Hack for sometimes failing GetLastOpenTag.
672
-		" As far as I tested fail isn't GLOT fault but problem
673
-		" of invalid document - not properly closed tags and other mish-mash.
674
-		" Also when document is empty. Return list of *all* tags.
675
-	    let tags = keys(b:html_omni)
676
-		call filter(tags, 'v:val !~ "^vimxml"')
677
-	else
678
-		if has_key(b:html_omni, opentag)
679
-			let tags = b:html_omni[opentag][0]
680
-		else
681
-			return []
682
-		endif
683
-	endif
684
-	" }}}
685
-
686
-	if exists("uppercase_tag") && uppercase_tag == 1
687
-		let context = tolower(context)
688
-	endif
689
-	" Handle XML keywords: DOCTYPE
690
-	if opentag == ''
691
-		let tags = [
692
-				\ '!DOCTYPE html>',
693
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
694
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
695
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
696
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
697
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
698
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
699
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
700
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
701
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
702
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
703
-				\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">'
704
-				\ ] + sort(tags)
705
-	endif
706
-
707
-	"for m in sort(tags)
708
-	for m in tags
709
-		if m =~ '^'.context
710
-			call add(res, m)
711
-		elseif m =~ context
712
-			call add(res2, m)
713
-		endif
714
-	endfor
715
-	let menu = res + res2
716
-	if has_key(b:html_omni, 'vimxmltaginfo')
717
-		let final_menu = []
718
-		for i in range(len(menu))
719
-			let item = menu[i]
720
-			if has_key(b:html_omni['vimxmltaginfo'], item)
721
-				let m_menu = b:html_omni['vimxmltaginfo'][item][0]
722
-				let m_info = b:html_omni['vimxmltaginfo'][item][1]
723
-			else
724
-				let m_menu = ''
725
-				let m_info = ''
726
-			endif
727
-			if &filetype == 'html' && exists("uppercase_tag") && uppercase_tag == 1 && item !~ 'DOCTYPE'
728
-				let item = toupper(item)
729
-			endif
730
-			if item =~ 'DOCTYPE'
731
-                if item =~ 'DTD'
732
-                    let abbr = 'DOCTYPE '.matchstr(item, 'DTD \zsX\?HTML .\{-}\ze\/\/')
733
-                else
734
-                    let abbr = 'DOCTYPE HTML 5'
735
-                endif
736
-			else
737
-				let abbr = item
738
-			endif
739
-			let final_menu += [{'abbr':abbr, 'word':item, 'menu':m_menu, 'info':m_info}]
740
-		endfor
741
-	else
742
-		let final_menu = menu
743
-	endif
744
-	return final_menu
745
-
746
-	" }}}
747
-  endif
748
-endfunction
749
-
750
-function! htmlcomplete#LoadAria() " {{{
751
-    runtime! autoload/xml/aria.vim
752
-    if exists("g:xmldata_aria")
753
-        \ && has_key(g:xmldata_aria, 'default_role') 
754
-        \ && has_key(g:xmldata_aria, 'role_attributes') 
755
-        \ && has_key(g:xmldata_aria, 'vimariaattrinfo')
756
-        \ && has_key(g:xmldata_aria, 'aria_attributes')
757
-        let b:aria_omni = g:xmldata_aria
758
-    else
759
-        let g:aria_attributes_complete = 0
760
-    endif
761
-endfunction
762
-" }}}
763
-function! htmlcomplete#LoadData() " {{{
764
-	if !exists("b:html_omni_flavor")
765
-		if &filetype == 'html'
766
-			let b:html_omni_flavor = 'html401t'
767
-		else
768
-			let b:html_omni_flavor = 'xhtml10s'
769
-		endif
770
-	endif
771
-	" With that if we still have bloated memory but create new buffer
772
-	" variables only by linking to existing g:variable, not sourcing whole
773
-	" file.
774
-	if exists('g:xmldata_'.b:html_omni_flavor)
775
-		exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
776
-	else
777
-		exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim'
778
-		exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
779
-	endif
780
-endfunction
781
-" }}}
782
-function! htmlcomplete#CheckDoctype() " {{{
783
-	if exists('b:html_omni_flavor')
784
-		let old_flavor = b:html_omni_flavor
785
-	else
786
-		let old_flavor = ''
787
-	endif
788
-	let i = 1
789
-	while i < 10 && i < line("$")
790
-		let line = getline(i)
791
-		if line =~ '<!DOCTYPE.*\<DTD HTML 3\.2'
792
-			let b:html_omni_flavor = 'html32'
793
-			let b:html_doctype = 1
794
-			break
795
-		elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Transitional'
796
-			let b:html_omni_flavor = 'html40t'
797
-			let b:html_doctype = 1
798
-			break
799
-		elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Frameset'
800
-			let b:html_omni_flavor = 'html40f'
801
-			let b:html_doctype = 1
802
-			break
803
-		elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0'
804
-			let b:html_omni_flavor = 'html40s'
805
-			let b:html_doctype = 1
806
-			break
807
-		elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Transitional'
808
-			let b:html_omni_flavor = 'html401t'
809
-			let b:html_doctype = 1
810
-			break
811
-		elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Frameset'
812
-			let b:html_omni_flavor = 'html401f'
813
-			let b:html_doctype = 1
814
-			break
815
-		elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01'
816
-			let b:html_omni_flavor = 'html401s'
817
-			let b:html_doctype = 1
818
-			break
819
-		elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Transitional'
820
-			let b:html_omni_flavor = 'xhtml10t'
821
-			let b:html_doctype = 1
822
-			break
823
-		elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Frameset'
824
-			let b:html_omni_flavor = 'xhtml10f'
825
-			let b:html_doctype = 1
826
-			break
827
-		elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Strict'
828
-			let b:html_omni_flavor = 'xhtml10s'
829
-			let b:html_doctype = 1
830
-			break
831
-		elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.1'
832
-			let b:html_omni_flavor = 'xhtml11'
833
-			let b:html_doctype = 1
834
-			break
835
-		elseif line =~ '<!DOCTYPE html'
836
-			let b:html_omni_flavor = 'html5'
837
-			let b:html_doctype = 1
838
-			break
839
-		endif
840
-		let i += 1
841
-	endwhile
842
-	if !exists("b:html_doctype")
843
-		return
844
-	else
845
-		" Tie g:xmldata with b:html_omni this way we need to sourca data file only
846
-		" once, not every time per buffer.
847
-		if old_flavor == b:html_omni_flavor
848
-			return
849
-		else
850
-			if exists('g:xmldata_'.b:html_omni_flavor)
851
-				exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
852
-			else
853
-				exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim'
854
-				exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
855
-			endif
856
-			return
857
-		endif
858
-	endif
859
-endfunction
860
-" }}}
861
-" vim:set foldmethod=marker:

+ 0
- 232
dotfiles/vim/bundle/html5.vim/autoload/xml/aria.vim View File

@@ -1,232 +0,0 @@
1
-" Vim completion for WAI-ARIA data file
2
-" Language:       HTML + WAI-ARIA
3
-" Maintainer:     othree <othree@gmail.com>
4
-" Last Change:    2010 Sep 09
5
-
6
-" WAI_ARIA: {{{
7
-" Ref: http://www.w3.org/TR/wai-aria/
8
-" Version: Draft 15 December 2009
9
-
10
-let abstract_role = {}
11
-let role_attributes = {}
12
-let default_role = {}
13
-
14
-" Ref: http://www.w3.org/TR/wai-aria/roles
15
-" Version: Draft 15 December 2009
16
-let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'slider', 'spinbutton', 'status', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
17
-let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
18
-let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
19
-let role = extend(widget_role, document_structure)
20
-let role = extend(role, landmark_role)
21
-
22
-" http://www.w3.org/TR/wai-aria/states_and_properties#state_prop_taxonomy
23
-"let global_states_and_properties = {'aria-atomic': ['true', 'false'], 'aria-busy': ['true', 'false'], 'aria-controls': [], 'aria-describedby': [], 'aria-disabled': ['true', 'false'], 'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'], 'aria-flowto': [], 'aria-grabbed': ['true', 'false', 'undefined'], 'aria-haspopup': ['true', 'false'], 'aria-hidden': ['true', 'false'], 'aria-invalid': ['grammar', 'spelling', 'true', 'false'], 'aria-label': [], 'aria-labelledby': [], 'aria-live': ['off', 'polite', 'assertive'], 'aria-owns': [], 'aria-relevant': ['additions', 'removals', 'text', 'all']}
24
-let widget_attributes = {'aria-autocomplete': ['inline', 'list', 'both', 'none'], 'aria-checked': ['true', 'false', 'mixed', 'undefined'], 'aria-disabled': ['true', 'false'], 'aria-expanded': ['true', 'false', 'undefined'], 'aria-haspopup': ['true', 'false'], 'aria-hidden': ['true', 'false'], 'aria-invalid': ['grammar', 'spelling', 'true', 'false'], 'aria-label': [], 'aria-level': [], 'aria-multiline': ['true', 'false'], 'aria-multiselectable': ['true', 'false'], 'aria-orientation': ['horizontal', 'vertical'], 'aria-pressed': ['true', 'false', 'mixed', 'undefined'], 'aria-readonly': ['true', 'false'], 'aria-required': ['true', 'false'], 'aria-selected': ['true', 'false', 'undefined'], 'aria-sort': ['ascending', 'descending', 'none', 'other'], 'aria-valuemax': [], 'aria-valuemin': [], 'aria-valuenow': [], 'aria-valuetext': []}
25
-let live_region_attributes = {'aria-atomic': ['true', 'false'], 'aria-busy': ['true', 'false'], 'aria-live': ['off', 'polite', 'assertive'], 'aria-relevant': ['additions', 'removals', 'text', 'all', 'additions text']}
26
-let drag_and_drop_attributes = {'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'], 'aria-grabbed': ['true', 'false', 'undefined']}
27
-let relationship_attributes = {'aria-activedescendant': [], 'aria-controls': [], 'aria-describedby': [], 'aria-flowto': [], 'aria-labelledby': [], 'aria-owns': [], 'aria-posinset': [], 'aria-setsize': []}
28
-let aria_attributes = widget_attributes
29
-let aria_attributes = extend(aria_attributes, live_region_attributes)
30
-let aria_attributes = extend(aria_attributes, drag_and_drop_attributes)
31
-let aria_attributes = extend(aria_attributes, relationship_attributes)
32
-
33
-" Abstract Roles
34
-let abstract_role['roletype'] = ['aria-atomic', 'aria-busy', 'aria-controls', 'aria-describedby', 'aria-disabled', 'aria-dropeffect', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant']
35
-let role_attributes['default'] = abstract_role['roletype']
36
-let abstract_role['structure'] = abstract_role['roletype']
37
-let abstract_role['widget'] = abstract_role['roletype']
38
-let abstract_role['window'] = abstract_role['roletype'] + ['aria-expanded']
39
-let abstract_role['composite'] = abstract_role['widget'] + ['aria-activedescendant']
40
-let abstract_role['input'] = abstract_role['widget']
41
-let abstract_role['section'] = abstract_role['structure'] + ['aria-expanded']
42
-let abstract_role['sectionhead'] = abstract_role['structure'] + ['aria-expanded']
43
-
44
-let role_attributes['group'] = abstract_role['section']
45
-let abstract_role['select'] = abstract_role['composite'] + role_attributes['group'] + abstract_role['input']
46
-
47
-let abstract_role['range'] = abstract_role['input'] + ['aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext']
48
-
49
-let role_attributes['region'] = abstract_role['section']
50
-let abstract_role['landmark'] = role_attributes['region']
51
-
52
-" Widget Roles
53
-let role_attributes['list'] = role_attributes['region'] 
54
-let role_attributes['listitem'] = abstract_role['section']
55
-
56
-let role_attributes['dialog'] = abstract_role['window']
57
-let role_attributes['menuitem'] = abstract_role['input'] 
58
-let role_attributes['checkbox'] = abstract_role['input'] + ['aria-checked'] 
59
-let role_attributes['menuitemcheckbox'] = role_attributes['menuitem'] + role_attributes['checkbox']
60
-let role_attributes['option'] = abstract_role['input'] + ['aria-checked', 'aria-posinset', 'aria-selected', 'aria-setsize']
61
-let role_attributes['radio'] = role_attributes['checkbox'] + role_attributes['option']
62
-
63
-let role_attributes['directory'] = role_attributes['list'] 
64
-
65
-let role_attributes['alert'] = role_attributes['region']
66
-let role_attributes['alertdialog'] = role_attributes['alert'] + role_attributes['dialog']
67
-let role_attributes['button'] = role_attributes['region'] + role_attributes['menuitemcheckbox']
68
-let role_attributes['combobox'] = abstract_role['select'] + ['aria-expanded', 'aria-required'] 
69
-let role_attributes['gridcell'] = abstract_role['section'] + abstract_role['widget']
70
-let role_attributes['link'] = abstract_role['widget'] 
71
-let role_attributes['log'] = role_attributes['region'] 
72
-let role_attributes['marquee'] = role_attributes['region'] 
73
-let role_attributes['menuitemradio'] = role_attributes['menuitemcheckbox'] + role_attributes['radio']
74
-let role_attributes['progressbar'] = abstract_role['widget'] + ['aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext']
75
-let role_attributes['radiogroup'] = abstract_role['select'] + ['aria-required']
76
-let role_attributes['scrollbar'] = abstract_role['range'] + ['aria-controls', 'aria-orientation', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow']
77
-let role_attributes['slider'] = abstract_role['range'] + ['aria-valuemax', 'aria-valuemin', 'aria-valuenow']
78
-let role_attributes['spinbutton'] = abstract_role['composite'] + abstract_role['range'] + ['aria-required'] 
79
-let role_attributes['status'] = abstract_role['composite'] + role_attributes['region']
80
-let role_attributes['tab'] = abstract_role['sectionhead'] + abstract_role['widget'] + ['aria-selected']
81
-let role_attributes['tabpanel'] = role_attributes['region']
82
-let role_attributes['textbox'] = abstract_role['input'] + ['aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required']
83
-let role_attributes['timer'] = role_attributes['status'] 
84
-let role_attributes['tooltip'] = abstract_role['section'] 
85
-let role_attributes['treeitem'] = role_attributes['listitem'] + role_attributes['option']
86
-
87
-let role_attributes['grid'] = abstract_role['composite'] + role_attributes['region'] + ['aria-level', 'aria-multiselectable', 'aria-readonly']
88
-let role_attributes['listbox'] = role_attributes['list'] + abstract_role['select'] + ['aria-multiselectable', 'aria-required']
89
-let role_attributes['menu'] =  role_attributes['list'] + abstract_role['select'] 
90
-let role_attributes['menubar'] = role_attributes['menu'] 
91
-let role_attributes['tablist'] = abstract_role['composite'] + role_attributes['directory']
92
-let role_attributes['toolbar'] = role_attributes['group'] 
93
-let role_attributes['tree'] = abstract_role['select'] + ['aria-multiselectable', 'aria-required']
94
-let role_attributes['treegrid'] = role_attributes['grid'] + role_attributes['tree']
95
-
96
-" Document Structure
97
-let role_attributes['document'] = abstract_role['structure'] + ['aria-expanded'] 
98
-
99
-let role_attributes['article'] = role_attributes['document'] + role_attributes['region'] 
100
-let role_attributes['columnheader'] = role_attributes['gridcell'] + abstract_role['sectionhead'] + ['aria-sort']
101
-let role_attributes['definition'] = abstract_role['section'] 
102
-let role_attributes['heading'] = abstract_role['sectionhead'] + ['aria-level'] 
103
-let role_attributes['img'] = abstract_role['section'] 
104
-let role_attributes['math'] = abstract_role['section'] 
105
-let role_attributes['note'] = abstract_role['section'] 
106
-let role_attributes['presentation'] = abstract_role['structure']
107
-let role_attributes['row'] = role_attributes['group'] + ['aria-level', 'aria-selected']
108
-let role_attributes['rowheader'] = role_attributes['gridcell'] + abstract_role['sectionhead']
109
-let role_attributes['separator'] = abstract_role['structure'] + ['aria-expanded'] 
110
-
111
-" Landmark Roles
112
-let role_attributes['application'] = abstract_role['landmark'] 
113
-let role_attributes['banner'] = abstract_role['landmark'] 
114
-let role_attributes['complementary'] = abstract_role['landmark'] 
115
-let role_attributes['contentinfo'] = abstract_role['landmark'] 
116
-let role_attributes['form'] = abstract_role['landmark'] 
117
-let role_attributes['main'] = abstract_role['landmark'] 
118
-let role_attributes['navigation'] = abstract_role['landmark'] 
119
-let role_attributes['search'] = abstract_role['landmark']
120
-
121
-" http://www.w3.org/TR/wai-aria/states_and_properties#state_prop_def
122
-let aria_attributes_value = {
123
-    \ 'aria-autocomplete': ['ID', ''],
124
-    \ 'aria-checked': ['Token', ''],
125
-    \ 'aria-disabled': ['true/false', ''],
126
-    \ 'aria-expanded': ['Token', ''],
127
-    \ 'aria-haspopup': ['true/false', ''],
128
-    \ 'aria-hidden': ['true/false', ''],
129
-    \ 'aria-invalid': ['Token', ''],
130
-    \ 'aria-label': ['String', ''],
131
-    \ 'aria-level': ['Int', ''],
132
-    \ 'aria-multiline': ['true/false', ''],
133
-    \ 'aria-multiselectable': ['true/false', ''],
134
-    \ 'aria-orientation': ['Token', ''],
135
-    \ 'aria-pressed': ['Token', ''],
136
-    \ 'aria-readonly': ['true/false', ''],
137
-    \ 'aria-required': ['true/false', ''],
138
-    \ 'aria-selected': ['Token', ''],
139
-    \ 'aria-sort': ['Token', ''],
140
-    \ 'aria-valuemax': ['Number', ''],
141
-    \ 'aria-valuemin': ['Number', ''],
142
-    \ 'aria-valuenow': ['Number', ''],
143
-    \ 'aria-valuetext': ['String', ''],
144
-    \ 'aria-atomic': ['true/false', ''],
145
-    \ 'aria-busy': ['true/false', ''],
146
-    \ 'aria-live': ['Token', ''],
147
-    \ 'aria-relevant': ['*Token', ''],
148
-    \ 'aria-dropeffect': ['*Token', ''],
149
-    \ 'aria-grabbed': ['Token', ''],
150
-    \ 'aria-activedescendant': ['ID', ''],
151
-    \ 'aria-controls': ['*ID', ''],
152
-    \ 'aria-describedby': ['*ID', ''],
153
-    \ 'aria-flowto': ['*ID', ''],
154
-    \ 'aria-labelledby': ['*ID', ''],
155
-    \ 'aria-owns': ['*ID', ''],
156
-    \ 'aria-posinset': ['Int', ''],
157
-    \ 'aria-setsize': ['Int', '']
158
-\ }
159
-
160
-" http://dev.w3.org/html5/spec/content-models.html#annotations-for-assistive-technology-products-aria
161
-let default_role = {
162
-    \ 'a': 'link',
163
-    \ 'area': 'link',
164
-    \ 'body': 'document',
165
-    \ 'button': 'button',
166
-    \ 'datalist': 'listbox',
167
-    \ 'h1': 'heading',
168
-    \ 'h2': 'heading',
169
-    \ 'h3': 'heading',
170
-    \ 'h4': 'heading',
171
-    \ 'h5': 'heading',
172
-    \ 'h6': 'heading',
173
-    \ 'hgroup': 'heading',
174
-    \ 'hr': 'separator',
175
-    \ 'img[alt=]': 'presentation',
176
-    \ 'input[type=button]': 'button',
177
-    \ 'input[type=email]': 'textbox',
178
-    \ 'input[type=image]': 'button',
179
-    \ 'input[type=number]': 'spinbutton',
180
-    \ 'input[type=password]': 'textbox',
181
-    \ 'input[type=range]': 'slider',
182
-    \ 'input[type=reset]': 'button',
183
-    \ 'input[type=search]': 'textbox',
184
-    \ 'input[type=submit]': 'button',
185
-    \ 'input[type=tel]': 'textbox',
186
-    \ 'input[type=text]': 'textbox',
187
-    \ 'input[list]': 'combobox',
188
-    \ 'input[type=url]': 'textbox',
189
-    \ 'input': 'textbox',
190
-    \ 'keygen': 'default',
191
-    \ 'label': 'default',
192
-    \ 'menu[type=list]': 'menu',
193
-    \ 'menu[type=toolbar]': 'toolbar',
194
-    \ 'menu': 'default',
195
-    \ 'link': 'link',
196
-    \ 'nav': 'navigation',
197
-    \ 'optgroup': 'default',
198
-    \ 'option': 'option',
199
-    \ 'progress': 'progressbar',
200
-    \ 'select': 'listbox',
201
-    \ 'summary': 'heading',
202
-    \ 'tbody': 'rowgroup',
203
-    \ 'td': 'gridcell',
204
-    \ 'textarea': 'textbox',
205
-    \ 'tfoot': 'rowgroup',
206
-    \ 'th[scope=col]': 'columnheader',
207
-    \ 'th[scope=row]': 'rowheader',
208
-    \ 'tr': 'row',
209
-    \ 'address': 'default',
210
-    \ 'article': 'article',
211
-    \ 'aside': 'note',
212
-    \ 'footer': 'default',
213
-    \ 'header': 'default',
214
-    \ 'details': 'group',
215
-    \ 'img': 'img',
216
-    \ 'input[type=checkbox]': 'checkbox',
217
-    \ 'input[type=radio]': 'radio',
218
-    \ 'li': 'listitem',
219
-    \ 'ol': 'list',
220
-    \ 'output': 'status',
221
-    \ 'section': 'region',
222
-    \ 'table': 'grid',
223
-    \ 'ul': 'list',
224
-\ }
225
-" }}}
226
-
227
-let g:xmldata_aria = {
228
-    \ 'aria_attributes': aria_attributes,
229
-    \ 'role_attributes': role_attributes,
230
-    \ 'default_role': default_role,
231
-    \ 'vimariaattrinfo': aria_attributes_value
232
-\ }

+ 0
- 791
dotfiles/vim/bundle/html5.vim/autoload/xml/html5.vim View File

@@ -1,791 +0,0 @@
1
-" Vim completion for HTML5 data file
2
-" Language:       HTML5
3
-" Maintainer:     othree <othree@gmail.com>
4
-" Last Change:    2011 Apr 9
5
-
6
-
7
-" Lang Tag: {{{
8
-" Ref: http://www.iana.org/assignments/language-subtag-registry
9
-" Version: 2010/09/07
10
-" Description: only get two-letter language tag
11
-let lang_tag = [
12
-    \ 'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm',
13
-    \ 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee',
14
-    \ 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu',
15
-    \ 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'in', 'io',
16
-    \ 'is', 'it', 'iu', 'iw', 'ja', 'ji', 'jv', 'jw', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr',
17
-    \ 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk',
18
-    \ 'ml', 'mn', 'mo', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny',
19
-    \ 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc',
20
-    \ 'sd', 'se', 'sg', 'sh', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta',
21
-    \ 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've',
22
-    \ 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu', 'zh-CN', 'zh-TW']
23
-" }}}
24
-
25
-" Charset: {{{
26
-" Ref: http://www.iana.org/assignments/character-sets 
27
-" Version: 2010/09/07
28
-let charset = [
29
-    \ 'ANSI_X3.4-1968', 'ISO_8859-1:1987', 'ISO_8859-2:1987', 'ISO_8859-3:1988', 'ISO_8859-4:1988', 'ISO_8859-5:1988', 
30
-    \ 'ISO_8859-6:1987', 'ISO_8859-7:1987', 'ISO_8859-8:1988', 'ISO_8859-9:1989', 'ISO-8859-10', 'ISO_6937-2-add', 'JIS_X0201', 
31
-    \ 'JIS_Encoding', 'Shift_JIS', 'Extended_UNIX_Code_Packed_Format_for_Japanese', 'Extended_UNIX_Code_Fixed_Width_for_Japanese',
32
-    \ 'BS_4730', 'SEN_850200_C', 'IT', 'ES', 'DIN_66003', 'NS_4551-1', 'NF_Z_62-010', 'ISO-10646-UTF-1', 'ISO_646.basic:1983', 
33
-    \ 'INVARIANT', 'ISO_646.irv:1983', 'NATS-SEFI', 'NATS-SEFI-ADD', 'NATS-DANO', 'NATS-DANO-ADD', 'SEN_850200_B', 'KS_C_5601-1987',
34
-    \ 'ISO-2022-KR', 'EUC-KR', 'ISO-2022-JP', 'ISO-2022-JP-2', 'JIS_C6220-1969-jp', 'JIS_C6220-1969-ro', 'PT', 'greek7-old', 
35
-    \ 'latin-greek', 'NF_Z_62-010_(1973)', 'Latin-greek-1', 'ISO_5427', 'JIS_C6226-1978', 'BS_viewdata', 'INIS', 'INIS-8', 
36
-    \ 'INIS-cyrillic', 'ISO_5427:1981', 'ISO_5428:1980', 'GB_1988-80', 'GB_2312-80', 'NS_4551-2', 'videotex-suppl', 'PT2', 
37
-    \ 'ES2', 'MSZ_7795.3', 'JIS_C6226-1983', 'greek7', 'ASMO_449', 'iso-ir-90', 'JIS_C6229-1984-a', 'JIS_C6229-1984-b', 
38
-    \ 'JIS_C6229-1984-b-add', 'JIS_C6229-1984-hand', 'JIS_C6229-1984-hand-add', 'JIS_C6229-1984-kana', 'ISO_2033-1983', 
39
-    \ 'ANSI_X3.110-1983', 'T.61-7bit', 'T.61-8bit', 'ECMA-cyrillic', 'CSA_Z243.4-1985-1', 'CSA_Z243.4-1985-2', 'CSA_Z243.4-1985-gr', 
40
-    \ 'ISO_8859-6-E', 'ISO_8859-6-I', 'T.101-G2', 'ISO_8859-8-E', 'ISO_8859-8-I', 'CSN_369103', 'JUS_I.B1.002', 'IEC_P27-1', 
41
-    \ 'JUS_I.B1.003-serb', 'JUS_I.B1.003-mac', 'greek-ccitt', 'NC_NC00-10:81', 'ISO_6937-2-25', 'GOST_19768-74', 'ISO_8859-supp', 
42
-    \ 'ISO_10367-box', 'latin-lap', 'JIS_X0212-1990', 'DS_2089', 'us-dk', 'dk-us', 'KSC5636', 'UNICODE-1-1-UTF-7', 'ISO-2022-CN', 
43
-    \ 'ISO-2022-CN-EXT', 'UTF-8', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16', 'GBK', 'GB18030', 'OSD_EBCDIC_DF04_15', 
44
-    \ 'OSD_EBCDIC_DF03_IRV', 'OSD_EBCDIC_DF04_1', 'ISO-11548-1', 'KZ-1048', 'ISO-10646-UCS-2', 'ISO-10646-UCS-4', 'ISO-10646-UCS-Basic',
45
-    \ 'ISO-10646-Unicode-Latin1', 'ISO-10646-J-1', 'ISO-Unicode-IBM-1261', 'ISO-Unicode-IBM-1268', 'ISO-Unicode-IBM-1276', 
46
-    \ 'ISO-Unicode-IBM-1264', 'ISO-Unicode-IBM-1265', 'UNICODE-1-1', 'SCSU', 'UTF-7', 'UTF-16BE', 'UTF-16LE', 'UTF-16', 'CESU-8', 
47
-    \ 'UTF-32', 'UTF-32BE', 'UTF-32LE', 'BOCU-1', 'ISO-8859-1-Windows-3.0-Latin-1', 'ISO-8859-1-Windows-3.1-Latin-1', 
48
-    \ 'ISO-8859-2-Windows-Latin-2', 'ISO-8859-9-Windows-Latin-5', 'hp-roman8', 'Adobe-Standard-Encoding', 'Ventura-US', 
49
-    \ 'Ventura-International', 'DEC-MCS', 'IBM850', 'PC8-Danish-Norwegian', 'IBM862', 'PC8-Turkish', 'IBM-Symbols', 'IBM-Thai', 
50
-    \ 'HP-Legal', 'HP-Pi-font', 'HP-Math8', 'Adobe-Symbol-Encoding', 'HP-DeskTop', 'Ventura-Math', 'Microsoft-Publishing', 
51
-    \ 'Windows-31J', 'GB2312', 'Big5', 'macintosh', 'IBM037', 'IBM038', 'IBM273', 'IBM274', 'IBM275', 'IBM277', 'IBM278', 
52
-    \ 'IBM280', 'IBM281', 'IBM284', 'IBM285', 'IBM290', 'IBM297', 'IBM420', 'IBM423', 'IBM424', 'IBM437', 'IBM500', 'IBM851', 
53
-    \ 'IBM852', 'IBM855', 'IBM857', 'IBM860', 'IBM861', 'IBM863', 'IBM864', 'IBM865', 'IBM868', 'IBM869', 'IBM870', 'IBM871', 
54
-    \ 'IBM880', 'IBM891', 'IBM903', 'IBM904', 'IBM905', 'IBM918', 'IBM1026', 'EBCDIC-AT-DE', 'EBCDIC-AT-DE-A', 'EBCDIC-CA-FR', 
55
-    \ 'EBCDIC-DK-NO', 'EBCDIC-DK-NO-A', 'EBCDIC-FI-SE', 'EBCDIC-FI-SE-A', 'EBCDIC-FR', 'EBCDIC-IT', 'EBCDIC-PT', 'EBCDIC-ES', 
56
-    \ 'EBCDIC-ES-A', 'EBCDIC-ES-S', 'EBCDIC-UK', 'EBCDIC-US', 'UNKNOWN-8BIT', 'MNEMONIC', 'MNEM', 'VISCII', 'VIQR', 'KOI8-R', 
57
-    \ 'HZ-GB-2312', 'IBM866', 'IBM775', 'KOI8-U', 'IBM00858', 'IBM00924', 'IBM01140', 'IBM01141', 'IBM01142', 'IBM01143', 
58
-    \ 'IBM01144', 'IBM01145', 'IBM01146', 'IBM01147', 'IBM01148', 'IBM01149', 'Big5-HKSCS', 'IBM1047', 'PTCP154', 'Amiga-1251', 
59
-    \ 'KOI7-switched', 'BRF', 'TSCII', 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255', 
60
-    \ 'windows-1256', 'windows-1257', 'windows-1258', 'TIS-620', ]
61
-" }}}
62
-
63
-" Attributes_and_Settings: {{{
64
-let core_attributes = {'accesskey': [], 'class': [], 'contenteditable': ['true', 'false', ''], 'contextmenu': [], 'dir': ['ltr', 'rtl'], 'draggable': ['true', 'false'], 'hidden': ['hidden', ''], 'id': [], 'lang': lang_tag, 'spellcheck': ['true', 'false', ''], 'style': [], 'tabindex': [], 'title': []}
65
-let xml_attributes = {'xml:lang': lang_tag, 'xml:space': ['preserve'], 'xml:base': [], 'xmlns': ['http://www.w3.org/1999/xhtml', 'http://www.w3.org/1998/Math/MathML', 'http://www.w3.org/2000/svg', 'http://www.w3.org/1999/xlink']}
66
-
67
-let body_attributes = {}
68
-let global_attributes = extend(core_attributes, xml_attributes)
69
-if !exists('g:html5_event_handler_attributes_complete')
70
-    let g:html5_event_handler_attributes_complete = 1
71
-endif
72
-
73
-" http://dev.w3.org/html5/spec/Overview.html#attributes-1
74
-let attributes_value = {
75
-    \ 'accept': ['MIME', ''],
76
-    \ 'accept-charset': ['Charset', ''],
77
-    \ 'accesskey': ['Character', ''],
78
-    \ 'action': ['URL', ''],
79
-    \ 'alt': ['Text', ''],
80
-    \ 'async': ['Bool', ''],
81
-    \ 'autocomplete': ['on/off', ''],
82
-    \ 'autofocus': ['Bool', ''],
83
-    \ 'autoplay': ['Bool', ''],
84
-    \ 'border': ['1', ''],
85
-    \ 'challenge': ['Text', ''],
86
-    \ 'charset': ['Charset', ''],
87
-    \ 'checked': ['Bool', ''],
88
-    \ 'cite': ['URL', ''],
89
-    \ 'class': ['*Token', ''],
90
-    \ 'cols': ['Int', ''],
91
-    \ 'colspan': ['Int', ''],
92
-    \ 'content': ['Text', ''],
93
-    \ 'contenteditable': ['true/false', ''],
94
-    \ 'contextmenu': ['ID', ''],
95
-    \ 'controls': ['Bool', ''],
96
-    \ 'coords': ['*Int', ''],
97
-    \ 'data': ['URL', ''],
98
-    \ 'datetime': ['Datetime', ''],
99
-    \ 'defer': ['Bool', ''],
100
-    \ 'dir': ['ltr/rtl', ''],
101
-    \ 'disabled': ['Bool', ''],
102
-    \ 'draggable': ['true/false', ''],
103
-    \ 'enctype': ['Token', ''],
104
-    \ 'for': ['ID', ''],
105
-    \ 'form': ['ID', ''],
106
-    \ 'formaction': ['URL', ''],
107
-    \ 'formenctype': ['Token', ''],
108
-    \ 'formmethod': ['HTTP Method', ''],
109
-    \ 'formnovalidate': ['Bool', ''],
110
-    \ 'formtarget': ['Name', ''],
111
-    \ 'headers': ['*ID', ''],
112
-    \ 'height': ['Int', ''],
113
-    \ 'hidden': ['Bool', ''],
114
-    \ 'high': ['Number', ''],
115
-    \ 'href': ['URL', ''],
116
-    \ 'hreflang': ['Lang Tag', ''],
117
-    \ 'http-equiv': ['Text', ''],
118
-    \ 'icon': ['URL', ''],
119
-    \ 'id': ['Text', ''],
120
-    \ 'ismap': ['Bool', ''],
121
-    \ 'keytype': ['Text', ''],
122
-    \ 'label': ['Text', ''],
123
-    \ 'lang': ['Lang Tag', ''],
124
-    \ 'list': ['ID', ''],
125
-    \ 'loop': ['Bool', ''],
126
-    \ 'low': ['Number', ''],
127
-    \ 'manifest': ['URL', ''],
128
-    \ 'max': ['Number', ''],
129
-    \ 'maxlength': ['Int', ''],
130
-    \ 'media': ['Text', ''],
131
-    \ 'method': ['HTTP Method', ''],
132
-    \ 'min': ['Number', ''],
133
-    \ 'multiple': ['Bool', ''],
134
-    \ 'name': ['Text', ''],
135
-    \ 'novalidate': ['Bool', ''],
136
-    \ 'open': ['Bool', ''],
137
-    \ 'optimum': ['Number', ''],
138
-    \ 'pattern': ['Pattern', ''],
139
-    \ 'placeholder': ['Text', ''],
140
-    \ 'poster': ['URL', ''],
141
-    \ 'preload': ['Token', ''],
142
-    \ 'pubdate': ['Bool', ''],
143
-    \ 'radiogroup': ['Text', ''],
144
-    \ 'readonly': ['Bool', ''],
145
-    \ 'rel': ['*Token', ''],
146
-    \ 'required': ['Bool', ''],
147
-    \ 'reversed': ['Bool', ''],
148
-    \ 'rows': ['Int', ''],
149
-    \ 'rowspan': ['Int', ''],
150
-    \ 'sandbox': ['*Token', ''],
151
-    \ 'spellcheck': ['true/false', ''],
152
-    \ 'scope': ['Token', ''],
153
-    \ 'scoped': ['Bool', ''],
154
-    \ 'seamless': ['Bool', ''],
155
-    \ 'selected': ['Bool', ''],
156
-    \ 'shape': ['Token', ''],
157
-    \ 'size': ['Int', ''],
158
-    \ 'sizes': ['*Token', ''],
159
-    \ 'span': ['Int', ''],
160
-    \ 'src': ['Int', ''],
161
-    \ 'srcdoc': ['Document', ''],
162
-    \ 'start': ['Int', ''],
163
-    \ 'step': ['Int', ''],
164
-    \ 'style': ['Style', ''],
165
-    \ 'summary': ['Text', ''],
166
-    \ 'tabindex': ['Int', ''],
167
-    \ 'target': ['Name', ''],
168
-    \ 'title': ['Text', ''],
169
-    \ 'type': ['Token', ''],
170
-    \ 'usemap': ['Name', ''],
171
-    \ 'value': ['Text', ''],
172
-    \ 'width': ['Int', ''],
173
-    \ 'wrap': ['soft/hard', ''],
174
-    \ 'xml:lang': ['Lang tag', ''],
175
-    \ 'xml:base': ['*URI', ''],
176
-    \ 'xml:space': ['preserve', ''],
177
-    \ 'xmlns': ['URI', ''],
178
-    \ 'version': ['HTML+RDFa 1.1', ''],
179
-    \ 'role': ['*Token', '']
180
-\ }
181
-
182
-if g:html5_event_handler_attributes_complete == 1
183
-    let event_handler_attributes = {'onabort': [], 'onblur': [], 'oncanplay': [], 'oncanplaythrough': [], 'onchange': [], 'onclick': [], 'oncontextmenu': [], 'ondblclick': [], 'ondrag': [], 'ondragend': [], 'ondragenter': [], 'ondragleave': [], 'ondragover': [], 'ondragstart': [], 'ondrop': [], 'ondurationchange': [], 'onemptied': [], 'onended': [], 'onerror': [], 'onfocus': [], 'onformchange': [], 'onforminput': [], 'oninput': [], 'oninvalid': [], 'onkeydown': [], 'onkeypress': [], 'onkeyup': [], 'onload': [], 'onloadeddata': [], 'onloadedmetadata': [], 'onloadstart': [], 'onmousedown': [], 'onmousemove': [], 'onmouseout': [], 'onmouseover': [], 'onmouseup': [], 'onmousewheel': [], 'onpause': [], 'onplay': [], 'onplaying': [], 'onprogress': [], 'onratechange': [], 'onreadystatechange': [], 'onscroll': [], 'onseeked': [], 'onseeking': [], 'onselect': [], 'onshow': [], 'onstalled': [], 'onsubmit': [], 'onsuspend': [], 'ontimeupdate': [], 'onvolumechange': [], 'onwaiting': []}
184
-    let global_attributes = extend(global_attributes, event_handler_attributes)
185
-    
186
-    let body_attributes = {'onafterprint': [], 'onbeforeprint': [], 'onbeforeunload': [], 'onblur': [], 'onerror': [], 'onfocus': [], 'onhashchange': [], 'onload': [], 'onmessage': [], 'onoffline': [], 'ononline': [], 'onpopstate': [], 'onredo': [], 'onresize': [], 'onstorage': [], 'onundo': [], 'onunload': []}
187
-
188
-    let event_attributes_value = {
189
-        \ 'onabort': ['Script', ''],
190
-        \ 'onafterprint': ['Script', ''],
191
-        \ 'onbeforeprint': ['Script', ''],
192
-        \ 'onbeforeunload': ['Script', ''],
193
-        \ 'onblur': ['Script', ''],
194
-        \ 'oncanplay': ['Script', ''],
195
-        \ 'oncanplaythrough': ['Script', ''],
196
-        \ 'onchange': ['Script', ''],
197
-        \ 'onclick': ['Script', ''],
198
-        \ 'oncontextmenu': ['Script', ''],
199
-        \ 'ondblclick': ['Script', ''],
200
-        \ 'ondrag': ['Script', ''],
201
-        \ 'ondragend': ['Script', ''],
202
-        \ 'ondragenter': ['Script', ''],
203
-        \ 'ondragleave': ['Script', ''],
204
-        \ 'ondragover': ['Script', ''],
205
-        \ 'ondragstart': ['Script', ''],
206
-        \ 'ondrop': ['Script', ''],
207
-        \ 'ondurationchange': ['Script', ''],
208
-        \ 'onemptied': ['Script', ''],
209
-        \ 'onended': ['Script', ''],
210
-        \ 'onerror': ['Script', ''],
211
-        \ 'onfocus': ['Script', ''],
212
-        \ 'onformchange': ['Script', ''],
213
-        \ 'onforminput': ['Script', ''],
214
-        \ 'onhashchange': ['Script', ''],
215
-        \ 'oninput': ['Script', ''],
216
-        \ 'oninvalid': ['Script', ''],
217
-        \ 'onkeydown': ['Script', ''],
218
-        \ 'onkeypress': ['Script', ''],
219
-        \ 'onkeyup': ['Script', ''],
220
-        \ 'onload': ['Script', ''],
221
-        \ 'onloadeddata': ['Script', ''],
222
-        \ 'onloadedmetadata': ['Script', ''],
223
-        \ 'onloadstart': ['Script', ''],
224
-        \ 'onmessage': ['Script', ''],
225
-        \ 'onmousedown': ['Script', ''],
226
-        \ 'onmousemove': ['Script', ''],
227
-        \ 'onmouseout': ['Script', ''],
228
-        \ 'onmouseover': ['Script', ''],
229
-        \ 'onmouseup': ['Script', ''],
230
-        \ 'onmousewheel': ['Script', ''],
231
-        \ 'onoffline': ['Script', ''],
232
-        \ 'ononline': ['Script', ''],
233
-        \ 'onpagehide': ['Script', ''],
234
-        \ 'onpageshow': ['Script', ''],
235
-        \ 'onpause': ['Script', ''],
236
-        \ 'onplay': ['Script', ''],
237
-        \ 'onplaying': ['Script', ''],
238
-        \ 'onpopstate': ['Script', ''],
239
-        \ 'onprogress': ['Script', ''],
240
-        \ 'onratechange': ['Script', ''],
241
-        \ 'onreadystatechange': ['Script', ''],
242
-        \ 'onredo': ['Script', ''],
243
-        \ 'onresize': ['Script', ''],
244
-        \ 'onscroll': ['Script', ''],
245
-        \ 'onseeked': ['Script', ''],
246
-        \ 'onseeking': ['Script', ''],
247
-        \ 'onselect': ['Script', ''],
248
-        \ 'onshow': ['Script', ''],
249
-        \ 'onstalled': ['Script', ''],
250
-        \ 'onstorage': ['Script', ''],
251
-        \ 'onsubmit': ['Script', ''],
252
-        \ 'onsuspend': ['Script', ''],
253
-        \ 'ontimeupdate': ['Script', ''],
254
-        \ 'onundo': ['Script', ''],
255
-        \ 'onunload': ['Script', ''],
256
-        \ 'onvolumechange': ['Script', ''],
257
-        \ 'onwaiting': ['Script', '']
258
-    \ }
259
-
260
-    let attributes_value = extend(attributes_value, event_attributes_value)
261
-endif
262
-if !exists('g:html5_rdfa_attributes_complete')
263
-    let g:html5_rdfa_attributes_complete = 1
264
-endif
265
-if g:html5_rdfa_attributes_complete == 1
266
-    " http://www.w3.org/TR/rdfa-syntax/#s_metaAttributes
267
-    " http://www.w3.org/TR/rdfa-core/#s_syntax
268
-    let relrev = ['chapter', 'contents', 'copyright', 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']
269
-    let rdfa_attributes = {'about': [], 'content': [], 'datatype': [], 'prefix': [], 'profile': [], 'property': [], 'resource': [], 'rel': relrev, 'rev': relrev, 'typeof': [], 'vocab': []}
270
-    let global_attributes = extend(global_attributes, rdfa_attributes)
271
-
272
-    let rdfa_attributes_value = {
273
-        \ 'about': ['SafeCURIEorCURIEorURI', ''],
274
-        \ 'content': ['CDATA String', ''],
275
-        \ 'datatype': ['CURIE', ''],
276
-        \ 'prefix': ['*Prefix', ''],
277
-        \ 'profile': ['String', ''],
278
-        \ 'property': ['*TERMorCURIEorAbsURIs', ''],
279
-        \ 'resource': ['URIorSafeCURIE', ''],
280
-        \ 'rel': ['*TERMorCURIEorAbsURIs', ''],
281
-        \ 'rev': ['*TERMorCURIEorAbsURIs', ''],
282
-        \ 'typeof': ['*TERMorCURIEorAbsURIs', ''],
283
-        \ 'vocab': ['URI', '']
284
-    \ }
285
-    let attributes_value = extend(attributes_value, rdfa_attributes_value)
286
-endif
287
-if !exists('g:html5_microdata_attributes_complete')
288
-    let g:html5_microdata_attributes_complete = 1
289
-endif
290
-if g:html5_microdata_attributes_complete == 1
291
-    let microdata_attributes = {'itemid': [], 'itemscope': ['itemscope', ''], 'itemtype': [], 'itemprop': [], 'itemref': []}
292
-    let global_attributes = extend(global_attributes, microdata_attributes)
293
-
294
-    let microdata_attributes_value = {
295
-        \ 'itemid': ['URI', ''],
296
-        \ 'itemscope': ['Bool', ''],
297
-        \ 'itemtype': ['URI', ''],
298
-        \ 'itemprop': ['String', ''],
299
-        \ 'itemref': ['*ID', '']
300
-    \ }
301
-    let attributes_value = extend(attributes_value, microdata_attributes_value)
302
-endif
303
-" }}}
304
-
305
-" WAI_ARIA: {{{
306
-" Ref: http://www.w3.org/TR/wai-aria/
307
-" Version: Draft 15 December 2009
308
-if !exists('g:html5_aria_attributes_complete')
309
-    let g:html5_aria_attributes_complete = 1
310
-endif
311
-if g:html5_aria_attributes_complete == 1
312
-    " Ref: http://www.w3.org/TR/wai-aria/roles
313
-    " Version: Draft 15 December 2009
314
-    let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'slider', 'spinbutton', 'status', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
315
-    let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
316
-    let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
317
-    let role = extend(widget_role, document_structure)
318
-    let role = extend(role, landmark_role)
319
-    let global_attributes = extend(global_attributes, {'role': role})
320
-endif
321
-" }}}
322
-
323
-" Ref: http://dev.w3.org/html5/markup/
324
-" Version: Draft 05 April 2011
325
-let phrasing_elements = ['a', 'em', 'strong', 'small', 'mark', 'abbr', 'dfn', 'i', 'b', 'u', 'code', 'var', 'samp', 'kbd', 'sup', 'sub', 'q', 'cite', 'span', 'bdo', 'bdi', 'br', 'wbr', 'ins', 'del', 'img', 'embed', 'object', 'iframe', 'map', 'area', 'script', 'noscript', 'ruby', 'video', 'audio', 'input', 'textarea', 'select', 'button', 'label', 'output', 'datalist', 'keygen', 'progress', 'command', 'canvas', 'time', 'meter']
326
-
327
-let metadata_elements = ['link', 'style', 'meta', 'script', 'noscript', 'command']
328
-
329
-let flow_elements = phrasing_elements + ['p', 'hr', 'pre', 'ul', 'ol', 'dl', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hgroup', 'address', 'blockquote', 'ins', 'del', 'object', 'map', 'noscript', 'section', 'nav', 'article', 'aside', 'header', 'footer', 'video', 'audio', 'figure', 'table', 'form', 'fieldset', 'menu', 'canvas', 'details']
330
-
331
-" http://dev.w3.org/html5/spec/Overview.html#linkTypes
332
-let linktypes = ['alternate', 'author', 'bookmark', 'external', 'help', 'icon', 'license', 'next', 'nofollow', 'noreferrer', 'pingback', 'prefetch', 'prev', 'search', 'stylesheet', 'sidebar', 'tag']
333
-" http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
334
-let linkreltypes = linktypes + ['canonical']
335
-
336
-" a and button are special elements for interactive, some element can't be its descendent
337
-let abutton_dec = 'details\\|embed\\|iframe\\|keygen\\|label\\|menu\\|select\\|textarea'
338
-
339
-
340
-
341
-let g:xmldata_html5 = {
342
-\ 'vimxmlentities': ['AElig', 'Aacute', 'Acirc', 'Agrave', 'Alpha', 'Aring', 'Atilde', 'Auml', 'Beta', 'Ccedil', 'Chi', 'Dagger', 'Delta', 'ETH', 'Eacute', 'Ecirc', 'Egrave', 'Epsilon', 'Eta', 'Euml', 'Gamma', 'Iacute', 'Icirc', 'Igrave', 'Iota', 'Iuml', 'Kappa', 'Lambda', 'Mu', 'Ntilde', 'Nu', 'OElig', 'Oacute', 'Ocirc', 'Ograve', 'Omega', 'Omicron', 'Oslash', 'Otilde', 'Ouml', 'Phi', 'Pi', 'Prime', 'Psi', 'Rho', 'Scaron', 'Sigma', 'THORN', 'Tau', 'Theta', 'Uacute', 'Ucirc', 'Ugrave', 'Upsilon', 'Uuml', 'Xi', 'Yacute', 'Yuml', 'Zeta', 'aacute', 'acirc', 'acute', 'aelig', 'agrave', 'alefsym', 'alpha', 'amp', 'and', 'ang', 'apos', 'aring', 'asymp', 'atilde', 'auml', 'bdquo', 'beta', 'brvbar', 'bull', 'cap', 'ccedil', 'cedil', 'cent', 'chi', 'circ', 'clubs', 'cong', 'copy', 'crarr', 'cup', 'curren', 'dArr', 'dagger', 'darr', 'deg', 'delta', 'diams', 'divide', 'eacute', 'ecirc', 'egrave', 'empty', 'emsp', 'ensp', 'epsilon', 'equiv', 'eta', 'eth', 'euml', 'euro', 'exist', 'fnof', 'forall', 'frac12', 'frac14', 'frac34', 'frasl', 'gamma', 'ge', 'gt', 'hArr', 'harr', 'hearts', 'hellip', 'iacute', 'icirc', 'iexcl', 'igrave', 'image', 'infin', 'int', 'iota', 'iquest', 'isin', 'iuml', 'kappa', 'lArr', 'lambda', 'lang', 'laquo', 'larr', 'lceil', 'ldquo', 'le', 'lfloor', 'lowast', 'loz', 'lrm', 'lsaquo', 'lsquo', 'lt', 'macr', 'mdash', 'micro', 'middot', 'minus', 'mu', 'nabla', 'nbsp', 'ndash', 'ne', 'ni', 'not', 'notin', 'nsub', 'ntilde', 'nu', 'oacute', 'ocirc', 'oelig', 'ograve', 'oline', 'omega', 'omicron', 'oplus', 'or', 'ordf', 'ordm', 'oslash', 'otilde', 'otimes', 'ouml', 'para', 'part', 'permil', 'perp', 'phi', 'pi', 'piv', 'plusmn', 'pound', 'prime', 'prod', 'prop', 'psi', 'quot', 'rArr', 'radic', 'rang', 'raquo', 'rarr', 'rceil', 'rdquo', 'real', 'reg', 'rfloor', 'rho', 'rlm', 'rsaquo', 'rsquo', 'sbquo', 'scaron', 'sdot', 'sect', 'shy', 'sigma', 'sigmaf', 'sim', 'spades', 'sub', 'sube', 'sum', 'sup', 'sup1', 'sup2', 'sup3', 'supe', 'szlig', 'tau', 'there4', 'theta', 'thetasym', 'thinsp', 'thorn', 'tilde', 'times', 'trade', 'uArr', 'uacute', 'uarr', 'ucirc', 'ugrave', 'uml', 'upsih', 'upsilon', 'uuml', 'weierp', 'xi', 'yacute', 'yen', 'yuml', 'zeta', 'zwj', 'zwnj'],
343
-\ 'vimxmlroot': ['html'],
344
-\ 'a': [
345
-    \ filter(copy(flow_elements), "!(v:val =~ '". abutton_dec ."')"),
346
-    \ extend(copy(global_attributes), {'name': [], 'href': [], 'target': [], 'rel': linktypes, 'hreflang': lang_tag, 'media': [], 'type': []}) 
347
-\ ],
348
-\ 'abbr': [
349
-    \ phrasing_elements,
350
-    \ global_attributes
351
-\ ],
352
-\ 'address': [
353
-    \ filter(copy(flow_elements), "!(v:val =~ 'address\\|nav\\|article\\|header\\|footer\\|section\\|aside\\|h1\\|h2\\|h3\\|h4\\|h5\\|h6')"),
354
-    \ global_attributes
355
-\ ],
356
-\ 'area': [
357
-    \ [],
358
-    \ extend(copy(global_attributes), {'alt': [], 'href': [], 'target': [], 'rel': linktypes, 'media': [], 'hreflang': lang_tag, 'type': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'coords': []})
359
-\ ],
360
-\ 'article': [
361
-    \ flow_elements + ['style'],
362
-    \ global_attributes
363
-\ ],
364
-\ 'aside': [
365
-    \ flow_elements + ['style'],
366
-    \ global_attributes
367
-\ ],
368
-\ 'audio': [
369
-    \ flow_elements + ['source', 'track'],
370
-    \ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'src': []})
371
-\ ],
372
-\ 'b': [
373
-    \ phrasing_elements,
374
-    \ global_attributes
375
-\ ],
376
-\ 'base': [
377
-    \ [],
378
-    \ extend(copy(global_attributes), {'href': [], 'target': []})
379
-\ ],
380
-\ 'bdo': [
381
-    \ phrasing_elements,
382
-    \ global_attributes
383
-\ ],
384
-\ 'bdi': [
385
-    \ phrasing_elements,
386
-    \ global_attributes
387
-\ ],
388
-\ 'blockquote': [
389
-    \ flow_elements,
390
-    \ extend(copy(global_attributes), {'cite': []})
391
-\ ],
392
-\ 'body': [
393
-    \ flow_elements,
394
-    \ extend(copy(global_attributes), body_attributes)
395
-\ ],
396
-\ 'br': [
397
-    \ [],
398
-    \ global_attributes
399
-\ ],
400
-\ 'button': [
401
-    \ filter(copy(phrasing_elements), "!(v:val =~ '". abutton_dec ."')"),
402
-    \ extend(copy(global_attributes), {'type': ['submit', 'reset', 'button'], 'name': [], 'disabled': ['disabled', ''], 'form': [], 'value': [], 'formaction': [], 'autofocus': ['autofocus', ''], 'formenctype': ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'], 'formmethod': ['get', 'post', 'put', 'delete'], 'formtarget': [], 'formnovalidate': ['formnovalidate', '']})
403
-\ ],
404
-\ 'canvas': [
405
-    \ flow_elements,
406
-    \ extend(copy(global_attributes), {'height': [], 'width': []})
407
-\ ],
408
-\ 'caption': [
409
-    \ filter(copy(flow_elements), "!(v:val =~ 'table')"),
410
-    \ global_attributes
411
-\ ],
412
-\ 'cite': [
413
-    \ phrasing_elements,
414
-    \ global_attributes
415
-\ ],
416
-\ 'code': [
417
-    \ phrasing_elements,
418
-    \ global_attributes
419
-\ ],
420
-\ 'col': [
421
-    \ [],
422
-    \ extend(copy(global_attributes), {'span': []})
423
-\ ],
424
-\ 'colgroup': [
425
-    \ [],
426
-    \ extend(copy(global_attributes), {'span': []})
427
-\ ],
428
-\ 'command': [
429
-    \ ['col'],
430
-    \ extend(copy(global_attributes), {'type': ['command', 'radio', 'checkbox'], 'radiogroup': [], 'checked': ['checked', ''], 'label': [], 'icon': [], 'disabled': ['disabled', '']})
431
-\ ],
432
-\ 'datalist': [
433
-    \ phrasing_elements + ['option'],
434
-    \ global_attributes
435
-\ ],
436
-\ 'dd': [
437
-    \ flow_elements,
438
-    \ global_attributes
439
-\ ],
440
-\ 'del': [
441
-    \ flow_elements,
442
-    \ extend(copy(global_attributes), {'cite': [], 'datetime': []})
443
-\ ],
444
-\ 'details': [
445
-    \ flow_elements + ['summary'],
446
-    \ extend(copy(global_attributes), {'open': ['open', '']})
447
-\ ],
448
-\ 'dfn': [
449
-    \ filter(copy(phrasing_elements), "!(v:val =~ 'dfn')"),
450
-    \ global_attributes
451
-\ ],
452
-\ 'div': [
453
-    \ flow_elements + ['style'],
454
-    \ global_attributes
455
-\ ],
456
-\ 'dl': [
457
-    \ ['dt', 'dd'],
458
-    \ global_attributes
459
-\ ],
460
-\ 'dt': [
461
-    \ phrasing_elements,
462
-    \ global_attributes
463
-\ ],
464
-\ 'em': [
465
-    \ phrasing_elements,
466
-    \ global_attributes
467
-\ ],
468
-\ 'embed': [
469
-    \ [],
470
-    \ extend(copy(global_attributes), {'src': [], 'type': [], 'height': [], 'width': []})
471
-\ ],
472
-\ 'fieldset': [
473
-    \ flow_elements + ['legend'],
474
-    \ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': []})
475
-\ ],
476
-\ 'figcaption': [
477
-    \ flow_elements,
478
-    \ global_attributes
479
-\ ],
480
-\ 'figure': [
481
-    \ flow_elements + ['figcaption'],
482
-    \ global_attributes
483
-\ ],
484
-\ 'footer': [
485
-    \ filter(copy(flow_elements), "!(v:val =~ 'address\\|header\\|footer')"),
486
-    \ global_attributes
487
-\ ],
488
-\ 'form': [
489
-    \ flow_elements,
490
-    \ extend(copy(global_attributes), {'name': [], 'action': [], 'enctype': ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'], 'method': ['get', 'post', 'put', 'delete'], 'target': [], 'novalidate': ['novalidate', ''], 'accept-charset': charset, 'autocomplete': ['on', 'off']})
491
-\ ],
492
-\ 'h1': [
493
-    \ phrasing_elements,
494
-    \ global_attributes
495
-\ ],
496
-\ 'h2': [
497
-    \ phrasing_elements,
498
-    \ global_attributes
499
-\ ],
500
-\ 'h3': [
501
-    \ phrasing_elements,
502
-    \ global_attributes
503
-\ ],
504
-\ 'h4': [
505
-    \ phrasing_elements,
506
-    \ global_attributes
507
-\ ],
508
-\ 'h5': [
509
-    \ phrasing_elements,
510
-    \ global_attributes
511
-\ ],
512
-\ 'h6': [
513
-    \ phrasing_elements,
514
-    \ global_attributes
515
-\ ],
516
-\ 'head': [
517
-    \ metadata_elements + ['title', 'base'],
518
-    \ global_attributes
519
-\ ],
520
-\ 'header': [
521
-    \ filter(copy(flow_elements), "!(v:val =~ 'address\\|header\\|footer')"),
522
-    \ global_attributes
523
-\ ],
524
-\ 'hgroup': [
525
-    \ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
526
-    \ global_attributes
527
-\ ],
528
-\ 'hr': [
529
-    \ [],
530
-    \ global_attributes
531
-\ ],
532
-\ 'html': [
533
-    \ ['head', 'body'],
534
-    \ extend(copy(global_attributes), {'manifest': [], 'version': ['HTML+RDFa 1.1']})
535
-\ ],
536
-\ 'i': [
537
-    \ phrasing_elements,
538
-    \ global_attributes
539
-\ ],
540
-\ 'iframe': [
541
-    \ [],
542
-    \ extend(copy(global_attributes), {'src': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', '']})
543
-\ ],
544
-\ 'img': [
545
-    \ [],
546
-    \ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'usemap': [], 'ismap': ['ismap', '']})
547
-\ ],
548
-\ 'input': [
549
-    \ [],
550
-    \ extend(copy(global_attributes), {'type': ['text', 'password', 'checkbox', 'radio', 'button', 'submit', 'reset', 'file', 'hidden', 'image', 'datetime', 'datetime-local', 'date', 'month', 'time', 'week', 'number', 'range', 'email', 'url', 'search', 'tel', 'coloe'], 'name': [], 'disabled': ['disabled', ''], 'form': [], 'maxlength': [], 'readonly': ['readonly', ''], 'size': [], 'value': [], 'autocomplete': ['on', 'off'], 'autofocus': ['autofocus', ''], 'list': [], 'pattern': [], 'required': ['required', ''], 'placeholder': [], 'checked': ['checked'], 'accept': [], 'multiple': ['multiple', ''], 'alt': [], 'src': [], 'height': [], 'width': [], 'min': [], 'max': [], 'step': [], 'formenctype': ['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain'], 'formmethod': ['get', 'post', 'put', 'delete'], 'formtarget': [], 'formnovalidate': ['formnovalidate', '']})
551
-\ ],
552
-\ 'ins': [
553
-    \ flow_elements,
554
-    \ extend(copy(global_attributes), {'cite': [], 'datetime': []})
555
-\ ],
556
-\ 'kbd': [
557
-    \ phrasing_elements,
558
-    \ global_attributes
559
-\ ],
560
-\ 'keygen': [
561
-    \ [],
562
-    \ extend(copy(global_attributes), {'challenge': [], 'keytype': ['rsa'], 'autofocus': ['autofocus', ''], 'name': [], 'disabled': ['disabled', ''], 'form': []})
563
-\ ],
564
-\ 'label': [
565
-    \ filter(copy(phrasing_elements), "!(v:val =~ 'label')"),
566
-    \ extend(copy(global_attributes), {'for': [], 'form': []})
567
-\ ],
568
-\ 'legend': [
569
-    \ phrasing_elements,
570
-    \ global_attributes
571
-\ ],
572
-\ 'li': [
573
-    \ flow_elements,
574
-    \ extend(copy(global_attributes), {'value': []})
575
-\ ],
576
-\ 'link': [
577
-    \ [],
578
-    \ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any']})
579
-\ ],
580
-\ 'map': [
581
-    \ flow_elements,
582
-    \ extend(copy(global_attributes), {'name': []})
583
-\ ],
584
-\ 'mark': [
585
-    \ phrasing_elements,
586
-    \ global_attributes
587
-\ ],
588
-\ 'menu': [
589
-    \ flow_elements + ['li'],
590
-    \ extend(copy(global_attributes), {'type': ['toolbar', 'context'], 'label': []})
591
-\ ],
592
-\ 'meta': [
593
-    \ [],
594
-    \ extend(copy(global_attributes), {'name': [], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
595
-\ ],
596
-\ 'meter': [
597
-    \ phrasing_elements,
598
-    \ extend(copy(global_attributes), {'value': [], 'min': [], 'low': [], 'high': [], 'max': [], 'optimum': []})
599
-\ ],
600
-\ 'nav': [
601
-    \ flow_elements,
602
-    \ global_attributes
603
-\ ],
604
-\ 'noscript': [
605
-    \ flow_elements + ['link', 'meta', 'style'],
606
-    \ global_attributes
607
-\ ],
608
-\ 'object': [
609
-    \ flow_elements + ['param'],
610
-    \ extend(copy(global_attributes), {'data': [], 'type': [], 'height': [], 'width': [], 'usemap': [], 'name': [], 'form': []})
611
-\ ],
612
-\ 'ol': [
613
-    \ ['li'],
614
-    \ extend(copy(global_attributes), {'start': [], 'reversed': ['reversed', '']})
615
-\ ],
616
-\ 'optgroup': [
617
-    \ ['option'],
618
-    \ extend(copy(global_attributes), {'label': [], 'disabled': ['disabled', '']})
619
-\ ],
620
-\ 'option': [
621
-    \ [''],
622
-    \ extend(copy(global_attributes), {'disabled': ['disabled', ''], 'selected': ['selected', ''], 'label': [], 'value': []})
623
-\ ],
624
-\ 'output': [
625
-    \ phrasing_elements,
626
-    \ extend(copy(global_attributes), {'name': [], 'form': [], 'for': []})
627
-\ ],
628
-\ 'p': [
629
-    \ phrasing_elements,
630
-    \ global_attributes
631
-\ ],
632
-\ 'param': [
633
-    \ [],
634
-    \ extend(copy(global_attributes), {'name': [], 'value': []})
635
-\ ],
636
-\ 'pre': [
637
-    \ phrasing_elements,
638
-    \ global_attributes
639
-\ ],
640
-\ 'progress': [
641
-    \ filter(copy(phrasing_elements), "!(v:val =~ 'progress')"),
642
-    \ extend(copy(global_attributes), {'value': [], 'max': []})
643
-\ ],
644
-\ 'q': [
645
-    \ phrasing_elements,
646
-    \ extend(copy(global_attributes), {'cite': []})
647
-\ ],
648
-\ 'rp': [
649
-    \ phrasing_elements,
650
-    \ global_attributes
651
-\ ],
652
-\ 'rt': [
653
-    \ phrasing_elements,
654
-    \ global_attributes
655
-\ ],
656
-\ 'ruby': [
657
-    \ phrasing_elements + ['rp', 'rt'],
658
-    \ global_attributes
659
-\ ],
660
-\ 'samp': [
661
-    \ phrasing_elements,
662
-    \ global_attributes
663
-\ ],
664
-\ 'script': [
665
-    \ [],
666
-    \ extend(copy(global_attributes), {'src': [], 'defer': ['defer', ''], 'async': ['async', ''], 'type': [], 'charset': charset})
667
-\ ],
668
-\ 'section': [
669
-    \ flow_elements + ['style'],
670
-    \ global_attributes
671
-\ ],
672
-\ 'select': [
673
-    \ ['optgroup', 'option'],
674
-    \ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': [], 'size': [], 'multiple': ['multiple', '']})
675
-\ ],
676
-\ 'small': [
677
-    \ phrasing_elements,
678
-    \ global_attributes
679
-\ ],
680
-\ 'source': [
681
-    \ [],
682
-    \ extend(copy(global_attributes), {'src': [], 'type': [], 'media': []})
683
-\ ],
684
-\ 'span': [
685
-    \ phrasing_elements,
686
-    \ global_attributes
687
-\ ],
688
-\ 'strong': [
689
-    \ phrasing_elements,
690
-    \ global_attributes
691
-\ ],
692
-\ 'style': [
693
-    \ [],
694
-    \ extend(copy(global_attributes), {'type': [], 'media': [], 'scoped': ['scoped', '']})
695
-\ ],
696
-\ 'sub': [
697
-    \ phrasing_elements,
698
-    \ global_attributes
699
-\ ],
700
-\ 'summary': [
701
-    \ phrasing_elements,
702
-    \ global_attributes
703
-\ ],
704
-\ 'sup': [
705
-    \ phrasing_elements,
706
-    \ global_attributes
707
-\ ],
708
-\ 'table': [
709
-    \ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'],
710
-    \ extend(copy(global_attributes), {'border': []})
711
-\ ],
712
-\ 'tbody': [
713
-    \ ['tr'],
714
-    \ global_attributes
715
-\ ],
716
-\ 'td': [
717
-    \ flow_elements,
718
-    \ extend(copy(global_attributes), {'colspan': [], 'rowspan': [], 'headers': []})
719
-\ ],
720
-\ 'textarea': [
721
-    \ [''],
722
-    \ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': [], 'readonly': ['readonly', ''], 'maxlength': [], 'autofocus': ['autofocus', ''], 'required': ['required', ''], 'placeholder': [], 'rows': [], 'wrap': ['hard', 'soft'], 'cols': []})
723
-\ ],
724
-\ 'tfoot': [
725
-    \ ['tr'],
726
-    \ global_attributes
727
-\ ],
728
-\ 'th': [
729
-    \ phrasing_elements,
730
-    \ extend(copy(global_attributes), {'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'colspan': [], 'rowspan': [], 'headers': []})
731
-\ ],
732
-\ 'thead': [
733
-    \ ['tr'],
734
-    \ global_attributes
735
-\ ],
736
-\ 'time': [
737
-    \ phrasing_elements,
738
-    \ extend(copy(global_attributes), {'datetime': [], 'pubdate': ['pubdate', '']})
739
-\ ],
740
-\ 'title': [
741
-    \ [''],
742
-    \ global_attributes
743
-\ ],
744
-\ 'tr': [
745
-    \ ['th', 'td'],
746
-    \ global_attributes
747
-\ ],
748
-\ 'track': [
749
-    \ [],
750
-    \ extend(copy(global_attributes), {'kind': ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'], 'src': [], 'charset': charset, 'srclang': lang_tag, 'label': []})
751
-\ ],
752
-\ 'u': [
753
-    \ phrasing_elements,
754
-    \ global_attributes
755
-\ ],
756
-\ 'ul': [
757
-    \ ['li'],
758
-    \ global_attributes
759
-\ ],
760
-\ 'var': [
761
-    \ phrasing_elements,
762
-    \ global_attributes
763
-\ ],
764
-\ 'video': [
765
-    \ flow_elements + ['source', 'track'],
766
-    \ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'poster': [], 'height': [], 'width': [], 'src': []})
767
-\ ],
768
-\ 'wbr': [
769
-    \ [],
770
-    \ global_attributes
771
-\ ],
772
-\ 'vimxmlattrinfo' : attributes_value,
773
-\ 'vimxmltaginfo': {
774
-    \ 'area': ['/>', ''],
775
-    \ 'base': ['/>', ''],
776
-    \ 'br': ['/>', ''],
777
-    \ 'col': ['/>', ''],
778
-    \ 'command': ['/>', ''],
779
-    \ 'embed': ['/>', ''],
780
-    \ 'hr': ['/>', ''],
781
-    \ 'img': ['/>', ''],
782
-    \ 'input': ['/>', ''],
783
-    \ 'keygen': ['/>', ''],
784
-    \ 'link': ['/>', ''],
785
-    \ 'meta': ['/>', ''],
786
-    \ 'param': ['/>', ''],
787
-    \ 'source': ['/>', ''],
788
-    \ 'track': ['/>', ''],
789
-    \ 'wbr': ['/>', ''],
790
-\ },
791
-\ }

+ 0
- 2
dotfiles/vim/bundle/html5.vim/config.mk View File

@@ -1,2 +0,0 @@
1
-VERSION=0.26
2
-

+ 0
- 341
dotfiles/vim/bundle/html5.vim/indent/html.vim View File

@@ -1,341 +0,0 @@
1
-" Description:      HTML5 and inline SVG indenter
2
-" Changed By: HT de Beer <H.T.de.Beer@gmail.com>
3
-" Last Change: 20121013
4
-"   Added the SVG elements to the list of indenting element. SVG elements
5
-"   taken from http://www.w3.org/TR/SVG/eltindex.html
6
-"   
7
-" Description:        html5 (and html4) indenter
8
-" Changed By:        Brian Gershon <brian.five@gmail.com>
9
-" Last Change:        30 Jan 2011
10
-" 
11
-"   1. Started with vim72 html indent file authored by Johannes Zellner (below)
12
-"   2. Added html5 list as described here:
13
-"      http://stackoverflow.com/questions/3232518/how-to-update-vim-to-color-code-new-html-elements
14
-"   3. Added this to a fork of https://github.com/othree/html5.vim
15
-"      which already provides nice html5 syntax highlighting.
16
-"
17
-" Description:        html indenter
18
-" Author:        Johannes Zellner <johannes@zellner.org>
19
-" Last Change:        Mo, 05 Jun 2006 22:32:41 CEST
20
-"                 Restoring 'cpo' and 'ic' added by Bram 2006 May 5
21
-" Globals:
22
-" let g:html_indent_tags = 'html\|p\|time'
23
-" let g:html_exclude_tags = ['html', 'style', 'script', 'body']
24
-
25
-
26
-" Only load this indent file when no other was loaded.
27
-if exists("b:did_indent")
28
-    finish
29
-endif
30
-runtime! indent/javascript.vim
31
-let s:jsindent = &indentexpr
32
-unlet b:did_indent
33
-runtime! indent/css.vim
34
-let s:cssindent = &indentexpr
35
-let b:did_indent = 1
36
-
37
-" [-- local settings (must come before aborting the script) --]
38
-setlocal indentexpr=HtmlIndentGet(v:lnum)
39
-setlocal indentkeys=o,O,*<Return>,<>>,{,}
40
-
41
-
42
-let s:tags = []
43
-
44
-" [-- <ELEMENT ? - - ...> --]
45
-call add(s:tags, 'a')
46
-call add(s:tags, 'abbr')
47
-call add(s:tags, 'acronym')
48
-call add(s:tags, 'address')
49
-call add(s:tags, 'b')
50
-call add(s:tags, 'bdo')
51
-call add(s:tags, 'big')
52
-call add(s:tags, 'blockquote')
53
-call add(s:tags, 'button')
54
-call add(s:tags, 'caption')
55
-call add(s:tags, 'center')
56
-call add(s:tags, 'cite')
57
-call add(s:tags, 'code')
58
-call add(s:tags, 'colgroup')
59
-call add(s:tags, 'del')
60
-call add(s:tags, 'dfn')
61
-call add(s:tags, 'dir')
62
-call add(s:tags, 'div')
63
-call add(s:tags, 'dl')
64
-call add(s:tags, 'em')
65
-call add(s:tags, 'fieldset')
66
-call add(s:tags, 'font')
67
-call add(s:tags, 'form')
68
-call add(s:tags, 'frameset')
69
-call add(s:tags, 'h1')
70
-call add(s:tags, 'h2')
71
-call add(s:tags, 'h3')
72
-call add(s:tags, 'h4')
73
-call add(s:tags, 'h5')
74
-call add(s:tags, 'h6')
75
-call add(s:tags, 'i')
76
-call add(s:tags, 'iframe')
77
-call add(s:tags, 'ins')
78
-call add(s:tags, 'kbd')
79
-call add(s:tags, 'label')
80
-call add(s:tags, 'legend')
81
-call add(s:tags, 'li')
82
-call add(s:tags, 'map')
83
-call add(s:tags, 'menu')
84
-call add(s:tags, 'noframes')
85
-call add(s:tags, 'noscript')
86
-call add(s:tags, 'object')
87
-call add(s:tags, 'ol')
88
-call add(s:tags, 'optgroup')
89
-call add(s:tags, 'p')
90
-" call add(s:tags, 'pre')
91
-call add(s:tags, 'q')
92
-call add(s:tags, 's')
93
-call add(s:tags, 'samp')
94
-call add(s:tags, 'script')
95
-call add(s:tags, 'select')
96
-call add(s:tags, 'small')
97
-call add(s:tags, 'span')
98
-call add(s:tags, 'strong')
99
-call add(s:tags, 'style')
100
-call add(s:tags, 'sub')
101
-call add(s:tags, 'sup')
102
-call add(s:tags, 'table')
103
-call add(s:tags, 'textarea')
104
-call add(s:tags, 'title')
105
-call add(s:tags, 'tt')
106
-call add(s:tags, 'u')
107
-call add(s:tags, 'ul')
108
-call add(s:tags, 'var')
109
-
110
-" New HTML 5 elements
111
-call add(s:tags, 'article')
112
-call add(s:tags, 'aside')
113
-call add(s:tags, 'audio')
114
-call add(s:tags, 'canvas')
115
-call add(s:tags, 'datalist')
116
-call add(s:tags, 'details')
117
-call add(s:tags, 'figcaption')
118
-call add(s:tags, 'figure')
119
-call add(s:tags, 'footer')
120
-call add(s:tags, 'header')
121
-call add(s:tags, 'hgroup')
122
-call add(s:tags, 'mark')
123
-call add(s:tags, 'meter')
124
-call add(s:tags, 'nav')
125
-call add(s:tags, 'output')
126
-call add(s:tags, 'progress')
127
-call add(s:tags, 'rp')
128
-call add(s:tags, 'rt')
129
-call add(s:tags, 'ruby')
130
-call add(s:tags, 'section')
131
-call add(s:tags, 'summary')
132
-call add(s:tags, 'time')
133
-call add(s:tags, 'video')
134
-call add(s:tags, 'bdi')
135
-
136
-" Common inline used SVG elements
137
-call add(s:tags, 'clipPath')
138
-call add(s:tags, 'defs')
139
-call add(s:tags, 'desc')
140
-call add(s:tags, 'filter')
141
-call add(s:tags, 'foreignObject')
142
-call add(s:tags, 'g')
143
-call add(s:tags, 'linearGradient')
144
-call add(s:tags, 'marker')
145
-call add(s:tags, 'mask')
146
-call add(s:tags, 'pattern')
147
-call add(s:tags, 'radialGradient')
148
-call add(s:tags, 'svg')
149
-call add(s:tags, 'switch')
150
-call add(s:tags, 'symbol')
151
-call add(s:tags, 'text')
152
-call add(s:tags, 'textPath')
153
-call add(s:tags, 'tref')
154
-call add(s:tags, 'tspan')
155
-
156
-call add(s:tags, 'html')
157
-call add(s:tags, 'head')
158
-call add(s:tags, 'body')
159
-
160
-call add(s:tags, 'thead')
161
-call add(s:tags, 'tbody')
162
-call add(s:tags, 'tfoot')
163
-call add(s:tags, 'tr')
164
-call add(s:tags, 'th')
165
-call add(s:tags, 'td')
166
-
167
-if exists('g:html_exclude_tags')
168
-    for tag in g:html_exclude_tags
169
-        call remove(s:tags, index(s:tags, tag))
170
-    endfor
171
-endif
172
-let s:html_indent_tags = join(s:tags, '\|')
173
-if exists('g:html_indent_tags')
174
-    let s:html_indent_tags = s:html_indent_tags.'\|'.g:html_indent_tags
175
-endif
176
-
177
-let s:cpo_save = &cpo
178
-set cpo-=C
179
-
180
-" [-- count indent-increasing tags of line a:lnum --]
181
-fun! <SID>HtmlIndentOpen(lnum, pattern)
182
-    let s = substitute('x'.getline(a:lnum),
183
-    \ '.\{-}\(\(<\)\('.a:pattern.'\)\>\)', "\1", 'g')
184
-    let s = substitute(s, "[^\1].*$", '', '')
185
-    return strlen(s)
186
-endfun
187
-
188
-" [-- count indent-decreasing tags of line a:lnum --]
189
-fun! <SID>HtmlIndentClose(lnum, pattern)
190
-    let s = substitute('x'.getline(a:lnum),
191
-    \ '.\{-}\(\(<\)/\('.a:pattern.'\)\>>\)', "\1", 'g')
192
-    let s = substitute(s, "[^\1].*$", '', '')
193
-    return strlen(s)
194
-endfun
195
-
196
-" [-- count indent-increasing '{' of (java|css) line a:lnum --]
197
-fun! <SID>HtmlIndentOpenAlt(lnum)
198
-    return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g'))
199
-endfun
200
-
201
-" [-- count indent-decreasing '}' of (java|css) line a:lnum --]
202
-fun! <SID>HtmlIndentCloseAlt(lnum)
203
-    return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g'))
204
-endfun
205
-
206
-" [-- return the sum of indents respecting the syntax of a:lnum --]
207
-fun! <SID>HtmlIndentSum(lnum, style)
208
-    if a:style == match(getline(a:lnum), '^\s*</')
209
-        if a:style == match(getline(a:lnum), '^\s*</\<\('.s:html_indent_tags.'\)\>')
210
-            let open = <SID>HtmlIndentOpen(a:lnum, s:html_indent_tags)
211
-            let close = <SID>HtmlIndentClose(a:lnum, s:html_indent_tags)
212
-            if 0 != open || 0 != close
213
-                return open - close
214
-            endif
215
-        endif
216
-    endif
217
-
218
-    if '' != &syntax &&
219
-        \ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' &&
220
-        \ synIDattr(synID(a:lnum, strlen(getline(a:lnum)), 1), 'name')
221
-        \ =~ '\(css\|java\).*'
222
-        if a:style == match(getline(a:lnum), '^\s*}')
223
-            return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum)
224
-        endif
225
-    endif
226
-    return 0
227
-endfun
228
-
229
-fun! HtmlIndentGet(lnum)
230
-    " Find a non-empty line above the current line.
231
-    let lnum = prevnonblank(a:lnum - 1)
232
-
233
-    " Hit the start of the file, use zero indent.
234
-    if lnum == 0
235
-        return 0
236
-    endif
237
-
238
-    let restore_ic = &ic
239
-    setlocal ic " ignore case
240
-
241
-    " [-- special handling for <pre>: no indenting --]
242
-    if getline(a:lnum) =~ '\c</pre>'
243
-                \ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nWb')
244
-                \ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nW')
245
-        " we're in a line with </pre> or inside <pre> ... </pre>
246
-        if restore_ic == 0
247
-          setlocal noic
248
-        endif
249
-        return -1
250
-    endif
251
-
252
-    " [-- special handling for <javascript>: use cindent --]
253
-    let js = '<script'
254
-    let jse = '</script>'
255
-
256
-    """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
257
-    " by Tye Zdrojewski <zdro@yahoo.com>, 05 Jun 2006
258
-    " ZDR: This needs to be an AND (we are 'after the start of the pair' AND
259
-    "      we are 'before the end of the pair').  Otherwise, indentation
260
-    "      before the start of the script block will be affected; the end of
261
-    "      the pair will still match if we are before the beginning of the
262
-    "      pair.
263
-    "
264
-    if   0 < searchpair(js, '', jse, 'nWb')
265
-    \ && 0 < searchpair(js, '', jse, 'nW')
266
-        " we're inside javascript
267
-        if getline(searchpair(js, '', '</script>', 'nWb')) !~ '<script [^>]*type=["'']\?text\/\(html\|template\)'
268
-        \ && getline(lnum) !~ js && getline(a:lnum) !~ jse
269
-            if restore_ic == 0
270
-              setlocal noic
271
-            endif
272
-            if s:jsindent == ''
273
-              return cindent(a:lnum)
274
-            else
275
-              execute 'let ind = ' . s:jsindent
276
-              return ind
277
-            endif
278
-        endif
279
-        if getline(a:lnum) =~ jse
280
-          return indent(searchpair(js, '', jse, 'nWb'))
281
-        endif
282
-    endif
283
-
284
-    let css = '<style'
285
-    let csse = '</style>'
286
-    if   0 < searchpair(css, '', csse, 'nWb')
287
-    \ && 0 < searchpair(css, '', csse, 'nW')
288
-        " we're inside style
289
-        if getline(lnum) !~ css && getline(a:lnum) !~ csse
290
-            if restore_ic == 0
291
-              setlocal noic
292
-            endif
293
-            if s:cssindent == ''
294
-              return cindent(a:lnum)
295
-            else
296
-              execute 'let ind = ' . s:cssindent
297
-              return ind
298
-            endif
299
-        endif
300
-        if getline(a:lnum) =~ csse
301
-          return indent(searchpair(css, '', csse, 'nWb'))
302
-        endif
303
-    endif
304
-
305
-    if getline(lnum) =~ '\c</pre>'
306
-        " line before the current line a:lnum contains
307
-        " a closing </pre>. --> search for line before
308
-        " starting <pre> to restore the indent.
309
-        let preline = prevnonblank(search('\c<pre>', 'bW') - 1)
310
-        if preline > 0
311
-            if restore_ic == 0
312
-              setlocal noic
313
-            endif
314
-
315
-            if 0 == match(getline(a:lnum), '^\s*</')
316
-                return indent(preline) - (1*&sw)
317
-            else
318
-                return indent(preline)
319
-            endif
320
-        endif
321
-    endif
322
-
323
-    let ind = <SID>HtmlIndentSum(lnum, -1)
324
-    let ind = ind + <SID>HtmlIndentSum(a:lnum, 0)
325
-
326
-    " Fix for conditional comment
327
-    if getline(a:lnum) =~ '\c<!--.*<\(html\|body\).*-->'
328
-        let ind = ind - 1
329
-    endif
330
-
331
-    if restore_ic == 0
332
-        setlocal noic
333
-    endif
334
-
335
-    return indent(lnum) + (&sw * ind)
336
-endfun
337
-
338
-let &cpo = s:cpo_save
339
-unlet s:cpo_save
340
-
341
-" [-- EOF <runtime>/indent/html.vim --]

+ 0
- 108
dotfiles/vim/bundle/html5.vim/syntax/html.vim View File

@@ -1,108 +0,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 13 January 2011
14
-"               add complete new attributes
15
-"               add microdata Attributes
16
-"               add bdi element
17
-" Modified:     htdebeer <H.T.de.Beer@gmail.com>
18
-" Changes:      add common SVG elements and attributes for inline SVG
19
-
20
-" HTML 5 tags
21
-syn keyword htmlTagName contained article aside audio canvas command
22
-syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
23
-syn keyword htmlTagName contained header hgroup keygen mark meter menu nav output
24
-syn keyword htmlTagName contained progress time ruby rt rp section source summary time track video
25
-syn keyword htmlTagName contained wbr bdi
26
-
27
-" SVG tags
28
-" http://www.w3.org/TR/SVG/
29
-" as found in http://www.w3.org/TR/SVG/eltindex.html
30
-syn keyword htmlTagName contained svg 
31
-syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem 
32
-syn keyword htmlTagName contained animate animateColor animateMotion animateTransform 
33
-syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path
34
-syn keyword htmlTagName contained clipPath color-profile cursor 
35
-syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject
36
-syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence 
37
-syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri 
38
-syn keyword htmlTagName contained glyph glyphRef hkern 
39
-syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop
40
-syn keyword htmlTagName contained missing-glyph mpath 
41
-syn keyword htmlTagName contained text textPath tref tspan vkern
42
-
43
-" HTML 5 arguments
44
-" Core Attributes
45
-syn keyword htmlArg contained accesskey class contenteditable contextmenu dir 
46
-syn keyword htmlArg contained draggable hidden id lang spellcheck style tabindex title translate
47
-" Event-handler Attributes
48
-syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange
49
-syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover 
50
-syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange 
51
-syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata 
52
-syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
53
-syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange 
54
-syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate 
55
-syn keyword htmlArg contained onvolumechange onwaiting
56
-" XML Attributes
57
-syn keyword htmlArg contained xml:lang xml:space xml:base xmlns
58
-" new features
59
-" <body>
60
-syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload 
61
-syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
62
-" <video>, <audio>, <source>, <track>
63
-syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track
64
-" <form>, <input>, <button>
65
-syn keyword htmlArg contained form autocomplete autofocus list min max step
66
-syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
67
-syn keyword htmlArg contained required placeholder
68
-" <command>, <details>, <time>
69
-syn keyword htmlArg contained label icon open datetime pubdate
70
-" <script>
71
-syn keyword htmlArg contained async
72
-
73
-" Custom Data Attributes
74
-" http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data
75
-syn match   htmlArg "\<\(data\(\-[a-z]\+\)\+\)\=\>" contained
76
-
77
-" Microdata
78
-" http://dev.w3.org/html5/md/
79
-syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref
80
-
81
-" SVG
82
-" http://www.w3.org/TR/SVG/
83
-" Some common attributes from http://www.w3.org/TR/SVG/attindex.html
84
-syn keyword htmlArg contained accent-height accumulate additive alphabetic amplitude arabic-form ascent attributeName attributeType azimuth 
85
-syn keyword htmlArg contained baseFrequency baseProfile bbox begin bias by 
86
-syn keyword htmlArg contained calcMode cap-height class clipPathUnits contentScriptType contentStyleType cx cy 
87
-syn keyword htmlArg contained d descent diffuseConstant divisor dur dx dy 
88
-syn keyword htmlArg contained edgeMode elevation end exponent externalResourcesRequired 
89
-syn keyword htmlArg contained fill filterRes filterUnits font-family font-size font-stretch font-style font-variant font-weight format format from fx fy 
90
-syn keyword htmlArg contained g1 g2 glyph-name glyphRef gradientTransform gradientUnits 
91
-syn keyword htmlArg contained hanging height horiz-adv-x horiz-origin-y 
92
-syn keyword htmlArg contained id ideographic in in2 intercept 
93
-syn keyword htmlArg contained k k1 k2 k3 k4 kernelMatrix kernelUnitLength keyPoints keySplines keyTimes 
94
-syn keyword htmlArg contained lang lengthAdjust limitingConeAngle local 
95
-syn keyword htmlArg contained markerHeight markerUnits markerWidth maskContentUnits maskUnits mathematical max media method min mode name 
96
-syn keyword htmlArg contained numOctaves 
97
-syn keyword htmlArg contained offset offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload onzoom operator order orient orientation origin overline-position overline-thickness 
98
-syn keyword htmlArg contained panose-1 path pathLength patternContentUnits patternTransform patternUnits points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits 
99
-syn keyword htmlArg contained r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry 
100
-syn keyword htmlArg contained scale seed slope spacing specularConstant specularExponent spreadMethod startOffset stdDeviation stemh stemv stitchTiles strikethrough-position strikethrough-thickness string surfaceScale systemLanguage 
101
-syn keyword htmlArg contained tableValues target targetX targetY textLength title to transform type u
102
-syn keyword htmlArg contained 1 u2 underline-position underline-thickness unicode unicode-range units-per-em 
103
-syn keyword htmlArg contained v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget 
104
-syn keyword htmlArg contained width widths 
105
-syn keyword htmlArg contained x x-height x1 x2 xChannelSelector xlink:actuate xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:show xlink:title xlink:type xml:base xml:lang xml:space 
106
-syn keyword htmlArg contained y y1 y2 yChannelSelector 
107
-syn keyword htmlArg contained z zoomAndPan 
108
-syn keyword htmlArg contained alignment-baseline baseline-shift clip-path clip-rule clip color-interpolation-filters color-interpolation color-profile color-rendering color cursor direction display dominant-baseline enable-background fill-opacity fill-rule fill filter flood-color flood-opacity font-family font-size-adjust font-size font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width stroke text-anchor text-decoration text-rendering unicode-bidi visibility word-spacing writing-mode

+ 0
- 35
dotfiles/vim/bundle/html5.vim/syntax/html/aria.vim View File

@@ -1,35 +0,0 @@
1
-" Vim syntax file
2
-" Language:	    WAI-ARIA
3
-" Maintainer:	othree <othree@gmail.com>
4
-" URL:		    http://github.com/othree/html5-syntax.vim
5
-" Last Change:  2010-09-25
6
-" License:      MIT
7
-" Changes:      update to Draft 16 September 2010
8
-
9
-" WAI-ARIA States and Properties
10
-" http://www.w3.org/TR/wai-aria/states_and_properties
11
-syn keyword htmlArg contained role
12
-
13
-" Global States and Properties
14
-syn match  htmlArg contained "\<aria-\(atomic\|busy\|controls\|describedby\)\>"
15
-syn match  htmlArg contained "\<aria-\(disabled\|dropeffect\|flowto\|grabbed\)\>"
16
-syn match  htmlArg contained "\<aria-\(haspopup\|hidden\|invalid\|label\)\>"
17
-syn match  htmlArg contained "\<aria-\(labelledby\|live\|owns\|relevant\)\>"
18
-
19
-" Widget Attributes
20
-syn match  htmlArg contained "\<aria-\(autocomplete\|checked\|disabled\|expanded\)\>"
21
-syn match  htmlArg contained "\<aria-\(haspopup\|hidden\|invalid\|label\)\>"
22
-syn match  htmlArg contained "\<aria-\(level\|multiline\|multiselectable\|orientation\)\>"
23
-syn match  htmlArg contained "\<aria-\(pressed\|readonly\|required\|selected\)\>"
24
-syn match  htmlArg contained "\<aria-\(sort\|valuemax\|valuemin\|valuenow\|valuetext\|\)\>"
25
-
26
-" Live Region Attributes
27
-syn match  htmlArg contained "\<aria-\(atomic\|busy\|live\|relevant\|\)\>"
28
-
29
-" Drag-and-Drop attributes
30
-syn match  htmlArg contained "\<aria-\(dropeffect\|grabbed\)\>"
31
-
32
-" Relationship Attributes
33
-syn match  htmlArg contained "\<aria-\(activedescendant\|controls\|describedby\|flowto\|\)\>"
34
-syn match  htmlArg contained "\<aria-\(labelledby\|owns\|posinset\|setsize\|\)\>"
35
-

+ 0
- 11
dotfiles/vim/bundle/html5.vim/syntax/html/rdfa.vim View File

@@ -1,11 +0,0 @@
1
-" Vim syntax file
2
-" Language:     RDFa
3
-" Maintainer:   othree <othree@gmail.com>
4
-" URL:          http://github.com/othree/html5-syntax.vim
5
-" Last Change:  2012-06-08
6
-" License:      MIT
7
-" Changes:      update to Rec 07 June 2012
8
-
9
-" RDFa
10
-" http://www.w3.org/TR/rdfa-syntax/#s_syntax
11
-syn keyword htmlArg contained about content datatype href inlist prefix property rel resource rev src typeof vocab

+ 0
- 43
dotfiles/vim/bundle/html5.vim/syntax/javascript/html5.vim View File

@@ -1,43 +0,0 @@
1
-" Vim syntax file
2
-" Language:	    HTML5 New Stuff
3
-" Maintainer:	othree <othree@gmail.com>
4
-" URL:		    http://github.com/othree/html5-syntax.vim
5
-" Last Change:  2011-05-27
6
-" License:      MIT
7
-" Changes:      
8
-
9
-syn keyword javaScriptHtmlEvents onabort onblur oncanplay oncanplaythrough onchange 
10
-syn keyword javaScriptHtmlEvents onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover 
11
-syn keyword javaScriptHtmlEvents ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange 
12
-syn keyword javaScriptHtmlEvents onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata 
13
-syn keyword javaScriptHtmlEvents onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
14
-syn keyword javaScriptHtmlEvents onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange 
15
-syn keyword javaScriptHtmlEvents onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate 
16
-syn keyword javaScriptHtmlEvents onvolumechange onwaiting
17
-
18
-" <body>
19
-syn keyword javaScriptHtmlEvents onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload 
20
-syn keyword javaScriptHtmlEvents onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
21
-
22
-" Media Controller
23
-syn keyword javaScriptDomElemAttrs buffered seekable duration currentTime paused
24
-syn keyword javaScriptDomElemAttrs played defaultPlaybackRate playbackRate volume muted
25
-syn keyword javaScriptDomElemAttrs mediaGroup
26
-syn keyword javaScriptDomElemFuncs load play pause 
27
-
28
-syn keyword javaScriptHtmlEvents oncanplay oncanplaythrough ondurationchange onemptied 
29
-syn keyword javaScriptHtmlEvents onloadeddata onloadedmetadata onloadstart onpause onplay onplaying onratechange 
30
-syn keyword javaScriptHtmlEvents ontimeupdate onvolumechange onwaiting
31
-
32
-" <audio>/<video>
33
-syn keyword javaScriptDomElemAttrs error src currentSrc networkState preload buffered readyState seeking 
34
-syn keyword javaScriptDomElemAttrs currentTime initialTime duration startOffsetTime paused defaultPlaybackRate playbackRate played
35
-syn keyword javaScriptDomElemAttrs seekable ended autoplay loop controls volume muted defaltMuted audioTracks videoTracks textTracks
36
-syn keyword javaScriptDomElemFuncs load addTextTrack
37
-
38
-" <video>
39
-" syn keyword javaScriptDomElemAttrs width height
40
-syn keyword javaScriptDomElemAttrs videoWidth videoHeight poster
41
-
42
-" drag and drop
43
-syn keyword javaScriptDomElemAttrs onDragStart onDragEnd onDragEnter onDragLeave onDragOver onDrag onDrop draggable dropzone