Initial commit from Mac

pull/1/head
Adam Veldhousen 10 years ago
commit 88cb13050a

@ -0,0 +1,86 @@
alias pd="pushd $1"
alias cdp="cd -"
alias ..='cd ..'
# list files
alias ll='ls --color=always -l'
#rake
alias bake='bundle exec rake'
alias bottle='bundle exec rake bottles:prepare; start ./Build/Bottles/debug'
alias fbake='bundle exec rake clobber default test:xunit'
alias bakeserver='bundle exec rake clobber localci build_env=dev'
alias uberbake='~/uberbake.txt'
function symlink(){
bake nuget:symlink[$1,$2]
}
#tools
alias s='start Source/*.sln'
alias ss='startserver'
alias projects='cd /c/Projects'
alias resrc='source ~/.bash_aliases && source ~/.bashrc && source ~/.profile'
alias role='whoami -groups -fo list | grep -i'
alias fu='find ./ -type f -print0 | xargs -0 grep $1'
function cc()
{
if [ -z "$1" ]
then
echo "bake compass:compile"
bake compass:compile
else
echo "compass compile"
compass compile $1
fi
}
function svgtool()
{
if [ -z "$1" ]
then
echo "Missing file"
else
exec "~/xamltune/svg2xaml/svg2xaml.exe" $1
fi
}
#git
alias gs='git status'
alias ehinit='git init --template=C:/Users/adve/eh-git'
#alias ehclone='git clone --template=C:/Users/adve/eh-git'
alias diff='git difftool'
alias diffc='git difftool --cached'
alias gpr='git pull --rebase'
alias gmt='git mergetool'
alias grc='git rebase --continue'
alias gk='git fetch origin; git remote prune origin; gitk --all &'
alias sym='~/nugetsymlink'
alias cw='compass watch $1'
alias dlb='dml'
function dml(){
for b in `git branch --merged | grep -v \*`; do git branch -D $b; done
}
function ehclone()
{
if [ -z "$1" ]
then
echo "Missing git repository url ending"
echo "usage: ehclone 'extendhealth git repository ending' ['target directory name']"
else
giturl="git@github.extendhealth.com:extend-health/$1.git"
if [ -z "$2" ]
then
# we DON'T HAVE a target directory
git clone --template=C:/Users/adve/eh-git $giturl $1
else
# we HAVE a target directory
git clone --template=C:/Users/adve/eh-git $giturl $2
fi
fi
}

@ -0,0 +1 @@
#!/bin/bash

@ -0,0 +1,108 @@
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph --abbrev-commit
# View the current working tree status using the short format
s = status -s
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
# Pull in remote changes for the current repository and all its submodules
p = !"git pull; git submodule foreach git pull origin master"
# Clone a repository including all submodules
c = clone --recursive
# Commit all changes
ca = !git add -A && git commit -av
# Switch to a branch, creating it if necessary
go = checkout -B
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"
# Find branches containing commit
fb = "!f() { git branch -a --contains $1; }; f"
# Find tags containing commit
ft = "!f() { git describe --always --contains $1; }; f"
# Find commits by source code
fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
# Find commits by commit message
fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
# Remove branches that have already been merged with master
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
[diff]
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
# instead of a/b/c/d as prefixes for patches
mnemonicprefix = true
[advice]
statusHints = false
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[gc]
auto=1
[core]
# Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
# Treat spaces before tabs and all kinds of trailing whitespace as an error.
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of
# a line
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
# Make `git rebase` safer on OS X
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
trustctime = false
editor = vim
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.)
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
# better merge messages
summary=true
# URL shorthands
[url "git@github.com:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "git@gist.github.com:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[push]
default = matching
[user]
email = adamveld12@gmail.com
name = Adam Veldhousen

18
.gitignore vendored

@ -0,0 +1,18 @@
# File
*.kdbx
_*
.vim_colorv_cache
.NERDTreeBookmars
*.log
./**/*.exe
.DS_Store
.viminfo
.bash_history
# Directory
.vim/bundle/*
.cache/
.gem/
.ssh/
.node-gyp/
./Tools/Console2/

@ -0,0 +1,92 @@
#------------------------------------------------------------------------------#
# vi: set sw=4 ts=2 ai: ("set modeline" in ~/.exrc) #
#------------------------------------------------------------------------------#
# Config file : ~/.tmux.conf #
# #
# Author : Adam Veldhousen The USA #
#------------------------------------------------------------------------------#
# enable pbcopy and pbpaste support with reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l zsh"
# set esc-wait off, so vim works
set-option -sg escape-time 0
#set prefix to alt-a
set-option -g prefix C-a
bind-key C-a send-prefix
# some nice ops
set-option -g bell-action any
set-option -g history-limit 10000
set-option -g set-titles on
set-option -g set-titles-string ' #I-#W '
set-option -g repeat-time 500
set-option -g visual-bell on
#status bar
set-option -g status-utf8 on
set-option -g status-interval 5
set-option -g status-justify left
set-option -g status-left ' #h | Adam Veldhousen'
set-option -g status-right 'tmux is rad | %d-%m-%Y %H:%M:%ss #[default]'
#window options
set-window-option -g utf8 on
set-window-option -g clock-mode-style 24
set-window-option -g monitor-activity on
set-window-option -g automatic-rename on
# Window nav
unbind-key 1 ; bind-key 1 select-window -t 1
unbind-key 2 ; bind-key 2 select-window -t 2
unbind-key 3 ; bind-key 3 select-window -t 3
unbind-key 4 ; bind-key 4 select-window -t 4
unbind-key 5 ; bind-key 5 select-window -t 5
unbind-key 6 ; bind-key 6 select-window -t 6
unbind-key 7 ; bind-key 7 select-window -t 7
unbind-key 8 ; bind-key 8 select-window -t 8
unbind-key 9 ; bind-key 9 select-window -t 9
unbind-key 0 ; bind-key 0 select-window -t 0
#maybe bind alt key + num
#pane selection
unbind-key left ; bind-key left select-pane -L
unbind-key right ; bind-key right select-pane -R
unbind-key up ; bind-key up select-pane -U
unbind-key down ; bind-key down select-pane -D
#vim binding
unbind-key h ; bind-key h select-pane -L
unbind-key l ; bind-key l select-pane -R
unbind-key k ; bind-key k select-pane -U
unbind-key j ; bind-key j select-pane -D
#pane resizing
unbind-key J ; bind-key -r J resize-pane -D 5
unbind-key K ; bind-key -r K resize-pane -U 5
unbind-key L ; bind-key -r L resize-pane -R 5
unbind-key H ; bind-key -r H resize-pane -L 5
# window splitting
unbind-key M-i ; bind-key M-i split-window -v
unbind-key M-s ; bind-key M-s split-window -h
unbind-key i ; bind-key i split-window -v
unbind-key s ; bind-key s split-window -h
#nice bindings
unbind-key R ; bind-key R source-file ~/.tmux.conf
unbind-key q ; bind-key q list-keys
unbind-key M-q ; bind-key M-q list-keys
# copy mode
set-window-option -g mode-keys vi
set-window-option -g mode-mouse off
set-option buffer-limit 10
#unbind-key ^A-c ; bind-key -n ^A-c copy-mode
#unbind-key ^A-NPage ; bind-key -n ^A-NPage copy-mode
#unbind-key ^A-PPage ; bind-key -n ^A-PPage copy-mode
#unbind-key ^A-i ; bind-key -n ^A-i paste-buffer
#unbind-key ^A-P ; bind-key -n ^A-P paste-buffer

257
.vimrc

@ -0,0 +1,257 @@
" change runtime path
set runtimepath=~/Tools/vim,$VIM/vimfiles,$VIMRUNTIME
let g:ruby_path = ':C:\ruby193\bin'
"call pathogen#runtime_append_all_bundles()
call pathogen#infect()
call pathogen#helptags()
colorscheme vividchalk
"inkpot
"jellybeans
"liquidcarbon
"molokai
"moria
"pinksea
"sonofobsidian
"vividchalk
"wombat256mod
set nocompatible "we don't want vi compatibility AKA Make Vim more useful
set noswapfile
set autoread
set selection=exclusive
set ttimeoutlen=50
let mapleader = ","
let g:ctrlp_map = '<c-p>'
let g:ctrlp_working_path_mode = 2
map <Space> :noh<CR>
imap <C-h> <C-O><C-w>h
imap <C-j> <C-O><C-w>j
imap <C-k> <C-O><C-w>k
imap <C-l> <C-O><C-w>l
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
map <A-k> <C-w>+
map <A-j> <C-w>-
map <A-l> <C-w>>
map <A-h> <C-w><
map <leader>x :%s/\s\+$//<CR>:noh<Cr>
map <leader>v :tabedit ~/.vimrc<CR>
map <leader><leader> :b#<cr>
map <F1> <Nop>
nmap <leader>n :NERDTreeToggle %:p:h<CR>
nmap <leader>m :NERDTreeClose<CR>:NERDTreeFind<CR>
nmap <leader>t :TlistToggle<CR>
map <leader>T 0f<ca<
noremap ;; :%s:::g<Left><Left><Left>
cmap ;\ \(\)<Left><Left>
syntax enable
"airline config
" the separator used on the left side >
let g:airline_left_sep='>'
" the separator used on the right side >
let g:airline_right_sep='<'
" enable modified detection >
let g:airline_detect_modified=1
" enable paste detection >
let g:airline_detect_paste=1
" enable iminsert detection >
let g:airline_detect_iminsert=1
" determine whether inactive windows should have the left section collapsed to only the filename of that buffer.
let g:airline_inactive_collapse=1
" enable/disable csv integration for displaying the current column.
let g:airline#extensions#csv#enabled = 1
" customize the whitespace symbol. >
let g:airline#extensions#whitespace#symbol = '.'
" themes are automatically selected based on the matching colorscheme. this can be overridden by defining a value.
" let g:airline_theme=
" if you want to patch the airline theme before it gets applied, you can supply the name of a function where you can modify the palette.
let g:airline_theme_patch_func = 'AirlineThemePatch'
function! AirlineThemePatch(palette)
if g:airline_theme == 'badwolf'
for colors in values(a:palette.inactive)
let colors[3] = 245
endfor
endif
endfunction
" enable/disable automatic population of the `g:airline_symbols` dictionary with powerline symbols.
let g:airline_powerline_fonts=0
" define the set of text to display for each mode.
let g:airline_mode_map = {} " see source for the defaults
" or copy paste the following into your vimrc for shortform text
let g:airline_mode_map = {
\ '__' : '-',
\ 'n' : 'N',
\ 'i' : 'I',
\ 'R' : 'R',
\ 'c' : 'C',
\ 'v' : 'V',
\ 'V' : 'V',
\ '' : 'V',
\ 's' : 'S',
\ 'S' : 'S',
\ '' : 'S',
\ }
" defines whether the preview window should be excluded from have its window statusline modified (may help with plugins which use the preview window heavily) >
let g:airline_exclude_preview = 0
" change the text for when no branch is detected >
let g:airline#extensions#branch#empty_message = 'No Branch'
" truncate long branch names to a fixed length >
let g:airline#extensions#branch#displayed_head_limit = 15
" enable/disable fugitive/lawrencium integration >
let g:airline#extensions#branch#enabled = 1
" Use the OS clipboard by default (on versions compiled with `+clipboard`)
set clipboard=unnamed
" Enhance command-line completion
set wildmenu
" Allow cursor keys in insert mode
set esckeys
" Allow backspace in insert mode
set backspace=indent,eol,start
" Optimize for fast terminal connections
set ttyfast
" Add the g flag to search/replace by default
set gdefault
" Use UTF-8 without BOM
set encoding=utf-8 nobomb
" Change mapleader
let mapleader=","
" Dont add empty newlines at the end of files
set binary
set noeol
" Centralize backups, swapfiles and undo history
set backupdir=~/Tools/vim/backups
set directory=~/Tools/vim/swaps
set history=256 " Number of things to remember in history.
set t_Co=256
if exists("&undodir")
set undodir=~/Tools/vim/undo
endif
" Respect modeline in files
set modeline
set modelines=4
" Enable per-directory .vimrc files and disable unsafe commands in them
set exrc
set secure
" Enable line numbers
set number
" Enable syntax highlighting
syntax on
" Highlight current line
set cursorline
" Make tabs as wide as two spaces
set tabstop=2
set expandtab
set shiftwidth=2
" Show “invisible” characters
set lcs=tab:▸\ ,trail,eol,nbsp:_
set list
" Highlight searches
set hlsearch
" Ignore case of searches
set ignorecase
" Highlight dynamically as pattern is typed
set incsearch
" Always show status line
set laststatus=2
" Enable mouse in all modes
set mouse=a
" Disable error bells
set noerrorbells
" Dont reset cursor to start of line when moving around.
set nostartofline
" Show the cursor position
set ruler
" Dont show the intro message when starting Vim
set shortmess=atI
" Show the current mode
set showmode
" Show the filename in the window titlebar
set title
" Show the (partial) command as its being typed
set showcmd
" Use relative line numbers
if exists("&relativenumber")
set relativenumber
au BufReadPost * set relativenumber
endif
" Start scrolling three lines before the horizontal window border
set scrolloff=3
" Strip trailing whitespace (,ss)
function! StripWhitespace()
let save_cursor = getpos(".")
let old_query = getreg('/')
:%s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace()<CR>
" Save a file as root (,W)
noremap <leader>W :w !sudo tee % > /dev/null<CR>
" Automatic commands
if has("autocmd")
" Enable file type detection
filetype on
" Treat .json files as .js
autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript
endif
au BufRead,BufNewFile *.jade setfiletype jade
au BufRead,BufNewFile *.markdown setfiletype markdown
au BufRead,BufNewFile *.xaml setfiletype xml
au BufRead,BufNewFile *.spark setfiletype html
au BufRead,BufNewFile *.ps1 setfiletype ps1
au BufRead,BufNewFile *.scala setfiletype scala
au BufRead,BufNewFile *.less setfiletype css
au BufRead,BufNewFile *.go setfiletype go
au BufRead,BufNewFile *.js setfiletype javascript
au BufRead,BufNewFile *.coffee setfiletype coffeescript
au GUIEnter * set vb t_vb=
if has('gui_running')
set guioptions -=m
set guioptions -=T
set guioptions -=r
set guioptions -=L
set guifont=Ubuntu\ Mono:h26,Consolas:h12
endif
let g:ruby_path = ':C:\ruby193\bin'

@ -0,0 +1,5 @@
#!/bin/bash
if [[ $DEBUG ]] ; then
echo "I'm on my work machine!"
fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,103 @@
<?xml version="1.0"?>
<settings>
<console change_refresh="10" refresh="100" rows="30" columns="80" buffer_rows="9999" buffer_columns="0" shell="&quot;C:\Program Files (x86)\Git\bin\sh.exe&quot; --login -i" init_dir="C:\Users\Adam\Home" start_hidden="0" save_size="0">
<colors>
<color id="0" r="0" g="0" b="0"/>
<color id="1" r="0" g="0" b="128"/>
<color id="2" r="0" g="150" b="0"/>
<color id="3" r="0" g="150" b="150"/>
<color id="4" r="170" g="25" b="25"/>
<color id="5" r="128" g="0" b="128"/>
<color id="6" r="128" g="128" b="0"/>
<color id="7" r="192" g="192" b="192"/>
<color id="8" r="128" g="128" b="128"/>
<color id="9" r="0" g="100" b="255"/>
<color id="10" r="0" g="255" b="0"/>
<color id="11" r="0" g="255" b="255"/>
<color id="12" r="255" g="50" b="50"/>
<color id="13" r="255" g="0" b="255"/>
<color id="14" r="255" g="255" b="0"/>
<color id="15" r="255" g="255" b="255"/>
</colors>
</console>
<appearance>
<font name="Consolas" size="10" bold="0" italic="0" smoothing="0">
<color use="0" r="0" g="0" b="0"/>
</font>
<window title="Console" icon="" use_tab_icon="1" use_console_title="0" show_cmd="0" show_cmd_tabs="0" use_tab_title="1" trim_tab_titles="20" trim_tab_titles_right="0"/>
<controls show_menu="1" show_toolbar="0" show_statusbar="0" show_tabs="1" hide_single_tab="1" show_scrollbars="1" flat_scrollbars="0" tabs_on_bottom="0"/>
<styles caption="1" resizable="1" taskbar_button="1" border="1" inside_border="2" tray_icon="1">
<selection_color r="255" g="255" b="255"/>
</styles>
<position x="-1" y="-1" dock="-1" snap="0" z_order="0" save_position="0"/>
<transparency type="0" active_alpha="255" inactive_alpha="255" r="0" g="0" b="0"/>
</appearance>
<behavior>
<copy_paste copy_on_select="1" clear_on_copy="1" no_wrap="1" trim_spaces="1" copy_newline_char="0" sensitive_copy="1"/>
<scroll page_scroll_rows="0"/>
<tab_highlight flashes="3" stay_highligted="1"/>
</behavior>
<hotkeys use_scroll_lock="1">
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="83" command="settings"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="112" command="help"/>
<hotkey ctrl="0" shift="0" alt="1" extended="0" code="115" command="exit"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="84" command="newtab1"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="113" command="newtab2"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="114" command="newtab3"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="115" command="newtab4"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="116" command="newtab5"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="117" command="newtab6"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="118" command="newtab7"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="119" command="newtab8"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="120" command="newtab9"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="121" command="newtab10"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="49" command="switchtab1"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="50" command="switchtab2"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="51" command="switchtab3"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="52" command="switchtab4"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="53" command="switchtab5"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="54" command="switchtab6"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="55" command="switchtab7"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="56" command="switchtab8"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="57" command="switchtab9"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="48" command="switchtab10"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="9" command="nexttab"/>
<hotkey ctrl="1" shift="1" alt="0" extended="0" code="9" command="prevtab"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="87" command="closetab"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="82" command="renametab"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="67" command="copy"/>
<hotkey ctrl="1" shift="0" alt="0" extended="1" code="46" command="clear_selection"/>
<hotkey ctrl="1" shift="0" alt="0" extended="0" code="86" command="paste"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="stopscroll"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollrowup"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollrowdown"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageup"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpagedown"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolleft"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolright"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageleft"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageright"/>
<hotkey ctrl="1" shift="1" alt="0" extended="0" code="112" command="dumpbuffer"/>
<hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="activate"/>
</hotkeys>
<mouse>
<actions>
<action ctrl="0" shift="0" alt="0" button="1" name="copy"/>
<action ctrl="0" shift="1" alt="0" button="1" name="select"/>
<action ctrl="0" shift="0" alt="0" button="3" name="paste"/>
<action ctrl="1" shift="0" alt="0" button="1" name="drag"/>
<action ctrl="0" shift="0" alt="0" button="2" name="menu"/>
</actions>
</mouse>
<tabs>
<tab title="Git Bash" icon="C:\Program Files (x86)\Git\etc\git.ico" use_default_icon="0">
<console shell="&quot;C:\Program Files (x86)\Git\bin\sh.exe&quot; --login -i" init_dir="C:\Users\Adam\Home" run_as_user="0" user=""/>
<cursor style="11" r="255" g="255" b="255"/>
<background type="0" r="0" g="0" b="0">
<image file="" relative="0" extend="0" position="0">
<tint opacity="0" r="0" g="0" b="0"/>
</image>
</background>
</tab>
</tabs>
</settings>

@ -0,0 +1,115 @@
README.txt for version 7.4 of Vim: Vi IMproved.
WHAT IS VIM
Vim is an almost compatible version of the UNIX editor Vi. Many new features
have been added: multi-level undo, syntax highlighting, command line history,
on-line help, spell checking, filename completion, block operations, etc.
There is also a Graphical User Interface (GUI) available. See
"runtime/doc/vi_diff.txt" for differences with Vi.
This editor is very useful for editing programs and other plain text files.
All commands are given with normal keyboard characters, so those who can type
with ten fingers can work very fast. Additionally, function keys can be
defined by the user, and the mouse can be used.
Vim runs under Amiga DOS, MS-DOS, MS-Windows (95, 98, Me, NT, 2000, XP, Vista,
7), Atari MiNT, Macintosh, BeOS, VMS, RISC OS, OS/2 and almost all flavours of
UNIX. Porting to other systems should not be very difficult.
DISTRIBUTION
There are separate distributions for Unix, PC, Amiga and some other systems.
This README.txt file comes with the runtime archive. It includes the
documentation, syntax files and other files that are used at runtime. To run
Vim you must get either one of the binary archives or a source archive.
Which one you need depends on the system you want to run it on and whether you
want or must compile it yourself. Check "http://www.vim.org/download.php" for
an overview of currently available distributions.
DOCUMENTATION
The vim tutor is a one hour training course for beginners. Mostly it can be
started as "vimtutor". See ":help tutor" for more information.
The best is to use ":help" in Vim. If you don't have an executable yet, read
"runtime/doc/help.txt". It contains pointers to the other documentation
files. The User Manual reads like a book and is recommended to learn to use
Vim. See ":help user-manual".
COPYING
Vim is Charityware. You can use and copy it as much as you like, but you are
encouraged to make a donation to help orphans in Uganda. Please read the file
"runtime/doc/uganda.txt" for details (do ":help uganda" inside Vim).
Summary of the license: There are no restrictions on using or distributing an
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
text must always be included. For modified versions a few restrictions apply.
The license is GPL compatible, you may compile Vim with GPL libraries and
distribute it.
SPONSORING
Fixing bugs and adding new features takes a lot of time and effort. To show
your appreciation for the work and motivate Bram and others to continue
working on Vim please send a donation.
Since Bram is back to a paid job the money will now be used to help children
in Uganda. See runtime/doc/uganda.txt. But at the same time donations
increase Bram's motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
http://www.vim.org/sponsor/
COMPILING
If you obtained a binary distribution you don't need to compile Vim. If you
obtained a source distribution, all the stuff for compiling Vim is in the
"src" directory. See src/INSTALL for instructions.
INSTALLATION
See one of these files for system-specific instructions:
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS and MS-Windows
README_os2.txt OS/2
README_mac.txt Macintosh
README_vms.txt VMS
There are more README_*.txt files, depending on the distribution you used.
INFORMATION
The latest news about Vim can be found on the Vim home page:
http://www.vim.org/
If you have problems, have a look at the Vim FAQ:
http://vimdoc.sf.net/vimfaq.html
If you still have problems or any other questions, use one of the mailing
lists to discuss them with Vim users and developers:
http://www.vim.org/maillist.php
If nothing else works, report bugs directly:
Bram Moolenaar <Bram@vim.org>
MAIN AUTHOR
Send any other comments, patches, flowers and suggestions to:
Bram Moolenaar E-mail: Bram@vim.org
Finsterruetihof 1
8134 Adliswil
Switzerland

@ -0,0 +1,22 @@
The autoload directory is for standard Vim autoload scripts.
These are functions used by plugins and for general use. They will be loaded
automatically when the function is invoked. See ":help autoload".
gzip.vim for editing compressed files
netrw*.vim browsing (remote) directories and editing remote files
tar.vim browsing tar files
zip.vim browsing zip files
paste.vim common code for mswin.vim, menu.vim and macmap.vim
spellfile.vim downloading of a missing spell file
Omni completion files:
ccomplete.vim C
csscomplete.vim HTML / CSS
htmlcomplete.vim HTML
javascriptcomplete.vim Javascript
phpcomplete.vim PHP
pythoncomplete.vim Python
rubycomplete.vim Ruby
syntaxcomplete.vim from syntax highlighting
xmlcomplete.vim XML (uses files in the xml directory)

@ -0,0 +1,635 @@
"------------------------------------------------------------------------------
" Description: Perform Ada specific completion & tagging.
" Language: Ada (2005)
" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
" Taylor Venable <taylor@metasyntax.net>
" Neil Bird <neil@fnxweb.com>
" Ned Okie <nokie@radford.edu>
" $Author: krischik $
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK ' should not be in iskeyword.
" 16.07.2006 MK Ada-Mode as vim-ball
" 02.10.2006 MK Better folding.
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" 08.07.2007 TV fix mapleader problems.
" 09.05.2007 MK Session just won't work no matter how much
" tweaking is done
" 19.09.2007 NO still some mapleader problems
" Help Page: ft-ada-functions
"------------------------------------------------------------------------------
if version < 700
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" Section: Constants {{{1
"
let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*'
let g:ada#WordRegex = '\a\w*'
let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*"
let g:ada#Keywords = []
" Section: g:ada#Keywords {{{1
"
" Section: add Ada keywords {{{2
"
for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'keyword',
\ 'info': 'Ada keyword.',
\ 'kind': 'k',
\ 'icase': 1}]
endfor
" Section: GNAT Project Files {{{3
"
if exists ('g:ada_with_gnat_project_files')
for Item in ['project']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'keyword',
\ 'info': 'GNAT projectfile keyword.',
\ 'kind': 'k',
\ 'icase': 1}]
endfor
endif
" Section: add standart exception {{{2
"
for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'exception',
\ 'info': 'Ada standart exception.',
\ 'kind': 'x',
\ 'icase': 1}]
endfor
" Section: add GNAT exception {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['Assert_Failure']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'exception',
\ 'info': 'GNAT exception.',
\ 'kind': 'x',
\ 'icase': 1}]
endfor
endif
" Section: add Ada buildin types {{{2
"
for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'type',
\ 'info': 'Ada buildin type.',
\ 'kind': 't',
\ 'icase': 1}]
endfor
" Section: add GNAT buildin types {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'type',
\ 'info': 'GNAT buildin type.',
\ 'kind': 't',
\ 'icase': 1}]
endfor
endif
" Section: add Ada Attributes {{{2
"
for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'attribute',
\ 'info': 'Ada attribute.',
\ 'kind': 'a',
\ 'icase': 1}]
endfor
" Section: add GNAT Attributes {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'attribute',
\ 'info': 'GNAT attribute.',
\ 'kind': 'a',
\ 'icase': 1}]
endfor
endif
" Section: add Ada Pragmas {{{2
"
for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'pragma',
\ 'info': 'Ada pragma.',
\ 'kind': 'p',
\ 'icase': 1}]
endfor
" Section: add GNAT Pragmas {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'pragma',
\ 'info': 'GNAT pragma.',
\ 'kind': 'p',
\ 'icase': 1}]
endfor
endif
" 1}}}
" Section: g:ada#Ctags_Kinds {{{1
"
let g:ada#Ctags_Kinds = {
\ 'P': ["packspec", "package specifications"],
\ 'p': ["package", "packages"],
\ 'T': ["typespec", "type specifications"],
\ 't': ["type", "types"],
\ 'U': ["subspec", "subtype specifications"],
\ 'u': ["subtype", "subtypes"],
\ 'c': ["component", "record type components"],
\ 'l': ["literal", "enum type literals"],
\ 'V': ["varspec", "variable specifications"],
\ 'v': ["variable", "variables"],
\ 'f': ["formal", "generic formal parameters"],
\ 'n': ["constant", "constants"],
\ 'x': ["exception", "user defined exceptions"],
\ 'R': ["subprogspec", "subprogram specifications"],
\ 'r': ["subprogram", "subprograms"],
\ 'K': ["taskspec", "task specifications"],
\ 'k': ["task", "tasks"],
\ 'O': ["protectspec", "protected data specifications"],
\ 'o': ["protected", "protected data"],
\ 'E': ["entryspec", "task/protected data entry specifications"],
\ 'e': ["entry", "task/protected data entries"],
\ 'b': ["label", "labels"],
\ 'i': ["identifier", "loop/declare identifiers"],
\ 'a': ["autovar", "automatic variables"],
\ 'y': ["annon", "loops and blocks with no identifier"]}
" Section: ada#Word (...) {{{1
"
" Extract current Ada word across multiple lines
" AdaWord ([line, column])\
"
function ada#Word (...)
if a:0 > 1
let l:Line_Nr = a:1
let l:Column_Nr = a:2 - 1
else
let l:Line_Nr = line('.')
let l:Column_Nr = col('.') - 1
endif
let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
" Cope with tag searching for items in comments; if we are, don't loop
" backards looking for previous lines
if l:Column_Nr > strlen(l:Line)
" We were in a comment
let l:Line = getline(l:Line_Nr)
let l:Search_Prev_Lines = 0
else
let l:Search_Prev_Lines = 1
endif
" Go backwards until we find a match (Ada ID) that *doesn't* include our
" location - i.e., the previous ID. This is because the current 'correct'
" match will toggle matching/not matching as we traverse characters
" backwards. Thus, we have to find the previous unrelated match, exclude
" it, then use the next full match (ours).
" Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)]
" ... but start, here, one after the required char.
let l:New_Column = l:Column_Nr + 1
while 1
let l:New_Column = l:New_Column - 1
if l:New_Column < 0
" Have to include previous l:Line from file
let l:Line_Nr = l:Line_Nr - 1
if l:Line_Nr < 1 || !l:Search_Prev_Lines
" Start of file or matching in a comment
let l:Line_Nr = 1
let l:New_Column = 0
let l:Our_Match = match (l:Line, g:ada#WordRegex )
break
endif
" Get previous l:Line, and prepend it to our search string
let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
let l:New_Column = strlen (l:New_Line) - 1
let l:Column_Nr = l:Column_Nr + l:New_Column
let l:Line = l:New_Line . l:Line
endif
" Check to see if this is a match excluding 'us'
let l:Match_End = l:New_Column +
\ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1
if l:Match_End >= l:New_Column &&
\ l:Match_End < l:Column_Nr
" Yes
let l:Our_Match = l:Match_End+1 +
\ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex )
break
endif
endwhile
" Got anything?
if l:Our_Match < 0
return ''
else
let l:Line = strpart (l:Line, l:Our_Match)
endif
" Now simply add further lines until the match gets no bigger
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
let l:Last_Line = line ('$')
let l:Line_Nr = line ('.') + 1
while l:Line_Nr <= l:Last_Line
let l:Last_Match = l:Match_String
let l:Line = l:Line .
\ substitute (getline (l:Line_Nr), g:ada#Comment, '', '')
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
if l:Match_String == l:Last_Match
break
endif
endwhile
" Strip whitespace & return
return substitute (l:Match_String, '\s\+', '', 'g')
endfunction ada#Word
" Section: ada#List_Tag (...) {{{1
"
" List tags in quickfix window
"
function ada#List_Tag (...)
if a:0 > 1
let l:Tag_Word = ada#Word (a:1, a:2)
elseif a:0 > 0
let l:Tag_Word = a:1
else
let l:Tag_Word = ada#Word ()
endif
echo "Searching for" l:Tag_Word
let l:Pattern = '^' . l:Tag_Word . '$'
let l:Tag_List = taglist (l:Pattern)
let l:Error_List = []
"
" add symbols
"
for Tag_Item in l:Tag_List
if l:Tag_Item['kind'] == ''
let l:Tag_Item['kind'] = 's'
endif
let l:Error_List += [
\ l:Tag_Item['filename'] . '|' .
\ l:Tag_Item['cmd'] . '|' .
\ l:Tag_Item['kind'] . "\t" .
\ l:Tag_Item['name'] ]
endfor
set errorformat=%f\|%l\|%m
cexpr l:Error_List
cwindow
endfunction ada#List_Tag
" Section: ada#Jump_Tag (Word, Mode) {{{1
"
" Word tag - include '.' and if Ada make uppercase
"
function ada#Jump_Tag (Word, Mode)
if a:Word == ''
" Get current word
let l:Word = ada#Word()
if l:Word == ''
throw "NOT_FOUND: no identifier found."
endif
else
let l:Word = a:Word
endif
echo "Searching for " . l:Word
try
execute a:Mode l:Word
catch /.*:E426:.*/
let ignorecase = &ignorecase
set ignorecase
execute a:Mode l:Word
let &ignorecase = ignorecase
endtry
return
endfunction ada#Jump_Tag
" Section: ada#Insert_Backspace () {{{1
"
" Backspace at end of line after auto-inserted commentstring '-- ' wipes it
"
function ada#Insert_Backspace ()
let l:Line = getline ('.')
if col ('.') > strlen (l:Line) &&
\ match (l:Line, '-- $') != -1 &&
\ match (&comments,'--') != -1
return "\<bs>\<bs>\<bs>"
else
return "\<bs>"
endif
return
endfunction ada#InsertBackspace
" Section: Insert Completions {{{1
"
" Section: ada#User_Complete(findstart, base) {{{2
"
" This function is used for the 'complete' option.
"
function! ada#User_Complete(findstart, base)
if a:findstart == 1
"
" locate the start of the word
"
let line = getline ('.')
let start = col ('.') - 1
while start > 0 && line[start - 1] =~ '\i\|'''
let start -= 1
endwhile
return start
else
"
" look up matches
"
let l:Pattern = '^' . a:base . '.*$'
"
" add keywords
"
for Tag_Item in g:ada#Keywords
if l:Tag_Item['word'] =~? l:Pattern
if complete_add (l:Tag_Item) == 0
return []
endif
if complete_check ()
return []
endif
endif
endfor
return []
endif
endfunction ada#User_Complete
" Section: ada#Completion (cmd) {{{2
"
" Word completion (^N/^R/^X^]) - force '.' inclusion
function ada#Completion (cmd)
set iskeyword+=46
return a:cmd . "\<C-R>=ada#Completion_End ()\<CR>"
endfunction ada#Completion
" Section: ada#Completion_End () {{{2
"
function ada#Completion_End ()
set iskeyword-=46
return ''
endfunction ada#Completion_End
" Section: ada#Create_Tags {{{1
"
function ada#Create_Tags (option)
if a:option == 'file'
let l:Filename = fnamemodify (bufname ('%'), ':p')
elseif a:option == 'dir'
let l:Filename =
\ fnamemodify (bufname ('%'), ':p:h') . "*.ada " .
\ fnamemodify (bufname ('%'), ':p:h') . "*.adb " .
\ fnamemodify (bufname ('%'), ':p:h') . "*.ads"
else
let l:Filename = a:option
endif
execute '!ctags --excmd=number ' . l:Filename
endfunction ada#Create_Tags
" Section: ada#Switch_Session {{{1
"
function ada#Switch_Session (New_Session)
"
" you should not save to much date into the seession since they will
" be sourced
"
let l:sessionoptions=&sessionoptions
try
set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize
if a:New_Session != v:this_session
"
" We actualy got a new session - otherwise there
" is nothing to do.
"
if strlen (v:this_session) > 0
execute 'mksession! ' . v:this_session
endif
let v:this_session = a:New_Session
"if filereadable (v:this_session)
"execute 'source ' . v:this_session
"endif
augroup ada_session
autocmd!
autocmd VimLeavePre * execute 'mksession! ' . v:this_session
augroup END
"if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open
"TlistOpen
"endif
endif
finally
let &sessionoptions=l:sessionoptions
endtry
return
endfunction ada#Switch_Session
" Section: GNAT Pretty Printer folding {{{1
"
if exists('g:ada_folding') && g:ada_folding[0] == 'g'
"
" Lines consisting only of ')' ';' are due to a gnat pretty bug and
" have the same level as the line above (can't happen in the first
" line).
"
let s:Fold_Collate = '^\([;)]*$\|'
"
" some lone statements are folded with the line above
"
if stridx (g:ada_folding, 'i') >= 0
let s:Fold_Collate .= '\s\+\<is\>$\|'
endif
if stridx (g:ada_folding, 'b') >= 0
let s:Fold_Collate .= '\s\+\<begin\>$\|'
endif
if stridx (g:ada_folding, 'p') >= 0
let s:Fold_Collate .= '\s\+\<private\>$\|'
endif
if stridx (g:ada_folding, 'x') >= 0
let s:Fold_Collate .= '\s\+\<exception\>$\|'
endif
" We also handle empty lines and
" comments here.
let s:Fold_Collate .= '--\)'
function ada#Pretty_Print_Folding (Line) " {{{2
let l:Text = getline (a:Line)
if l:Text =~ s:Fold_Collate
"
" fold with line above
"
let l:Level = "="
elseif l:Text =~ '^\s\+('
"
" gnat outdents a line which stards with a ( by one characters so
" that parameters which follow are aligned.
"
let l:Level = (indent (a:Line) + 1) / &shiftwidth
else
let l:Level = indent (a:Line) / &shiftwidth
endif
return l:Level
endfunction ada#Pretty_Print_Folding " }}}2
endif
" Section: Options and Menus {{{1
"
" Section: ada#Switch_Syntax_Options {{{2
"
function ada#Switch_Syntax_Option (option)
syntax off
if exists ('g:ada_' . a:option)
unlet g:ada_{a:option}
echo a:option . 'now off'
else
let g:ada_{a:option}=1
echo a:option . 'now on'
endif
syntax on
endfunction ada#Switch_Syntax_Option
" Section: ada#Map_Menu {{{2
"
function ada#Map_Menu (Text, Keys, Command)
if a:Keys[0] == ':'
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
\ "<Tab>" . a:Keys .
\ " :" . a:Command . "<CR>"
execute
\ "command -buffer " .
\ a:Keys[1:] .
\" :" . a:Command . "<CR>"
elseif a:Keys[0] == '<'
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
\ "<Tab>" . a:Keys .
\ " :" . a:Command . "<CR>"
execute
\ "nnoremap <buffer> " .
\ a:Keys .
\" :" . a:Command . "<CR>"
execute
\ "inoremap <buffer> " .
\ a:Keys .
\" <C-O>:" . a:Command . "<CR>"
else
if exists("g:mapleader")
let l:leader = g:mapleader
else
let l:leader = '\'
endif
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
execute
\ "nnoremap <buffer>" .
\ escape(l:leader . "a" . a:Keys , '\') .
\" :" . a:Command
execute
\ "inoremap <buffer>" .
\ escape(l:leader . "a" . a:Keys , '\') .
\" <C-O>:" . a:Command
endif
return
endfunction
" Section: ada#Map_Popup {{{2
"
function ada#Map_Popup (Text, Keys, Command)
if exists("g:mapleader")
let l:leader = g:mapleader
else
let l:leader = '\'
endif
execute
\ "50amenu " .
\ "PopUp." . escape(a:Text, ' ') .
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
call ada#Map_Menu (a:Text, a:Keys, a:Command)
return
endfunction ada#Map_Popup
" }}}1
lockvar g:ada#WordRegex
lockvar g:ada#DotWordRegex
lockvar g:ada#Comment
lockvar! g:ada#Keywords
lockvar! g:ada#Ctags_Kinds
let &cpo = s:keepcpo
unlet s:keepcpo
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

@ -0,0 +1,109 @@
"------------------------------------------------------------------------------
" Description: Vim Ada omnicompletion file
" Language: Ada (2005)
" $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $
" Maintainer: Martin Krischik
" $Author: krischik $
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK improved search for begin of word.
" 16.07.2006 MK Ada-Mode as vim-ball
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: ft-ada-omni
"------------------------------------------------------------------------------
if version < 700
finish
endif
" Section: adacomplete#Complete () {{{1
"
" This function is used for the 'omnifunc' option.
"
function! adacomplete#Complete (findstart, base)
if a:findstart == 1
return ada#User_Complete (a:findstart, a:base)
else
"
" look up matches
"
if exists ("g:ada_omni_with_keywords")
call ada#User_Complete (a:findstart, a:base)
endif
"
" search tag file for matches
"
let l:Pattern = '^' . a:base . '.*$'
let l:Tag_List = taglist (l:Pattern)
"
" add symbols
"
for Tag_Item in l:Tag_List
if l:Tag_Item['kind'] == ''
"
" Tag created by gnat xref
"
let l:Match_Item = {
\ 'word': l:Tag_Item['name'],
\ 'menu': l:Tag_Item['filename'],
\ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'],
\ 'kind': 's',
\ 'icase': 1}
else
"
" Tag created by ctags
"
let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n"
let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n"
let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n"
if has_key( l:Tag_Item, 'package')
let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n"
let l:Menu = l:Tag_Item['package']
elseif has_key( l:Tag_Item, 'separate')
let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n"
let l:Menu = l:Tag_Item['separate']
elseif has_key( l:Tag_Item, 'packspec')
let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n"
let l:Menu = l:Tag_Item['packspec']
elseif has_key( l:Tag_Item, 'type')
let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n"
let l:Menu = l:Tag_Item['type']
else
let l:Menu = l:Tag_Item['filename']
endif
let l:Match_Item = {
\ 'word': l:Tag_Item['name'],
\ 'menu': l:Menu,
\ 'info': l:Info,
\ 'kind': l:Tag_Item['kind'],
\ 'icase': 1}
endif
if complete_add (l:Match_Item) == 0
return []
endif
if complete_check ()
return []
endif
endfor
return []
endif
endfunction adacomplete#Complete
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

@ -0,0 +1,332 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.3
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your
" .vimrc is the only other setup necessary.
"
" The API is documented inline below. For maximum ease of reading,
" :set foldmethod=marker
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
" Point of entry for basic default usage. Give a relative path to invoke
" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke
" pathogen#surround(). For backwards compatibility purposes, a full path that
" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories()
" instead.
function! pathogen#infect(...) abort " {{{1
for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}']
if path =~# '^[^\\/]\+$'
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#interpose(path . '/{}')
elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$'
call pathogen#interpose(path)
elseif path =~# '[\\/]\%({}\|\*\)$'
call pathogen#surround(path)
else
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#surround(path . '/{}')
endif
endfor
call pathogen#cycle_filetype()
return ''
endfunction " }}}1
" Split a path into a list.
function! pathogen#split(path) abort " {{{1
if type(a:path) == type([]) | return a:path | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction " }}}1
" Convert a list to a path.
function! pathogen#join(...) abort " {{{1
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
else
let path .= "," . a:000[i]
endif
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction " }}}1
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort " {{{1
return call('pathogen#join',[1] + a:000)
endfunction " }}}1
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() " {{{1
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction " }}}1
" Check if a bundle is disabled. A bundle is considered disabled if its
" basename or full name is included in the list g:pathogen_disabled.
function! pathogen#is_disabled(path) abort " {{{1
let sep = pathogen#slash()
let blacklist = get(g:, 'pathogen_blacklist', get(g:, 'pathogen_disabled', []))
return index(blacklist, fnamemodify(a:path, ':t')) != -1 || index(blacklist, a:path) != -1
endfunction "}}}1
" Prepend the given directory to the runtime path and append its corresponding
" after directory. If the directory is already included, move it to the
" outermost position. Wildcards are added as is. Ending a path in /{} causes
" all subdirectories to be added (except those in g:pathogen_disabled).
function! pathogen#surround(path) abort " {{{1
let sep = pathogen#slash()
let rtp = pathogen#split(&rtp)
if a:path =~# '[\\/]{}$'
let path = fnamemodify(a:path[0:-4], ':p:s?[\\/]\=$??')
let before = filter(pathogen#glob_directories(path.sep.'*'), '!pathogen#is_disabled(v:val)')
let after = filter(reverse(pathogen#glob_directories(path.sep."*".sep."after")), '!pathogen#is_disabled(v:val[0:-7])')
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
else
let path = fnamemodify(a:path, ':p:s?[\\/]\=$??')
let before = [path]
let after = [path . sep . 'after']
call filter(rtp, 'index(before + after, v:val) == -1')
endif
let &rtp = pathogen#join(before, rtp, after)
return &rtp
endfunction " }}}1
" For each directory in the runtime path, add a second entry with the given
" argument appended. If the argument ends in '/{}', add a separate entry for
" each subdirectory.
function! pathogen#interpose(name) abort " {{{1
let sep = pathogen#slash()
let name = a:name
if has_key(s:done_bundles, name)
return ""
endif
let s:done_bundles[name] = 1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
if name =~# '{}$'
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name[0:-3],'').'*'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
else
let list += [dir, substitute(dir, 'after$', '', '') . name . sep . 'after']
endif
else
if name =~# '{}$'
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name[0:-3].'*'), '!pathogen#is_disabled(v:val)')
else
let list += [dir . sep . name, dir]
endif
endif
endfor
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction
let s:done_bundles = {}
" }}}1
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() abort " {{{1
let sep = pathogen#slash()
for glob in pathogen#split(&rtp)
for dir in map(split(glob(glob), "\n"), 'v:val.sep."/doc/".sep')
if (dir)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir) == 2 && !empty(split(glob(dir.'*.txt'))) && (!filereadable(dir.'tags') || filewritable(dir.'tags'))
silent! execute 'helptags' pathogen#fnameescape(dir)
endif
endfor
endfor
endfunction " }}}1
command! -bar Helptags :call pathogen#helptags()
" Execute the given command. This is basically a backdoor for --remote-expr.
function! pathogen#execute(...) abort " {{{1
for command in a:000
execute command
endfor
return ''
endfunction " }}}1
" Section: Unofficial
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#slash() abort " {{{1
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction " }}}1
function! pathogen#separator() abort " {{{1
return pathogen#slash()
endfunction " }}}1
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort " {{{1
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#slash()."/]$","","")')
endfunction "}}}1
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort " {{{1
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction "}}}1
" Remove duplicates from a list.
function! pathogen#uniq(list) abort " {{{1
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction " }}}1
" Backport of fnameescape().
function! pathogen#fnameescape(string) abort " {{{1
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction " }}}1
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) abort "{{{1
let rtp = pathogen#join(1,pathogen#split(&rtp))
let file = findfile(a:file,rtp,a:count)
if file ==# ''
return ''
else
return fnamemodify(file,':p')
endif
endfunction " }}}1
" Section: Deprecated
function! s:warn(msg)
echohl WarningMsg
echomsg a:msg
echohl NONE
endfunction
" Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories. Deprecated.
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')')
return pathogen#surround(a:path . pathogen#slash() . '{}')
endfunction " }}}1
function! pathogen#incubate(...) abort " {{{1
let name = a:0 ? a:1 : 'bundle/{}'
call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')')
return pathogen#interpose(name)
endfunction " }}}1
" Deprecated alias for pathogen#interpose().
function! pathogen#runtime_append_all_bundles(...) abort " {{{1
if a:0
call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')')
else
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()')
endif
return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}')
endfunction " }}}1
if exists(':Vedit')
finish
endif
let s:vopen_warning = 0
function! s:find(count,cmd,file,lcd) " {{{1
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
let file = pathogen#runtime_findfile(a:file,a:count)
if file ==# ''
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
endif
if !s:vopen_warning
let s:vopen_warning = 1
let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE'
else
let warning = ''
endif
if a:lcd
let path = file[0:-strlen(a:file)-2]
execute 'lcd `=path`'
return a:cmd.' '.pathogen#fnameescape(a:file) . warning
else
return a:cmd.' '.pathogen#fnameescape(file) . warning
endif
endfunction " }}}1
function! s:Findcomplete(A,L,P) " {{{1
let sep = pathogen#slash()
let cheats = {
\'a': 'autoload',
\'d': 'doc',
\'f': 'ftplugin',
\'i': 'indent',
\'p': 'plugin',
\'s': 'syntax'}
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
let request = cheats[a:A[0]].a:A[1:-1]
else
let request = a:A
endif
let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*'
let found = {}
for path in pathogen#split(&runtimepath)
let path = expand(path, ':p')
let matches = split(glob(path.sep.pattern),"\n")
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
for match in matches
let found[match] = 1
endfor
endfor
return sort(keys(found))
endfunction " }}}1
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
" vim:set et sw=2:

@ -0,0 +1,610 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Jun 20
let s:cpo_save = &cpo
set cpo&vim
" This function is used for the 'omnifunc' option.
function! ccomplete#Complete(findstart, base)
if a:findstart
" Locate the start of the item, including ".", "->" and "[...]".
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
if line[start - 1] =~ '\w'
let start -= 1
elseif line[start - 1] =~ '\.'
if lastword == -1
let lastword = start
endif
let start -= 1
elseif start > 1 && line[start - 2] == '-' && line[start - 1] == '>'
if lastword == -1
let lastword = start
endif
let start -= 2
elseif line[start - 1] == ']'
" Skip over [...].
let n = 0
let start -= 1
while start > 0
let start -= 1
if line[start] == '['
if n == 0
break
endif
let n -= 1
elseif line[start] == ']' " nested []
let n += 1
endif
endwhile
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, lastword - start)
return lastword
endif
" Return list of matches.
let base = s:prepended . a:base
" Don't do anything for an empty base, would result in all the tags in the
" tags file.
if base == ''
return []
endif
" init cache for vimgrep to empty
let s:grepCache = {}
" Split item in words, keep empty word after "." or "->".
" "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc.
" We can't use split, because we need to skip nested [...].
let items = []
let s = 0
while 1
let e = match(base, '\.\|->\|\[', s)
if e < 0
if s == 0 || base[s - 1] != ']'
call add(items, strpart(base, s))
endif
break
endif
if s == 0 || base[s - 1] != ']'
call add(items, strpart(base, s, e - s))
endif
if base[e] == '.'
let s = e + 1 " skip over '.'
elseif base[e] == '-'
let s = e + 2 " skip over '->'
else
" Skip over [...].
let n = 0
let s = e
let e += 1
while e < len(base)
if base[e] == ']'
if n == 0
break
endif
let n -= 1
elseif base[e] == '[' " nested [...]
let n += 1
endif
let e += 1
endwhile
let e += 1
call add(items, strpart(base, s, e - s))
let s = e
endif
endwhile
" Find the variable items[0].
" 1. in current function (like with "gd")
" 2. in tags file(s) (like with ":tag")
" 3. in current file (like with "gD")
let res = []
if searchdecl(items[0], 0, 1) == 0
" Found, now figure out the type.
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
if stridx(strpart(line, 0, col), ';') != -1
" Handle multiple declarations on the same line.
let col2 = col - 1
while line[col2] != ';'
let col2 -= 1
endwhile
let line = strpart(line, col2 + 1)
let col -= col2
endif
if stridx(strpart(line, 0, col), ',') != -1
" Handle multiple declarations on the same line in a function
" declaration.
let col2 = col - 1
while line[col2] != ','
let col2 -= 1
endwhile
if strpart(line, col2 + 1, col - col2 - 1) =~ ' *[^ ][^ ]* *[^ ]'
let line = strpart(line, col2 + 1)
let col -= col2
endif
endif
if len(items) == 1
" Completing one word and it's a local variable: May add '[', '.' or
" '->'.
let match = items[0]
let kind = 'v'
if match(line, '\<' . match . '\s*\[') > 0
let match .= '['
else
let res = s:Nextitem(strpart(line, 0, col), [''], 0, 1)
if len(res) > 0
" There are members, thus add "." or "->".
if match(line, '\*[ \t(]*' . match . '\>') > 0
let match .= '->'
else
let match .= '.'
endif
endif
endif
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
else
" Completing "var.", "var.something", etc.
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
endif
endif
if len(items) == 1
" Only one part, no "." or "->": complete from tags file.
let tags = taglist('^' . base)
" Remove members, these can't appear without something in front.
call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
" Remove static matches in other files.
call filter(tags, '!has_key(v:val, "static") || !v:val["static"] || bufnr("%") == bufnr(v:val["filename"])')
call extend(res, map(tags, 's:Tag2item(v:val)'))
endif
if len(res) == 0
" Find the variable in the tags file(s)
let diclist = taglist('^' . items[0] . '$')
" Remove members, these can't appear without something in front.
call filter(diclist, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
let res = []
for i in range(len(diclist))
" New ctags has the "typeref" field. Patched version has "typename".
if has_key(diclist[i], 'typename')
call extend(res, s:StructMembers(diclist[i]['typename'], items[1:], 1))
elseif has_key(diclist[i], 'typeref')
call extend(res, s:StructMembers(diclist[i]['typeref'], items[1:], 1))
endif
" For a variable use the command, which must be a search pattern that
" shows the declaration of the variable.
if diclist[i]['kind'] == 'v'
let line = diclist[i]['cmd']
if line[0] == '/' && line[1] == '^'
let col = match(line, '\<' . items[0] . '\>')
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0, 1))
endif
endif
endfor
endif
if len(res) == 0 && searchdecl(items[0], 1) == 0
" Found, now figure out the type.
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
endif
" If the last item(s) are [...] they need to be added to the matches.
let last = len(items) - 1
let brackets = ''
while last >= 0
if items[last][0] != '['
break
endif
let brackets = items[last] . brackets
let last -= 1
endwhile
return map(res, 's:Tagline2item(v:val, brackets)')
endfunc
function! s:GetAddition(line, match, memarg, bracket)
" Guess if the item is an array.
if a:bracket && match(a:line, a:match . '\s*\[') > 0
return '['
endif
" Check if the item has members.
if len(s:SearchMembers(a:memarg, [''], 0)) > 0
" If there is a '*' before the name use "->".
if match(a:line, '\*[ \t(]*' . a:match . '\>') > 0
return '->'
else
return '.'
endif
endif
return ''
endfunction
" Turn the tag info "val" into an item for completion.
" "val" is is an item in the list returned by taglist().
" If it is a variable we may add "." or "->". Don't do it for other types,
" such as a typedef, by not including the info that s:GetAddition() uses.
function! s:Tag2item(val)
let res = {'match': a:val['name']}
let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename'])
let s = s:Dict2info(a:val)
if s != ''
let res['info'] = s
endif
let res['tagline'] = ''
if has_key(a:val, "kind")
let kind = a:val['kind']
let res['kind'] = kind
if kind == 'v'
let res['tagline'] = "\t" . a:val['cmd']
let res['dict'] = a:val
elseif kind == 'f'
let res['match'] = a:val['name'] . '('
endif
endif
return res
endfunction
" Use all the items in dictionary for the "info" entry.
function! s:Dict2info(dict)
let info = ''
for k in sort(keys(a:dict))
let info .= k . repeat(' ', 10 - len(k))
if k == 'cmd'
let info .= substitute(matchstr(a:dict['cmd'], '/^\s*\zs.*\ze$/'), '\\\(.\)', '\1', 'g')
else
let info .= a:dict[k]
endif
let info .= "\n"
endfor
return info
endfunc
" Parse a tag line and return a dictionary with items like taglist()
function! s:ParseTagline(line)
let l = split(a:line, "\t")
let d = {}
if len(l) >= 3
let d['name'] = l[0]
let d['filename'] = l[1]
let d['cmd'] = l[2]
let n = 2
if l[2] =~ '^/'
" Find end of cmd, it may contain Tabs.
while n < len(l) && l[n] !~ '/;"$'
let n += 1
let d['cmd'] .= " " . l[n]
endwhile
endif
for i in range(n + 1, len(l) - 1)
if l[i] == 'file:'
let d['static'] = 1
elseif l[i] !~ ':'
let d['kind'] = l[i]
else
let d[matchstr(l[i], '[^:]*')] = matchstr(l[i], ':\zs.*')
endif
endfor
endif
return d
endfunction
" Turn a match item "val" into an item for completion.
" "val['match']" is the matching item.
" "val['tagline']" is the tagline in which the last part was found.
function! s:Tagline2item(val, brackets)
let line = a:val['tagline']
let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '')
let res = {'word': a:val['match'] . a:brackets . add }
if has_key(a:val, 'info')
" Use info from Tag2item().
let res['info'] = a:val['info']
else
" Parse the tag line and add each part to the "info" entry.
let s = s:Dict2info(s:ParseTagline(line))
if s != ''
let res['info'] = s
endif
endif
if has_key(a:val, 'kind')
let res['kind'] = a:val['kind']
elseif add == '('
let res['kind'] = 'f'
else
let s = matchstr(line, '\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
if s != ''
let res['kind'] = s
endif
endif
if has_key(a:val, 'extra')
let res['menu'] = a:val['extra']
return res
endif
" Isolate the command after the tag and filename.
let s = matchstr(line, '[^\t]*\t[^\t]*\t\zs\(/^.*$/\|[^\t]*\)\ze\(;"\t\|\t\|$\)')
if s != ''
let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t'))
endif
return res
endfunction
" Turn a command from a tag line to something that is useful in the menu
function! s:Tagcmd2extra(cmd, name, fname)
if a:cmd =~ '^/^'
" The command is a search command, useful to see what it is.
let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/')
let x = substitute(x, '\<' . a:name . '\>', '@@', '')
let x = substitute(x, '\\\(.\)', '\1', 'g')
let x = x . ' - ' . a:fname
elseif a:cmd =~ '^\d*$'
" The command is a line number, the file name is more useful.
let x = a:fname . ' - ' . a:cmd
else
" Not recognized, use command and file name.
let x = a:cmd . ' - ' . a:fname
endif
return x
endfunction
" Find composing type in "lead" and match items[0] with it.
" Repeat this recursively for items[1], if it's there.
" When resolving typedefs "depth" is used to avoid infinite recursion.
" Return the list of matches.
function! s:Nextitem(lead, items, depth, all)
" Use the text up to the variable name and split it in tokens.
let tokens = split(a:lead, '\s\+\|\<')
" Try to recognize the type of the variable. This is rough guessing...
let res = []
for tidx in range(len(tokens))
" Skip tokens starting with a non-ID character.
if tokens[tidx] !~ '^\h'
continue
endif
" Recognize "struct foobar" and "union foobar".
" Also do "class foobar" when it's C++ after all (doesn't work very well
" though).
if (tokens[tidx] == 'struct' || tokens[tidx] == 'union' || tokens[tidx] == 'class') && tidx + 1 < len(tokens)
let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items, a:all)
break
endif
" TODO: add more reserved words
if index(['int', 'short', 'char', 'float', 'double', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0
continue
endif
" Use the tags file to find out if this is a typedef.
let diclist = taglist('^' . tokens[tidx] . '$')
for tagidx in range(len(diclist))
let item = diclist[tagidx]
" New ctags has the "typeref" field. Patched version has "typename".
if has_key(item, 'typeref')
call extend(res, s:StructMembers(item['typeref'], a:items, a:all))
continue
endif
if has_key(item, 'typename')
call extend(res, s:StructMembers(item['typename'], a:items, a:all))
continue
endif
" Only handle typedefs here.
if item['kind'] != 't'
continue
endif
" Skip matches local to another file.
if has_key(item, 'static') && item['static'] && bufnr('%') != bufnr(item['filename'])
continue
endif
" For old ctags we recognize "typedef struct aaa" and
" "typedef union bbb" in the tags file command.
let cmd = item['cmd']
let ei = matchend(cmd, 'typedef\s\+')
if ei > 1
let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<')
if len(cmdtokens) > 1
if cmdtokens[0] == 'struct' || cmdtokens[0] == 'union' || cmdtokens[0] == 'class'
let name = ''
" Use the first identifier after the "struct" or "union"
for ti in range(len(cmdtokens) - 1)
if cmdtokens[ti] =~ '^\w'
let name = cmdtokens[ti]
break
endif
endfor
if name != ''
call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items, a:all))
endif
elseif a:depth < 10
" Could be "typedef other_T some_T".
call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1, a:all))
endif
endif
endif
endfor
if len(res) > 0
break
endif
endfor
return res
endfunction
" Search for members of structure "typename" in tags files.
" Return a list with resulting matches.
" Each match is a dictionary with "match" and "tagline" entries.
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
function! s:StructMembers(typename, items, all)
" Todo: What about local structures?
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
if fnames == ''
return []
endif
let typename = a:typename
let qflist = []
let cached = 0
if a:all == 0
let n = '1' " stop at first found match
if has_key(s:grepCache, a:typename)
let qflist = s:grepCache[a:typename]
let cached = 1
endif
else
let n = ''
endif
if !cached
while 1
exe 'silent! keepj noautocmd ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
let qflist = getqflist()
if len(qflist) > 0 || match(typename, "::") < 0
break
endif
" No match for "struct:context::name", remove "context::" and try again.
let typename = substitute(typename, ':[^:]*::', ':', '')
endwhile
if a:all == 0
" Store the result to be able to use it again later.
let s:grepCache[a:typename] = qflist
endif
endif
" Put matching members in matches[].
let matches = []
for l in qflist
let memb = matchstr(l['text'], '[^\t]*')
if memb =~ '^' . a:items[0]
" Skip matches local to another file.
if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*'))
let item = {'match': memb, 'tagline': l['text']}
" Add the kind of item.
let s = matchstr(l['text'], '\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
if s != ''
let item['kind'] = s
if s == 'f'
let item['match'] = memb . '('
endif
endif
call add(matches, item)
endif
endif
endfor
if len(matches) > 0
" Skip over [...] items
let idx = 1
while 1
if idx >= len(a:items)
return matches " No further items, return the result.
endif
if a:items[idx][0] != '['
break
endif
let idx += 1
endwhile
" More items following. For each of the possible members find the
" matching following members.
return s:SearchMembers(matches, a:items[idx :], a:all)
endif
" Failed to find anything.
return []
endfunction
" For matching members, find matches for following items.
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
function! s:SearchMembers(matches, items, all)
let res = []
for i in range(len(a:matches))
let typename = ''
if has_key(a:matches[i], 'dict')
if has_key(a:matches[i].dict, 'typename')
let typename = a:matches[i].dict['typename']
elseif has_key(a:matches[i].dict, 'typeref')
let typename = a:matches[i].dict['typeref']
endif
let line = "\t" . a:matches[i].dict['cmd']
else
let line = a:matches[i]['tagline']
let e = matchend(line, '\ttypename:')
if e < 0
let e = matchend(line, '\ttyperef:')
endif
if e > 0
" Use typename field
let typename = matchstr(line, '[^\t]*', e)
endif
endif
if typename != ''
call extend(res, s:StructMembers(typename, a:items, a:all))
else
" Use the search command (the declaration itself).
let s = match(line, '\t\zs/^')
if s > 0
let e = match(line, '\<' . a:matches[i]['match'] . '\>', s)
if e > 0
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0, a:all))
endif
endif
endif
if a:all == 0 && len(res) > 0
break
endif
endfor
return res
endfunc
let &cpo = s:cpo_save
unlet s:cpo_save

File diff suppressed because one or more lines are too long

@ -0,0 +1,429 @@
" Vim completion script
" Language: CSS 2.1
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2007 May 5
let s:values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index")
function! csscomplete#CompleteCSS(findstart, base)
if a:findstart
" We need whole line to proper checking
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\%(\k\|-\)'
let start -= 1
endwhile
let b:compl_context = line[0:compl_begin]
return start
endif
" There are few chars important for context:
" ^ ; : { } /* */
" Where ^ is start of line and /* */ are comment borders
" Depending on their relative position to cursor we will know what should
" be completed.
" 1. if nearest are ^ or { or ; current word is property
" 2. if : it is value (with exception of pseudo things)
" 3. if } we are outside of css definitions
" 4. for comments ignoring is be the easiest but assume they are the same
" as 1.
" 5. if @ complete at-rule
" 6. if ! complete important
if exists("b:compl_context")
let line = b:compl_context
unlet! b:compl_context
else
let line = a:base
endif
let res = []
let res2 = []
let borders = {}
" Check last occurrence of sequence
let openbrace = strridx(line, '{')
let closebrace = strridx(line, '}')
let colon = strridx(line, ':')
let semicolon = strridx(line, ';')
let opencomm = strridx(line, '/*')
let closecomm = strridx(line, '*/')
let style = strridx(line, 'style\s*=')
let atrule = strridx(line, '@')
let exclam = strridx(line, '!')
if openbrace > -1
let borders[openbrace] = "openbrace"
endif
if closebrace > -1
let borders[closebrace] = "closebrace"
endif
if colon > -1
let borders[colon] = "colon"
endif
if semicolon > -1
let borders[semicolon] = "semicolon"
endif
if opencomm > -1
let borders[opencomm] = "opencomm"
endif
if closecomm > -1
let borders[closecomm] = "closecomm"
endif
if style > -1
let borders[style] = "style"
endif
if atrule > -1
let borders[atrule] = "atrule"
endif
if exclam > -1
let borders[exclam] = "exclam"
endif
if len(borders) == 0 || borders[max(keys(borders))] =~ '^\%(openbrace\|semicolon\|opencomm\|closecomm\|style\)$'
" Complete properties
let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$')
for m in s:values
if m =~? '^'.entered_property
call add(res, m . ':')
elseif m =~? entered_property
call add(res2, m . ':')
endif
endfor
return res + res2
elseif borders[max(keys(borders))] == 'colon'
" Get name of property
let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$'))
if prop == 'azimuth'
let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"]
elseif prop == 'background-attachment'
let values = ["scroll", "fixed"]
elseif prop == 'background-color'
let values = ["transparent", "rgb(", "#"]
elseif prop == 'background-image'
let values = ["url(", "none"]
elseif prop == 'background-position'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z]\+\)\?$'
let values = ["top", "center", "bottom"]
elseif vals =~ '^[a-zA-Z]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["left", "center", "right"]
else
return []
endif
elseif prop == 'background-repeat'
let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'background'
let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'border-collapse'
let values = ["collapse", "separate"]
elseif prop == 'border-color'
let values = ["rgb(", "#", "transparent"]
elseif prop == 'border-spacing'
return []
elseif prop == 'border-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)$'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-color'
let values = ["rgb(", "#", "transparent"]
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop == 'bottom'
let values = ["auto"]
elseif prop == 'caption-side'
let values = ["top", "bottom"]
elseif prop == 'clear'
let values = ["none", "left", "right", "both"]
elseif prop == 'clip'
let values = ["auto", "rect("]
elseif prop == 'color'
let values = ["rgb(", "#"]
elseif prop == 'content'
let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"]
elseif prop =~ 'counter-\%(increment\|reset\)$'
let values = ["none"]
elseif prop =~ '^\%(cue-after\|cue-before\|cue\)$'
let values = ["url(", "none"]
elseif prop == 'cursor'
let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"]
elseif prop == 'direction'
let values = ["ltr", "rtl"]
elseif prop == 'display'
let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"]
elseif prop == 'elevation'
let values = ["below", "level", "above", "higher", "lower"]
elseif prop == 'empty-cells'
let values = ["show", "hide"]
elseif prop == 'float'
let values = ["left", "right", "none"]
elseif prop == 'font-family'
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
elseif prop == 'font-size'
let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
elseif prop == 'font-style'
let values = ["normal", "italic", "oblique"]
elseif prop == 'font-variant'
let values = ["normal", "small-caps"]
elseif prop == 'font-weight'
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
elseif prop == 'font'
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
elseif prop =~ '^\%(height\|width\)$'
let values = ["auto"]
elseif prop =~ '^\%(left\|rigth\)$'
let values = ["auto"]
elseif prop == 'letter-spacing'
let values = ["normal"]
elseif prop == 'line-height'
let values = ["normal"]
elseif prop == 'list-style-image'
let values = ["url(", "none"]
elseif prop == 'list-style-position'
let values = ["inside", "outside"]
elseif prop == 'list-style-type'
let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"]
elseif prop == 'list-style'
return []
elseif prop == 'margin'
let values = ["auto"]
elseif prop =~ 'margin-\%(right\|left\|top\|bottom\)$'
let values = ["auto"]
elseif prop == 'max-height'
let values = ["auto"]
elseif prop == 'max-width'
let values = ["none"]
elseif prop == 'min-height'
let values = ["none"]
elseif prop == 'min-width'
let values = ["none"]
elseif prop == 'orphans'
return []
elseif prop == 'outline-color'
let values = ["rgb(", "#"]
elseif prop == 'outline-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop == 'outline-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'outline'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z0-9,()#]\+\)\?$'
let values = ["rgb(", "#"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
let values = ["thin", "thick", "medium"]
else
return []
endif
elseif prop == 'overflow'
let values = ["visible", "hidden", "scroll", "auto"]
elseif prop == 'padding'
return []
elseif prop =~ 'padding-\%(top\|right\|bottom\|left\)$'
return []
elseif prop =~ 'page-break-\%(after\|before\)$'
let values = ["auto", "always", "avoid", "left", "right"]
elseif prop == 'page-break-inside'
let values = ["auto", "avoid"]
elseif prop =~ 'pause-\%(after\|before\)$'
return []
elseif prop == 'pause'
return []
elseif prop == 'pitch-range'
return []
elseif prop == 'pitch'
let values = ["x-low", "low", "medium", "high", "x-high"]
elseif prop == 'play-during'
let values = ["url(", "mix", "repeat", "auto", "none"]
elseif prop == 'position'
let values = ["static", "relative", "absolute", "fixed"]
elseif prop == 'quotes'
let values = ["none"]
elseif prop == 'richness'
return []
elseif prop == 'speak-header'
let values = ["once", "always"]
elseif prop == 'speak-numeral'
let values = ["digits", "continuous"]
elseif prop == 'speak-punctuation'
let values = ["code", "none"]
elseif prop == 'speak'
let values = ["normal", "none", "spell-out"]
elseif prop == 'speech-rate'
let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"]
elseif prop == 'stress'
return []
elseif prop == 'table-layout'
let values = ["auto", "fixed"]
elseif prop == 'text-align'
let values = ["left", "right", "center", "justify"]
elseif prop == 'text-decoration'
let values = ["none", "underline", "overline", "line-through", "blink"]
elseif prop == 'text-indent'
return []
elseif prop == 'text-transform'
let values = ["capitalize", "uppercase", "lowercase", "none"]
elseif prop == 'top'
let values = ["auto"]
elseif prop == 'unicode-bidi'
let values = ["normal", "embed", "bidi-override"]
elseif prop == 'vertical-align'
let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"]
elseif prop == 'visibility'
let values = ["visible", "hidden", "collapse"]
elseif prop == 'voice-family'
return []
elseif prop == 'volume'
let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"]
elseif prop == 'white-space'
let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"]
elseif prop == 'widows'
return []
elseif prop == 'word-spacing'
let values = ["normal"]
elseif prop == 'z-index'
let values = ["auto"]
else
" If no property match it is possible we are outside of {} and
" trying to complete pseudo-(class|element)
let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$'))
if stridx(',a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var,', ','.element.',') > -1
let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"]
else
return []
endif
endif
" Complete values
let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
for m in values
if m =~? '^'.entered_value
call add(res, m)
elseif m =~? entered_value
call add(res2, m)
endif
endfor
return res + res2
elseif borders[max(keys(borders))] == 'closebrace'
return []
elseif borders[max(keys(borders))] == 'exclam'
" Complete values
let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
let values = ["important"]
for m in values
if m =~? '^'.entered_imp
call add(res, m)
endif
endfor
return res
elseif borders[max(keys(borders))] == 'atrule'
let afterat = matchstr(line, '.*@\zs.*')
if afterat =~ '\s'
let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze')
if atrulename == 'media'
let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"]
let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
elseif atrulename == 'import'
let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$')
if entered_atruleafter =~ "^[\"']"
let filestart = matchstr(entered_atruleafter, '^.\zs.*')
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"\"".v:val')
elseif entered_atruleafter =~ "^url("
let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*")
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"url(".v:val')
else
let values = ['"', 'url(']
endif
else
return []
endif
for m in values
if m =~? '^'.entered_atruleafter
call add(res, m)
elseif m =~? entered_atruleafter
call add(res2, m)
endif
endfor
return res + res2
endif
let values = ["charset", "page", "media", "import", "font-face"]
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
for m in values
if m =~? '^'.entered_atrule
call add(res, m .' ')
elseif m =~? entered_atrule
call add(res2, m .' ')
endif
endfor
return res + res2
endif
return []
endfunction

@ -0,0 +1,75 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/Dec Ada compiler file
" Language: Ada (Dec Ada)
" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
" $Author: krischik $
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: compiler-decada
"------------------------------------------------------------------------------
if version < 700
finish
endif
function decada#Unit_Name () dict " {{{1
" Convert filename into acs unit:
" 1: remove the file extenstion.
" 2: replace all double '_' or '-' with an dot (which denotes a separate)
" 3: remove a trailing '_' (wich denotes a specification)
return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
endfunction decada#Unit_Name " }}}1
function decada#Make () dict " {{{1
let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '')
let &errorformat = g:self.Error_Format
let &makeprg = l:make_prg
wall
make
copen
set wrap
wincmd W
endfunction decada#Build " }}}1
function decada#Set_Session (...) dict " {{{1
if a:0 > 0
call ada#Switch_Session (a:1)
elseif argc() == 0 && strlen (v:servername) > 0
call ada#Switch_Session (
\ expand('~')[0:-2] . ".vimfiles.session]decada_" .
\ v:servername . ".vim")
endif
return
endfunction decada#Set_Session " }}}1
function decada#New () " }}}1
let Retval = {
\ 'Make' : function ('decada#Make'),
\ 'Unit_Name' : function ('decada#Unit_Name'),
\ 'Set_Session' : function ('decada#Set_Session'),
\ 'Project_Dir' : '',
\ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<',
\ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' .
\ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'}
return Retval
endfunction decada#New " }}}1
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

@ -0,0 +1,667 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell
" Date: Apr 17, 2013
" Version: 35
" Installing: :help glvs-install
" Usage: :help glvs
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Initialization: {{{1
" if you're sourcing this file, surely you can't be
" expecting vim to be in its vi-compatible mode!
if exists("g:loaded_getscript")
finish
endif
let g:loaded_getscript= "v35"
if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
endif
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of getscript needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo = &cpo
set cpo&vim
"DechoTabOn
" ---------------------------
" Global Variables: {{{1
" ---------------------------
" Cygwin Detection ------- {{{2
if !exists("g:getscript_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:getscript_cygwin= 1
else
let g:getscript_cygwin= 0
endif
else
let g:getscript_cygwin= 0
endif
endif
" wget vs curl {{{2
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
let g:GetLatestVimScripts_wget= "wget"
elseif executable("curl")
let g:GetLatestVimScripts_wget= "curl"
else
let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"'
let g:GetLatestVimScripts_options = ""
endif
endif
" options that wget and curl require:
if !exists("g:GetLatestVimScripts_options")
if g:GetLatestVimScripts_wget == "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget == "curl"
let g:GetLatestVimScripts_options= "-s -O"
else
let g:GetLatestVimScripts_options= ""
endif
endif
" by default, allow autoinstall lines to work
if !exists("g:GetLatestVimScripts_allowautoinstall")
let g:GetLatestVimScripts_allowautoinstall= 1
endif
" set up default scriptaddr address
if !exists("g:GetLatestVimScripts_scriptaddr")
let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='
endif
"" For debugging:
"let g:GetLatestVimScripts_wget = "echo"
"let g:GetLatestVimScripts_options = "options"
" ---------------------------------------------------------------------
" Check If AutoInstall Capable: {{{1
let s:autoinstall= ""
if g:GetLatestVimScripts_allowautoinstall
if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash"
" windows (but not cygwin/bash)
let s:dotvim= "vimfiles"
if !exists("g:GetLatestVimScripts_mv")
let g:GetLatestVimScripts_mv= "ren"
endif
else
" unix
let s:dotvim= ".vim"
if !exists("g:GetLatestVimScripts_mv")
let g:GetLatestVimScripts_mv= "mv"
endif
endif
if exists("g:GetLatestVimScripts_autoinstalldir") && isdirectory(g:GetLatestVimScripts_autoinstalldir)
let s:autoinstall= g:GetLatestVimScripts_autoinstalldir"
elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
let s:autoinstall= $HOME."/".s:dotvim
endif
" call Decho("s:autoinstall<".s:autoinstall.">")
"else "Decho
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
endif
" ---------------------------------------------------------------------
" Public Interface: {{{1
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
" ---------------------------------------------------------------------
" GetLatestVimScripts: this function gets the latest versions of {{{1
" scripts based on the list in
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
fun! getscript#GetLatestVimScripts()
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
" insure that wget is executable
if executable(g:GetLatestVimScripts_wget) != 1
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
" call Dret("GetLatestVimScripts : wget not executable/availble")
return
endif
" insure that fnameescape() is available
if !exists("*fnameescape")
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
return
endif
" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
" call Decho("found directory<".datadir.">")
let datadir= datadir . "/GetLatest"
break
endif
if filereadable(datadir."GetLatestVimScripts.dat")
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
break
endif
endfor
" Sanity checks: readability and writability
if datadir == ""
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
return
endif
if filewritable(datadir) != 2
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
return
endif
let datafile= datadir."/GetLatestVimScripts.dat"
if !filereadable(datafile)
echoerr "Your data file<".datafile."> isn't readable"
" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">")
return
endif
if !filewritable(datafile)
echoerr "Your data file<".datafile."> isn't writable"
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
return
endif
" --------------------
" Passed sanity checks
" --------------------
" call Decho("datadir <".datadir.">")
" call Decho("datafile <".datafile.">")
" don't let any event handlers interfere (like winmanager's, taglist's, etc)
let eikeep = &ei
let hlskeep = &hls
let acdkeep = &acd
set ei=all hls&vim noacd
" Edit the datafile (ie. GetLatestVimScripts.dat):
" 1. record current directory (origdir),
" 2. change directory to datadir,
" 3. split window
" 4. edit datafile
let origdir= getcwd()
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
split
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
res 1000
let s:downloads = 0
let s:downerrors= 0
" Check on dependencies mentioned in plugins
" call Decho(" ")
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
let firstdir = substitute(&rtp,',.*$','','')
let plugins = split(globpath(firstdir,"plugin/*.vim"),'\n')
let plugins = plugins + split(globpath(firstdir,"AsNeeded/*.vim"),'\n')
let foundscript = 0
" this loop updates the GetLatestVimScripts.dat file
" with dependencies explicitly mentioned in the plugins
" via GetLatestVimScripts: ... lines
" It reads the plugin script at the end of the GetLatestVimScripts.dat
" file, examines it, and then removes it.
for plugin in plugins
" call Decho(" ")
" call Decho("plugin<".plugin.">")
" read plugin in
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
$
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
" call Decho("..exe silent r ".fnameescape(plugin))
exe "silent r ".fnameescape(plugin)
exe "silent bwipe ".bufnr("#")
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
let llp1 = lastline+1
" call Decho("..depscript<".depscript.">")
" found a "GetLatestVimScripts: # #" line in the script;
" check if its already in the datafile by searching backwards from llp1,
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
" for the script-id with no wrapping allowed.
let curline = line(".")
let noai_script = substitute(depscript,'\s*:AutoInstall:\s*','','e')
exe llp1
let srchline = search('^\s*'.depscriptid.'\s\+\d\+\s\+.*$','bW')
if srchline == 0
" this second search is taken when, for example, a 0 0 scriptname is to be skipped over
let srchline= search('\<'.noai_script.'\>','bW')
endif
" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline)
if srchline == 0
" found a new script to permanently include in the datafile
let keep_rega = @a
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
echomsg "Appending <".@a."> to ".datafile." for ".depscript
" call Decho("..Appending <".@a."> to ".datafile." for ".depscript)
exe lastline."put a"
let @a = keep_rega
let lastline = llp1
let curline = curline + 1
let foundscript = foundscript + 1
" else " Decho
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
endif
let curline = curline + 1
exe curline
endwhile
" llp1: last line plus one
let llp1= lastline + 1
" call Decho(".deleting lines: ".llp1.",$d")
exe "silent! ".llp1.",$d"
endfor
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
" call Decho(" ")
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
if foundscript == 0
setlocal nomod
endif
" --------------------------------------------------------------------
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
" --------------------------------------------------------------------
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
setlocal lz
1
" /^-----/,$g/^\s*\d/call Decho(getline("."))
1
/^-----/,$g/^\s*\d/call s:GetOneScript()
" call Decho("--- end out-of-date checking --- ")
" Final report (an echomsg)
try
silent! ?^-------?
catch /^Vim\%((\a\+)\)\=:E114/
" call Dret("GetLatestVimScripts : nothing done!")
return
endtry
exe "norm! kz\<CR>"
redraw!
let s:msg = ""
if s:downloads == 1
let s:msg = "Downloaded one updated script to <".datadir.">"
elseif s:downloads == 2
let s:msg= "Downloaded two updated scripts to <".datadir.">"
elseif s:downloads > 1
let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">"
else
let s:msg= "Everything was already current"
endif
if s:downerrors > 0
let s:msg= s:msg." (".s:downerrors." downloading errors)"
endif
echomsg s:msg
" save the file
if &mod
silent! w!
endif
q!
" restore events and current directory
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
let &ei = eikeep
let &hls = hlskeep
let &acd = acdkeep
setlocal nolz
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
endfun
" ---------------------------------------------------------------------
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
" on the current line, interpreting two numbers and text as
" ScriptID, SourceID, and Filename.
" It downloads any scripts that have newer versions from vim.sourceforge.net.
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
" set options to allow progress to be shown on screen
let rega= @a
let t_ti= &t_ti
let t_te= &t_te
let rs = &rs
set t_ti= t_te= nors
" put current line on top-of-screen and interpret it into
" a script identifer : used to obtain webpage
" source identifier : used to identify current version
" and an associated comment: used to report on what's being considered
if a:0 >= 3
let scriptid = a:1
let srcid = a:2
let fname = a:3
let cmmnt = ""
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
else
let curline = getline(".")
if curline =~ '^\s*#'
let @a= rega
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
try
let scriptid = substitute(curline,parsepat,'\1','e')
catch /^Vim\%((\a\+)\)\=:E486/
let scriptid= 0
endtry
try
let srcid = substitute(curline,parsepat,'\2','e')
catch /^Vim\%((\a\+)\)\=:E486/
let srcid= 0
endtry
try
let fname= substitute(curline,parsepat,'\3','e')
catch /^Vim\%((\a\+)\)\=:E486/
let fname= ""
endtry
try
let cmmnt= substitute(curline,parsepat,'\4','e')
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
endtry
" call Decho("curline <".curline.">")
" call Decho("parsepat<".parsepat.">")
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
endif
" plugin author protection from downloading his/her own scripts atop their latest work
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
let @a= rega
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
return
endif
let doautoinstall= 0
if fname =~ ":AutoInstall:"
" call Decho("case AutoInstall: fname<".fname.">")
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
if s:autoinstall != ""
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
endif
else
let aicmmnt= fname
endif
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
exe "norm z\<CR>"
redraw!
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
" grab a copy of the plugin's vim.sourceforge.net webpage
let scriptaddr = g:GetLatestVimScripts_scriptaddr.scriptid
let tmpfile = tempname()
let v:errmsg = ""
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw!
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)
endif
if itry == 1
exe "silent vsplit ".fnameescape(tmpfile)
else
silent! e %
endif
setlocal bh=wipe
" find the latest source-id in the plugin's webpage
silent! 1
let findpkg= search('Click on the package to download','W')
if findpkg > 0
break
endif
let itry= itry + 1
endwhile
" call Decho(" --- end downloading tries while loop --- itry=".itry)
" testing: did finding "Click on the package..." fail?
if findpkg == 0 || itry >= 4
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
let @a= rega
return
endif
" call Decho('found "Click on the package to download"')
let findsrcid= search('src_id=','W')
if findsrcid == 0
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
let @a= rega
" call Dret("GetOneScript : srch for /src_id/ failed")
return
endif
" call Decho('found "src_id=" in description page')
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
silent q!
call delete(tmpfile)
" convert the strings-of-numbers into numbers
let srcid = srcid + 0
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
" has the plugin's most-recent srcid increased, which indicates that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
let s:downloads= s:downloads + 1
if sname == bufname("%")
" GetLatestVimScript has to be careful about downloading itself
let sname= "NEW_".sname
endif
" -----------------------------------------------------------------------------
" the plugin has been updated since we last obtained it, so download a new copy
" -----------------------------------------------------------------------------
" call Decho(".downloading new <".sname.">")
echomsg ".downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid
endif
" --------------------------------------------------------------------------
" AutoInstall: only if doautoinstall has been requested by the plugin itself
" --------------------------------------------------------------------------
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
if doautoinstall
" call Decho(" ")
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
" call Decho("<".sname."> is readable")
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
let installdir= curdir."/Installed"
if !isdirectory(installdir)
call mkdir(installdir)
endif
" call Decho("curdir<".curdir."> installdir<".installdir.">")
" call Decho("exe cd ".fnameescape(s:autoinstall))
exe "cd ".fnameescape(s:autoinstall)
" determine target directory for moves
let firstdir= substitute(&rtp,',.*$','','')
let pname = substitute(sname,'\..*','.vim','')
" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
if filereadable(firstdir.'/AsNeeded/'.pname)
let tgtdir= "AsNeeded"
else
let tgtdir= "plugin"
endif
" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
exe "sil !bunzip2 ".shellescape(sname)
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
exe "sil !gunzip ".shellescape(sname)
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
elseif sname =~ '\.xz$'
" call Decho("decompress: attempt to unxz ".sname)
exe "sil !unxz ".shellescape(sname)
let sname= substitute(sname,'\.xz$','','')
" call Decho("decompress: new sname<".sname."> after unxz")
else
" call Decho("no decompression needed")
endif
" distribute archive(.zip, .tar, .vba, ...) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".shellescape(sname)
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".shellescape(sname)
elseif sname =~ '\.tgz$'
" call Decho("dearchive: attempt to untar+gunzip ".sname)
exe "silent !tar -zxvf ".shellescape(sname)
elseif sname =~ '\.taz$'
" call Decho("dearchive: attempt to untar+uncompress ".sname)
exe "silent !tar -Zxvf ".shellescape(sname)
elseif sname =~ '\.tbz$'
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
exe "silent !tar -jxvf ".shellescape(sname)
elseif sname =~ '\.txz$'
" call Decho("dearchive: attempt to untar+xz ".sname)
exe "silent !tar -Jxvf ".shellescape(sname)
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split
if exists("g:vimball_home")
let oldvimballhome= g:vimball_home
endif
let g:vimball_home= s:autoinstall
exe "silent e ".fnameescape(sname)
silent so %
silent q
if exists("oldvimballhome")
let g:vimball_home= oldvimballhome
else
unlet g:vimball_home
endif
else
" call Decho("no dearchiving needed")
endif
" ---------------------------------------------
" move plugin to plugin/ or AsNeeded/ directory
" ---------------------------------------------
if sname =~ '.vim$'
" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
else
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
endif
if tgtdir != "plugin"
" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir
endif
" helptags step
let docdir= substitute(&rtp,',.*','','e')."/doc"
" call Decho("helptags: docdir<".docdir.">")
exe "helptags ".fnameescape(docdir)
exe "cd ".fnameescape(curdir)
endif
if fname !~ ':AutoInstall:'
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
" update the data in the <GetLatestVimScripts.dat> file
call setline(line("."),modline)
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
" else " Decho
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
endif
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let @a = rega
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
" call Dret("GetOneScript")
endfun
" ---------------------------------------------------------------------
" Restore Options: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: ts=8 sts=2 fdm=marker nowrap

@ -0,0 +1,147 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/GNAT compiler file
" Language: Ada (GNAT)
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
" Ned Okie <nokie@radford.edu>
" $Author: krischik $
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
" Version: 4.6
" $Revision: 887 $
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
" 05.08.2006 MK Add session support
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" 19.09.2007 NO use project file only when there is a project
" Help Page: compiler-gnat
"------------------------------------------------------------------------------
if version < 700
finish
endif
function gnat#Make () dict " {{{1
let &l:makeprg = self.Get_Command('Make')
let &l:errorformat = self.Error_Format
wall
make
copen
set wrap
wincmd W
endfunction gnat#Make " }}}1
function gnat#Pretty () dict " {{{1
execute "!" . self.Get_Command('Pretty')
endfunction gnat#Make " }}}1
function gnat#Find () dict " {{{1
execute "!" . self.Get_Command('Find')
endfunction gnat#Find " }}}1
function gnat#Tags () dict " {{{1
execute "!" . self.Get_Command('Tags')
edit tags
call gnat#Insert_Tags_Header ()
update
quit
endfunction gnat#Tags " }}}1
function gnat#Set_Project_File (...) dict " {{{1
if a:0 > 0
let self.Project_File = a:1
if ! filereadable (self.Project_File)
let self.Project_File = findfile (
\ fnamemodify (self.Project_File, ':r'),
\ $ADA_PROJECT_PATH,
\ 1)
endif
elseif strlen (self.Project_File) > 0
let self.Project_File = browse (0, 'GNAT Project File?', '', self.Project_File)
elseif expand ("%:e") == 'gpr'
let self.Project_File = browse (0, 'GNAT Project File?', '', expand ("%:e"))
else
let self.Project_File = browse (0, 'GNAT Project File?', '', 'default.gpr')
endif
if strlen (v:this_session) > 0
execute 'mksession! ' . v:this_session
endif
"if strlen (self.Project_File) > 0
"if has("vms")
"call ada#Switch_Session (
"\ expand('~')[0:-2] . ".vimfiles.session]gnat_" .
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
"else
"call ada#Switch_Session (
"\ expand('~') . "/vimfiles/session/gnat_" .
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
"endif
"else
"call ada#Switch_Session ('')
"endif
return
endfunction gnat#Set_Project_File " }}}1
function gnat#Get_Command (Command) dict " {{{1
let l:Command = eval ('self.' . a:Command . '_Command')
return eval (l:Command)
endfunction gnat#Get_Command " }}}1
function gnat#Set_Session (...) dict " {{{1
if argc() == 1 && fnamemodify (argv(0), ':e') == 'gpr'
call self.Set_Project_File (argv(0))
elseif strlen (v:servername) > 0
call self.Set_Project_File (v:servername . '.gpr')
endif
endfunction gnat#Set_Session " }}}1
function gnat#New () " {{{1
let l:Retval = {
\ 'Make' : function ('gnat#Make'),
\ 'Pretty' : function ('gnat#Pretty'),
\ 'Find' : function ('gnat#Find'),
\ 'Tags' : function ('gnat#Tags'),
\ 'Set_Project_File' : function ('gnat#Set_Project_File'),
\ 'Set_Session' : function ('gnat#Set_Session'),
\ 'Get_Command' : function ('gnat#Get_Command'),
\ 'Project_File' : '',
\ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "',
\ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "',
\ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "',
\ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"',
\ 'Error_Format' : '%f:%l:%c: %trror: %m,' .
\ '%f:%l:%c: %tarning: %m,' .
\ '%f:%l:%c: (%ttyle) %m'}
return l:Retval
endfunction gnat#New " }}}1
function gnat#Insert_Tags_Header () " {{{1
1insert
!_TAG_FILE_FORMAT 1 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR AdaCore /info@adacore.com/
!_TAG_PROGRAM_NAME gnatxref //
!_TAG_PROGRAM_URL http://www.adacore.com /official site/
!_TAG_PROGRAM_VERSION 5.05w //
.
return
endfunction gnat#Insert_Tags_Header " }}}1
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

@ -0,0 +1,212 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Jul 04
" These functions are used by the gzip plugin.
" Function to check that executing "cmd [-f]" works.
" The result is cached in s:have_"cmd" for speed.
fun s:check(cmd)
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
if !exists("s:have_" . name)
let e = executable(name)
if e < 0
let r = system(name . " --version")
let e = (r !~ "not found" && r != "")
endif
exe "let s:have_" . name . "=" . e
endif
exe "return s:have_" . name
endfun
" Set b:gzip_comp_arg to the gzip argument to be used for compression, based on
" the flags in the compressed file.
" The only compression methods that can be detected are max speed (-1) and max
" compression (-9).
fun s:set_compression(line)
" get the Compression Method
let l:cm = char2nr(a:line[2])
" if it's 8 (DEFLATE), we can check for the compression level
if l:cm == 8
" get the eXtra FLags
let l:xfl = char2nr(a:line[8])
" max compression
if l:xfl == 2
let b:gzip_comp_arg = "-9"
" min compression
elseif l:xfl == 4
let b:gzip_comp_arg = "-1"
endif
endif
endfun
" After reading compressed file: Uncompress text in buffer with "cmd"
fun gzip#read(cmd)
" don't do anything if the cmd is not supported
if !s:check(a:cmd)
return
endif
" for gzip check current compression level and set b:gzip_comp_arg.
silent! unlet b:gzip_comp_arg
if a:cmd[0] == 'g'
call s:set_compression(getline(1))
endif
" make 'patchmode' empty, we don't want a copy of the written file
let pm_save = &pm
set pm=
" remove 'a' and 'A' from 'cpo' to avoid the alternate file changes
let cpo_save = &cpo
set cpo-=a cpo-=A
" set 'modifiable'
let ma_save = &ma
setlocal ma
" Reset 'foldenable', otherwise line numbers get adjusted.
if has("folding")
let fen_save = &fen
setlocal nofen
endif
" when filtering the whole buffer, it will become empty
let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname()
let tmpe = tmp . "." . expand("<afile>:e")
if exists('*fnameescape')
let tmp_esc = fnameescape(tmp)
let tmpe_esc = fnameescape(tmpe)
else
let tmp_esc = escape(tmp, ' ')
let tmpe_esc = escape(tmpe, ' ')
endif
" write the just read lines to a temp file "'[,']w tmp.gz"
execute "silent '[,']w " . tmpe_esc
" uncompress the temp file: call system("gzip -dn tmp.gz")
call system(a:cmd . " " . s:escape(tmpe))
if !filereadable(tmp)
" uncompress didn't work! Keep the compressed file then.
echoerr "Error: Could not read uncompressed file"
let ok = 0
else
let ok = 1
" delete the compressed lines; remember the line number
let l = line("'[") - 1
if exists(":lockmarks")
lockmarks '[,']d _
else
'[,']d _
endif
" read in the uncompressed lines "'[-1r tmp"
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
else
execute "silent lockmarks " . l . "r " . tmp_esc
endif
else
execute "silent " . l . "r " . tmp_esc
endif
" if buffer became empty, delete trailing blank line
if empty
silent $delete _
1
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp_esc
silent! exe "bwipe " . tmpe_esc
endif
" Restore saved option values.
let &pm = pm_save
let &cpo = cpo_save
let &l:ma = ma_save
if has("folding")
let &l:fen = fen_save
endif
" When uncompressed the whole buffer, do autocommands
if ok && empty
if exists('*fnameescape')
let fname = fnameescape(expand("%:r"))
else
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
endif
if &verbose >= 8
execute "doau BufReadPost " . fname
else
execute "silent! doau BufReadPost " . fname
endif
endif
endfun
" After writing compressed file: Compress written file with "cmd"
fun gzip#write(cmd)
" don't do anything if the cmd is not supported
if s:check(a:cmd)
" Rename the file before compressing it.
let nm = resolve(expand("<afile>"))
let nmt = s:tempname(nm)
if rename(nm, nmt) == 0
if exists("b:gzip_comp_arg")
call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt))
else
call system(a:cmd . " -- " . s:escape(nmt))
endif
call rename(nmt . "." . expand("<afile>:e"), nm)
endif
endif
endfun
" Before appending to compressed file: Uncompress file with "cmd"
fun gzip#appre(cmd)
" don't do anything if the cmd is not supported
if s:check(a:cmd)
let nm = expand("<afile>")
" for gzip check current compression level and set b:gzip_comp_arg.
silent! unlet b:gzip_comp_arg
if a:cmd[0] == 'g'
call s:set_compression(readfile(nm, "b", 1)[0])
endif
" Rename to a weird name to avoid the risk of overwriting another file
let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
let nmte = nmt . "." . expand("<afile>:e")
if rename(nm, nmte) == 0
if &patchmode != "" && getfsize(nm . &patchmode) == -1
" Create patchmode file by creating the decompressed file new
call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt))
call rename(nmte, nm . &patchmode)
else
call system(a:cmd . " -- " . s:escape(nmte))
endif
call rename(nmt, nm)
endif
endif
endfun
" find a file name for the file to be compressed. Use "name" without an
" extension if possible. Otherwise use a weird name to avoid overwriting an
" existing file.
fun s:tempname(name)
let fn = fnamemodify(a:name, ":r")
if !filereadable(fn) && !isdirectory(fn)
return fn
endif
return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
endfun
fun s:escape(name)
" shellescape() was added by patch 7.0.111
if exists("*shellescape")
return shellescape(a:name)
endif
return "'" . a:name . "'"
endfun
" vim: set sw=2 :

@ -0,0 +1,861 @@
" Vim completion script
" Language: HTML and XHTML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Oct 19
" Modified: othree <othree@gmail.com>
" Changes: Add HTML5, WAI-ARIA support
" Last Change: 2010 Sep 25
if !exists('g:aria_attributes_complete')
let g:aria_attributes_complete = 1
endif
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let curline = line('.')
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|[!:.-]\)'
let start -= 1
endwhile
" Handling of entities {{{
if start >= 0 && line[start - 1] =~ '&'
let b:entitiescompl = 1
let b:compl_context = ''
return start
endif
" }}}
" Handling of <style> tag {{{
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
if stylestart != 0 && styleend != 0
if stylestart <= curline && styleend >= curline
let start = col('.') - 1
let b:csscompl = 1
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
let start -= 1
endwhile
endif
endif
" }}}
" Handling of <script> tag {{{
let scriptstart = searchpair('<script\>', '', '<\/script\>', "bnW")
let scriptend = searchpair('<script\>', '', '<\/script\>', "nW")
if scriptstart != 0 && scriptend != 0
if scriptstart <= curline && scriptend >= curline
let start = col('.') - 1
let b:jscompl = 1
let b:jsrange = [scriptstart, scriptend]
while start >= 0 && line[start - 1] =~ '\k'
let start -= 1
endwhile
" We are inside of <script> tag. But we should also get contents
" of all linked external files and (secondary, less probably) other <script> tags
" This logic could possible be done in separate function - may be
" reused in events scripting (also with option could be reused for
" CSS
let b:js_extfiles = []
let l = line('.')
let c = col('.')
call cursor(1,1)
while search('<\@<=script\>', 'W') && line('.') <= l
if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
if filereadable(sname)
let b:js_extfiles += readfile(sname)
endif
endif
endwhile
call cursor(1,1)
let js_scripttags = []
while search('<script\>', 'W') && line('.') < l
if matchstr(getline('.'), '<script[^>]*src') == ''
let js_scripttag = getline(line('.'), search('</script>', 'W'))
let js_scripttags += js_scripttag
endif
endwhile
let b:js_extfiles += js_scripttags
call cursor(l,c)
unlet! l c
endif
endif
" }}}
if !exists("b:csscompl") && !exists("b:jscompl")
let b:compl_context = getline('.')[0:(compl_begin)]
if b:compl_context !~ '<[^>]*$'
" Look like we may have broken tag. Check previous lines.
let i = 1
while 1
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$' || i == curline
" We are in normal tag line, no need for completion at all
" OR reached first line without tag at all
let b:compl_context = ''
break
endif
let i += 1
endwhile
" Make sure we don't have counter
unlet! i
endif
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
" Return proper start for on-events. Without that beginning of
" completion will be badly reported
if b:compl_context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
let start = col('.') - 1
while start >= 0 && line[start - 1] =~ '\k'
let start -= 1
endwhile
endif
" If b:compl_context begins with <? we are inside of PHP code. It
" wasn't closed so PHP completion passed it to HTML
if &filetype =~? 'php' && b:compl_context =~ '^<?'
let b:phpcompl = 1
let start = col('.') - 1
while start >= 0 && line[start - 1] =~ '[a-zA-Z_0-9\x7f-\xff$]'
let start -= 1
endwhile
endif
else
let b:compl_context = getline('.')[0:compl_begin]
endif
return start
else
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
let context = b:compl_context
" Check if we should do CSS completion inside of <style> tag
" or JS completion inside of <script> tag or PHP completion in case of <?
" tag AND &ft==php
if exists("b:csscompl")
unlet! b:csscompl
let context = b:compl_context
unlet! b:compl_context
return csscomplete#CompleteCSS(0, context)
elseif exists("b:jscompl")
unlet! b:jscompl
return javascriptcomplete#CompleteJS(0, a:base)
elseif exists("b:phpcompl")
unlet! b:phpcompl
let context = b:compl_context
return phpcomplete#CompletePHP(0, a:base)
else
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
return []
endif
let context = matchstr(b:compl_context, '.\zs.*')
endif
unlet! b:compl_context
" Entities completion {{{
if exists("b:entitiescompl")
unlet! b:entitiescompl
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
"runtime! autoload/xml/xhtml10s.vim
call htmlcomplete#LoadData()
endif
if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
call htmlcomplete#LoadAria()
endif
let entities = b:html_omni['vimxmlentities']
if len(a:base) == 1
for m in entities
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
else
for m in entities
if m =~? '^'.a:base
call add(res, m.';')
elseif m =~? a:base
call add(res2, m.';')
endif
endfor
return res + res2
endif
endif
" }}}
if context =~ '>'
" Generally if context contains > it means we are outside of tag and
" should abandon action - with one exception: <style> span { bo
if context =~ 'style[^>]\{-}>[^<]\{-}$'
return csscomplete#CompleteCSS(0, context)
elseif context =~ 'script[^>]\{-}>[^<]\{-}$'
let b:jsrange = [line('.'), search('<\/script\>', 'nW')]
return javascriptcomplete#CompleteJS(0, context)
else
return []
endif
endif
" If context contains > it means we are already outside of tag and we
" should abandon action
" If context contains white space it is attribute.
" It can be also value of attribute.
" We have to get first word to offer proper completions
if context == ''
let tag = ''
else
let tag = split(context)[0]
" Detect if tag is uppercase to return in proper case,
" we need to make it lowercase for processing
if tag =~ '^\u*$'
let uppercase_tag = 1
let tag = tolower(tag)
else
let uppercase_tag = 0
endif
endif
" Get last word, it should be attr name
let attr = matchstr(context, '\S\+="[^"]*$')
if attr == ''
let attr = matchstr(context, '.*\s\zs.*')
endif
" Possible situations where any prediction would be difficult:
" 1. Events attributes
if context =~ '\s'
" Sort out style, class, and on* cases
if context =~? "\\s\\(on[a-z]+\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
" Id, class completion {{{
if context =~? "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~? "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "class"
elseif context =~? "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "id"
endif
" Handle class name completion
" 1. Find lines of <link stylesheet>
" 1a. Check file for @import
" 2. Extract filename(s?) of stylesheet,
call cursor(1,1)
let head = getline(search('<head\>'), search('<\/head>'))
let headjoined = join(copy(head), ' ')
if headjoined =~ '<style'
" Remove possibly confusing CSS operators
let stylehead = substitute(headjoined, '+>\*[,', ' ', 'g')
if search_for == 'class'
let styleheadlines = split(stylehead)
let headclasslines = filter(copy(styleheadlines), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
else
let stylesheet = split(headjoined, '[{}]')
" Get all lines which fit id syntax
let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
" Filter out possible color definitions
call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
" Filter out complex border definitions
call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
let templines = join(classlines, ' ')
let headclasslines = split(templines)
call filter(headclasslines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
endif
let internal = 1
else
let internal = 0
endif
let styletable = []
let secimportfiles = []
let filestable = filter(copy(head), "v:val =~ '\\(@import\\|link.*stylesheet\\)'")
for line in filestable
if line =~ "@import"
let styletable += [matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")]
elseif line =~ "<link"
let styletable += [matchstr(line, "href\\s*=\\s*[\"']\\zs\\f\\+\\ze")]
endif
endfor
for file in styletable
if filereadable(file)
let stylesheet = readfile(file)
let secimport = filter(copy(stylesheet), "v:val =~ '@import'")
if len(secimport) > 0
for line in secimport
let secfile = matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")
let secfile = fnamemodify(file, ":p:h").'/'.secfile
let secimportfiles += [secfile]
endfor
endif
endif
endfor
let cssfiles = styletable + secimportfiles
let classes = []
for file in cssfiles
if filereadable(file)
let stylesheet = readfile(file)
let stylefile = join(stylesheet, ' ')
let stylefile = substitute(stylefile, '+>\*[,', ' ', 'g')
if search_for == 'class'
let stylesheet = split(stylefile)
let classlines = filter(copy(stylesheet), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
else
let stylesheet = split(stylefile, '[{}]')
" Get all lines which fit id syntax
let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
" Filter out possible color definitions
call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
" Filter out complex border definitions
call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
let templines = join(classlines, ' ')
let stylelines = split(templines)
let classlines = filter(stylelines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
endif
" We gathered classes definitions from all external files
let classes += classlines
endif
endfor
if internal == 1
let classes += headclasslines
endif
if search_for == 'class'
let elements = {}
for element in classes
if element =~ '^\.'
let class = matchstr(element, '^\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
let class = substitute(class, ':.*', '', '')
if has_key(elements, 'common')
let elements['common'] .= ' '.class
else
let elements['common'] = class
endif
else
let class = matchstr(element, '[a-zA-Z1-6]*\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
let tagname = tolower(matchstr(element, '[a-zA-Z1-6]*\ze.'))
if tagname != ''
if has_key(elements, tagname)
let elements[tagname] .= ' '.class
else
let elements[tagname] = class
endif
endif
endif
endfor
if has_key(elements, tag) && has_key(elements, 'common')
let values = split(elements[tag]." ".elements['common'])
elseif has_key(elements, tag) && !has_key(elements, 'common')
let values = split(elements[tag])
elseif !has_key(elements, tag) && has_key(elements, 'common')
let values = split(elements['common'])
else
return []
endif
elseif search_for == 'id'
" Find used IDs
" 1. Catch whole file
let filelines = getline(1, line('$'))
" 2. Find lines with possible id
let used_id_lines = filter(filelines, 'v:val =~ "id\\s*=\\s*[\"''][a-zA-Z0-9_-]\\+"')
" 3a. Join all filtered lines
let id_string = join(used_id_lines, ' ')
" 3b. And split them to be sure each id is in separate item
let id_list = split(id_string, 'id\s*=\s*')
" 4. Extract id values
let used_id = map(id_list, 'matchstr(v:val, "[\"'']\\zs[a-zA-Z0-9_-]\\+\\ze")')
let joined_used_id = ','.join(used_id, ',').','
let allvalues = map(classes, 'matchstr(v:val, ".*#\\zs[a-zA-Z0-9_-]\\+")')
let values = []
for element in classes
if joined_used_id !~ ','.element.','
let values += [element]
endif
endfor
endif
" We need special version of sbase
let classbase = matchstr(context, ".*[\"']")
let classquote = matchstr(classbase, '.$')
let entered_class = matchstr(attr, ".*=\\s*[\"']\\zs.*")
for m in sort(values)
if m =~? '^'.entered_class
call add(res, m . classquote)
elseif m =~? entered_class
call add(res2, m . classquote)
endif
endfor
return res + res2
elseif context =~? "style\\s*=\\s*[\"'][^\"']*$"
return csscomplete#CompleteCSS(0, context)
endif
" }}}
" Complete on-events {{{
if context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
" We have to:
" 1. Find external files
let b:js_extfiles = []
let l = line('.')
let c = col('.')
call cursor(1,1)
while search('<\@<=script\>', 'W') && line('.') <= l
if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
if filereadable(sname)
let b:js_extfiles += readfile(sname)
endif
endif
endwhile
" 2. Find at least one <script> tag
call cursor(1,1)
let js_scripttags = []
while search('<script\>', 'W') && line('.') < l
if matchstr(getline('.'), '<script[^>]*src') == ''
let js_scripttag = getline(line('.'), search('</script>', 'W'))
let js_scripttags += js_scripttag
endif
endwhile
let b:js_extfiles += js_scripttags
" 3. Proper call for javascriptcomplete#CompleteJS
call cursor(l,c)
let js_context = matchstr(a:base, '\k\+$')
let js_shortcontext = substitute(a:base, js_context.'$', '', '')
let b:compl_context = context
let b:jsrange = [l, l]
unlet! l c
return javascriptcomplete#CompleteJS(0, js_context)
endif
" }}}
let stripbase = matchstr(context, ".*\\(on[a-zA-Z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
" Now we have context stripped from all chars up to style/class.
" It may fail with some strange style value combinations.
if stripbase !~ "[\"']"
return []
endif
endif
" Value of attribute completion {{{
" If attr contains =\s*[\"'] we catched value of attribute
if attr =~ "=\s*[\"']" || attr =~ "=\s*$"
" Let do attribute specific completion
let attrname = matchstr(attr, '.*\ze\s*=')
let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*")
let values = []
" Load data {{{
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
"runtime! autoload/xml/xhtml10s.vim
call htmlcomplete#LoadData()
endif
if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
call htmlcomplete#LoadAria()
endif
" }}}
if attrname == 'href'
" Now we are looking for local anchors defined by name or id
if entered_value =~ '^#'
let file = join(getline(1, line('$')), ' ')
" Split it be sure there will be one id/name element in
" item, it will be also first word [a-zA-Z0-9_-] in element
let oneelement = split(file, "\\(meta \\)\\@<!\\(name\\|id\\)\\s*=\\s*[\"']")
for i in oneelement
let values += ['#'.matchstr(i, "^[a-zA-Z][a-zA-Z0-9%_-]*")]
endfor
endif
else
if has_key(b:html_omni, tag) && has_key(b:html_omni[tag][1], attrname)
let values = b:html_omni[tag][1][attrname]
elseif attrname =~ '^aria-' && exists("b:aria_omni") && has_key(b:aria_omni['aria_attributes'], attrname)
let values = b:aria_omni['aria_attributes'][attrname]
else
return []
endif
endif
if len(values) == 0
return []
endif
" We need special version of sbase
let attrbase = matchstr(context, ".*[\"']")
let attrquote = matchstr(attrbase, '.$')
if attrquote !~ "['\"]"
let attrquoteopen = '"'
let attrquote = '"'
else
let attrquoteopen = ''
endif
" Multi value attributes don't need ending quote
let info = ''
if has_key(b:html_omni['vimxmlattrinfo'], attrname)
let info = b:html_omni['vimxmlattrinfo'][attrname][0]
elseif exists("b:aria_omni") && has_key(b:aria_omni['vimariaattrinfo'], attrname)
let info = b:aria_omni['vimariaattrinfo'][attrname][0]
endif
if info =~ "^\\*"
let attrquote = ''
endif
if len(entered_value) > 0
if entered_value =~ "\\s$"
let entered_value = ''
else
let entered_value = split(entered_value)[-1]
endif
endif
for m in values
" This if is needed to not offer all completions as-is
" alphabetically but sort them. Those beginning with entered
" part will be as first choices
if m =~ '^'.entered_value
call add(res, attrquoteopen . m . attrquote)
elseif m =~ entered_value
call add(res2, attrquoteopen . m . attrquote)
endif
endfor
return res + res2
endif
" }}}
" Attribute completion {{{
" Shorten context to not include last word
let sbase = matchstr(context, '.*\ze\s.*')
" Load data {{{
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
call htmlcomplete#LoadData()
endif
if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
call htmlcomplete#LoadAria()
endif
" }}}
if has_key(b:html_omni, tag)
let attrs = keys(b:html_omni[tag][1])
else
return []
endif
if exists("b:aria_omni")
let roles = []
if has_key(b:aria_omni['default_role'], tag)
let roles = [b:aria_omni['default_role'][tag]]
endif
if context =~ 'role='
let start = matchend(context, "role=['\"]")
let end = matchend(context, "[a-z ]\\+['\"]", start)
if start != -1 && end != -1
let roles = split(strpart(context, start, end-start-1), " ")
endif
endif
for i in range(len(roles))
let role = roles[i]
if has_key(b:aria_omni['role_attributes'], role)
let attrs = extend(attrs, b:aria_omni['role_attributes'][role])
endif
endfor
endif
for m in sort(attrs)
if m =~ '^'.attr
call add(res, m)
elseif m =~ attr
call add(res2, m)
endif
endfor
"let menu = res + res2
let menu = res
if has_key(b:html_omni, 'vimxmlattrinfo') || (exists("b:aria_omni") && has_key(b:aria_omni, 'vimariaattrinfo'))
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if has_key(b:html_omni['vimxmlattrinfo'], item)
let m_menu = b:html_omni['vimxmlattrinfo'][item][0]
let m_info = b:html_omni['vimxmlattrinfo'][item][1]
elseif exists("b:aria_omni") && has_key(b:aria_omni['vimariaattrinfo'], item)
let m_menu = b:aria_omni['vimariaattrinfo'][item][0]
let m_info = b:aria_omni['vimariaattrinfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
if item =~ '^aria-' && exists("b:aria_omni")
if len(b:aria_omni['aria_attributes'][item]) > 0 && b:aria_omni['aria_attributes'][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
let m_menu = 'Bool'
else
let item .= '="'
endif
else
if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
let m_menu = 'Bool'
else
let item .= '="'
endif
endif
let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
endfor
else
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
else
let item .= '="'
endif
let final_menu += [item]
endfor
return final_menu
endif
return final_menu
endif
" }}}
" Close tag {{{
let b:unaryTagsStack = "area base br col command embed hr img input keygen link meta param source track wbr"
if context =~ '^\/'
if context =~ '^\/.'
return []
else
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return [opentag.">"]
endif
endif
" }}}
" Load data {{{
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
"runtime! autoload/xml/xhtml10s.vim
call htmlcomplete#LoadData()
endif
if g:aria_attributes_complete == 1 && !exists("b:aria_omni")
call htmlcomplete#LoadAria()
endif
" }}}
" Tag completion {{{
" Deal with tag completion.
let opentag = tolower(xmlcomplete#GetLastOpenTag("b:unaryTagsStack"))
" MM: TODO: GLOT works always the same but with some weird situation it
" behaves as intended in HTML but screws in PHP
if opentag == '' || &filetype == 'php' && !has_key(b:html_omni, opentag)
" Hack for sometimes failing GetLastOpenTag.
" As far as I tested fail isn't GLOT fault but problem
" of invalid document - not properly closed tags and other mish-mash.
" Also when document is empty. Return list of *all* tags.
let tags = keys(b:html_omni)
call filter(tags, 'v:val !~ "^vimxml"')
else
if has_key(b:html_omni, opentag)
let tags = b:html_omni[opentag][0]
else
return []
endif
endif
" }}}
if exists("uppercase_tag") && uppercase_tag == 1
let context = tolower(context)
endif
" Handle XML keywords: DOCTYPE
if opentag == ''
let tags = [
\ '!DOCTYPE html>',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">'
\ ] + sort(tags)
endif
"for m in sort(tags)
for m in tags
if m =~ '^'.context
call add(res, m)
elseif m =~ context
call add(res2, m)
endif
endfor
let menu = res + res2
if has_key(b:html_omni, 'vimxmltaginfo')
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if has_key(b:html_omni['vimxmltaginfo'], item)
let m_menu = b:html_omni['vimxmltaginfo'][item][0]
let m_info = b:html_omni['vimxmltaginfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
if &filetype == 'html' && exists("uppercase_tag") && uppercase_tag == 1 && item !~ 'DOCTYPE'
let item = toupper(item)
endif
if item =~ 'DOCTYPE'
if item =~ 'DTD'
let abbr = 'DOCTYPE '.matchstr(item, 'DTD \zsX\?HTML .\{-}\ze\/\/')
else
let abbr = 'DOCTYPE HTML 5'
endif
else
let abbr = item
endif
let final_menu += [{'abbr':abbr, 'word':item, 'menu':m_menu, 'info':m_info}]
endfor
else
let final_menu = menu
endif
return final_menu
" }}}
endif
endfunction
function! htmlcomplete#LoadAria() " {{{
runtime! autoload/xml/aria.vim
if exists("g:xmldata_aria")
\ && has_key(g:xmldata_aria, 'default_role')
\ && has_key(g:xmldata_aria, 'role_attributes')
\ && has_key(g:xmldata_aria, 'vimariaattrinfo')
\ && has_key(g:xmldata_aria, 'aria_attributes')
let b:aria_omni = g:xmldata_aria
else
let g:aria_attributes_complete = 0
endif
endfunction
" }}}
function! htmlcomplete#LoadData() " {{{
if !exists("b:html_omni_flavor")
if &filetype == 'html'
let b:html_omni_flavor = 'html401t'
else
let b:html_omni_flavor = 'xhtml10s'
endif
endif
" With that if we still have bloated memory but create new buffer
" variables only by linking to existing g:variable, not sourcing whole
" file.
if exists('g:xmldata_'.b:html_omni_flavor)
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
else
exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim'
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
endif
endfunction
" }}}
function! htmlcomplete#CheckDoctype() " {{{
if exists('b:html_omni_flavor')
let old_flavor = b:html_omni_flavor
else
let old_flavor = ''
endif
let i = 1
while i < 10 && i < line("$")
let line = getline(i)
if line =~ '<!DOCTYPE.*\<DTD HTML 3\.2'
let b:html_omni_flavor = 'html32'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Transitional'
let b:html_omni_flavor = 'html40t'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Frameset'
let b:html_omni_flavor = 'html40f'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0'
let b:html_omni_flavor = 'html40s'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Transitional'
let b:html_omni_flavor = 'html401t'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Frameset'
let b:html_omni_flavor = 'html401f'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01'
let b:html_omni_flavor = 'html401s'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Transitional'
let b:html_omni_flavor = 'xhtml10t'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Frameset'
let b:html_omni_flavor = 'xhtml10f'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Strict'
let b:html_omni_flavor = 'xhtml10s'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.1'
let b:html_omni_flavor = 'xhtml11'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE html'
let b:html_omni_flavor = 'html5'
let b:html_doctype = 1
break
endif
let i += 1
endwhile
if !exists("b:html_doctype")
return
else
" Tie g:xmldata with b:html_omni this way we need to sourca data file only
" once, not every time per buffer.
if old_flavor == b:html_omni_flavor
return
else
if exists('g:xmldata_'.b:html_omni_flavor)
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
else
exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim'
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
endif
return
endif
endif
endfunction
" }}}
" vim:set foldmethod=marker:

@ -0,0 +1,625 @@
" Vim completion script
" Language: Java Script
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Apr 30
function! javascriptcomplete#CompleteJS(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let curline = line('.')
let compl_begin = col('.') - 2
" Bit risky but JS is rather limited language and local chars shouldn't
" fint way into names
while start >= 0 && line[start - 1] =~ '\k'
let start -= 1
endwhile
let b:compl_context = getline('.')[0:compl_begin]
return start
else
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
" Shortcontext is context without a:base, useful for checking if we are
" looking for objects and for what objects we are looking for
let context = b:compl_context
let shortcontext = substitute(context, a:base.'$', '', '')
unlet! b:compl_context
if exists("b:jsrange")
let file = getline(b:jsrange[0],b:jsrange[1])
unlet! b:jsrange
if len(b:js_extfiles) > 0
let file = b:js_extfiles + file
endif
else
let file = getline(1, '$')
endif
" Completion of properties, methods, etc. {{{
if shortcontext =~ '\.$'
" Complete methods and properties for objects
" DOM separate
let doms = ['style.']
" Arrays
let arrayprop = ['constructor', 'index', 'input', 'length', 'prototype']
let arraymeth = ['concat', 'join', 'pop', 'push', 'reverse', 'shift',
\ 'splice', 'sort', 'toSource', 'toString', 'unshift', 'valueOf',
\ 'watch', 'unwatch']
call map(arraymeth, 'v:val."("')
let arrays = arrayprop + arraymeth
" Boolean - complete subset of array values
" properties - constructor, prototype
" methods - toSource, toString, valueOf
" Date
" properties - constructor, prototype
let datemeth = ['getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds',
\ 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset',
\ 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds',
\ 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds',
\ 'getYear', 'parse', 'parse',
\ 'setDate', 'setDay', 'setFullYear', 'setHours', 'setMilliseconds',
\ 'setMinutes', 'setMonth', 'setSeconds',
\ 'setUTCDate', 'setUTCDay', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds',
\ 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'setTime',
\ 'toGMTString', 'toLocaleString', 'toLocaleDateString', 'toLocaleTimeString',
\ 'toSource', 'toString', 'toUTCString', 'UTC', 'valueOf', 'watch', 'unwatch']
call map(datemeth, 'v:val."("')
let dates = datemeth
" Function
let funcprop = ['arguments', 'arguments.callee', 'arguments.caller', 'arguments.length',
\ 'arity', 'constructor', 'length', 'prototype']
let funcmeth = ['apply', 'call', 'toSource', 'toString', 'valueOf']
call map(funcmeth, 'v:val."("')
let funcs = funcprop + funcmeth
" Math
let mathprop = ['E', 'LN2', 'LN10', 'LOG2E', 'LOG10E', 'PI', 'SQRT1_2', 'SQRT']
let mathmeth = ['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor',
\ 'log', 'max', 'min', 'pow', 'random', 'round', 'sin', 'sqrt', 'tan',
\ 'watch', 'unwatch']
call map(mathmeth, 'v:val."("')
let maths = mathprop + mathmeth
" Number
let numbprop = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY',
\ 'constructor', 'prototype']
let numbmeth = ['toExponential', 'toFixed', 'toPrecision', 'toSource', 'toString', 'valueOf',
\ 'watch', 'unwatch']
call map(numbmeth, 'v:val."("')
let numbs = numbprop + numbmeth
" Object
let objeprop = ['constructor', 'prototype']
let objemeth = ['eval', 'toSource', 'toString', 'unwatch', 'watch', 'valueOf']
call map(objemeth, 'v:val."("')
let objes = objeprop + objemeth
" RegExp
let regeprop = ['constructor', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'prototype']
let regemeth = ['exec', 'test', 'toSource', 'toString', 'watch', 'unwatch']
call map(regemeth, 'v:val."("')
let reges = regeprop + regemeth
" String
let striprop = ['constructor', 'length', 'prototype']
let strimeth = ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'concat',
\ 'fixed', 'fontcolor', 'fontsize', 'fromCharCode', 'indexOf', 'italics',
\ 'lastIndexOf', 'link', 'match', 'replace', 'search', 'slice', 'small',
\ 'split', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLowerCase',
\ 'toSource', 'toString', 'toUpperCase', 'watch', 'unwatch']
call map(strimeth, 'v:val."("')
let stris = striprop + strimeth
" User created properties
let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\k"')
let juser_props1 = join(user_props1, ' ')
let user_props1 = split(juser_props1, '\zethis\.')
unlet! juser_props1
call map(user_props1, 'matchstr(v:val, "this\\.\\zs\\k\\+\\ze")')
let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\k"')
let juser_props2 = join(user_props2, ' ')
let user_props2 = split(juser_props2, '\zeprototype\.')
unlet! juser_props2
call map(user_props2, 'matchstr(v:val, "prototype\\.\\zs\\k\\+\\ze")')
let user_props = user_props1 + user_props2
" HTML DOM properties
" Anchors - anchor.
let anchprop = ['accessKey', 'charset', 'coords', 'href', 'hreflang', 'id', 'innerHTML',
\ 'name', 'rel', 'rev', 'shape', 'tabIndex', 'target', 'type', 'onBlur', 'onFocus']
let anchmeth = ['blur', 'focus']
call map(anchmeth, 'v:val."("')
let anths = anchprop + anchmeth
" Area - area.
let areaprop = ['accessKey', 'alt', 'coords', 'hash', 'host', 'hostname', 'href', 'id',
\ 'noHref', 'pathname', 'port', 'protocol', 'search', 'shape', 'tabIndex', 'target']
let areameth = ['onClick', 'onDblClick', 'onMouseOut', 'onMouseOver']
call map(areameth, 'v:val."("')
let areas = areaprop + areameth
" Base - base.
let baseprop = ['href', 'id', 'target']
let bases = baseprop
" Body - body.
let bodyprop = ['aLink', 'background', 'gbColor', 'id', 'link', 'scrollLeft', 'scrollTop',
\ 'text', 'vLink']
let bodys = bodyprop
" Document - document.
let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets',
\ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL']
let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById',
\ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln',
\ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp',
\ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize']
call map(documeth, 'v:val."("')
let docuxprop = ['attributes', 'childNodes', 'doctype', 'documentElement', 'firstChild',
\ 'implementation', 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType',
\ 'nodeValue', 'ownerDocument', 'parentNode', 'previousSibling']
let docuxmeth = ['createAttribute', 'createCDATASection',
\ 'createComment', 'createDocument', 'createDocumentFragment',
\ 'createElement', 'createEntityReference', 'createProcessingInstruction',
\ 'createTextNode']
call map(docuxmeth, 'v:val."("')
let docus = docuprop + docuxprop + documeth + docuxmeth
" Form - form.
let formprop = ['elements', 'acceptCharset', 'action', 'encoding', 'enctype', 'id', 'length',
\ 'method', 'name', 'tabIndex', 'target']
let formmeth = ['reset', 'submit', 'onReset', 'onSubmit']
call map(formmeth, 'v:val."("')
let forms = formprop + formmeth
" Frame - frame.
let framprop = ['contentDocument', 'frameBorder', 'id', 'longDesc', 'marginHeight', 'marginWidth',
\ 'name', 'noResize', 'scrolling', 'src']
let frammeth = ['blur', 'focus']
call map(frammeth, 'v:val."("')
let frams = framprop + frammeth
" Frameset - frameset.
let fsetprop = ['cols', 'id', 'rows']
let fsetmeth = ['blur', 'focus']
call map(fsetmeth, 'v:val."("')
let fsets = fsetprop + fsetmeth
" History - history.
let histprop = ['length']
let histmeth = ['back', 'forward', 'go']
call map(histmeth, 'v:val."("')
let hists = histprop + histmeth
" Iframe - iframe.
let ifraprop = ['align', 'frameBorder', 'height', 'id', 'longDesc', 'marginHeight', 'marginWidth',
\ 'name', 'scrolling', 'src', 'width']
let ifras = ifraprop
" Image - image.
let imagprop = ['align', 'alt', 'border', 'complete', 'height', 'hspace', 'id', 'isMap', 'longDesc',
\ 'lowSrc', 'name', 'src', 'useMap', 'vspace', 'width']
let imagmeth = ['onAbort', 'onError', 'onLoad']
call map(imagmeth, 'v:val."("')
let imags = histprop + imagmeth
" Button - accessible only by other properties
let buttprop = ['accessKey', 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let buttmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(buttmeth, 'v:val."("')
let butts = buttprop + buttmeth
" Checkbox - accessible only by other properties
let checprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let checmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(checmeth, 'v:val."("')
let checs = checprop + checmeth
" File upload - accessible only by other properties
let fileprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let filemeth = ['blur', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(filemeth, 'v:val."("')
let files = fileprop + filemeth
" Hidden - accessible only by other properties
let hiddprop = ['defaultValue', 'form', 'id', 'name', 'type', 'value']
let hidds = hiddprop
" Password - accessible only by other properties
let passprop = ['accept', 'accessKey', 'defaultValue',
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly', 'size', 'tabIndex',
\ 'type', 'value']
let passmeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus', 'onKeyDown',
\ 'onKeyPress', 'onKeyUp']
call map(passmeth, 'v:val."("')
let passs = passprop + passmeth
" Radio - accessible only by other properties
let radiprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let radimeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
call map(radimeth, 'v:val."("')
let radis = radiprop + radimeth
" Reset - accessible only by other properties
let reseprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
let resemeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
call map(resemeth, 'v:val."("')
let reses = reseprop + resemeth
" Submit - accessible only by other properties
let submprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
let submmeth = ['blur', 'click', 'focus', 'select', 'onClick', 'onSelectStart']
call map(submmeth, 'v:val."("')
let subms = submprop + submmeth
" Text - accessible only by other properties
let textprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly',
\ 'size', 'tabIndex', 'type', 'value']
let textmeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus', 'onKeyDown',
\ 'onKeyPress', 'onKeyUp', 'onSelect']
call map(textmeth, 'v:val."("')
let texts = textprop + textmeth
" Link - link.
let linkprop = ['charset', 'disabled', 'href', 'hreflang', 'id', 'media',
\ 'rel', 'rev', 'target', 'type']
let linkmeth = ['onLoad']
call map(linkmeth, 'v:val."("')
let links = linkprop + linkmeth
" Location - location.
let locaprop = ['href', 'hash', 'host', 'hostname', 'pathname', 'port', 'protocol',
\ 'search']
let locameth = ['assign', 'reload', 'replace']
call map(locameth, 'v:val."("')
let locas = locaprop + locameth
" Meta - meta.
let metaprop = ['charset', 'content', 'disabled', 'httpEquiv', 'name', 'scheme']
let metas = metaprop
" Navigator - navigator.
let naviprop = ['plugins', 'appCodeName', 'appName', 'appVersion', 'cookieEnabled',
\ 'platform', 'userAgent']
let navimeth = ['javaEnabled', 'taintEnabled']
call map(navimeth, 'v:val."("')
let navis = naviprop + navimeth
" Object - object.
let objeprop = ['align', 'archive', 'border', 'code', 'codeBase', 'codeType', 'data',
\ 'declare', 'form', 'height', 'hspace', 'id', 'name', 'standby', 'tabIndex',
\ 'type', 'useMap', 'vspace', 'width']
let objes = objeprop
" Option - accessible only by other properties
let optiprop = ['defaultSelected',
\ 'disabled', 'form', 'id', 'index', 'label', 'selected', 'text', 'value']
let optis = optiprop
" Screen - screen.
let screprop = ['availHeight', 'availWidth', 'colorDepth', 'height', 'width']
let scres = screprop
" Select - accessible only by other properties
let seleprop = ['options', 'disabled', 'form', 'id', 'length', 'multiple', 'name',
\ 'selectedIndex', 'size', 'tabIndex', 'type', 'value']
let selemeth = ['blur', 'focus', 'remove', 'onBlur', 'onChange', 'onFocus']
call map(selemeth, 'v:val."("')
let seles = seleprop + selemeth
" Style - style.
let stylprop = ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage',
\ 'backgroundPosition', 'backgroundRepeat',
\ 'border', 'borderBottom', 'borderLeft', 'borderRight', 'borderTop',
\ 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor',
\ 'borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle',
\ 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth',
\ 'borderColor', 'borderStyle', 'borderWidth', 'margin', 'marginBottom',
\ 'marginLeft', 'marginRight', 'marginTop', 'outline', 'outlineStyle', 'outlineWidth',
\ 'outlineColor', 'outlineStyle', 'outlineWidth', 'padding', 'paddingBottom',
\ 'paddingLeft', 'paddingRight', 'paddingTop',
\ 'clear', 'clip', 'clipBottom', 'clipLeft', 'clipRight', 'clipTop', 'content',
\ 'counterIncrement', 'counterReset', 'cssFloat', 'cursor', 'direction',
\ 'display', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight',
\ 'minWidth', 'overflow', 'overflowX', 'overflowY', 'verticalAlign', 'visibility',
\ 'width',
\ 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType',
\ 'cssText', 'bottom', 'height', 'left', 'position', 'right', 'top', 'width', 'zindex',
\ 'orphans', 'widows', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside',
\ 'borderCollapse', 'borderSpacing', 'captionSide', 'emptyCells', 'tableLayout',
\ 'color', 'font', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch',
\ 'fontStyle', 'fontVariant', 'fontWeight', 'letterSpacing', 'lineHeight', 'quotes',
\ 'textAlign', 'textIndent', 'textShadow', 'textTransform', 'textUnderlinePosition',
\ 'unicodeBidi', 'whiteSpace', 'wordSpacing']
let styls = stylprop
" Table - table.
let tablprop = ['rows', 'tBodies', 'align', 'bgColor', 'border', 'caption', 'cellPadding',
\ 'cellSpacing', 'frame', 'height', 'rules', 'summary', 'tFoot', 'tHead', 'width']
let tablmeth = ['createCaption', 'createTFoot', 'createTHead', 'deleteCaption', 'deleteRow',
\ 'deleteTFoot', 'deleteTHead', 'insertRow']
call map(tablmeth, 'v:val."("')
let tabls = tablprop + tablmeth
" Table data - TableData.
let tdatprop = ['abbr', 'align', 'axis', 'bgColor', 'cellIndex', 'ch', 'chOff',
\ 'colSpan', 'headers', 'noWrap', 'rowSpan', 'scope', 'vAlign', 'width']
let tdats = tdatprop
" Table row - TableRow.
let trowprop = ['cells', 'align', 'bgColor', 'ch', 'chOff', 'rowIndex', 'sectionRowIndex',
\ 'vAlign']
let trowmeth = ['deleteCell', 'insertCell']
call map(trowmeth, 'v:val."("')
let trows = trowprop + trowmeth
" Textarea - accessible only by other properties
let tareprop = ['accessKey', 'cols', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'readOnly', 'rows',
\ 'tabIndex', 'type', 'value', 'selectionStart', 'selectionEnd']
let taremeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus']
call map(taremeth, 'v:val."("')
let tares = tareprop + taremeth
" Window - window.
let windprop = ['frames', 'closed', 'defaultStatus', 'encodeURI', 'event', 'history',
\ 'length', 'location', 'name', 'onload', 'opener', 'parent', 'screen', 'self',
\ 'status', 'top', 'XMLHttpRequest', 'ActiveXObject']
let windmeth = ['alert', 'blur', 'clearInterval', 'clearTimeout', 'close', 'confirm', 'focus',
\ 'moveBy', 'moveTo', 'open', 'print', 'prompt', 'scrollBy', 'scrollTo', 'setInterval',
\ 'setTimeout']
call map(windmeth, 'v:val."("')
let winds = windprop + windmeth
" XMLHttpRequest - access by new xxx()
let xmlhprop = ['onreadystatechange', 'readyState', 'responseText', 'responseXML',
\ 'status', 'statusText', 'parseError']
let xmlhmeth = ['abort', 'getAllResponseHeaders', 'getResponseHeaders', 'open',
\ 'send', 'setRequestHeader']
call map(xmlhmeth, 'v:val."("')
let xmlhs = xmlhprop + xmlhmeth
" XML DOM
" Attributes - element.attributes[x].
let xdomattrprop = ['name', 'specified', 'value']
" Element - anyelement.
let xdomelemprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',
\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue',
\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling', 'tagName']
let xdomelemmeth = ['appendChild', 'cloneNode', 'getAttribute', 'getAttributeNode',
\ 'getElementsByTagName', 'hasChildNodes', 'insertBefore', 'normalize',
\ 'removeAttribute', 'removeAttributeNode', 'removeChild', 'replaceChild',
\ 'setAttribute', 'setAttributeNode']
call map(xdomelemmeth, 'v:val."("')
let xdomelems = xdomelemprop + xdomelemmeth
" Node - anynode.
let xdomnodeprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',
\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue',
\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling']
let xdomnodemeth = ['appendChild', 'cloneNode',
\ 'hasChildNodes', 'insertBefore', 'removeChild', 'replaceChild']
call map(xdomnodemeth, 'v:val."("')
let xdomnodes = xdomnodeprop + xdomnodemeth
" NodeList
let xdomnliss = ['length', 'item(']
" Error - parseError.
let xdomerror = ['errorCode', 'reason', 'line', 'linepos', 'srcText', 'url', 'filepos']
" Find object type declaration to reduce number of suggestions. {{{
" 1. Get object name
" 2. Find object declaration line
" 3. General declaration follows "= new Type" syntax, additional else
" for regexp "= /re/"
" 4. Make correction for Microsoft.XMLHTTP ActiveXObject
" 5. Repeat for external files
let object = matchstr(shortcontext, '\zs\k\+\ze\(\[.\{-}\]\)\?\.$')
if len(object) > 0
let decl_line = search(object.'.\{-}=\s*new\s*', 'bn')
if decl_line > 0
let object_type = matchstr(getline(decl_line), object.'.\{-}=\s*new\s*\zs\k\+\ze')
if object_type == 'ActiveXObject' && matchstr(getline(decl_line), object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != ''
let object_type = 'XMLHttpRequest'
endif
else
let decl_line = search('var\s*'.object.'\s*=\s*\/', 'bn')
if decl_line > 0
let object_type = 'RegExp'
endif
endif
" We didn't find var declaration in current file but we may have
" something in external files.
if decl_line == 0 && exists("b:js_extfiles")
let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "'.object.'.\\{-}=\\s*new\\s*"')
if len(dext_line) > 0
let object_type = matchstr(dext_line[-1], object.'.\{-}=\s*new\s*\zs\k\+\ze')
if object_type == 'ActiveXObject' && matchstr(dext_line[-1], object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != ''
let object_type = 'XMLHttpRequest'
endif
else
let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "var\s*'.object.'\\s*=\\s*\\/"')
if len(dext_line) > 0
let object_type = 'RegExp'
endif
endif
endif
endif
" }}}
if !exists('object_type')
let object_type = ''
endif
if object_type == 'Date'
let values = dates
elseif object_type == 'Image'
let values = imags
elseif object_type == 'Array'
let values = arrays
elseif object_type == 'Boolean'
" TODO: a bit more than real boolean
let values = arrays
elseif object_type == 'XMLHttpRequest'
let values = xmlhs
elseif object_type == 'String'
let values = stris
elseif object_type == 'RegExp'
let values = reges
elseif object_type == 'Math'
let values = maths
endif
if !exists('values')
" List of properties
if shortcontext =~ 'Math\.$'
let values = maths
elseif shortcontext =~ 'anchors\(\[.\{-}\]\)\?\.$'
let values = anths
elseif shortcontext =~ 'area\.$'
let values = areas
elseif shortcontext =~ 'base\.$'
let values = bases
elseif shortcontext =~ 'body\.$'
let values = bodys
elseif shortcontext =~ 'document\.$'
let values = docus
elseif shortcontext =~ 'forms\(\[.\{-}\]\)\?\.$'
let values = forms
elseif shortcontext =~ 'frameset\.$'
let values = fsets
elseif shortcontext =~ 'history\.$'
let values = hists
elseif shortcontext =~ 'iframe\.$'
let values = ifras
elseif shortcontext =~ 'images\(\[.\{-}\]\)\?\.$'
let values = imags
elseif shortcontext =~ 'links\(\[.\{-}\]\)\?\.$'
let values = links
elseif shortcontext =~ 'location\.$'
let values = locas
elseif shortcontext =~ 'meta\.$'
let values = metas
elseif shortcontext =~ 'navigator\.$'
let values = navis
elseif shortcontext =~ 'object\.$'
let values = objes
elseif shortcontext =~ 'screen\.$'
let values = scres
elseif shortcontext =~ 'style\.$'
let values = styls
elseif shortcontext =~ 'table\.$'
let values = tabls
elseif shortcontext =~ 'TableData\.$'
let values = tdats
elseif shortcontext =~ 'TableRow\.$'
let values = trows
elseif shortcontext =~ 'window\.$'
let values = winds
elseif shortcontext =~ 'parseError\.$'
let values = xdomerror
elseif shortcontext =~ 'attributes\[\d\+\]\.$'
let values = xdomattrprop
else
let values = user_props + arrays + dates + funcs + maths + numbs + objes + reges + stris
let values += doms + anths + areas + bases + bodys + docus + forms + frams + fsets + hists
let values += ifras + imags + links + locas + metas + navis + objes + scres
let values += tabls + trows + tares + winds
let values += xdomnodes + xdomnliss + xdomelems
endif
endif
for m in values
if m =~? '^'.a:base
call add(res, m)
elseif m =~? a:base
call add(res2, m)
endif
endfor
unlet! values
return res + res2
endif
" }}}
" Get variables data.
let variables = filter(copy(file), 'v:val =~ "var\\s"')
call map(variables, 'matchstr(v:val, ".\\{-}var\\s\\+\\zs.*\\ze")')
call map(variables, 'substitute(v:val, ";\\|$", ",", "g")')
let vars = []
" This loop (and next one) is necessary to get variable names from
" constructs like: var var1, var2, var3 = "something";
for i in range(len(variables))
let comma_separated = split(variables[i], ',\s*')
call map(comma_separated, 'matchstr(v:val, "\\k\\+")')
let vars += comma_separated
endfor
let variables = sort(vars)
unlet! vars
" Add "no var" variables.
let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\k\\+\\s*="')
let u_vars = []
for i in range(len(undeclared_variables))
let split_equal = split(undeclared_variables[i], '\s*=')
call map(split_equal, 'matchstr(v:val, "\\k\\+$")')
let u_vars += split_equal
endfor
let variables += sort(u_vars)
unlet! u_vars
" Get functions
let functions = filter(copy(file), 'v:val =~ "^\\s*function\\s"')
let arguments = copy(functions)
call map(functions, 'matchstr(v:val, "^\\s*function\\s\\+\\zs\\k\\+")')
call map(functions, 'v:val."("')
let functions = sort(functions)
" Create table to keep arguments for additional 'menu' info
let b:js_menuinfo = {}
for i in arguments
let g:ia = i
let f_elements = matchlist(i, 'function\s\+\(\k\+\)\s*(\(.\{-}\))')
if len(f_elements) == 3
let b:js_menuinfo[f_elements[1].'('] = f_elements[2]
endif
endfor
" Get functions arguments
call map(arguments, 'matchstr(v:val, "function.\\{-}(\\zs.\\{-}\\ze)")')
let jargs = join(arguments, ',')
let jargs = substitute(jargs, '\s', '', 'g')
let arguments = split(jargs, ',')
let arguments = sort(arguments)
" Built-in functions
let builtin = ['alert(', 'confirm(']
" Top-level HTML DOM objects
let htmldom = ['document', 'anchor', 'area', 'base', 'body', 'document', 'event', 'form', 'frame', 'frameset', 'history', 'iframe', 'image', 'input', 'link', 'location', 'meta', 'navigator', 'object', 'option', 'screen', 'select', 'table', 'tableData', 'tableHeader', 'tableRow', 'textarea', 'window']
call map(htmldom, 'v:val."."')
" Top-level properties
let properties = ['decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
\ 'eval', 'Infinity', 'isFinite', 'isNaN', 'NaN', 'Number', 'parseFloat',
\ 'parseInt', 'String', 'undefined', 'escape', 'unescape']
" Keywords
let keywords = ["Array", "Boolean", "Date", "Function", "Math", "Number", "Object", "RegExp", "String", "XMLHttpRequest", "ActiveXObject", "abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double ", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in ", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super ", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with"]
let values = variables + functions + htmldom + arguments + builtin + properties + keywords
for m in values
if m =~? '^'.a:base
call add(res, m)
elseif m =~? a:base
call add(res2, m)
endif
endfor
let menu = res + res2
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if item =~ '($'
let kind = 'f'
if has_key(b:js_menuinfo, item)
let m_info = b:js_menuinfo[item]
else
let m_info = ''
endif
else
let kind = 'v'
let m_info = ''
endif
let final_menu += [{'word':item, 'menu':m_info, 'kind':kind}]
endfor
let g:fm = final_menu
return final_menu
endfunction
" vim:set foldmethod=marker:

File diff suppressed because it is too large Load Diff

@ -0,0 +1,362 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell
" Date: May 03, 2013
" Version: 11b ASTRO-ONLY
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" netrwFileHandlers.vim is provided *as is* and comes with no
" warranty of any kind, either expressed or implied. In no
" event will the copyright holder be liable for any damages
" resulting from the use of this software.
"
" Rom 6:23 (WEB) For the wages of sin is death, but the free gift of God {{{1
" is eternal life in Christ Jesus our Lord.
" ---------------------------------------------------------------------
" Load Once: {{{1
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let g:loaded_netrwFileHandlers= "v11b"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" ---------------------------------------------------------------------
" netrwFileHandlers#Invoke: {{{1
fun! netrwFileHandlers#Invoke(exten,fname)
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
let exten= a:exten
" list of supported special characters. Consider rcs,v --- that can be
" supported with a NFH_rcsCOMMAv() handler
if exten =~ '[@:,$!=\-+%?;~]'
let specials= {
\ '@' : 'AT',
\ ':' : 'COLON',
\ ',' : 'COMMA',
\ '$' : 'DOLLAR',
\ '!' : 'EXCLAMATION',
\ '=' : 'EQUAL',
\ '-' : 'MINUS',
\ '+' : 'PLUS',
\ '%' : 'PERCENT',
\ '?' : 'QUESTION',
\ ';' : 'SEMICOLON',
\ '~' : 'TILDE'}
let exten= substitute(a:exten,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
" call Decho('fname<'.fname.'> done with dictionary')
endif
if a:exten != "" && exists("*NFH_".exten)
" support user NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= NFH_".exten.'("'.a:fname.'")'
elseif a:exten != "" && exists("*s:NFH_".exten)
" use builtin-NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
endif
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
return 0
endfun
" ---------------------------------------------------------------------
" s:NFH_html: handles html when the user hits "x" when the {{{1
" cursor is atop a *.html file
fun! s:NFH_html(pagefile)
" call Dfunc("s:NFH_html(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla ".shellescape(page,1)
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape ".shellescape(page,1)
else
" call Dret("s:NFH_html 0")
return 0
endif
" call Dret("s:NFH_html 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_htm: handles html when the user hits "x" when the {{{1
" cursor is atop a *.htm file
fun! s:NFH_htm(pagefile)
" call Dfunc("s:NFH_htm(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla ".shellescape(page,1)
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape ".shellescape(page,1)
else
" call Dret("s:NFH_htm 0")
return 0
endif
" call Dret("s:NFH_htm 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_jpg: {{{1
fun! s:NFH_jpg(jpgfile)
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:jpgfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:jpgfile,1)
else
" call Dret("s:NFH_jpg 0")
return 0
endif
" call Dret("s:NFH_jpg 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_gif: {{{1
fun! s:NFH_gif(giffile)
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:giffile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1)
else
" call Dret("s:NFH_gif 0")
return 0
endif
" call Dret("s:NFH_gif 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_png: {{{1
fun! s:NFH_png(pngfile)
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:pngfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1)
else
" call Dret("s:NFH_png 0")
return 0
endif
" call Dret("s:NFH_png 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_pnm: {{{1
fun! s:NFH_pnm(pnmfile)
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:pnmfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1)
else
" call Dret("s:NFH_pnm 0")
return 0
endif
" call Dret("s:NFH_pnm 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_bmp: visualize bmp files {{{1
fun! s:NFH_bmp(bmpfile)
" call Dfunc("s:NFH_bmp(bmpfile<".a:bmpfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:bmpfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1)
else
" call Dret("s:NFH_bmp 0")
return 0
endif
" call Dret("s:NFH_bmp 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_pdf: visualize pdf files {{{1
fun! s:NFH_pdf(pdf)
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
if executable("gs")
exe 'silent! !gs '.shellescape(a:pdf,1)
elseif executable("pdftotext")
exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1)
else
" call Dret("s:NFH_pdf 0")
return 0
endif
" call Dret("s:NFH_pdf 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_doc: visualize doc files {{{1
fun! s:NFH_doc(doc)
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
if executable("oowriter")
exe 'silent! !oowriter '.shellescape(a:doc,1)
redraw!
else
" call Dret("s:NFH_doc 0")
return 0
endif
" call Dret("s:NFH_doc 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_sxw: visualize sxw files {{{1
fun! s:NFH_sxw(sxw)
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
exe 'silent! !oowriter '.shellescape(a:sxw,1)
redraw!
else
" call Dret("s:NFH_sxw 0")
return 0
endif
" call Dret("s:NFH_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_xls: visualize xls files {{{1
fun! s:NFH_xls(xls)
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
if executable("oocalc")
exe 'silent! !oocalc '.shellescape(a:xls,1)
redraw!
else
" call Dret("s:NFH_xls 0")
return 0
endif
" call Dret("s:NFH_xls 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_ps: handles PostScript files {{{1
fun! s:NFH_ps(ps)
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
if executable("gs")
" call Decho("exe silent! !gs ".a:ps)
exe "silent! !gs ".shellescape(a:ps,1)
redraw!
elseif executable("ghostscript")
" call Decho("exe silent! !ghostscript ".a:ps)
exe "silent! !ghostscript ".shellescape(a:ps,1)
redraw!
elseif executable("gswin32")
" call Decho("exe silent! !gswin32 ".shellescape(a:ps,1))
exe "silent! !gswin32 ".shellescape(a:ps,1)
redraw!
else
" call Dret("s:NFH_ps 0")
return 0
endif
" call Dret("s:NFH_ps 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_eps: handles encapsulated PostScript files {{{1
fun! s:NFH_eps(eps)
" call Dfunc("s:NFH_eps()")
if executable("gs")
exe "silent! !gs ".shellescape(a:eps,1)
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".shellescape(a:eps,1)
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".shellescape(a:eps,1)
redraw!
elseif executable("gswin32")
exe "silent! !gswin32 ".shellescape(a:eps,1)
redraw!
else
" call Dret("s:NFH_eps 0")
return 0
endif
" call Dret("s:NFH_eps 0")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_fig: handles xfig files {{{1
fun! s:NFH_fig(fig)
" call Dfunc("s:NFH_fig()")
if executable("xfig")
exe "silent! !xfig ".a:fig
redraw!
else
" call Dret("s:NFH_fig 0")
return 0
endif
" call Dret("s:NFH_fig 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_obj: handles tgif's obj files {{{1
fun! s:NFH_obj(obj)
" call Dfunc("s:NFH_obj()")
if has("unix") && executable("tgif")
exe "silent! !tgif ".a:obj
redraw!
else
" call Dret("s:NFH_obj 0")
return 0
endif
" call Dret("s:NFH_obj 1")
return 1
endfun
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker

@ -0,0 +1,239 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: May 03, 2013
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
" Version: 14a ASTRO-ONLY
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" netrwSettings.vim is provided *as is* and comes with no
" warranty of any kind, either expressed or implied. By using
" this plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
"
" Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1
" synagogues, preaching the gospel of the kingdom, and healing
" every disease and every sickness among the people.
" Load Once: {{{1
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v14a"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
echohl Normal
finish
endif
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
fun! netrwSettings#NetrwSettings()
" this call is here largely just to insure that netrw has been loaded
call netrw#NetrwSavePosn()
if !exists("g:loaded_netrw")
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
return
endif
above wincmd s
enew
setlocal noswapfile bh=wipe
set ft=vim
file Netrw\ Settings
" these variables have the following default effects when they don't
" exist (ie. have not been set by the user in his/her .vimrc)
if !exists("g:netrw_liststyle")
let g:netrw_liststyle= 0
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
endif
if !exists("g:netrw_silent")
let g:netrw_silent= 0
endif
if !exists("g:netrw_use_nt_rcp")
let g:netrw_use_nt_rcp= 0
endif
if !exists("g:netrw_ftp")
let g:netrw_ftp= 0
endif
if !exists("g:netrw_ignorenetrc")
let g:netrw_ignorenetrc= 0
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: by Charles E. Campbell'
put ='+ Press <F1> with cursor atop any line for help'
put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
put =''
put ='+ Netrw Protocol Commands'
put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd
put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd
put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd
put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd
put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd
put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd
put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd
put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
let s:netrw_protocol_stop= line(".")
put = ''
put ='+Netrw Transfer Control'
put = 'let g:netrw_cygwin = '.g:netrw_cygwin
put = 'let g:netrw_ftp = '.g:netrw_ftp
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_silent = '.g:netrw_silent
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
let s:netrw_xfer_stop= line(".")
put =''
put ='+ Netrw Messages'
put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
put = ''
put ='+ Netrw Browser Control'
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_banner = '.g:netrw_banner
if exists("g:netrw_bannerbackslash")
put = 'let g:netrw_bannerbackslash = '.g:netrw_bannerbackslash
else
put = '\" let g:netrw_bannerbackslash = (not defined)'
endif
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
if exists("g:netrw_browsex_viewer")
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
else
put = '\" let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_compress = '.g:netrw_compress
if exists("g:Netrw_corehandler")
put = 'let g:Netrw_corehandler = '.g:Netrw_corehandler
else
put = '\" let g:Netrw_corehandler = (not defined)'
endif
put = 'let g:netrw_ctags = '.g:netrw_ctags
put = 'let g:netrw_cursor = '.g:netrw_cursor
let decompressline= line("$")
put = 'let g:netrw_decompress = '.string(g:netrw_decompress)
if exists("g:netrw_dynamic_maxfilenamelen")
put = 'let g:netrw_dynamic_maxfilenamelen='.g:netrw_dynamic_maxfilenamelen
else
put = '\" let g:netrw_dynamic_maxfilenamelen= (not defined)'
endif
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_errorlvl = '.g:netrw_errorlvl
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
let fnameescline= line("$")
put = 'let g:netrw_fname_escape = '.string(g:netrw_fname_escape)
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
let globescline= line("$")
put = 'let g:netrw_glob_escape = '.string(g:netrw_glob_escape)
put = 'let g:netrw_hide = '.g:netrw_hide
if exists("g:netrw_home")
put = 'let g:netrw_home = '.g:netrw_home
else
put = '\" let g:netrw_home = (not defined)'
endif
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
if exists("g:netrw_nobeval")
put = 'let g:netrw_nobeval = '.g:netrw_nobeval
else
put = '\" let g:netrw_nobeval = (not defined)'
endif
put = 'let g:netrw_remote_mkdir = '.g:netrw_remote_mkdir
put = 'let g:netrw_preview = '.g:netrw_preview
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_retmap = '.g:netrw_retmap
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
let tmpfileescline= line("$")
put ='let g:netrw_tmpfile_escape...'
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
put ='+ For help, place cursor on line and press <F1>'
1d
silent %s/^+/"/e
res 99
silent %s/= \([^0-9].*\)$/= '\1'/e
silent %s/= $/= ''/e
1
call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
set nomod
nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfun
" ---------------------------------------------------------------------
" NetrwSettingHelp: {{{2
fun! NetrwSettingHelp()
" call Dfunc("NetrwSettingHelp()")
let curline = getline(".")
if curline =~ '='
let varhelp = substitute(curline,'^\s*let ','','e')
let varhelp = substitute(varhelp,'\s*=.*$','','e')
" call Decho("trying help ".varhelp)
try
exe "he ".varhelp
catch /^Vim\%((\a\+)\)\=:E149/
echo "***sorry*** no help available for <".varhelp.">"
endtry
elseif line(".") < s:netrw_settings_stop
he netrw-settings
elseif line(".") < s:netrw_protocol_stop
he netrw-externapp
elseif line(".") < s:netrw_xfer_stop
he netrw-variables
else
he netrw-browse-var
endif
" call Dret("NetrwSettingHelp")
endfun
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim:ts=8 fdm=marker

@ -0,0 +1,35 @@
" Vim support file to help with paste mappings and menus
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Jun 23
" Define the string to use for items that are present both in Edit, Popup and
" Toolbar menu. Also used in mswin.vim and macmap.vim.
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
" were characterwise instead. Add to that some tricks to leave the cursor in
" the right position, also for "gi".
if has("virtualedit")
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
let paste#paste_cmd['i'] = 'x<BS><Esc>' . paste#paste_cmd['n'] . 'gi'
func! paste#Paste()
let ove = &ve
set ve=all
normal! `^
if @+ != ''
normal! "+gP
endif
let c = col(".")
normal! i
if col(".") < c " compensate for i<ESC> moving the cursor left
normal! l
endif
let &ve = ove
endfunc
else
let paste#paste_cmd = {'n': "\"=@+.'xy'<CR>gPFx\"_2x"}
let paste#paste_cmd['v'] = '"-c<Esc>gix<Esc>' . paste#paste_cmd['n'] . '"_x'
let paste#paste_cmd['i'] = 'x<Esc>' . paste#paste_cmd['n'] . '"_s'
endif

@ -0,0 +1,332 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.3
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your
" .vimrc is the only other setup necessary.
"
" The API is documented inline below. For maximum ease of reading,
" :set foldmethod=marker
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
" Point of entry for basic default usage. Give a relative path to invoke
" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke
" pathogen#surround(). For backwards compatibility purposes, a full path that
" does not end in {} or * is given to pathogen#runtime_prepend_subdirectories()
" instead.
function! pathogen#infect(...) abort " {{{1
for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}']
if path =~# '^[^\\/]\+$'
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#interpose(path . '/{}')
elseif path =~# '^[^\\/]\+[\\/]\%({}\|\*\)$'
call pathogen#interpose(path)
elseif path =~# '[\\/]\%({}\|\*\)$'
call pathogen#surround(path)
else
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#surround(path . '/{}')
endif
endfor
call pathogen#cycle_filetype()
return ''
endfunction " }}}1
" Split a path into a list.
function! pathogen#split(path) abort " {{{1
if type(a:path) == type([]) | return a:path | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction " }}}1
" Convert a list to a path.
function! pathogen#join(...) abort " {{{1
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
else
let path .= "," . a:000[i]
endif
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction " }}}1
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort " {{{1
return call('pathogen#join',[1] + a:000)
endfunction " }}}1
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() " {{{1
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction " }}}1
" Check if a bundle is disabled. A bundle is considered disabled if its
" basename or full name is included in the list g:pathogen_disabled.
function! pathogen#is_disabled(path) abort " {{{1
let sep = pathogen#slash()
let blacklist = get(g:, 'pathogen_blacklist', get(g:, 'pathogen_disabled', []))
return index(blacklist, fnamemodify(a:path, ':t')) != -1 || index(blacklist, a:path) != -1
endfunction "}}}1
" Prepend the given directory to the runtime path and append its corresponding
" after directory. If the directory is already included, move it to the
" outermost position. Wildcards are added as is. Ending a path in /{} causes
" all subdirectories to be added (except those in g:pathogen_disabled).
function! pathogen#surround(path) abort " {{{1
let sep = pathogen#slash()
let rtp = pathogen#split(&rtp)
if a:path =~# '[\\/]{}$'
let path = fnamemodify(a:path[0:-4], ':p:s?[\\/]\=$??')
let before = filter(pathogen#glob_directories(path.sep.'*'), '!pathogen#is_disabled(v:val)')
let after = filter(reverse(pathogen#glob_directories(path.sep."*".sep."after")), '!pathogen#is_disabled(v:val[0:-7])')
call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
else
let path = fnamemodify(a:path, ':p:s?[\\/]\=$??')
let before = [path]
let after = [path . sep . 'after']
call filter(rtp, 'index(before + after, v:val) == -1')
endif
let &rtp = pathogen#join(before, rtp, after)
return &rtp
endfunction " }}}1
" For each directory in the runtime path, add a second entry with the given
" argument appended. If the argument ends in '/{}', add a separate entry for
" each subdirectory.
function! pathogen#interpose(name) abort " {{{1
let sep = pathogen#slash()
let name = a:name
if has_key(s:done_bundles, name)
return ""
endif
let s:done_bundles[name] = 1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
if name =~# '{}$'
let list += filter(pathogen#glob_directories(substitute(dir,'after$',name[0:-3],'').'*'.sep.'after'), '!pathogen#is_disabled(v:val[0:-7])') + [dir]
else
let list += [dir, substitute(dir, 'after$', '', '') . name . sep . 'after']
endif
else
if name =~# '{}$'
let list += [dir] + filter(pathogen#glob_directories(dir.sep.name[0:-3].'*'), '!pathogen#is_disabled(v:val)')
else
let list += [dir . sep . name, dir]
endif
endif
endfor
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction
let s:done_bundles = {}
" }}}1
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() abort " {{{1
let sep = pathogen#slash()
for glob in pathogen#split(&rtp)
for dir in map(split(glob(glob), "\n"), 'v:val.sep."/doc/".sep')
if (dir)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir) == 2 && !empty(split(glob(dir.'*.txt'))) && (!filereadable(dir.'tags') || filewritable(dir.'tags'))
silent! execute 'helptags' pathogen#fnameescape(dir)
endif
endfor
endfor
endfunction " }}}1
command! -bar Helptags :call pathogen#helptags()
" Execute the given command. This is basically a backdoor for --remote-expr.
function! pathogen#execute(...) abort " {{{1
for command in a:000
execute command
endfor
return ''
endfunction " }}}1
" Section: Unofficial
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#slash() abort " {{{1
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction " }}}1
function! pathogen#separator() abort " {{{1
return pathogen#slash()
endfunction " }}}1
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort " {{{1
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#slash()."/]$","","")')
endfunction "}}}1
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort " {{{1
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction "}}}1
" Remove duplicates from a list.
function! pathogen#uniq(list) abort " {{{1
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction " }}}1
" Backport of fnameescape().
function! pathogen#fnameescape(string) abort " {{{1
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction " }}}1
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) abort "{{{1
let rtp = pathogen#join(1,pathogen#split(&rtp))
let file = findfile(a:file,rtp,a:count)
if file ==# ''
return ''
else
return fnamemodify(file,':p')
endif
endfunction " }}}1
" Section: Deprecated
function! s:warn(msg)
echohl WarningMsg
echomsg a:msg
echohl NONE
endfunction
" Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories. Deprecated.
function! pathogen#runtime_prepend_subdirectories(path) " {{{1
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')')
return pathogen#surround(a:path . pathogen#slash() . '{}')
endfunction " }}}1
function! pathogen#incubate(...) abort " {{{1
let name = a:0 ? a:1 : 'bundle/{}'
call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')')
return pathogen#interpose(name)
endfunction " }}}1
" Deprecated alias for pathogen#interpose().
function! pathogen#runtime_append_all_bundles(...) abort " {{{1
if a:0
call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')')
else
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()')
endif
return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}')
endfunction " }}}1
if exists(':Vedit')
finish
endif
let s:vopen_warning = 0
function! s:find(count,cmd,file,lcd) " {{{1
let rtp = pathogen#join(1,pathogen#split(&runtimepath))
let file = pathogen#runtime_findfile(a:file,a:count)
if file ==# ''
return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'"
endif
if !s:vopen_warning
let s:vopen_warning = 1
let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE'
else
let warning = ''
endif
if a:lcd
let path = file[0:-strlen(a:file)-2]
execute 'lcd `=path`'
return a:cmd.' '.pathogen#fnameescape(a:file) . warning
else
return a:cmd.' '.pathogen#fnameescape(file) . warning
endif
endfunction " }}}1
function! s:Findcomplete(A,L,P) " {{{1
let sep = pathogen#slash()
let cheats = {
\'a': 'autoload',
\'d': 'doc',
\'f': 'ftplugin',
\'i': 'indent',
\'p': 'plugin',
\'s': 'syntax'}
if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0])
let request = cheats[a:A[0]].a:A[1:-1]
else
let request = a:A
endif
let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*'
let found = {}
for path in pathogen#split(&runtimepath)
let path = expand(path, ':p')
let matches = split(glob(path.sep.pattern),"\n")
call map(matches,'isdirectory(v:val) ? v:val.sep : v:val')
call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]')
for match in matches
let found[match] = 1
endfor
endfor
return sort(keys(found))
endfunction " }}}1
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(<count>,'edit<bang>',<q-args>,0)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(<count>,'edit<bang>',<q-args>,1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(<count>,'split',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(<count>,'vsplit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(<count>,'tabedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(<count>,'pedit',<q-args>,<bang>1)
command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(<count>,'read',<q-args>,<bang>1)
" vim:set et sw=2:

File diff suppressed because it is too large Load Diff

@ -0,0 +1,606 @@
"python3complete.vim - Omni Completion for python
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Version: 0.9
" Last Updated: 18 Jun 2009
"
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
"
" Changes
" TODO:
" 'info' item output can use some formatting work
" Add an "unsafe eval" mode, to allow for return type evaluation
" Complete basic syntax along with import statements
" i.e. "import url<c-x,c-o>"
" Continue parsing on invalid line??
"
" v 0.9
" * Fixed docstring parsing for classes and functions
" * Fixed parsing of *args and **kwargs type arguments
" * Better function param parsing to handle things like tuples and
" lambda defaults args
"
" v 0.8
" * Fixed an issue where the FIRST assignment was always used instead of
" using a subsequent assignment for a variable
" * Fixed a scoping issue when working inside a parameterless function
"
"
" v 0.7
" * Fixed function list sorting (_ and __ at the bottom)
" * Removed newline removal from docs. It appears vim handles these better in
" recent patches
"
" v 0.6:
" * Fixed argument completion
" * Removed the 'kind' completions, as they are better indicated
" with real syntax
" * Added tuple assignment parsing (whoops, that was forgotten)
" * Fixed import handling when flattening scope
"
" v 0.5:
" Yeah, I skipped a version number - 0.4 was never public.
" It was a bugfix version on top of 0.3. This is a complete
" rewrite.
"
if !has('python3')
echo "Error: Required vim compiled with +python3"
finish
endif
function! python3complete#Complete(findstart, base)
"findstart = 1 when we need to get the text length
if a:findstart == 1
let line = getline('.')
let idx = col('.')
while idx > 0
let idx -= 1
let c = line[idx]
if c =~ '\w'
continue
elseif ! c =~ '\.'
let idx = -1
break
else
break
endif
endwhile
return idx
"findstart = 0 when we need to return the list of completions
else
"vim no longer moves the cursor upon completion... fix that
let line = getline('.')
let idx = col('.')
let cword = ''
while idx > 0
let idx -= 1
let c = line[idx]
if c =~ '\w' || c =~ '\.'
let cword = c . cword
continue
elseif strlen(cword) > 0 || idx == 0
break
endif
endwhile
execute "py3 vimpy3complete('" . cword . "', '" . a:base . "')"
return g:python3complete_completions
endif
endfunction
function! s:DefPython()
py3 << PYTHONEOF
import sys, tokenize, io, types
from token import NAME, DEDENT, NEWLINE, STRING
debugstmts=[]
def dbg(s): debugstmts.append(s)
def showdbg():
for d in debugstmts: print("DBG: %s " % d)
def vimpy3complete(context,match):
global debugstmts
debugstmts = []
try:
import vim
cmpl = Completer()
cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')"))
all = cmpl.get_completions(context,match)
all.sort(key=lambda x:x['abbr'].replace('_','z'))
dictstr = '['
# have to do this for double quoting
for cmpl in all:
dictstr += '{'
for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x])
dictstr += '"icase":0},'
if dictstr[-1] == ',': dictstr = dictstr[:-1]
dictstr += ']'
#dbg("dict: %s" % dictstr)
vim.command("silent let g:python3complete_completions = %s" % dictstr)
#dbg("Completion dict:\n%s" % all)
except vim.error:
dbg("VIM Error: %s" % vim.error)
class Completer(object):
def __init__(self):
self.compldict = {}
self.parser = PyParser()
def evalsource(self,text,line=0):
sc = self.parser.parse(text,line)
src = sc.get_code()
dbg("source: %s" % src)
try: exec(src,self.compldict)
except: dbg("parser: %s, %s" % (sys.exc_info()[0],sys.exc_info()[1]))
for l in sc.locals:
try: exec(l,self.compldict)
except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l))
def _cleanstr(self,doc):
return doc.replace('"',' ').replace("'",' ')
def get_arguments(self,func_obj):
def _ctor(class_ob):
try: return class_ob.__init__
except AttributeError:
for base in class_ob.__bases__:
rc = _ctor(base)
if rc is not None: return rc
return None
arg_offset = 1
if type(func_obj) == type: func_obj = _ctor(func_obj)
elif type(func_obj) == types.MethodType: arg_offset = 1
else: arg_offset = 0
arg_text=''
if type(func_obj) in [types.FunctionType, types.LambdaType,types.MethodType]:
try:
cd = func_obj.__code__
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
defaults = func_obj.__defaults__ or []
defaults = ["=%s" % name for name in defaults]
defaults = [""] * (len(real_args)-len(defaults)) + defaults
items = [a+d for a,d in zip(real_args,defaults)]
if func_obj.__code__.co_flags & 0x4:
items.append("...")
if func_obj.__code__.co_flags & 0x8:
items.append("***")
arg_text = (','.join(items)) + ')'
except:
dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1]))
pass
if len(arg_text) == 0:
# The doc string sometimes contains the function signature
# this works for alot of C modules that are part of the
# standard library
doc = func_obj.__doc__
if doc:
doc = doc.lstrip()
pos = doc.find('\n')
if pos > 0:
sigline = doc[:pos]
lidx = sigline.find('(')
ridx = sigline.find(')')
if lidx > 0 and ridx > 0:
arg_text = sigline[lidx+1:ridx] + ')'
if len(arg_text) == 0: arg_text = ')'
return arg_text
def get_completions(self,context,match):
#dbg("get_completions('%s','%s')" % (context,match))
stmt = ''
if context: stmt += str(context)
if match: stmt += str(match)
try:
result = None
all = {}
ridx = stmt.rfind('.')
if len(stmt) > 0 and stmt[-1] == '(':
result = eval(_sanitize(stmt[:-1]), self.compldict)
doc = result.__doc__
if doc is None: doc = ''
args = self.get_arguments(result)
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
elif ridx == -1:
match = stmt
all = self.compldict
else:
match = stmt[ridx+1:]
stmt = _sanitize(stmt[:ridx])
result = eval(stmt, self.compldict)
all = dir(result)
dbg("completing: stmt:%s" % stmt)
completions = []
try: maindoc = result.__doc__
except: maindoc = ' '
if maindoc is None: maindoc = ' '
for m in all:
if m == "_PyCmplNoType": continue #this is internal
try:
dbg('possible completion: %s' % m)
if m.find(match) == 0:
if result is None: inst = all[m]
else: inst = getattr(result,m)
try: doc = inst.__doc__
except: doc = maindoc
typestr = str(inst)
if doc is None or doc == '': doc = maindoc
wrd = m[len(match):]
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
if "function" in typestr:
c['word'] += '('
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
elif "method" in typestr:
c['word'] += '('
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
elif "module" in typestr:
c['word'] += '.'
elif "type" in typestr:
c['word'] += '('
c['abbr'] += '('
completions.append(c)
except:
i = sys.exc_info()
dbg("inner completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
return completions
except:
i = sys.exc_info()
dbg("completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
return []
class Scope(object):
def __init__(self,name,indent,docstr=''):
self.subscopes = []
self.docstr = docstr
self.locals = []
self.parent = None
self.name = name
self.indent = indent
def add(self,sub):
#print('push scope: [%s@%s]' % (sub.name,sub.indent))
sub.parent = self
self.subscopes.append(sub)
return sub
def doc(self,str):
""" Clean up a docstring """
d = str.replace('\n',' ')
d = d.replace('\t',' ')
while d.find(' ') > -1: d = d.replace(' ',' ')
while d[0] in '"\'\t ': d = d[1:]
while d[-1] in '"\'\t ': d = d[:-1]
dbg("Scope(%s)::docstr = %s" % (self,d))
self.docstr = d
def local(self,loc):
self._checkexisting(loc)
self.locals.append(loc)
def copy_decl(self,indent=0):
""" Copy a scope's declaration only, at the specified indent level - not local variables """
return Scope(self.name,indent,self.docstr)
def _checkexisting(self,test):
"Convienance function... keep out duplicates"
if test.find('=') > -1:
var = test.split('=')[0].strip()
for l in self.locals:
if l.find('=') > -1 and var == l.split('=')[0].strip():
self.locals.remove(l)
def get_code(self):
str = ""
if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n'
for l in self.locals:
if l.startswith('import'): str += l+'\n'
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
for sub in self.subscopes:
str += sub.get_code()
for l in self.locals:
if not l.startswith('import'): str += l+'\n'
return str
def pop(self,indent):
#print('pop scope: [%s] to [%s]' % (self.indent,indent))
outer = self
while outer.parent != None and outer.indent >= indent:
outer = outer.parent
return outer
def currentindent(self):
#print('parse current indent: %s' % self.indent)
return ' '*self.indent
def childindent(self):
#print('parse child indent: [%s]' % (self.indent+1))
return ' '*(self.indent+1)
class Class(Scope):
def __init__(self, name, supers, indent, docstr=''):
Scope.__init__(self,name,indent, docstr)
self.supers = supers
def copy_decl(self,indent=0):
c = Class(self.name,self.supers,indent, self.docstr)
for s in self.subscopes:
c.add(s.copy_decl(indent+1))
return c
def get_code(self):
str = '%sclass %s' % (self.currentindent(),self.name)
if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers)
str += ':\n'
if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
if len(self.subscopes) > 0:
for s in self.subscopes: str += s.get_code()
else:
str += '%spass\n' % self.childindent()
return str
class Function(Scope):
def __init__(self, name, params, indent, docstr=''):
Scope.__init__(self,name,indent, docstr)
self.params = params
def copy_decl(self,indent=0):
return Function(self.name,self.params,indent, self.docstr)
def get_code(self):
str = "%sdef %s(%s):\n" % \
(self.currentindent(),self.name,','.join(self.params))
if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
str += "%spass\n" % self.childindent()
return str
class PyParser:
def __init__(self):
self.top = Scope('global',0)
self.scope = self.top
def _parsedotname(self,pre=None):
#returns (dottedname, nexttoken)
name = []
if pre is None:
tokentype, token, indent = self.donext()
if tokentype != NAME and token != '*':
return ('', token)
else: token = pre
name.append(token)
while True:
tokentype, token, indent = self.donext()
if token != '.': break
tokentype, token, indent = self.donext()
if tokentype != NAME: break
name.append(token)
return (".".join(name), token)
def _parseimportlist(self):
imports = []
while True:
name, token = self._parsedotname()
if not name: break
name2 = ''
if token == 'as': name2, token = self._parsedotname()
imports.append((name, name2))
while token != "," and "\n" not in token:
tokentype, token, indent = self.donext()
if token != ",": break
return imports
def _parenparse(self):
name = ''
names = []
level = 1
while True:
tokentype, token, indent = self.donext()
if token in (')', ',') and level == 1:
if '=' not in name: name = name.replace(' ', '')
names.append(name.strip())
name = ''
if token == '(':
level += 1
name += "("
elif token == ')':
level -= 1
if level == 0: break
else: name += ")"
elif token == ',' and level == 1:
pass
else:
name += "%s " % str(token)
return names
def _parsefunction(self,indent):
self.scope=self.scope.pop(indent)
tokentype, fname, ind = self.donext()
if tokentype != NAME: return None
tokentype, open, ind = self.donext()
if open != '(': return None
params=self._parenparse()
tokentype, colon, ind = self.donext()
if colon != ':': return None
return Function(fname,params,indent)
def _parseclass(self,indent):
self.scope=self.scope.pop(indent)
tokentype, cname, ind = self.donext()
if tokentype != NAME: return None
super = []
tokentype, thenext, ind = self.donext()
if thenext == '(':
super=self._parenparse()
elif thenext != ':': return None
return Class(cname,super,indent)
def _parseassignment(self):
assign=''
tokentype, token, indent = self.donext()
if tokentype == tokenize.STRING or token == 'str':
return '""'
elif token == '(' or token == 'tuple':
return '()'
elif token == '[' or token == 'list':
return '[]'
elif token == '{' or token == 'dict':
return '{}'
elif tokentype == tokenize.NUMBER:
return '0'
elif token == 'open' or token == 'file':
return 'file'
elif token == 'None':
return '_PyCmplNoType()'
elif token == 'type':
return 'type(_PyCmplNoType)' #only for method resolution
else:
assign += token
level = 0
while True:
tokentype, token, indent = self.donext()
if token in ('(','{','['):
level += 1
elif token in (']','}',')'):
level -= 1
if level == 0: break
elif level == 0:
if token in (';','\n'): break
assign += token
return "%s" % assign
def donext(self):
type, token, (lineno, indent), end, self.parserline = next(self.gen)
if lineno == self.curline:
#print('line found [%s] scope=%s' % (line.replace('\n',''),self.scope.name))
self.currentscope = self.scope
return (type, token, indent)
def _adjustvisibility(self):
newscope = Scope('result',0)
scp = self.currentscope
while scp != None:
if type(scp) == Function:
slice = 0
#Handle 'self' params
if scp.parent != None and type(scp.parent) == Class:
slice = 1
newscope.local('%s = %s' % (scp.params[0],scp.parent.name))
for p in scp.params[slice:]:
i = p.find('=')
if len(p) == 0: continue
pvar = ''
ptype = ''
if i == -1:
pvar = p
ptype = '_PyCmplNoType()'
else:
pvar = p[:i]
ptype = _sanitize(p[i+1:])
if pvar.startswith('**'):
pvar = pvar[2:]
ptype = '{}'
elif pvar.startswith('*'):
pvar = pvar[1:]
ptype = '[]'
newscope.local('%s = %s' % (pvar,ptype))
for s in scp.subscopes:
ns = s.copy_decl(0)
newscope.add(ns)
for l in scp.locals: newscope.local(l)
scp = scp.parent
self.currentscope = newscope
return self.currentscope
#p.parse(vim.current.buffer[:],vim.eval("line('.')"))
def parse(self,text,curline=0):
self.curline = int(curline)
buf = io.StringIO(''.join(text) + '\n')
self.gen = tokenize.generate_tokens(buf.readline)
self.currentscope = self.scope
try:
freshscope=True
while True:
tokentype, token, indent = self.donext()
#dbg( 'main: token=[%s] indent=[%s]' % (token,indent))
if tokentype == DEDENT or token == "pass":
self.scope = self.scope.pop(indent)
elif token == 'def':
func = self._parsefunction(indent)
if func is None:
print("function: syntax error...")
continue
dbg("new scope: function")
freshscope = True
self.scope = self.scope.add(func)
elif token == 'class':
cls = self._parseclass(indent)
if cls is None:
print("class: syntax error...")
continue
freshscope = True
dbg("new scope: class")
self.scope = self.scope.add(cls)
elif token == 'import':
imports = self._parseimportlist()
for mod, alias in imports:
loc = "import %s" % mod
if len(alias) > 0: loc += " as %s" % alias
self.scope.local(loc)
freshscope = False
elif token == 'from':
mod, token = self._parsedotname()
if not mod or token != "import":
print("from: syntax error...")
continue
names = self._parseimportlist()
for name, alias in names:
loc = "from %s import %s" % (mod,name)
if len(alias) > 0: loc += " as %s" % alias
self.scope.local(loc)
freshscope = False
elif tokentype == STRING:
if freshscope: self.scope.doc(token)
elif tokentype == NAME:
name,token = self._parsedotname(token)
if token == '=':
stmt = self._parseassignment()
dbg("parseassignment: %s = %s" % (name, stmt))
if stmt != None:
self.scope.local("%s = %s" % (name,stmt))
freshscope = False
except StopIteration: #thrown on EOF
pass
except:
dbg("parse error: %s, %s @ %s" %
(sys.exc_info()[0], sys.exc_info()[1], self.parserline))
return self._adjustvisibility()
def _sanitize(str):
val = ''
level = 0
for c in str:
if c in ('(','{','['):
level += 1
elif c in (']','}',')'):
level -= 1
elif level == 0:
val += c
return val
sys.path.extend(['.','..'])
PYTHONEOF
endfunction
call s:DefPython()

@ -0,0 +1,625 @@
"pythoncomplete.vim - Omni Completion for python
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Version: 0.9
" Last Updated: 18 Jun 2009
"
" Changes
" TODO:
" 'info' item output can use some formatting work
" Add an "unsafe eval" mode, to allow for return type evaluation
" Complete basic syntax along with import statements
" i.e. "import url<c-x,c-o>"
" Continue parsing on invalid line??
"
" v 0.9
" * Fixed docstring parsing for classes and functions
" * Fixed parsing of *args and **kwargs type arguments
" * Better function param parsing to handle things like tuples and
" lambda defaults args
"
" v 0.8
" * Fixed an issue where the FIRST assignment was always used instead of
" using a subsequent assignment for a variable
" * Fixed a scoping issue when working inside a parameterless function
"
"
" v 0.7
" * Fixed function list sorting (_ and __ at the bottom)
" * Removed newline removal from docs. It appears vim handles these better in
" recent patches
"
" v 0.6:
" * Fixed argument completion
" * Removed the 'kind' completions, as they are better indicated
" with real syntax
" * Added tuple assignment parsing (whoops, that was forgotten)
" * Fixed import handling when flattening scope
"
" v 0.5:
" Yeah, I skipped a version number - 0.4 was never public.
" It was a bugfix version on top of 0.3. This is a complete
" rewrite.
"
if !has('python')
echo "Error: Required vim compiled with +python"
finish
endif
function! pythoncomplete#Complete(findstart, base)
"findstart = 1 when we need to get the text length
if a:findstart == 1
let line = getline('.')
let idx = col('.')
while idx > 0
let idx -= 1
let c = line[idx]
if c =~ '\w'
continue
elseif ! c =~ '\.'
let idx = -1
break
else
break
endif
endwhile
return idx
"findstart = 0 when we need to return the list of completions
else
"vim no longer moves the cursor upon completion... fix that
let line = getline('.')
let idx = col('.')
let cword = ''
while idx > 0
let idx -= 1
let c = line[idx]
if c =~ '\w' || c =~ '\.'
let cword = c . cword
continue
elseif strlen(cword) > 0 || idx == 0
break
endif
endwhile
execute "python vimcomplete('" . cword . "', '" . a:base . "')"
return g:pythoncomplete_completions
endif
endfunction
function! s:DefPython()
python << PYTHONEOF
import sys, tokenize, cStringIO, types
from token import NAME, DEDENT, NEWLINE, STRING
debugstmts=[]
def dbg(s): debugstmts.append(s)
def showdbg():
for d in debugstmts: print "DBG: %s " % d
def vimcomplete(context,match):
global debugstmts
debugstmts = []
try:
import vim
def complsort(x,y):
try:
xa = x['abbr']
ya = y['abbr']
if xa[0] == '_':
if xa[1] == '_' and ya[0:2] == '__':
return xa > ya
elif ya[0:2] == '__':
return -1
elif y[0] == '_':
return xa > ya
else:
return 1
elif ya[0] == '_':
return -1
else:
return xa > ya
except:
return 0
cmpl = Completer()
cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')"))
all = cmpl.get_completions(context,match)
all.sort(complsort)
dictstr = '['
# have to do this for double quoting
for cmpl in all:
dictstr += '{'
for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x])
dictstr += '"icase":0},'
if dictstr[-1] == ',': dictstr = dictstr[:-1]
dictstr += ']'
#dbg("dict: %s" % dictstr)
vim.command("silent let g:pythoncomplete_completions = %s" % dictstr)
#dbg("Completion dict:\n%s" % all)
except vim.error:
dbg("VIM Error: %s" % vim.error)
class Completer(object):
def __init__(self):
self.compldict = {}
self.parser = PyParser()
def evalsource(self,text,line=0):
sc = self.parser.parse(text,line)
src = sc.get_code()
dbg("source: %s" % src)
try: exec(src) in self.compldict
except: dbg("parser: %s, %s" % (sys.exc_info()[0],sys.exc_info()[1]))
for l in sc.locals:
try: exec(l) in self.compldict
except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l))
def _cleanstr(self,doc):
return doc.replace('"',' ').replace("'",' ')
def get_arguments(self,func_obj):
def _ctor(obj):
try: return class_ob.__init__.im_func
except AttributeError:
for base in class_ob.__bases__:
rc = _find_constructor(base)
if rc is not None: return rc
return None
arg_offset = 1
if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj)
elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
else: arg_offset = 0
arg_text=''
if type(func_obj) in [types.FunctionType, types.LambdaType]:
try:
cd = func_obj.func_code
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
defaults = func_obj.func_defaults or ''
defaults = map(lambda name: "=%s" % name, defaults)
defaults = [""] * (len(real_args)-len(defaults)) + defaults
items = map(lambda a,d: a+d, real_args, defaults)
if func_obj.func_code.co_flags & 0x4:
items.append("...")
if func_obj.func_code.co_flags & 0x8:
items.append("***")
arg_text = (','.join(items)) + ')'
except:
dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1]))
pass
if len(arg_text) == 0:
# The doc string sometimes contains the function signature
# this works for alot of C modules that are part of the
# standard library
doc = func_obj.__doc__
if doc:
doc = doc.lstrip()
pos = doc.find('\n')
if pos > 0:
sigline = doc[:pos]
lidx = sigline.find('(')
ridx = sigline.find(')')
if lidx > 0 and ridx > 0:
arg_text = sigline[lidx+1:ridx] + ')'
if len(arg_text) == 0: arg_text = ')'
return arg_text
def get_completions(self,context,match):
dbg("get_completions('%s','%s')" % (context,match))
stmt = ''
if context: stmt += str(context)
if match: stmt += str(match)
try:
result = None
all = {}
ridx = stmt.rfind('.')
if len(stmt) > 0 and stmt[-1] == '(':
result = eval(_sanitize(stmt[:-1]), self.compldict)
doc = result.__doc__
if doc is None: doc = ''
args = self.get_arguments(result)
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
elif ridx == -1:
match = stmt
all = self.compldict
else:
match = stmt[ridx+1:]
stmt = _sanitize(stmt[:ridx])
result = eval(stmt, self.compldict)
all = dir(result)
dbg("completing: stmt:%s" % stmt)
completions = []
try: maindoc = result.__doc__
except: maindoc = ' '
if maindoc is None: maindoc = ' '
for m in all:
if m == "_PyCmplNoType": continue #this is internal
try:
dbg('possible completion: %s' % m)
if m.find(match) == 0:
if result is None: inst = all[m]
else: inst = getattr(result,m)
try: doc = inst.__doc__
except: doc = maindoc
typestr = str(inst)
if doc is None or doc == '': doc = maindoc
wrd = m[len(match):]
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
if "function" in typestr:
c['word'] += '('
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
elif "method" in typestr:
c['word'] += '('
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
elif "module" in typestr:
c['word'] += '.'
elif "class" in typestr:
c['word'] += '('
c['abbr'] += '('
completions.append(c)
except:
i = sys.exc_info()
dbg("inner completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
return completions
except:
i = sys.exc_info()
dbg("completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
return []
class Scope(object):
def __init__(self,name,indent,docstr=''):
self.subscopes = []
self.docstr = docstr
self.locals = []
self.parent = None
self.name = name
self.indent = indent
def add(self,sub):
#print 'push scope: [%s@%s]' % (sub.name,sub.indent)
sub.parent = self
self.subscopes.append(sub)
return sub
def doc(self,str):
""" Clean up a docstring """
d = str.replace('\n',' ')
d = d.replace('\t',' ')
while d.find(' ') > -1: d = d.replace(' ',' ')
while d[0] in '"\'\t ': d = d[1:]
while d[-1] in '"\'\t ': d = d[:-1]
dbg("Scope(%s)::docstr = %s" % (self,d))
self.docstr = d
def local(self,loc):
self._checkexisting(loc)
self.locals.append(loc)
def copy_decl(self,indent=0):
""" Copy a scope's declaration only, at the specified indent level - not local variables """
return Scope(self.name,indent,self.docstr)
def _checkexisting(self,test):
"Convienance function... keep out duplicates"
if test.find('=') > -1:
var = test.split('=')[0].strip()
for l in self.locals:
if l.find('=') > -1 and var == l.split('=')[0].strip():
self.locals.remove(l)
def get_code(self):
str = ""
if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n'
for l in self.locals:
if l.startswith('import'): str += l+'\n'
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
for sub in self.subscopes:
str += sub.get_code()
for l in self.locals:
if not l.startswith('import'): str += l+'\n'
return str
def pop(self,indent):
#print 'pop scope: [%s] to [%s]' % (self.indent,indent)
outer = self
while outer.parent != None and outer.indent >= indent:
outer = outer.parent
return outer
def currentindent(self):
#print 'parse current indent: %s' % self.indent
return ' '*self.indent
def childindent(self):
#print 'parse child indent: [%s]' % (self.indent+1)
return ' '*(self.indent+1)
class Class(Scope):
def __init__(self, name, supers, indent, docstr=''):
Scope.__init__(self,name,indent, docstr)
self.supers = supers
def copy_decl(self,indent=0):
c = Class(self.name,self.supers,indent, self.docstr)
for s in self.subscopes:
c.add(s.copy_decl(indent+1))
return c
def get_code(self):
str = '%sclass %s' % (self.currentindent(),self.name)
if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers)
str += ':\n'
if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
if len(self.subscopes) > 0:
for s in self.subscopes: str += s.get_code()
else:
str += '%spass\n' % self.childindent()
return str
class Function(Scope):
def __init__(self, name, params, indent, docstr=''):
Scope.__init__(self,name,indent, docstr)
self.params = params
def copy_decl(self,indent=0):
return Function(self.name,self.params,indent, self.docstr)
def get_code(self):
str = "%sdef %s(%s):\n" % \
(self.currentindent(),self.name,','.join(self.params))
if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
str += "%spass\n" % self.childindent()
return str
class PyParser:
def __init__(self):
self.top = Scope('global',0)
self.scope = self.top
def _parsedotname(self,pre=None):
#returns (dottedname, nexttoken)
name = []
if pre is None:
tokentype, token, indent = self.next()
if tokentype != NAME and token != '*':
return ('', token)
else: token = pre
name.append(token)
while True:
tokentype, token, indent = self.next()
if token != '.': break
tokentype, token, indent = self.next()
if tokentype != NAME: break
name.append(token)
return (".".join(name), token)
def _parseimportlist(self):
imports = []
while True:
name, token = self._parsedotname()
if not name: break
name2 = ''
if token == 'as': name2, token = self._parsedotname()
imports.append((name, name2))
while token != "," and "\n" not in token:
tokentype, token, indent = self.next()
if token != ",": break
return imports
def _parenparse(self):
name = ''
names = []
level = 1
while True:
tokentype, token, indent = self.next()
if token in (')', ',') and level == 1:
if '=' not in name: name = name.replace(' ', '')
names.append(name.strip())
name = ''
if token == '(':
level += 1
name += "("
elif token == ')':
level -= 1
if level == 0: break
else: name += ")"
elif token == ',' and level == 1:
pass
else:
name += "%s " % str(token)
return names
def _parsefunction(self,indent):
self.scope=self.scope.pop(indent)
tokentype, fname, ind = self.next()
if tokentype != NAME: return None
tokentype, open, ind = self.next()
if open != '(': return None
params=self._parenparse()
tokentype, colon, ind = self.next()
if colon != ':': return None
return Function(fname,params,indent)
def _parseclass(self,indent):
self.scope=self.scope.pop(indent)
tokentype, cname, ind = self.next()
if tokentype != NAME: return None
super = []
tokentype, next, ind = self.next()
if next == '(':
super=self._parenparse()
elif next != ':': return None
return Class(cname,super,indent)
def _parseassignment(self):
assign=''
tokentype, token, indent = self.next()
if tokentype == tokenize.STRING or token == 'str':
return '""'
elif token == '(' or token == 'tuple':
return '()'
elif token == '[' or token == 'list':
return '[]'
elif token == '{' or token == 'dict':
return '{}'
elif tokentype == tokenize.NUMBER:
return '0'
elif token == 'open' or token == 'file':
return 'file'
elif token == 'None':
return '_PyCmplNoType()'
elif token == 'type':
return 'type(_PyCmplNoType)' #only for method resolution
else:
assign += token
level = 0
while True:
tokentype, token, indent = self.next()
if token in ('(','{','['):
level += 1
elif token in (']','}',')'):
level -= 1
if level == 0: break
elif level == 0:
if token in (';','\n'): break
assign += token
return "%s" % assign
def next(self):
type, token, (lineno, indent), end, self.parserline = self.gen.next()
if lineno == self.curline:
#print 'line found [%s] scope=%s' % (line.replace('\n',''),self.scope.name)
self.currentscope = self.scope
return (type, token, indent)
def _adjustvisibility(self):
newscope = Scope('result',0)
scp = self.currentscope
while scp != None:
if type(scp) == Function:
slice = 0
#Handle 'self' params
if scp.parent != None and type(scp.parent) == Class:
slice = 1
newscope.local('%s = %s' % (scp.params[0],scp.parent.name))
for p in scp.params[slice:]:
i = p.find('=')
if len(p) == 0: continue
pvar = ''
ptype = ''
if i == -1:
pvar = p
ptype = '_PyCmplNoType()'
else:
pvar = p[:i]
ptype = _sanitize(p[i+1:])
if pvar.startswith('**'):
pvar = pvar[2:]
ptype = '{}'
elif pvar.startswith('*'):
pvar = pvar[1:]
ptype = '[]'
newscope.local('%s = %s' % (pvar,ptype))
for s in scp.subscopes:
ns = s.copy_decl(0)
newscope.add(ns)
for l in scp.locals: newscope.local(l)
scp = scp.parent
self.currentscope = newscope
return self.currentscope
#p.parse(vim.current.buffer[:],vim.eval("line('.')"))
def parse(self,text,curline=0):
self.curline = int(curline)
buf = cStringIO.StringIO(''.join(text) + '\n')
self.gen = tokenize.generate_tokens(buf.readline)
self.currentscope = self.scope
try:
freshscope=True
while True:
tokentype, token, indent = self.next()
#dbg( 'main: token=[%s] indent=[%s]' % (token,indent))
if tokentype == DEDENT or token == "pass":
self.scope = self.scope.pop(indent)
elif token == 'def':
func = self._parsefunction(indent)
if func is None:
print "function: syntax error..."
continue
dbg("new scope: function")
freshscope = True
self.scope = self.scope.add(func)
elif token == 'class':
cls = self._parseclass(indent)
if cls is None:
print "class: syntax error..."
continue
freshscope = True
dbg("new scope: class")
self.scope = self.scope.add(cls)
elif token == 'import':
imports = self._parseimportlist()
for mod, alias in imports:
loc = "import %s" % mod
if len(alias) > 0: loc += " as %s" % alias
self.scope.local(loc)
freshscope = False
elif token == 'from':
mod, token = self._parsedotname()
if not mod or token != "import":
print "from: syntax error..."
continue
names = self._parseimportlist()
for name, alias in names:
loc = "from %s import %s" % (mod,name)
if len(alias) > 0: loc += " as %s" % alias
self.scope.local(loc)
freshscope = False
elif tokentype == STRING:
if freshscope: self.scope.doc(token)
elif tokentype == NAME:
name,token = self._parsedotname(token)
if token == '=':
stmt = self._parseassignment()
dbg("parseassignment: %s = %s" % (name, stmt))
if stmt != None:
self.scope.local("%s = %s" % (name,stmt))
freshscope = False
except StopIteration: #thrown on EOF
pass
except:
dbg("parse error: %s, %s @ %s" %
(sys.exc_info()[0], sys.exc_info()[1], self.parserline))
return self._adjustvisibility()
def _sanitize(str):
val = ''
level = 0
for c in str:
if c in ('(','{','['):
level += 1
elif c in (']','}',')'):
level -= 1
elif level == 0:
val += c
return val
sys.path.extend(['.','..'])
PYTHONEOF
endfunction
call s:DefPython()
" vim: set et ts=4:

@ -0,0 +1,805 @@
" Vim completion script
" Language: Ruby
" Maintainer: Mark Guzman <segfault@hasno.info>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Maintainer Version: 0.8.1
" ----------------------------------------------------------------------------
"
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
" ----------------------------------------------------------------------------
" {{{ requirement checks
function! s:ErrMsg(msg)
echohl ErrorMsg
echo a:msg
echohl None
endfunction
if !has('ruby')
call s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
call s:ErrMsg( "Error: falling back to syntax completion" )
" lets fall back to syntax completion
setlocal omnifunc=syntaxcomplete#Complete
finish
endif
if version < 700
call s:ErrMsg( "Error: Required vim >= 7.0" )
finish
endif
" }}} requirement checks
" {{{ configuration failsafe initialization
if !exists("g:rubycomplete_rails")
let g:rubycomplete_rails = 0
endif
if !exists("g:rubycomplete_classes_in_global")
let g:rubycomplete_classes_in_global = 0
endif
if !exists("g:rubycomplete_buffer_loading")
let g:rubycomplete_buffer_loading = 0
endif
if !exists("g:rubycomplete_include_object")
let g:rubycomplete_include_object = 0
endif
if !exists("g:rubycomplete_include_objectspace")
let g:rubycomplete_include_objectspace = 0
endif
" }}} configuration failsafe initialization
" {{{ vim-side support functions
let s:rubycomplete_debug = 0
function! s:dprint(msg)
if s:rubycomplete_debug == 1
echom a:msg
endif
endfunction
function! s:GetBufferRubyModule(name, ...)
if a:0 == 1
let [snum,enum] = s:GetBufferRubyEntity(a:name, "module", a:1)
else
let [snum,enum] = s:GetBufferRubyEntity(a:name, "module")
endif
return snum . '..' . enum
endfunction
function! s:GetBufferRubyClass(name, ...)
if a:0 >= 1
let [snum,enum] = s:GetBufferRubyEntity(a:name, "class", a:1)
else
let [snum,enum] = s:GetBufferRubyEntity(a:name, "class")
endif
return snum . '..' . enum
endfunction
function! s:GetBufferRubySingletonMethods(name)
endfunction
function! s:GetBufferRubyEntity( name, type, ... )
let lastpos = getpos(".")
let lastline = lastpos
if (a:0 >= 1)
let lastline = [ 0, a:1, 0, 0 ]
call cursor( a:1, 0 )
endif
let stopline = 1
let crex = '^\s*\<' . a:type . '\>\s*\<' . a:name . '\>\s*\(<\s*.*\s*\)\?'
let [lnum,lcol] = searchpos( crex, 'w' )
"let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' )
if lnum == 0 && lcol == 0
call cursor(lastpos[1], lastpos[2])
return [0,0]
endif
let curpos = getpos(".")
let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'wr' )
call cursor(lastpos[1], lastpos[2])
if lnum > enum
return [0,0]
endif
" we found a the class def
return [lnum,enum]
endfunction
function! s:IsInClassDef()
return s:IsPosInClassDef( line('.') )
endfunction
function! s:IsPosInClassDef(pos)
let [snum,enum] = s:GetBufferRubyEntity( '.*', "class" )
let ret = 'nil'
if snum < a:pos && a:pos < enum
let ret = snum . '..' . enum
endif
return ret
endfunction
function! s:GetRubyVarType(v)
let stopline = 1
let vtp = ''
let pos = getpos('.')
let sstr = '^\s*#\s*@var\s*'.escape(a:v, '*').'\>\s\+[^ \t]\+\s*$'
let [lnum,lcol] = searchpos(sstr,'nb',stopline)
if lnum != 0 && lcol != 0
call setpos('.',pos)
let str = getline(lnum)
let vtp = substitute(str,sstr,'\1','')
return vtp
endif
call setpos('.',pos)
let ctors = '\(now\|new\|open\|get_instance'
if exists('g:rubycomplete_rails') && g:rubycomplete_rails == 1 && s:rubycomplete_rails_loaded == 1
let ctors = ctors.'\|find\|create'
else
endif
let ctors = ctors.'\)'
let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)'
let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr
let [lnum,lcol] = searchpos(sstr,'nb',stopline)
if lnum != 0 && lcol != 0
let str = matchstr(getline(lnum),fstr,lcol)
let str = substitute(str,'^=\s*','','')
call setpos('.',pos)
if str == '"' || str == '''' || stridx(tolower(str), '%q[') != -1
return 'String'
elseif str == '[' || stridx(str, '%w[') != -1
return 'Array'
elseif str == '{'
return 'Hash'
elseif str == '/' || str == '%r{'
return 'Regexp'
elseif strlen(str) >= 4 && stridx(str,'..') != -1
return 'Range'
elseif stridx(str, 'lambda') != -1 || str == '&'
return 'Proc'
elseif strlen(str) > 4
let l = stridx(str,'.')
return str[0:l-1]
end
return ''
endif
call setpos('.',pos)
return ''
endfunction
"}}} vim-side support functions
"{{{ vim-side completion function
function! rubycomplete#Init()
execute "ruby VimRubyCompletion.preload_rails"
endfunction
function! rubycomplete#Complete(findstart, base)
"findstart = 1 when we need to get the text length
if a:findstart
let line = getline('.')
let idx = col('.')
while idx > 0
let idx -= 1
let c = line[idx-1]
if c =~ '\w'
continue
elseif ! c =~ '\.'
idx = -1
break
else
break
endif
endwhile
return idx
"findstart = 0 when we need to return the list of completions
else
let g:rubycomplete_completions = []
execute "ruby VimRubyCompletion.get_completions('" . a:base . "')"
return g:rubycomplete_completions
endif
endfunction
"}}} vim-side completion function
"{{{ ruby-side code
function! s:DefRuby()
ruby << RUBYEOF
# {{{ ruby completion
begin
require 'rubygems' # let's assume this is safe...?
rescue Exception
#ignore?
end
class VimRubyCompletion
# {{{ constants
@@debug = false
@@ReservedWords = [
"BEGIN", "END",
"alias", "and",
"begin", "break",
"case", "class",
"def", "defined", "do",
"else", "elsif", "end", "ensure",
"false", "for",
"if", "in",
"module",
"next", "nil", "not",
"or",
"redo", "rescue", "retry", "return",
"self", "super",
"then", "true",
"undef", "unless", "until",
"when", "while",
"yield",
]
@@Operators = [ "%", "&", "*", "**", "+", "-", "/",
"<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>",
"[]", "[]=", "^", ]
# }}} constants
# {{{ buffer analysis magic
def load_requires
buf = VIM::Buffer.current
enum = buf.line_number
nums = Range.new( 1, enum )
nums.each do |x|
ln = buf[x]
begin
eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln )
rescue Exception
#ignore?
end
end
end
def load_buffer_class(name)
dprint "load_buffer_class(%s) START" % name
classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")')
return if classdef == nil
pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef )
load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed
mixre = /.*\n\s*(include|prepend)\s*(.*)\s*\n/.match( classdef )
load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed
begin
eval classdef
rescue Exception
VIM::evaluate( "s:ErrMsg( 'Problem loading class \"%s\", was it already completed?' )" % name )
end
dprint "load_buffer_class(%s) END" % name
end
def load_buffer_module(name)
dprint "load_buffer_module(%s) START" % name
classdef = get_buffer_entity(name, 's:GetBufferRubyModule("%s")')
return if classdef == nil
begin
eval classdef
rescue Exception
VIM::evaluate( "s:ErrMsg( 'Problem loading module \"%s\", was it already completed?' )" % name )
end
dprint "load_buffer_module(%s) END" % name
end
def get_buffer_entity(name, vimfun)
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
return nil if loading_allowed.to_i.zero?
return nil if /(\"|\')+/.match( name )
buf = VIM::Buffer.current
nums = eval( VIM::evaluate( vimfun % name ) )
return nil if nums == nil
return nil if nums.min == nums.max && nums.min == 0
dprint "get_buffer_entity START"
visited = []
clscnt = 0
bufname = VIM::Buffer.current.name
classdef = ""
cur_line = VIM::Buffer.current.line_number
while (nums != nil && !(nums.min == 0 && nums.max == 0) )
dprint "visited: %s" % visited.to_s
break if visited.index( nums )
visited << nums
nums.each do |x|
if x != cur_line
next if x == 0
ln = buf[x]
if /^\s*(module|class|def|include)\s+/.match(ln)
clscnt += 1 if $1 == "class"
#dprint "\$1$1
classdef += "%s\n" % ln
classdef += "end\n" if /def\s+/.match(ln)
dprint ln
end
end
end
nm = "%s(::.*)*\", %s, \"" % [ name, nums.last ]
nums = eval( VIM::evaluate( vimfun % nm ) )
dprint "nm: \"%s\"" % nm
dprint "vimfun: %s" % (vimfun % nm)
dprint "got nums: %s" % nums.to_s
end
if classdef.length > 1
classdef += "end\n"*clscnt
# classdef = "class %s\n%s\nend\n" % [ bufname.gsub( /\/|\\/, "_" ), classdef ]
end
dprint "get_buffer_entity END"
dprint "classdef====start"
lns = classdef.split( "\n" )
lns.each { |x| dprint x }
dprint "classdef====end"
return classdef
end
def get_var_type( receiver )
if /(\"|\')+/.match( receiver )
"String"
else
VIM::evaluate("s:GetRubyVarType('%s')" % receiver)
end
end
def dprint( txt )
print txt if @@debug
end
def escape_vim_singlequote_string(str)
str.to_s.gsub(/'/,"\\'")
end
def get_buffer_entity_list( type )
# this will be a little expensive.
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global")
return [] if allow_aggressive_load.to_i.zero? || loading_allowed.to_i.zero?
buf = VIM::Buffer.current
eob = buf.length
ret = []
rg = 1..eob
re = eval( "/^\s*%s\s*([A-Za-z0-9_:-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*/" % type )
rg.each do |x|
if re.match( buf[x] )
next if type == "def" && eval( VIM::evaluate("s:IsPosInClassDef(%s)" % x) ) != nil
ret.push $1
end
end
return ret
end
def get_buffer_modules
return get_buffer_entity_list( "modules" )
end
def get_buffer_methods
return get_buffer_entity_list( "def" )
end
def get_buffer_classes
return get_buffer_entity_list( "class" )
end
def load_rails
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
return if allow_rails.to_i.zero?
buf_path = VIM::evaluate('expand("%:p")')
file_name = VIM::evaluate('expand("%:t")')
vim_dir = VIM::evaluate('getcwd()')
file_dir = buf_path.gsub( file_name, '' )
file_dir.gsub!( /\\/, "/" )
vim_dir.gsub!( /\\/, "/" )
vim_dir << "/"
dirs = [ vim_dir, file_dir ]
sdirs = [ "", "./", "../", "../../", "../../../", "../../../../" ]
rails_base = nil
dirs.each do |dir|
sdirs.each do |sub|
trail = "%s%s" % [ dir, sub ]
tcfg = "%sconfig" % trail
if File.exists?( tcfg )
rails_base = trail
break
end
end
break if rails_base
end
return if rails_base == nil
$:.push rails_base unless $:.index( rails_base )
rails_config = rails_base + "config/"
rails_lib = rails_base + "lib/"
$:.push rails_config unless $:.index( rails_config )
$:.push rails_lib unless $:.index( rails_lib )
bootfile = rails_config + "boot.rb"
envfile = rails_config + "environment.rb"
if File.exists?( bootfile ) && File.exists?( envfile )
begin
require bootfile
require envfile
begin
require 'console_app'
require 'console_with_helpers'
rescue Exception
dprint "Rails 1.1+ Error %s" % $!
# assume 1.0
end
#eval( "Rails::Initializer.run" ) #not necessary?
VIM::command('let s:rubycomplete_rails_loaded = 1')
dprint "rails loaded"
rescue Exception
dprint "Rails Error %s" % $!
VIM::evaluate( "s:ErrMsg('Error loading rails environment')" )
end
end
end
def get_rails_helpers
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
buf_path = VIM::evaluate('expand("%:p")')
buf_path.gsub!( /\\/, "/" )
path_elm = buf_path.split( "/" )
dprint "buf_path: %s" % buf_path
types = [ "app", "db", "lib", "test", "components", "script" ]
i = nil
ret = []
type = nil
types.each do |t|
i = path_elm.index( t )
break if i
end
type = path_elm[i]
type.downcase!
dprint "type: %s" % type
case type
when "app"
i += 1
subtype = path_elm[i]
subtype.downcase!
dprint "subtype: %s" % subtype
case subtype
when "views"
ret += ActionView::Base.instance_methods
ret += ActionView::Base.methods
when "controllers"
ret += ActionController::Base.instance_methods
ret += ActionController::Base.methods
when "models"
ret += ActiveRecord::Base.instance_methods
ret += ActiveRecord::Base.methods
end
when "db"
ret += ActiveRecord::ConnectionAdapters::SchemaStatements.instance_methods
ret += ActiveRecord::ConnectionAdapters::SchemaStatements.methods
end
return ret
end
def add_rails_columns( cls )
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
begin
eval( "#{cls}.establish_connection" )
return [] unless eval( "#{cls}.ancestors.include?(ActiveRecord::Base).to_s" )
col = eval( "#{cls}.column_names" )
return col if col
rescue
dprint "add_rails_columns err: (cls: %s) %s" % [ cls, $! ]
return []
end
return []
end
def clean_sel(sel, msg)
ret = sel.reject{|x|x.nil?}.uniq
ret = ret.grep(/^#{Regexp.quote(msg)}/) if msg != nil
ret
end
def get_rails_view_methods
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
buf_path = VIM::evaluate('expand("%:p")')
buf_path.gsub!( /\\/, "/" )
pelm = buf_path.split( "/" )
idx = pelm.index( "views" )
return [] unless idx
idx += 1
clspl = pelm[idx].camelize.pluralize
cls = clspl.singularize
ret = []
begin
ret += eval( "#{cls}.instance_methods" )
ret += eval( "#{clspl}Helper.instance_methods" )
rescue Exception
dprint "Error: Unable to load rails view helpers for %s: %s" % [ cls, $! ]
end
return ret
end
# }}} buffer analysis magic
# {{{ main completion code
def self.preload_rails
a = VimRubyCompletion.new
require 'Thread'
Thread.new(a) do |b|
begin
b.load_rails
rescue
end
end
a.load_rails
rescue
end
def self.get_completions(base)
b = VimRubyCompletion.new
b.get_completions base
end
def get_completions(base)
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
if loading_allowed.to_i == 1
load_requires
load_rails
end
input = VIM::Buffer.current.line
cpos = VIM::Window.current.cursor[1] - 1
input = input[0..cpos]
input += base
input.sub!(/.*[ \t\n\"\\'`><=;|&{(]/, '') # Readline.basic_word_break_characters
input.sub!(/self\./, '')
input.sub!(/.*((\.\.[\[(]?)|([\[(]))/, '')
dprint 'input %s' % input
message = nil
receiver = nil
methods = []
variables = []
classes = []
constants = []
case input
when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp
receiver = $1
message = Regexp.quote($2)
methods = Regexp.instance_methods(true)
when /^([^\]]*\])\.([^.]*)$/ # Array
receiver = $1
message = Regexp.quote($2)
methods = Array.instance_methods(true)
when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash
receiver = $1
message = Regexp.quote($2)
methods = Proc.instance_methods(true) | Hash.instance_methods(true)
when /^(:[^:.]*)$/ # Symbol
dprint "symbol"
if Symbol.respond_to?(:all_symbols)
receiver = $1
message = $1.sub( /:/, '' )
methods = Symbol.all_symbols.collect{|s| s.id2name}
methods.delete_if { |c| c.match( /'/ ) }
end
when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods
dprint "const or cls"
receiver = $1
methods = Object.constants
methods.grep(/^#{receiver}/).collect{|e| "::" + e}
when /^(((::)?[A-Z][^:.\(]*)+?)::?([^:.]*)$/ # Constant or class methods
receiver = $1
message = Regexp.quote($4)
dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ]
load_buffer_class( receiver )
begin
classes = eval("#{receiver}.constants")
#methods = eval("#{receiver}.methods")
rescue Exception
dprint "exception: %s" % $!
methods = []
end
methods.grep(/^#{message}/).collect{|e| receiver + "::" + e}
when /^(:[^:.]+)\.([^.]*)$/ # Symbol
dprint "symbol"
receiver = $1
message = Regexp.quote($2)
methods = Symbol.instance_methods(true)
when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ # Numeric
dprint "numeric"
receiver = $1
message = Regexp.quote($4)
begin
methods = eval(receiver).methods
rescue Exception
methods = []
end
when /^(\$[^.]*)$/ #global
dprint "global"
methods = global_variables.grep(Regexp.new(Regexp.quote($1)))
when /^((\.?[^.]+)+?)\.([^.]*)$/ # variable
dprint "variable"
receiver = $1
message = Regexp.quote($3)
load_buffer_class( receiver )
cv = eval("self.class.constants")
vartype = get_var_type( receiver )
dprint "vartype: %s" % vartype
if vartype != ''
load_buffer_class( vartype )
begin
methods = eval("#{vartype}.instance_methods")
variables = eval("#{vartype}.instance_variables")
rescue Exception
dprint "load_buffer_class err: %s" % $!
end
elsif (cv).include?(receiver)
# foo.func and foo is local var.
methods = eval("#{receiver}.methods")
vartype = receiver
elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver
vartype = receiver
# Foo::Bar.func
begin
methods = eval("#{receiver}.methods")
rescue Exception
end
else
# func1.func2
ObjectSpace.each_object(Module){|m|
next if m.name != "IRB::Context" and
/^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name
methods.concat m.instance_methods(false)
}
end
variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0
when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/
message = $1
methods = Range.instance_methods(true)
when /^\.([^.]*)$/ # unknown(maybe String)
message = Regexp.quote($1)
methods = String.instance_methods(true)
else
dprint "default/other"
inclass = eval( VIM::evaluate("s:IsInClassDef()") )
if inclass != nil
dprint "inclass"
classdef = "%s\n" % VIM::Buffer.current[ inclass.min ]
found = /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*\n$/.match( classdef )
if found != nil
receiver = $1
message = input
load_buffer_class( receiver )
begin
methods = eval( "#{receiver}.instance_methods" )
variables += add_rails_columns( "#{receiver}" )
rescue Exception
found = nil
end
end
end
if inclass == nil || found == nil
dprint "inclass == nil"
methods = get_buffer_methods
methods += get_rails_view_methods
cls_const = Class.constants
constants = cls_const.select { |c| /^[A-Z_-]+$/.match( c ) }
classes = eval("self.class.constants") - constants
classes += get_buffer_classes
classes += get_buffer_modules
include_objectspace = VIM::evaluate("exists('g:rubycomplete_include_objectspace') && g:rubycomplete_include_objectspace")
ObjectSpace.each_object(Class) { |cls| classes << cls.to_s } if include_objectspace == "1"
message = receiver = input
end
methods += get_rails_helpers
methods += Kernel.public_methods
end
include_object = VIM::evaluate("exists('g:rubycomplete_include_object') && g:rubycomplete_include_object")
methods = clean_sel( methods, message )
methods = (methods-Object.instance_methods) if include_object == "0"
rbcmeth = (VimRubyCompletion.instance_methods-Object.instance_methods) # lets remove those rubycomplete methods
methods = (methods-rbcmeth)
variables = clean_sel( variables, message )
classes = clean_sel( classes, message ) - ["VimRubyCompletion"]
constants = clean_sel( constants, message )
valid = []
valid += methods.collect { |m| { :name => m.to_s, :type => 'm' } }
valid += variables.collect { |v| { :name => v.to_s, :type => 'v' } }
valid += classes.collect { |c| { :name => c.to_s, :type => 't' } }
valid += constants.collect { |d| { :name => d.to_s, :type => 'd' } }
valid.sort! { |x,y| x[:name] <=> y[:name] }
outp = ""
rg = 0..valid.length
rg.step(150) do |x|
stpos = 0+x
enpos = 150+x
valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ].map{|x|escape_vim_singlequote_string(x)} }
outp.sub!(/,$/, '')
VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp)
outp = ""
end
end
# }}} main completion code
end # VimRubyCompletion
# }}} ruby completion
RUBYEOF
endfunction
let s:rubycomplete_rails_loaded = 0
call s:DefRuby()
"}}} ruby-side code
" vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl:

@ -0,0 +1,209 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Jan 08
if !exists('g:spellfile_URL')
" Prefer using http:// when netrw should be able to use it, since
" more firewalls let this through.
if executable("curl") || executable("wget") || executable("fetch")
let g:spellfile_URL = 'http://ftp.vim.org/pub/vim/runtime/spell'
else
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
endif
endif
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
" This function is used for the spellfile plugin.
function! spellfile#LoadFile(lang)
" If the netrw plugin isn't loaded we silently skip everything.
if !exists(":Nread")
if &verbose
echomsg 'spellfile#LoadFile(): Nread command is not available.'
endif
return
endif
" If the URL changes we try all files again.
if s:spellfile_URL != g:spellfile_URL
let s:donedict = {}
let s:spellfile_URL = g:spellfile_URL
endif
" I will say this only once!
if has_key(s:donedict, a:lang . &enc)
if &verbose
echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
endif
return
endif
let s:donedict[a:lang . &enc] = 1
" Find spell directories we can write in.
let [dirlist, dirchoices] = spellfile#GetDirChoices()
if len(dirlist) == 0
let dir_to_create = spellfile#WritableSpellDir()
if &verbose || dir_to_create != ''
echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
endif
if dir_to_create != ''
if confirm("Shall I create " . dir_to_create, "&Yes\n&No", 2) == 1
" After creating the directory it should show up in the list.
call mkdir(dir_to_create, "p")
let [dirlist, dirchoices] = spellfile#GetDirChoices()
endif
endif
if len(dirlist) == 0
return
endif
endif
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
let msg .= "\nDo you want me to try downloading it?"
if confirm(msg, "&Yes\n&No", 2) == 1
let enc = &encoding
if enc == 'iso-8859-15'
let enc = 'latin1'
endif
let fname = a:lang . '.' . enc . '.spl'
" Split the window, read the file into a new buffer.
" Remember the buffer number, we check it below.
new
let newbufnr = winbufnr(0)
setlocal bin fenc=
echo 'Downloading ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
" Didn't work, perhaps there is an ASCII one.
" Careful: Nread() may have opened a new window for the error message,
" we need to go back to our own buffer and window.
if newbufnr != winbufnr(0)
let winnr = bufwinnr(newbufnr)
if winnr == -1
" Our buffer has vanished!? Open a new window.
echomsg "download buffer disappeared, opening a new one"
new
setlocal bin fenc=
else
exe winnr . "wincmd w"
endif
endif
if newbufnr == winbufnr(0)
" We are back the old buffer, remove any (half-finished) download.
g/^/d
else
let newbufnr = winbufnr(0)
endif
let fname = a:lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
echo 'Sorry, downloading failed'
exe newbufnr . "bwipe!"
return
endif
endif
" Delete the empty first line and mark the file unmodified.
1d
set nomod
let msg = "In which directory do you want to write the file:"
for i in range(len(dirlist))
let msg .= "\n" . (i + 1) . '. ' . dirlist[i]
endfor
let dirchoice = confirm(msg, dirchoices) - 2
if dirchoice >= 0
if exists('*fnameescape')
let dirname = fnameescape(dirlist[dirchoice])
else
let dirname = escape(dirlist[dirchoice], ' ')
endif
setlocal fenc=
exe "write " . dirname . '/' . fname
" Also download the .sug file, if the user wants to.
let msg = "Do you want me to try getting the .sug file?\n"
let msg .= "This will improve making suggestions for spelling mistakes,\n"
let msg .= "but it uses quite a bit of memory."
if confirm(msg, "&No\n&Yes") == 2
g/^/d
let fname = substitute(fname, '\.spl$', '.sug', '')
echo 'Downloading ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) =~ 'VIMsug'
1d
exe "write " . dirname . '/' . fname
set nomod
else
echo 'Sorry, downloading failed'
" Go back to our own buffer/window, Nread() may have taken us to
" another window.
if newbufnr != winbufnr(0)
let winnr = bufwinnr(newbufnr)
if winnr != -1
exe winnr . "wincmd w"
endif
endif
if newbufnr == winbufnr(0)
set nomod
endif
endif
endif
endif
" Wipe out the buffer we used.
exe newbufnr . "bwipe"
endif
endfunc
" Read "fname" from the server.
function! spellfile#Nread(fname)
" We do our own error handling, don't want a window for it.
if exists("g:netrw_use_errorwindow")
let save_ew = g:netrw_use_errorwindow
endif
let g:netrw_use_errorwindow=0
if g:spellfile_URL =~ '^ftp://'
" for an ftp server use a default login and password to avoid a prompt
let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
else
exe 'Nread ' g:spellfile_URL . '/' . a:fname
endif
if exists("save_ew")
let g:netrw_use_errorwindow = save_ew
else
unlet g:netrw_use_errorwindow
endif
endfunc
" Get a list of writable spell directories and choices for confirm().
function! spellfile#GetDirChoices()
let dirlist = []
let dirchoices = '&Cancel'
for dir in split(globpath(&rtp, 'spell'), "\n")
if filewritable(dir) == 2
call add(dirlist, dir)
let dirchoices .= "\n&" . len(dirlist)
endif
endfor
return [dirlist, dirchoices]
endfunc
function! spellfile#WritableSpellDir()
if has("unix")
" For Unix always use the $HOME/.vim directory
return $HOME . "/.vim/spell"
endif
for dir in split(&rtp, ',')
if filewritable(dir) == 2
return dir . "/spell"
endif
endfor
return ''
endfunction

@ -0,0 +1,967 @@
" Vim OMNI completion script for SQL
" Language: SQL
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 15.0
" Last Change: 2013 May 13
" Homepage: http://www.vim.org/scripts/script.php?script_id=1572
" Usage: For detailed help
" ":help sql.txt"
" or ":help ft-sql-omni"
" or read $VIMRUNTIME/doc/sql.txt
" History
"
" TODO
" - Jonas Enberg - if no table is found when using column completion
" look backwards to a FROM clause and find the first table
" and complete it.
"
" Version 15.0 (May 2013)
" - NF: Changed the SQL precached syntax items, omni_sql_precache_syntax_groups,
" to use regular expressions to pick up extended syntax group names.
" This requires an updated SyntaxComplete plugin version 13.0.
" If the required versions have not been installed, previous
" behaviour will not be impacted.
"
" Version 14.0 (Dec 2012)
" - BF: Added check for cpo
"
" Version 13.0 (Dec 2012)
" - NF: When completing column lists or drilling into a table
" and g:omni_sql_include_owner is enabled, the
" only the table name would be replaced with the column
" list instead of the table name and owner (if specified).
" - NF: When completing column lists using table aliases
" and g:omni_sql_include_owner is enabled, account
" for the owner name when looking up the table
" list instead of the table name and owner (if specified).
" - BF: When completing column lists or drilling into a table
" and g:omni_sql_include_owner is enabled, the
" column list could often not be found for the table.
" - BF: When OMNI popped up, possibly the wrong word
" would be replaced for column and column list options.
"
" Version 12.0 (Feb 2012)
" - Partial column name completion did not work when a table
" name or table alias was provided (Jonas Enberg).
" - Improved the handling of column completion. First we match any
" columns from a previous completion. If not matches are found, we
" consider the partial name to be a table or table alias for the
" query and attempt to match on it.
"
" Version 11.0 (Jan 2012)
" Added g:omni_sql_default_compl_type variable
" - You can specify which type of completion to default to
" when pressing <C-X><C-O>. The entire list of available
" choices can be found in the calls to sqlcomplete#Map in:
" ftplugin/sql.vim
"
" Version 10.0
" Updated PreCacheSyntax()
" - Now returns a List of the syntax items it finds.
" This allows other plugins / scripts to use this list for their own
" purposes. In this case XPTemplate can use them for a Choose list.
" - Verifies the parameters are the correct type and displays a
" warning if not.
" - Verifies the parameters are the correct type and displays a
" warning if not.
" Updated SQLCWarningMsg()
" - Prepends warning message with SQLComplete so you know who issued
" the warning.
" Updated SQLCErrorMsg()
" - Prepends error message with SQLComplete so you know who issued
" the error.
"
" Version 9.0 (May 2010)
" This change removes some of the support for tables with spaces in their
" names in order to simplify the regexes used to pull out query table
" aliases for more robust table name and column name code completion.
" Full support for "table names with spaces" can be added in again
" after 7.3.
"
" Version 8.0
" Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left
" when drilling in and out of a column list for a table.
"
" Version 7.0 (Jan 2010)
" Better handling of object names
"
" Version 6.0 (Apr 2008)
" Supports object names with spaces "my table name"
"
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
" sourced directly instead of using the autoload feature.
if exists('&omnifunc')
" Do not set the option if already set since this
" results in an E117 warning.
if &omnifunc == ""
setlocal omnifunc=sqlcomplete#Complete
endif
endif
if exists('g:loaded_sql_completion')
finish
endif
let g:loaded_sql_completion = 150
let s:keepcpo= &cpo
set cpo&vim
" Maintains filename of dictionary
let s:sql_file_table = ""
let s:sql_file_procedure = ""
let s:sql_file_view = ""
" Define various arrays to be used for caching
let s:tbl_name = []
let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
" Used in conjunction with the syntaxcomplete plugin
let s:save_inc = ""
let s:save_exc = ""
if !exists('g:omni_syntax_group_include_sql')
let g:omni_syntax_group_include_sql = ''
endif
if !exists('g:omni_syntax_group_exclude_sql')
let g:omni_syntax_group_exclude_sql = ''
endif
let s:save_inc = g:omni_syntax_group_include_sql
let s:save_exc = g:omni_syntax_group_exclude_sql
" Used with the column list
let s:save_prev_table = ""
" Default the option to verify table alias
if !exists('g:omni_sql_use_tbl_alias')
let g:omni_sql_use_tbl_alias = 'a'
endif
" Default syntax items to precache
if !exists('g:omni_sql_precache_syntax_groups')
let g:omni_sql_precache_syntax_groups = [
\ 'syntax\w*',
\ 'sqlKeyword\w*',
\ 'sqlFunction\w*',
\ 'sqlOption\w*',
\ 'sqlType\w*',
\ 'sqlStatement\w*'
\ ]
endif
" Set ignorecase to the ftplugin standard
if !exists('g:omni_sql_ignorecase')
let g:omni_sql_ignorecase = &ignorecase
endif
" During table completion, should the table list also
" include the owner name
if !exists('g:omni_sql_include_owner')
let g:omni_sql_include_owner = 0
if exists('g:loaded_dbext')
if g:loaded_dbext >= 300
" New to dbext 3.00, by default the table lists include the owner
" name of the table. This is used when determining how much of
" whatever has been typed should be replaced as part of the
" code replacement.
let g:omni_sql_include_owner = 1
endif
endif
endif
" Default type of completion used when <C-X><C-O> is pressed
if !exists('g:omni_sql_default_compl_type')
let g:omni_sql_default_compl_type = 'table'
endif
" This function is used for the 'omnifunc' option.
" It is called twice by omni and it is responsible
" for returning the completion list of items.
" But it must also determine context of what to complete
" and what to "replace" with the completion.
" The a:base, is replaced directly with what the user
" chooses from the choices.
" The s:prepend provides context for the completion.
function! sqlcomplete#Complete(findstart, base)
" Default to table name completion
let compl_type = 'table'
" Allow maps to specify what type of object completion they want
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
endif
let begindot = 0
" First pass through this function determines how much of the line should
" be replaced by whatever is chosen from the completion list
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
" Check if the first character is a ".", for column completion
if line[start - 1] == '.'
let begindot = 1
endif
while start > 0
" Additional code was required to handle objects which
" can contain spaces like "my table name".
if line[start - 1] !~ '\(\w\|\.\)'
" If the previous character is not a period or word character
break
" elseif line[start - 1] =~ '\(\w\|\s\+\)'
" let start -= 1
elseif line[start - 1] =~ '\w'
" If the previous character is word character continue back
let start -= 1
elseif line[start - 1] =~ '\.' &&
\ compl_type =~ 'column\|table\|view\|procedure'
" If the previous character is a period and we are completing
" an object which can be specified with a period like this:
" table_name.column_name
" owner_name.table_name
" If lastword has already been set for column completion
" break from the loop, since we do not also want to pickup
" a table name if it was also supplied.
" Unless g:omni_sql_include_owner == 1, then we can
" include the ownername.
if lastword != -1 && compl_type == 'column'
\ && g:omni_sql_include_owner == 0
break
endif
" If column completion was specified stop at the "." if
" a . was specified, otherwise, replace all the way up
" to the owner name (if included).
if lastword == -1 && compl_type == 'column' && begindot == 1
let lastword = start
endif
" If omni_sql_include_owner = 0, do not include the table
" name as part of the substitution, so break here
if lastword == -1 &&
\ compl_type =~ '\<\(table\|view\|procedure\|column\|column_csv\)\>' &&
\ g:omni_sql_include_owner == 0
let lastword = start
break
endif
let start -= 1
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, lastword - start)
return lastword
endif
" Second pass through this function will determine what data to put inside
" of the completion list
" s:prepended is set by the first pass
let base = s:prepended . a:base
" Default the completion list to an empty list
let compl_list = []
" Default to table name completion
let compl_type = g:omni_sql_default_compl_type
" Allow maps to specify what type of object completion they want
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
unlet b:sql_compl_type
endif
if compl_type == 'tableReset'
let compl_type = 'table'
let base = ''
endif
if compl_type == 'table' ||
\ compl_type == 'procedure' ||
\ compl_type == 'view'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
" Allow the user to override the dbext plugin to specify whether
" the owner/creator should be included in the list
if g:loaded_dbext >= 300
let saveSetting = DB_listOption('dict_show_owner')
exec 'DBSetOption dict_show_owner='.(g:omni_sql_include_owner==1?'1':'0')
endif
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
" Same call below, no need to do it twice
" if s:sql_file_{compl_type} == ""
" let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
" endif
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
if s:sql_file_{compl_type} != ""
if filereadable(s:sql_file_{compl_type})
let compl_list = readfile(s:sql_file_{compl_type})
endif
endif
if g:loaded_dbext > 300
exec 'DBSetOption dict_show_owner='.saveSetting
endif
elseif compl_type =~? 'column'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if base == ""
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let base = s:save_prev_table
endif
let owner = ''
let column = ''
if base =~ '\.'
" Check if the owner/creator has been specified
let owner = matchstr( base, '^\zs.*\ze\..*\..*' )
let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' )
let column = matchstr( base, '.*\.\zs.*' )
if g:omni_sql_include_owner == 1 && owner == '' && table != '' && column != ''
let owner = table
let table = column
let column = ''
endif
" It is pretty well impossible to determine if the user
" has entered:
" owner.table
" table.column_prefix
" So there are a couple of things we can do to mitigate
" this issue.
" 1. Check if the dbext plugin has the option turned
" on to even allow owners
" 2. Based on 1, if the user is showing a table list
" and the DrillIntoTable (using <Right>) then
" this will be owner.table. In this case, we can
" check to see the table.column exists in the
" cached table list. If it does, then we have
" determined the user has actually chosen
" owner.table, not table.column_prefix.
let found = -1
if g:omni_sql_include_owner == 1 && owner == ''
if filereadable(s:sql_file_table)
let tbl_list = readfile(s:sql_file_table)
let found = index( tbl_list, ((table != '')?(table.'.'):'').column)
endif
endif
" If the table.column was found in the table list, we can safely assume
" the owner was not provided and shift the items appropriately.
" OR
" If the user has indicated not to use table owners at all and
" the base ends in a '.' we know they are not providing a column
" name, so we can shift the items appropriately.
" if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$')
" let owner = table
" let table = column
" let column = ''
" endif
else
" If no "." was provided and the user asked for
" column level completion, first attempt the match
" on any previous column lists. If the user asked
" for a list of columns comma separated, continue as usual.
if compl_type == 'column' && s:save_prev_table != ''
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let table = s:save_prev_table
let list_type = ''
let compl_list = s:SQLCGetColumns(table, list_type)
if ! empty(compl_list)
" If no column prefix has been provided and the table
" name was provided, append it to each of the items
" returned.
let compl_list = filter(deepcopy(compl_list), 'v:val=~"^'.base.'"' )
" If not empty, we have a match on columns
" return the list
if ! empty(compl_list)
return compl_list
endif
endif
endif
" Since no columns were found to match the base supplied
" assume the user is trying to complete the column list
" for a table (and or an alias to a table).
let table = base
endif
" Get anything after the . and consider this the table name
" If an owner has been specified, then we must consider the
" base to be a partial column name
" let base = matchstr( base, '^\(.*\.\)\?\zs.*' )
if table != ""
let s:save_prev_table = base
let list_type = ''
if compl_type == 'column_csv'
" Return one array element, with a comma separated
" list of values instead of multiple array entries
" for each column in the table.
let list_type = 'csv'
endif
" If we are including the OWNER for the objects, then for
" table completion, if we have it, it should be included
" as there can be the same table names in a database yet
" with different owner names.
if g:omni_sql_include_owner == 1 && owner != '' && table != ''
let compl_list = s:SQLCGetColumns(owner.'.'.table, list_type)
else
let compl_list = s:SQLCGetColumns(table, list_type)
endif
if column != ''
" If no column prefix has been provided and the table
" name was provided, append it to each of the items
" returned.
let compl_list = map(compl_list, 'table.".".v:val')
if owner != ''
" If an owner has been provided append it to each of the
" items returned.
let compl_list = map(compl_list, 'owner.".".v:val')
endif
else
let base = ''
endif
if compl_type == 'column_csv'
" Join the column array into 1 single element array
" but make the columns column separated
let compl_list = [join(compl_list, ', ')]
endif
endif
elseif compl_type == 'resetCache'
" Reset all cached items
let s:tbl_name = []
let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
let s:sql_file_table = ""
let s:sql_file_procedure = ""
let s:sql_file_view = ""
let msg = "All SQL cached items have been removed."
call s:SQLCWarningMsg(msg)
" Leave time for the user to read the error message
:sleep 2
else
let compl_list = s:SQLCGetSyntaxList(compl_type)
endif
if base != ''
" Filter the list based on the first few characters the user entered.
" Check if the text matches at the beginning
" \\(^.base.'\\)
" or
" Match to a owner.table or alias.column type match
" ^\\(\\w\\+\\.\\)\\?'.base.'\\)
" or
" Handle names with spaces "my table name"
" "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"'
"
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\(\\.\\)\\?'.base.'\\)"'
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
let compl_list = filter(deepcopy(compl_list), expr)
if empty(compl_list) && compl_type == 'table' && base =~ '\.$'
" It is possible we could be looking for column name completion
" and the user simply hit C-X C-O to lets try it as well
" since we had no hits with the tables.
" If the base ends with a . it is hard to know if we are
" completing table names or column names.
let list_type = ''
let compl_list = s:SQLCGetColumns(base, list_type)
endif
endif
if exists('b:sql_compl_savefunc') && b:sql_compl_savefunc != ""
let &omnifunc = b:sql_compl_savefunc
endif
if empty(compl_list)
call s:SQLCWarningMsg( 'Could not find type['.compl_type.'] using prepend[.'.s:prepended.'] base['.a:base.']' )
endif
return compl_list
endfunc
function! sqlcomplete#PreCacheSyntax(...)
let syn_group_arr = []
let syn_items = []
if a:0 > 0
if type(a:1) != 3
call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']")
return ''
endif
let syn_group_arr = a:1
else
let syn_group_arr = g:omni_sql_precache_syntax_groups
endif
" For each group specified in the list, precache all
" the sytnax items.
if !empty(syn_group_arr)
for group_name in syn_group_arr
let syn_items = extend( syn_items, s:SQLCGetSyntaxList(group_name) )
endfor
endif
return syn_items
endfunction
function! sqlcomplete#ResetCacheSyntax(...)
let syn_group_arr = []
if a:0 > 0
if type(a:1) != 3
call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']")
return ''
endif
let syn_group_arr = a:1
else
let syn_group_arr = g:omni_sql_precache_syntax_groups
endif
" For each group specified in the list, precache all
" the sytnax items.
if !empty(syn_group_arr)
for group_name in syn_group_arr
let list_idx = index(s:syn_list, group_name, 0, &ignorecase)
if list_idx > -1
" Remove from list of groups
call remove( s:syn_list, list_idx )
" Remove from list of keywords
call remove( s:syn_value, list_idx )
endif
endfor
endif
endfunction
function! sqlcomplete#Map(type)
" Tell the SQL plugin what you want to complete
let b:sql_compl_type=a:type
" Record previous omnifunc, if the SQL completion
" is being used in conjunction with other filetype
" completion plugins
if &omnifunc != "" && &omnifunc != 'sqlcomplete#Complete'
" Record the previous omnifunc, the plugin
" will automatically set this back so that it
" does not interfere with other ftplugins settings
let b:sql_compl_savefunc=&omnifunc
endif
" Set the OMNI func for the SQL completion plugin
let &omnifunc='sqlcomplete#Complete'
endfunction
function! sqlcomplete#DrillIntoTable()
" If the omni popup window is visible
if pumvisible()
call sqlcomplete#Map('column')
" C-Y, makes the currently highlighted entry active
" and trigger the omni popup to be redisplayed
call feedkeys("\<C-Y>\<C-X>\<C-O>", 'n')
else
" If the popup is not visible, simple perform the normal
" key behaviour.
" Must use exec since they key must be preceeded by "\"
" or feedkeys will simply push each character of the string
" rather than the "key press".
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")'
endif
return ""
endfunction
function! sqlcomplete#DrillOutOfColumns()
" If the omni popup window is visible
if pumvisible()
call sqlcomplete#Map('tableReset')
" Trigger the omni popup to be redisplayed
call feedkeys("\<C-X>\<C-O>")
else
" If the popup is not visible, simple perform the normal
" key behaviour.
" Must use exec since they key must be preceeded by "\"
" or feedkeys will simply push each character of the string
" rather than the "key press".
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")'
endif
return ""
endfunction
function! s:SQLCWarningMsg(msg)
echohl WarningMsg
echomsg 'SQLComplete:'.a:msg
echohl None
endfunction
function! s:SQLCErrorMsg(msg)
echohl ErrorMsg
echomsg 'SQLComplete:'.a:msg
echohl None
endfunction
function! s:SQLCGetSyntaxList(syn_group)
let syn_group = a:syn_group
let compl_list = []
" Check if we have already cached the syntax list
let list_idx = index(s:syn_list, syn_group, 0, &ignorecase)
if list_idx > -1
" Return previously cached value
let compl_list = s:syn_value[list_idx]
else
let s:save_inc = g:omni_syntax_group_include_sql
let s:save_exc = g:omni_syntax_group_exclude_sql
let g:omni_syntax_group_include_sql = ''
let g:omni_syntax_group_exclude_sql = ''
" Request the syntax list items from the
" syntax completion plugin
if syn_group == 'syntax'
" Handle this special case. This allows the user
" to indicate they want all the syntax items available,
" so do not specify a specific include list.
let syn_value = syntaxcomplete#OmniSyntaxList()
else
" The user has specified a specific syntax group
let g:omni_syntax_group_include_sql = syn_group
let syn_value = syntaxcomplete#OmniSyntaxList(syn_group)
endif
let g:omni_syntax_group_include_sql = s:save_inc
let g:omni_syntax_group_exclude_sql = s:save_exc
" Cache these values for later use
let s:syn_list = add( s:syn_list, syn_group )
let s:syn_value = add( s:syn_value, syn_value )
let compl_list = syn_value
endif
return compl_list
endfunction
function! s:SQLCCheck4dbext()
if !exists('g:loaded_dbext')
let msg = "The dbext plugin must be loaded for dynamic SQL completion"
call s:SQLCErrorMsg(msg)
" Leave time for the user to read the error message
:sleep 2
return -1
elseif g:loaded_dbext < 600
let msg = "The dbext plugin must be at least version 5.30 " .
\ " for dynamic SQL completion"
call s:SQLCErrorMsg(msg)
" Leave time for the user to read the error message
:sleep 2
return -1
endif
return 1
endfunction
function! s:SQLCAddAlias(table_name, table_alias, cols)
" Strip off the owner if included
let table_name = matchstr(a:table_name, '\%(.\{-}\.\)\?\zs\(.*\)' )
let table_alias = a:table_alias
let cols = a:cols
if g:omni_sql_use_tbl_alias != 'n'
if table_alias == ''
if 'da' =~? g:omni_sql_use_tbl_alias
if table_name =~ '_'
" Treat _ as separators since people often use these
" for word separators
let save_keyword = &iskeyword
setlocal iskeyword-=_
" Get the first letter of each word
" [[:alpha:]] is used instead of \w
" to catch extended accented characters
"
let table_alias = substitute(
\ table_name,
\ '\<[[:alpha:]]\+\>_\?',
\ '\=strpart(submatch(0), 0, 1)',
\ 'g'
\ )
" Restore original value
let &iskeyword = save_keyword
elseif table_name =~ '\u\U'
let table_alias = substitute(
\ table_name, '\(\u\)\U*', '\1', 'g')
else
let table_alias = strpart(table_name, 0, 1)
endif
endif
endif
if table_alias != ''
" Following a word character, make sure there is a . and no spaces
let table_alias = substitute(table_alias, '\w\zs\.\?\s*$', '.', '')
if 'a' =~? g:omni_sql_use_tbl_alias && a:table_alias == ''
let table_alias = inputdialog("Enter table alias:", table_alias)
endif
endif
if table_alias != ''
let cols = substitute(cols, '\<\w', table_alias.'&', 'g')
endif
endif
return cols
endfunction
function! s:SQLCGetObjectOwner(object)
" The owner regex matches a word at the start of the string which is
" followed by a dot, but doesn't include the dot in the result.
" ^ - from beginning of line
" \("\|\[\)\? - ignore any quotes
" \zs - start the match now
" .\{-} - get owner name
" \ze - end the match
" \("\|\[\)\? - ignore any quotes
" \. - must by followed by a .
" let owner = matchstr( a:object, '^\s*\zs.*\ze\.' )
let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' )
return owner
endfunction
function! s:SQLCGetColumns(table_name, list_type)
if a:table_name =~ '\.'
" Check if the owner/creator has been specified
let owner = matchstr( a:table_name, '^\zs.*\ze\..*\..*' )
let table = matchstr( a:table_name, '^\(.*\.\)\?\zs.*\ze\..*' )
let column = matchstr( a:table_name, '.*\.\zs.*' )
if g:omni_sql_include_owner == 1 && owner == '' && table != '' && column != ''
let owner = table
let table = column
let column = ''
endif
else
let owner = ''
let table = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
let column = ''
endif
" Check if the table name was provided as part of the column name
" let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
let table_name = table
let table_cols = []
let table_alias = ''
let move_to_top = 1
let table_name = substitute(table_name, '\s*\(.\{-}\)\s*$', '\1', 'g')
" If the table name was given as:
" where c.
let table_name = substitute(table_name, '^\c\(WHERE\|AND\|OR\)\s\+', '', '')
if g:loaded_dbext >= 300
let saveSettingAlias = DB_listOption('use_tbl_alias')
exec 'DBSetOption use_tbl_alias=n'
endif
let table_name_stripped = substitute(table_name, '["\[\]]*', '', 'g')
" Check if we have already cached the column list for this table
" by its name
let list_idx = index(s:tbl_name, table_name_stripped, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx], '\n')
else
" Check if we have already cached the column list for this table
" by its alias, assuming the table_name provided was actually
" the alias for the table instead
" select *
" from area a
" where a.
let list_idx = index(s:tbl_alias, table_name_stripped, 0, &ignorecase)
if list_idx > -1
let table_alias = table_name_stripped
let table_name = s:tbl_name[list_idx]
let table_cols = split(s:tbl_cols[list_idx], '\n')
endif
endif
" If we have not found a cached copy of the table
" And the table ends in a "." or we are looking for a column list
" if list_idx == -1 && (a:table_name =~ '\.' || b:sql_compl_type =~ 'column')
" if list_idx == -1 && (a:table_name =~ '\.' || a:list_type =~ 'csv')
if list_idx == -1
let saveY = @y
let saveSearch = @/
let saveWScan = &wrapscan
let curline = line(".")
let curcol = col(".")
" Do not let searchs wrap
setlocal nowrapscan
" If . was entered, look at the word just before the .
" We are looking for something like this:
" select *
" from customer c
" where c.
" So when . is pressed, we need to find 'c'
"
" Search backwards to the beginning of the statement
" and do NOT wrap
" exec 'silent! normal! v?\<\(select\|update\|delete\|;\)\>'."\n".'"yy'
exec 'silent! normal! ?\<\c\(select\|update\|delete\|;\)\>'."\n"
" Start characterwise visual mode
" Advance right one character
" Search foward until one of the following:
" 1. Another select/update/delete statement
" 2. A ; at the end of a line (the delimiter)
" 3. The end of the file (incase no delimiter)
" Yank the visually selected text into the "y register.
exec 'silent! normal! vl/\c\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy'
let query = @y
let query = substitute(query, "\n", ' ', 'g')
let found = 0
" if query =~? '^\c\(select\)'
if query =~? '^\(select\|update\|delete\)'
let found = 1
" \(\(\<\w\+\>\)\.\)\? -
" '\c\(from\|join\|,\).\{-}' - Starting at the from clause (case insensitive)
" '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional)
" '\<\w\+\>\ze' - Get the table name
" '\s\+\<'.table_name.'\>' - Followed by the alias
" '\s*\.\@!.*' - Cannot be followed by a .
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
" '.*' - Exclude the rest of the line in the match
" let table_name_new = matchstr(@y,
" \ '\c\(from\|join\|,\).\{-}'.
" \ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
" \ '\("\|\[\)\?.\{-}\("\|\]\)\?\ze'.
" \ '\s\+\%(as\s\+\)\?\<'.
" \ matchstr(table_name, '.\{-}\ze\.\?$').
" \ '\>'.
" \ '\s*\.\@!.*'.
" \ '\(\<where\>\|$\)'.
" \ '.*'
" \ )
"
"
" ''\c\(\<from\>\|\<join\>\|,\)\s*' - Starting at the from clause (case insensitive)
" '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?' - Get the owner name (optional)
" '\("\|\[\)\?\w\+\("\|\]\)\?\ze' - Get the table name
" '\s\+\%(as\s\+\)\?\<'.matchstr(table_name, '.\{-}\ze\.\?$').'\>' - Followed by the alias
" '\s*\.\@!.*' - Cannot be followed by a .
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
" '.*' - Exclude the rest of the line in the match
let table_name_new = matchstr(@y,
\ '\c\(\<from\>\|\<join\>\|,\)\s*'.
\ '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?'.
\ '\("\|\[\)\?\w\+\("\|\]\)\?\ze'.
\ '\s\+\%(as\s\+\)\?\<'.
\ matchstr(table_name, '.\{-}\ze\.\?$').
\ '\>'.
\ '\s*\.\@!.*'.
\ '\(\<where\>\|$\)'.
\ '.*'
\ )
if table_name_new != ''
let table_alias = table_name
if g:omni_sql_include_owner == 1
let table_name = matchstr( table_name_new, '^\zs\(.\{-}\.\)\?\(.\{-}\.\)\?.*\ze' )
else
" let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' )
let table_name = matchstr( table_name_new, '^\(.\{-}\.\)\?\zs\(.\{-}\.\)\?.*\ze' )
endif
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
let s:tbl_name[list_idx] = table_name
let s:tbl_alias[list_idx] = table_alias
else
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
let s:tbl_name[list_idx] = table_name
let s:tbl_alias[list_idx] = table_alias
endif
endif
endif
else
" Simply assume it is a table name provided with a . on the end
let found = 1
endif
let @y = saveY
let @/ = saveSearch
let &wrapscan = saveWScan
" Return to previous location
call cursor(curline, curcol)
if found == 0
if g:loaded_dbext > 300
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
endif
" Not a SQL statement, do not display a list
return []
endif
endif
if empty(table_cols)
" Specify silent mode, no messages to the user (tbl, 1)
" Specify do not comma separate (tbl, 1, 1)
" let table_cols_str = DB_getListColumn(table_name, 1, 1)
let table_cols_str = DB_getListColumn((owner!=''?owner.'.':'').table_name, 1, 1)
if table_cols_str != ""
let s:tbl_name = add( s:tbl_name, table_name )
let s:tbl_alias = add( s:tbl_alias, table_alias )
let s:tbl_cols = add( s:tbl_cols, table_cols_str )
let table_cols = split(table_cols_str, '\n')
endif
endif
if g:loaded_dbext > 300
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
endif
" If the user has asked for a comma separate list of column
" values, ask the user if they want to prepend each column
" with a tablename alias.
if a:list_type == 'csv' && !empty(table_cols)
let cols = join(table_cols, ', ')
let cols = s:SQLCAddAlias(table_name, table_alias, cols)
let table_cols = [cols]
endif
return table_cols
endfunction
" Restore:
let &cpo= s:keepcpo
unlet s:keepcpo
" vim: ts=4 fdm=marker

@ -0,0 +1,755 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 13.0
" Last Change: 2013 May 14
" Usage: For detailed help, ":help ft-syntax-omni"
" History
"
" Version 13.0
" - Extended the option omni_syntax_group_include_{filetype}
" to accept a comma separated list of regex's rather than
" string. For example, for the javascript filetype you could
" use:
" let g:omni_syntax_group_include_javascript = 'javascript\w\+,jquery\w\+'
" - Some syntax files (perl.vim) use the match // syntax as a mechanism
" to identify keywords. This update attempts to parse the
" match syntax and pull out syntax items which are at least
" 3 words or more.
"
" Version 12.0
" - It is possible to have '-' as part of iskeyword, when
" checking for character ranges, tighten up the regex.
" E688: More targets than List items.
"
" Version 11.0
" - Corrected which characters required escaping during
" substitution calls.
"
" Version 10.0
" - Cycle through all the character ranges specified in the
" iskeyword option and build a list of valid word separators.
" Prior to this change, only actual characters were used,
" where for example ASCII "45" == "-". If "45" were used
" in iskeyword the hyphen would not be picked up.
" This introduces a new option, since the character ranges
" specified could be multibyte:
" let g:omni_syntax_use_single_byte = 1
" - This by default will only allow single byte ASCII
" characters to be added and an additional check to ensure
" the charater is printable (see documentation for isprint).
"
" Version 9.0
" - Add the check for cpo.
"
" Version 8.0
" - Updated SyntaxCSyntaxGroupItems()
" - Some additional syntax items were also allowed
" on nextgroup= lines which were ignored by default.
" Now these lines are processed independently.
"
" Version 7.0
" - Updated syntaxcomplete#OmniSyntaxList()
" - Looking up the syntax groups defined from a syntax file
" looked for only 1 format of {filetype}GroupName, but some
" syntax writers use this format as well:
" {b:current_syntax}GroupName
" - OmniSyntaxList() will now check for both if the first
" method does not find a match.
"
" Version 6.0
" - Added syntaxcomplete#OmniSyntaxList()
" - Allows other plugins to use this for their own
" purposes.
" - It will return a List of all syntax items for the
" syntax group name passed in.
" - XPTemplate for SQL will use this function via the
" sqlcomplete plugin to populate a Choose box.
"
" Version 5.0
" - Updated SyntaxCSyntaxGroupItems()
" - When processing a list of syntax groups, the final group
" was missed in function SyntaxCSyntaxGroupItems.
"
" Set completion with CTRL-X CTRL-O to autoloaded function.
" This check is in place in case this script is
" sourced directly instead of using the autoload feature.
if exists('+omnifunc')
" Do not set the option if already set since this
" results in an E117 warning.
if &omnifunc == ""
setlocal omnifunc=syntaxcomplete#Complete
endif
endif
if exists('g:loaded_syntax_completion')
finish
endif
let g:loaded_syntax_completion = 130
" Turn on support for line continuations when creating the script
let s:cpo_save = &cpo
set cpo&vim
" Set ignorecase to the ftplugin standard
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_ignorecase')
let g:omni_syntax_ignorecase = &ignorecase
endif
" Indicates whether we should use the iskeyword option to determine
" how to split words.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_use_iskeyword')
let g:omni_syntax_use_iskeyword = 1
endif
" When using iskeyword, this setting controls whether the characters
" should be limited to single byte characters.
if !exists('g:omni_syntax_use_single_byte')
let g:omni_syntax_use_single_byte = 1
endif
" When using iskeyword, this setting controls whether the characters
" should be limited to single byte characters.
if !exists('g:omni_syntax_use_iskeyword_numeric')
let g:omni_syntax_use_iskeyword_numeric = 1
endif
" Only display items in the completion window that are at least
" this many characters in length.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_minimum_length')
let g:omni_syntax_minimum_length = 0
endif
" This script will build a completion list based on the syntax
" elements defined by the files in $VIMRUNTIME/syntax.
" let s:syn_remove_words = 'match,matchgroup=,contains,'.
let s:syn_remove_words = 'matchgroup=,contains,'.
\ 'links to,start=,end='
" \ 'links to,start=,end=,nextgroup='
let s:cache_name = []
let s:cache_list = []
let s:prepended = ''
" This function is used for the 'omnifunc' option.
function! syntaxcomplete#Complete(findstart, base)
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_ignorecase')
if exists('g:omni_syntax_ignorecase')
let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase
else
let b:omni_syntax_ignorecase = &ignorecase
endif
endif
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
" if line[start - 1] =~ '\S'
" let start -= 1
" elseif line[start - 1] =~ '\.'
if line[start - 1] =~ '\k'
let start -= 1
let lastword = a:findstart
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, (col('.') - 1) - start)
return start
endif
" let base = s:prepended . a:base
let base = s:prepended
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
if list_idx > -1
let compl_list = s:cache_list[list_idx]
else
let compl_list = OmniSyntaxList()
let s:cache_name = add( s:cache_name, filetype )
let s:cache_list = add( s:cache_list, compl_list )
endif
" Return list of matches.
if base != ''
" let compstr = join(compl_list, ' ')
" let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
" let compstr = substitute(compstr, expr, '', 'g')
" let compl_list = split(compstr, '\s\+')
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
let compl_list = filter(deepcopy(compl_list), expr)
endif
return compl_list
endfunc
function! syntaxcomplete#OmniSyntaxList(...)
if a:0 > 0
let parms = []
if 3 == type(a:1)
let parms = a:1
elseif 1 == type(a:1)
let parms = split(a:1, ',')
endif
return OmniSyntaxList( parms )
else
return OmniSyntaxList()
endif
endfunc
function! OmniSyntaxList(...)
let list_parms = []
if a:0 > 0
if 3 == type(a:1)
let list_parms = a:1
elseif 1 == type(a:1)
let list_parms = split(a:1, ',')
endif
endif
" Default to returning a dictionary, if use_dictionary is set to 0
" a list will be returned.
" let use_dictionary = 1
" if a:0 > 0 && a:1 != ''
" let use_dictionary = a:1
" endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_use_iskeyword')
if exists('g:omni_syntax_use_iskeyword')
let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
else
let b:omni_syntax_use_iskeyword = 1
endif
endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_minimum_length')
if exists('g:omni_syntax_minimum_length')
let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length
else
let b:omni_syntax_minimum_length = 0
endif
endif
let saveL = @l
let filetype = substitute(&filetype, '\.', '_', 'g')
if empty(list_parms)
" Default the include group to include the requested syntax group
let syntax_group_include_{filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_include_'.filetype)
let syntax_group_include_{filetype} =
\ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g')
let list_parms = split(g:omni_syntax_group_include_{filetype}, ',')
if syntax_group_include_{filetype} =~ '\w'
let syntax_group_include_{filetype} =
\ substitute( syntax_group_include_{filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
else
" A specific list was provided, use it
endif
" Loop through all the syntax groupnames, and build a
" syntax file which contains these names. This can
" work generically for any filetype that does not already
" have a plugin defined.
" This ASSUMES the syntax groupname BEGINS with the name
" of the filetype. From my casual viewing of the vim7\syntax
" directory this is true for almost all syntax definitions.
" As an example, the SQL syntax groups have this pattern:
" sqlType
" sqlOperators
" sqlKeyword ...
if !empty(list_parms) && empty(substitute(join(list_parms), '[a-zA-Z ]', '', 'g'))
" If list_parms only includes word characters, use it to limit
" the syntax elements.
" If using regex syntax list will fail to find those items, so
" simply grab the who syntax list.
redir @l
silent! exec 'syntax list '.join(list_parms)
redir END
else
redir @l
silent! exec 'syntax list'
redir END
endif
let syntax_full = "\n".@l
let @l = saveL
if syntax_full =~ 'E28'
\ || syntax_full =~ 'E411'
\ || syntax_full =~ 'E415'
\ || syntax_full =~ 'No Syntax items'
return []
endif
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_exclude_groups = []
if a:0 > 0
" Do nothing since we have specific a specific list of groups
else
" Default the exclude group to nothing
let syntax_group_exclude_{filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_exclude_'.filetype)
let syntax_group_exclude_{filetype} =
\ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g')
let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',')
if syntax_group_exclude_{filetype} =~ '\w'
let syntax_group_exclude_{filetype} =
\ substitute( syntax_group_exclude_{filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
endif
if empty(list_parms)
let list_parms = [&filetype.'\w\+']
endif
let syn_list = ''
let index = 0
for group_regex in list_parms
" Sometimes filetypes can be composite names, like c.doxygen
" Loop through each individual part looking for the syntax
" items specific to each individual filetype.
" let ftindex = 0
" let ftindex = match(syntax_full, group_regex, ftindex)
" while ftindex > -1
" let ft_part_name = matchstr( syntax_full, '\w\+', ftindex )
" Syntax rules can contain items for more than just the current
" filetype. They can contain additional items added by the user
" via autocmds or their vimrc.
" Some syntax files can be combined (html, php, jsp).
" We want only items that begin with the filetype we are interested in.
let next_group_regex = '\n' .
\ '\zs'.group_regex.'\ze'.
\ '\s\+xxx\s\+'
let index = match(syntax_full, next_group_regex, index)
" For the matched group name, strip off any of the regex special
" characters and see if we get a match with the current syntax
if index == -1 && exists('b:current_syntax') && substitute(group_regex, '[^a-zA-Z ]\+.*', '', 'g') !~ '^'.b:current_syntax
" There appears to be two standards when writing syntax files.
" Either items begin as:
" syn keyword {filetype}Keyword values ...
" let b:current_syntax = "sql"
" let b:current_syntax = "sqlanywhere"
" Or
" syn keyword {syntax_filename}Keyword values ...
" let b:current_syntax = "mysql"
" So, we will make the format of finding the syntax group names
" a bit more flexible and look for both if the first fails to
" find a match.
let next_group_regex = '\n' .
\ '\zs'.b:current_syntax.'\w\+\ze'.
\ '\s\+xxx\s\+'
let index = 0
let index = match(syntax_full, next_group_regex, index)
endif
while index > -1
let group_name = matchstr( syntax_full, '\w\+', index )
let get_syn_list = 1
for exclude_group_name in list_exclude_groups
if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>'
let get_syn_list = 0
endif
endfor
" This code is no longer needed in version 6.0 since we have
" augmented the syntax list command to only retrieve the syntax
" groups we are interested in.
"
" if get_syn_list == 1
" if syntax_group_include_{filetype} != ''
" if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>'
" let get_syn_list = 0
" endif
" endif
" endif
if get_syn_list == 1
" Pass in the full syntax listing, plus the group name we
" are interested in.
let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
let syn_list = syn_list . extra_syn_list . "\n"
endif
let index = index + strlen(group_name)
let index = match(syntax_full, next_group_regex, index)
endwhile
" let ftindex = ftindex + len(ft_part_name)
" let ftindex = match( syntax_full, group_regex, ftindex )
" endwhile
endfor
" " Sometimes filetypes can be composite names, like c.doxygen
" " Loop through each individual part looking for the syntax
" " items specific to each individual filetype.
" let syn_list = ''
" let ftindex = 0
" let ftindex = match(&filetype, '\w\+', ftindex)
" while ftindex > -1
" let ft_part_name = matchstr( &filetype, '\w\+', ftindex )
" " Syntax rules can contain items for more than just the current
" " filetype. They can contain additional items added by the user
" " via autocmds or their vimrc.
" " Some syntax files can be combined (html, php, jsp).
" " We want only items that begin with the filetype we are interested in.
" let next_group_regex = '\n' .
" \ '\zs'.ft_part_name.'\w\+\ze'.
" \ '\s\+xxx\s\+'
" let index = 0
" let index = match(syntax_full, next_group_regex, index)
" if index == -1 && exists('b:current_syntax') && ft_part_name != b:current_syntax
" " There appears to be two standards when writing syntax files.
" " Either items begin as:
" " syn keyword {filetype}Keyword values ...
" " let b:current_syntax = "sql"
" " let b:current_syntax = "sqlanywhere"
" " Or
" " syn keyword {syntax_filename}Keyword values ...
" " let b:current_syntax = "mysql"
" " So, we will make the format of finding the syntax group names
" " a bit more flexible and look for both if the first fails to
" " find a match.
" let next_group_regex = '\n' .
" \ '\zs'.b:current_syntax.'\w\+\ze'.
" \ '\s\+xxx\s\+'
" let index = 0
" let index = match(syntax_full, next_group_regex, index)
" endif
" while index > -1
" let group_name = matchstr( syntax_full, '\w\+', index )
" let get_syn_list = 1
" for exclude_group_name in list_exclude_groups
" if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>'
" let get_syn_list = 0
" endif
" endfor
" " This code is no longer needed in version 6.0 since we have
" " augmented the syntax list command to only retrieve the syntax
" " groups we are interested in.
" "
" " if get_syn_list == 1
" " if syntax_group_include_{filetype} != ''
" " if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>'
" " let get_syn_list = 0
" " endif
" " endif
" " endif
" if get_syn_list == 1
" " Pass in the full syntax listing, plus the group name we
" " are interested in.
" let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
" let syn_list = syn_list . extra_syn_list . "\n"
" endif
" let index = index + strlen(group_name)
" let index = match(syntax_full, next_group_regex, index)
" endwhile
" let ftindex = ftindex + len(ft_part_name)
" let ftindex = match( &filetype, '\w\+', ftindex )
" endwhile
" Convert the string to a List and sort it.
let compl_list = sort(split(syn_list))
if &filetype == 'vim'
let short_compl_list = []
for i in range(len(compl_list))
if i == len(compl_list)-1
let next = i
else
let next = i + 1
endif
if compl_list[next] !~ '^'.compl_list[i].'.$'
let short_compl_list += [compl_list[i]]
endif
endfor
return short_compl_list
else
return compl_list
endif
endfunction
function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
let syn_list = ""
" From the full syntax listing, strip out the portion for the
" request group.
" Query:
" \n - must begin with a newline
" a:group_name - the group name we are interested in
" \s\+xxx\s\+ - group names are always followed by xxx
" \zs - start the match
" .\{-} - everything ...
" \ze - end the match
" \( - start a group or 2 potential matches
" \n\w - at the first newline starting with a character
" \| - 2nd potential match
" \%$ - matches end of the file or string
" \) - end a group
let syntax_group = matchstr(a:syntax_full,
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze\(\n\w\|\%$\)'
\ )
if syntax_group != ""
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" We only want the words for the lines begining with
" containedin, but there could be other items.
" Tried to remove all lines that do not begin with contained
" but this does not work in all cases since you can have
" contained nextgroup=...
" So this will strip off the ending of lines with known
" keywords.
let syn_list = substitute(
\ syntax_group, '\<\('.
\ substitute(
\ escape(s:syn_remove_words, '\\/.*$^~[]')
\ , ',', '\\|', 'g'
\ ).
\ '\).\{-}\%($\|'."\n".'\)'
\ , "\n", 'g'
\ )
" Attempt to deal with lines using the match syntax
" javaScriptDocTags xxx match /@\(param\|argument\|requires\|file\)\>/
" Though it can use any types of regex, so this plugin will attempt
" to restrict it
" 1. Only use \( or \%( constructs remove all else
" 2 Remove and []s
" 3. Account for match //constructs
" \%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?
" 4. Hope for the best
"
"
let syn_list_old = syn_list
while syn_list =~ '\<match\>\s\+\/'
if syn_list =~ 'perlElseIfError'
let syn_list = syn_list
endif
" Check if the match has words at least 3 characters long
if syn_list =~ '\<match \/\zs.\{-}\<\w\{3,}\>.\{-}\ze\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+'
" Remove everything after / and before the first \(
let syn_list = substitute( syn_list, '\<match \/\zs.\{-}\ze\\%\?(.\{-}\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
" Remove everything after \) and up to the ending /
let syn_list = substitute( syn_list, '\<match \/.\{-}\\)\zs.\{-}\ze\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
" Remove any character classes
" let syn_list = substitute( syn_list, '\<match /\zs.\{-}\[[^]]*\].\{-}\ze\/ ', '', 'g' )
let syn_list = substitute( syn_list, '\%(\<match \/[^/]\{-}\)\@<=\[[^]]*\]\ze.\{-}\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?', '', 'g' )
" Remove any words < 3 characters
let syn_list = substitute( syn_list, '\%(\<match \/[^/]\{-}\)\@<=\<\w\{1,2}\>\ze.\{-}\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
" Remove all non-word characters
" let syn_list = substitute( syn_list, '\<match /\zs.\{-}\<\W\+\>.\{-}\ze\/ ', "", 'g' )
" let syn_list = substitute( syn_list, '\%(\<match \/[^/]\{-}\)\@<=\W\+\ze.\{-}\/ ', ' ', 'g' )
" Do this by using the outer substitue() call to gather all
" text between the match /.../ tags.
" The inner substitute() call operates on the text selected
" and replaces all non-word characters.
let syn_list = substitute( syn_list, '\<match \/\zs\(.\{-}\)\ze\\\@<!\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+'
\ , '\=substitute(submatch(1), "\\W\\+", " ", "g")'
\ , 'g' )
" Remove the match / / syntax
let syn_list = substitute( syn_list, '\<match \/\(.\{-}\)\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '\1', 'g' )
else
" No words long enough, remove the match
" Remove the match syntax
" let syn_list = substitute( syn_list, '\<match \/[^\/]*\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
let syn_list = substitute( syn_list, '\<match \/\%(.\{-}\)\?\/\%(\%(ms\|me\|hs\|he\|rs\|re\|lc\)\S\+\)\?\s\+', '', 'g' )
endif
if syn_list =~ '\<match\>\s\+\/'
" Problem removing the match / / tags
let syn_list = ''
endif
endwhile
" Now strip off the newline + blank space + contained.
" Also include lines with nextgroup=@someName skip_key_words syntax_element
" \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=\)'
" \ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=[@a-zA-Z,]*\)'
let syn_list = substitute(
\ syn_list, '\<\(contained\|nextgroup=[@a-zA-Z,]*\)'
\ , "", 'g'
\ )
" This can leave lines like this
" =@vimMenuList skipwhite onoremenu
" Strip the special option keywords first
" :h :syn-skipwhite*
let syn_list = substitute(
\ syn_list, '\<\(skipwhite\|skipnl\|skipempty\)\>'
\ , "", 'g'
\ )
" Now remove the remainder of the nextgroup=@someName lines
let syn_list = substitute(
\ syn_list, '\%(^\|\n\)\@<=\s*\(@\w\+\)'
\ , "", 'g'
\ )
if b:omni_syntax_use_iskeyword == 0
" There are a number of items which have non-word characters in
" them, *'T_F1'*. vim.vim is one such file.
" This will replace non-word characters with spaces.
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
else
if g:omni_syntax_use_iskeyword_numeric == 1
" iskeyword can contain value like this
" 38,42,43,45,47-58,60-62,64-90,97-122,_,+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
" Numeric values convert to their ASCII equivalent using the
" nr2char() function.
" & 38
" * 42
" + 43
" - 45
" ^ 94
" Iterate through all numeric specifications and convert those
" to their ascii equivalent ensuring the character is printable.
" If so, add it to the list.
let accepted_chars = ''
for item in split(&iskeyword, ',')
if item =~ '\d-\d'
" This is a character range (ie 47-58),
" cycle through each character within the range
let [b:start, b:end] = split(item, '-')
for range_item in range( b:start, b:end )
if range_item <= 127 || g:omni_syntax_use_single_byte == 0
if nr2char(range_item) =~ '\p'
let accepted_chars = accepted_chars . nr2char(range_item)
endif
endif
endfor
elseif item =~ '^\d\+$'
" Only numeric, translate to a character
if item < 127 || g:omni_syntax_use_single_byte == 0
if nr2char(item) =~ '\p'
let accepted_chars = accepted_chars . nr2char(item)
endif
endif
else
if char2nr(item) < 127 || g:omni_syntax_use_single_byte == 0
if item =~ '\p'
let accepted_chars = accepted_chars . item
endif
endif
endif
endfor
" Escape special regex characters
" Looks like the wrong chars are escaped. In a collection,
" :h /[]
" only `]', `\', `-' and `^' are special:
" let accepted_chars = escape(accepted_chars, '\\/.*$^~[]' )
let accepted_chars = escape(accepted_chars, ']\-^' )
" Remove all characters that are not acceptable
let syn_list = substitute( syn_list, '[^A-Za-z'.accepted_chars.']', ' ', 'g' )
else
let accept_chars = ','.&iskeyword.','
" Remove all character ranges
" let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g')
" Remove all numeric specifications
" let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g')
" Remove all commas
let accept_chars = substitute(accept_chars, ',', '', 'g')
" Escape special regex characters
" Looks like the wrong chars are escaped. In a collection,
" :h /[]
" only `]', `\', `-' and `^' are special:
" let accept_chars = escape(accept_chars, '\\/.*$^~[]' )
let accept_chars = escape(accept_chars, ']\-^' )
" Remove all characters that are not acceptable
let syn_list = substitute( syn_list, '[^0-9A-Za-z_'.accept_chars.']', ' ', 'g' )
endif
endif
if b:omni_syntax_minimum_length > 0
" If the user specified a minimum length, enforce it
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
endif
else
let syn_list = ''
endif
return syn_list
endfunction
function! OmniSyntaxShowChars(spec)
let result = []
for item in split(a:spec, ',')
if len(item) > 1
if item == '@-@'
call add(result, char2nr(item))
else
call extend(result, call('range', split(item, '-')))
endif
else
if item == '@' " assume this is [A-Za-z]
for [c1, c2] in [['A', 'Z'], ['a', 'z']]
call extend(result, range(char2nr(c1), char2nr(c2)))
endfor
else
call add(result, char2nr(item))
endif
endif
endfor
return join(map(result, 'nr2char(v:val)'), ', ')
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save

@ -0,0 +1,626 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Apr 17, 2013
" Version: 29
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
"
" Contains many ideas from Michael Toren's <tar.vim>
"
" Copyright: Copyright (C) 2005-2011 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" tar.vim and tarPlugin.vim are provided *as is* and comes
" with no warranty of any kind, either expressed or implied.
" By using this plugin, you agree that in no event will the
" copyright holder be liable for any damages resulting from
" the use of this software.
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v29"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
"call Decho("loading autoload/tar.vim")
" ---------------------------------------------------------------------
" Default Settings: {{{1
if !exists("g:tar_browseoptions")
let g:tar_browseoptions= "Ptf"
endif
if !exists("g:tar_readoptions")
let g:tar_readoptions= "OPxf"
endif
if !exists("g:tar_cmd")
let g:tar_cmd= "tar"
endif
if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
endif
else
let g:netrw_cygwin= 0
endif
endif
if !exists("g:tar_copycmd")
if !exists("g:netrw_localcopycmd")
if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
let g:netrw_localcopycmd= "cp"
else
let g:netrw_localcopycmd= "copy"
endif
elseif has("unix") || has("macunix")
let g:netrw_localcopycmd= "cp"
else
let g:netrw_localcopycmd= ""
endif
endif
let g:tar_copycmd= g:netrw_localcopycmd
endif
if !exists("g:tar_extractcmd")
let g:tar_extractcmd= "tar -xf"
endif
" set up shell quoting character
if !exists("g:tar_shq")
if exists("+shq") && exists("&shq") && &shq != ""
let g:tar_shq= &shq
elseif has("win32") || has("win95") || has("win64") || has("win16")
if exists("g:netrw_cygwin") && g:netrw_cygwin
let g:tar_shq= "'"
else
let g:tar_shq= '"'
endif
else
let g:tar_shq= "'"
endif
" call Decho("g:tar_shq<".g:tar_shq.">")
endif
" ----------------
" Functions: {{{1
" ----------------
" ---------------------------------------------------------------------
" tar#Browse: {{{2
fun! tar#Browse(tarfile)
" call Dfunc("tar#Browse(tarfile<".a:tarfile.">)")
let repkeep= &report
set report=10
" sanity checks
if !executable(g:tar_cmd)
redraw!
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
let &report= repkeep
" call Dret("tar#Browse")
return
endif
if !filereadable(a:tarfile)
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
if a:tarfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
redraw!
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
endif
let &report= repkeep
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
return
endif
if &ma != 1
set ma
endif
let b:tarfile= a:tarfile
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal nobuflisted
setlocal nowrap
set ft=tar
" give header
" call Decho("printing header")
let lastline= line("$")
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
call setline(lastline+3,'" Select a file with cursor and press ENTER')
keepj $put =''
keepj sil! 0d
keepj $
let tarfile= a:tarfile
if has("win32unix") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
let curlast= line("$")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.lrp'
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(lzma\|tlz\)$'
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(xz\|txz\)$'
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
endif
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
return
endif
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
keepj sil! %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "r ".fnameescape(a:tarfile)
let &ei= eikeep
keepj sil! 1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
return
endif
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
let &report= repkeep
" call Dret("tar#Browse : b:tarfile<".b:tarfile.">")
endfun
" ---------------------------------------------------------------------
" TarBrowseSelect: {{{2
fun! s:TarBrowseSelect()
" call Dfunc("TarBrowseSelect() b:tarfile<".b:tarfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
" call Decho("fname<".fname.">")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("TarBrowseSelect")
return
endif
" about to make a new window, need to use b:tarfile
let tarfile= b:tarfile
let curfile= expand("%")
if has("win32unix") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
new
if !exists("g:tar_nomax") || g:tar_nomax == 0
wincmd _
endif
let s:tblfile_{winnr()}= curfile
call tar#Read("tarfile:".tarfile.'::'.fname,1)
filetype detect
set nomod
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
let &report= repkeep
" call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
endfun
" ---------------------------------------------------------------------
" tar#Read: {{{2
fun! tar#Read(fname,mode)
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
if has("win32unix") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
" call Decho("tarfile<".tarfile.">")
" call Decho("fname<".fname.">")
if fname =~ '\.bz2$' && executable("bzcat")
let decmp= "|bzcat"
let doro = 1
elseif fname =~ '\.gz$' && executable("zcat")
let decmp= "|zcat"
let doro = 1
elseif fname =~ '\.lzma$' && executable("lzcat")
let decmp= "|lzcat"
let doro = 1
elseif fname =~ '\.xz$' && executable("xzcat")
let decmp= "|xzcat"
let doro = 1
else
let decmp=""
let doro = 0
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
setlocal bin
endif
endif
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
if tarfile =~# '\.bz2$'
" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.lrp$'
" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.lzma$'
" call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif tarfile =~# '\.\(xz\|txz\)$'
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp)
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
endif
if doro
" because the reverse process of compressing changed files back into the tarball is not currently supported
setlocal ro
endif
let b:tarfile= a:fname
exe "file tarfile::".fnameescape(fname)
" cleanup
keepj sil! 0d
set nomod
let &report= repkeep
" call Dret("tar#Read : b:tarfile<".b:tarfile.">")
endfun
" ---------------------------------------------------------------------
" tar#Write: {{{2
fun! tar#Write(fname)
" call Dfunc("tar#Write(fname<".a:fname.">) b:tarfile<".b:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
let repkeep= &report
set report=10
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity checks
if !executable(g:tar_cmd)
redraw!
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
let &report= repkeep
" call Dret("tar#Write")
return
endif
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
let &report= repkeep
" call Dret("tar#Write")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
" call Decho("orig tempname<".tmpdir.">")
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
" call Decho("tmpdir<".tmpdir.">")
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
try
exe "cd ".fnameescape(tmpdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
let &report= repkeep
" call Dret("tar#Write")
return
endtry
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
" handle compressed archives
if tarfile =~# '\.bz2'
call system("bzip2 -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.bz2','','e')
let compress= "bzip2 -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.gz'
call system("gzip -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.gz','','e')
let compress= "gzip -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.tgz'
call system("gzip -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
let compress= "gzip -- ".shellescape(tarfile,0)
let tgz = 1
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.xz'
call system("xz -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.xz','','e')
let compress= "xz -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.lzma'
call system("lzma -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.lzma','','e')
let compress= "lzma -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
endif
" call Decho("tarfile<".tarfile.">")
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
else
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
let dirpath = substitute(system("cygpath ".shellescape(dirpath, 0)),'\n','','e')
endif
call mkdir(dirpath,"p")
endif
if tarfile !~ '/'
let tarfile= curdir.'/'.tarfile
endif
if tarfile =~ '^\s*-'
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
exe "w! ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
endif
" delete old file from tarfile
" call Decho("system(".g:tar_cmd." --delete -f ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
call system(g:tar_cmd." --delete -f ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
else
" update tarfile with new file
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
elseif exists("compress")
" call Decho("call system(".compress.")")
call system(compress)
if exists("tgz")
" call Decho("rename(".tarfile.".gz,".substitute(tarfile,'\.tar$','.tgz','e').")")
call rename(tarfile.".gz",substitute(tarfile,'\.tar$','.tgz','e'))
endif
endif
endif
" support writing tarfiles across a network
if s:tblfile_{winnr()} =~ '^\a\+://'
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
let tblfile= s:tblfile_{winnr()}
1split|enew
let binkeep= &l:binary
let eikeep = &ei
set binary ei=all
exe "e! ".fnameescape(tarfile)
call netrw#NetWrite(tblfile)
let &ei = eikeep
let &l:binary = binkeep
q!
unlet s:tblfile_{winnr()}
endif
endif
" cleanup and restore current directory
cd ..
call s:Rmdir("_ZIPVIM_")
exe "cd ".fnameescape(curdir)
setlocal nomod
let &report= repkeep
" call Dret("tar#Write")
endfun
" ---------------------------------------------------------------------
" tar#Diff: {{{2
fun! tar#Diff(userfname,fname)
" call Dfunc("tar#Diff(userfname<".a:userfname."> fname<".a:fname.")")
let fname= a:fname
if a:userfname != ""
let fname= a:userfname
endif
if filereadable(fname)
" sets current file (from tarball) for diff'ing
" splits window vertically
" opens original file, sets it for diff'ing
" sets up b:tardiff_otherbuf variables so each buffer knows about the other (for closing purposes)
diffthis
wincmd v
exe "e ".fnameescape(fname)
diffthis
else
redraw!
echo "***warning*** unable to read file<".fname.">"
endif
" call Dret("tar#Diff")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
else
call system("del /S ".shellescape(a:fname,0))
endif
endif
" call Dret("Rmdir")
endfun
" ---------------------------------------------------------------------
" tar#Vimuntar: installs a tarball in the user's .vim / vimfiles directory {{{2
fun! tar#Vimuntar(...)
" call Dfunc("tar#Vimuntar() a:0=".a:0." a:1<".(exists("a:1")? a:1 : "-n/a-").">")
let tarball = expand("%")
" call Decho("tarball<".tarball.">")
let tarbase = substitute(tarball,'\..*$','','')
" call Decho("tarbase<".tarbase.">")
let tarhome = expand("%:p")
if has("win32") || has("win95") || has("win64") || has("win16")
let tarhome= substitute(tarhome,'\\','/','g')
endif
let tarhome= substitute(tarhome,'/[^/]*$','','')
" call Decho("tarhome<".tarhome.">")
let tartail = expand("%:t")
" call Decho("tartail<".tartail.">")
let curdir = getcwd()
" call Decho("curdir <".curdir.">")
" set up vimhome
if a:0 > 0 && a:1 != ""
let vimhome= a:1
else
let vimhome= vimball#VimballHome()
endif
" call Decho("vimhome<".vimhome.">")
" call Decho("curdir<".curdir."> vimhome<".vimhome.">")
if simplify(curdir) != simplify(vimhome)
" copy (possibly compressed) tarball to .vim/vimfiles
" call Decho(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
call system(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
" call Decho("exe cd ".fnameescape(vimhome))
exe "cd ".fnameescape(vimhome)
endif
" call Decho("getcwd<".getcwd().">")
" if necessary, decompress the tarball; then, extract it
if tartail =~ '\.tgz'
if executable("gunzip")
silent exe "!gunzip ".shellescape(tartail)
elseif executable("gzip")
silent exe "!gzip -d ".shellescape(tartail)
else
echoerr "unable to decompress<".tartail."> on this sytem"
if simplify(curdir) != simplify(tarhome)
" remove decompressed tarball, restore directory
" call Decho("delete(".tartail.".tar)")
call delete(tartail.".tar")
" call Decho("exe cd ".fnameescape(curdir))
exe "cd ".fnameescape(curdir)
endif
" call Dret("tar#Vimuntar")
return
endif
else
call vimball#Decompress(tartail,0)
endif
let extractcmd= netrw#WinPath(g:tar_extractcmd)
" call Decho("system(".extractcmd." ".shellescape(tarbase.".tar").")")
call system(extractcmd." ".shellescape(tarbase.".tar"))
" set up help
if filereadable("doc/".tarbase.".txt")
" call Decho("exe helptags ".getcwd()."/doc")
exe "helptags ".getcwd()."/doc"
endif
if simplify(tarhome) != simplify(vimhome)
" remove decompressed tarball, restore directory
call delete(vimhome."/".tarbase.".tar")
exe "cd ".fnameescape(curdir)
endif
" call Dret("tar#Vimuntar")
endfun
" =====================================================================
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker

@ -0,0 +1,923 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2013 Jun 19
"
" Additional contributors:
"
" Original by Bram Moolenaar <Bram@vim.org>
" Diff2HTML() added by Christian Brabandt <cb@256bit.org>
"
" See Mercurial change logs for more!
" this file uses line continuations
let s:cpo_sav = &cpo
set cpo&vim
" Automatically find charsets from all encodings supported natively by Vim. With
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
" this. Let the user specify these however since they won't be supported on
" every system.
"
" Note, not all of Vim's supported encodings have a charset to use.
"
" Names in this list are from:
" http://www.iana.org/assignments/character-sets
" g:tohtml#encoding_to_charset: {{{
let g:tohtml#encoding_to_charset = {
\ 'latin1' : 'ISO-8859-1',
\ 'iso-8859-2' : 'ISO-8859-2',
\ 'iso-8859-3' : 'ISO-8859-3',
\ 'iso-8859-4' : 'ISO-8859-4',
\ 'iso-8859-5' : 'ISO-8859-5',
\ 'iso-8859-6' : 'ISO-8859-6',
\ 'iso-8859-7' : 'ISO-8859-7',
\ 'iso-8859-8' : 'ISO-8859-8',
\ 'iso-8859-9' : 'ISO-8859-9',
\ 'iso-8859-10' : '',
\ 'iso-8859-13' : 'ISO-8859-13',
\ 'iso-8859-14' : '',
\ 'iso-8859-15' : 'ISO-8859-15',
\ 'koi8-r' : 'KOI8-R',
\ 'koi8-u' : 'KOI8-U',
\ 'macroman' : 'macintosh',
\ 'cp437' : '',
\ 'cp775' : '',
\ 'cp850' : '',
\ 'cp852' : '',
\ 'cp855' : '',
\ 'cp857' : '',
\ 'cp860' : '',
\ 'cp861' : '',
\ 'cp862' : '',
\ 'cp863' : '',
\ 'cp865' : '',
\ 'cp866' : 'IBM866',
\ 'cp869' : '',
\ 'cp874' : '',
\ 'cp1250' : 'windows-1250',
\ 'cp1251' : 'windows-1251',
\ 'cp1253' : 'windows-1253',
\ 'cp1254' : 'windows-1254',
\ 'cp1255' : 'windows-1255',
\ 'cp1256' : 'windows-1256',
\ 'cp1257' : 'windows-1257',
\ 'cp1258' : 'windows-1258',
\ 'euc-jp' : 'EUC-JP',
\ 'sjis' : 'Shift_JIS',
\ 'cp932' : 'Shift_JIS',
\ 'cp949' : '',
\ 'euc-kr' : 'EUC-KR',
\ 'cp936' : 'GBK',
\ 'euc-cn' : 'GB2312',
\ 'big5' : 'Big5',
\ 'cp950' : 'Big5',
\ 'utf-8' : 'UTF-8',
\ 'ucs-2' : 'UTF-8',
\ 'ucs-2le' : 'UTF-8',
\ 'utf-16' : 'UTF-8',
\ 'utf-16le' : 'UTF-8',
\ 'ucs-4' : 'UTF-8',
\ 'ucs-4le' : 'UTF-8',
\ }
lockvar g:tohtml#encoding_to_charset
" Notes:
" 1. All UCS/UTF are converted to UTF-8 because it is much better supported
" 2. Any blank spaces are there because Vim supports it but at least one major
" web browser does not according to http://wiki.whatwg.org/wiki/Web_Encodings.
" }}}
" Only automatically find encodings supported natively by Vim, let the user
" specify the encoding if it's not natively supported. This function is only
" used when the user specifies the charset, they better know what they are
" doing!
"
" Names in this list are from:
" http://www.iana.org/assignments/character-sets
" g:tohtml#charset_to_encoding: {{{
let g:tohtml#charset_to_encoding = {
\ 'iso_8859-1:1987' : 'latin1',
\ 'iso-ir-100' : 'latin1',
\ 'iso_8859-1' : 'latin1',
\ 'iso-8859-1' : 'latin1',
\ 'latin1' : 'latin1',
\ 'l1' : 'latin1',
\ 'ibm819' : 'latin1',
\ 'cp819' : 'latin1',
\ 'csisolatin1' : 'latin1',
\ 'iso_8859-2:1987' : 'iso-8859-2',
\ 'iso-ir-101' : 'iso-8859-2',
\ 'iso_8859-2' : 'iso-8859-2',
\ 'iso-8859-2' : 'iso-8859-2',
\ 'latin2' : 'iso-8859-2',
\ 'l2' : 'iso-8859-2',
\ 'csisolatin2' : 'iso-8859-2',
\ 'iso_8859-3:1988' : 'iso-8859-3',
\ 'iso-ir-109' : 'iso-8859-3',
\ 'iso_8859-3' : 'iso-8859-3',
\ 'iso-8859-3' : 'iso-8859-3',
\ 'latin3' : 'iso-8859-3',
\ 'l3' : 'iso-8859-3',
\ 'csisolatin3' : 'iso-8859-3',
\ 'iso_8859-4:1988' : 'iso-8859-4',
\ 'iso-ir-110' : 'iso-8859-4',
\ 'iso_8859-4' : 'iso-8859-4',
\ 'iso-8859-4' : 'iso-8859-4',
\ 'latin4' : 'iso-8859-4',
\ 'l4' : 'iso-8859-4',
\ 'csisolatin4' : 'iso-8859-4',
\ 'iso_8859-5:1988' : 'iso-8859-5',
\ 'iso-ir-144' : 'iso-8859-5',
\ 'iso_8859-5' : 'iso-8859-5',
\ 'iso-8859-5' : 'iso-8859-5',
\ 'cyrillic' : 'iso-8859-5',
\ 'csisolatincyrillic' : 'iso-8859-5',
\ 'iso_8859-6:1987' : 'iso-8859-6',
\ 'iso-ir-127' : 'iso-8859-6',
\ 'iso_8859-6' : 'iso-8859-6',
\ 'iso-8859-6' : 'iso-8859-6',
\ 'ecma-114' : 'iso-8859-6',
\ 'asmo-708' : 'iso-8859-6',
\ 'arabic' : 'iso-8859-6',
\ 'csisolatinarabic' : 'iso-8859-6',
\ 'iso_8859-7:1987' : 'iso-8859-7',
\ 'iso-ir-126' : 'iso-8859-7',
\ 'iso_8859-7' : 'iso-8859-7',
\ 'iso-8859-7' : 'iso-8859-7',
\ 'elot_928' : 'iso-8859-7',
\ 'ecma-118' : 'iso-8859-7',
\ 'greek' : 'iso-8859-7',
\ 'greek8' : 'iso-8859-7',
\ 'csisolatingreek' : 'iso-8859-7',
\ 'iso_8859-8:1988' : 'iso-8859-8',
\ 'iso-ir-138' : 'iso-8859-8',
\ 'iso_8859-8' : 'iso-8859-8',
\ 'iso-8859-8' : 'iso-8859-8',
\ 'hebrew' : 'iso-8859-8',
\ 'csisolatinhebrew' : 'iso-8859-8',
\ 'iso_8859-9:1989' : 'iso-8859-9',
\ 'iso-ir-148' : 'iso-8859-9',
\ 'iso_8859-9' : 'iso-8859-9',
\ 'iso-8859-9' : 'iso-8859-9',
\ 'latin5' : 'iso-8859-9',
\ 'l5' : 'iso-8859-9',
\ 'csisolatin5' : 'iso-8859-9',
\ 'iso-8859-10' : 'iso-8859-10',
\ 'iso-ir-157' : 'iso-8859-10',
\ 'l6' : 'iso-8859-10',
\ 'iso_8859-10:1992' : 'iso-8859-10',
\ 'csisolatin6' : 'iso-8859-10',
\ 'latin6' : 'iso-8859-10',
\ 'iso-8859-13' : 'iso-8859-13',
\ 'iso-8859-14' : 'iso-8859-14',
\ 'iso-ir-199' : 'iso-8859-14',
\ 'iso_8859-14:1998' : 'iso-8859-14',
\ 'iso_8859-14' : 'iso-8859-14',
\ 'latin8' : 'iso-8859-14',
\ 'iso-celtic' : 'iso-8859-14',
\ 'l8' : 'iso-8859-14',
\ 'iso-8859-15' : 'iso-8859-15',
\ 'iso_8859-15' : 'iso-8859-15',
\ 'latin-9' : 'iso-8859-15',
\ 'koi8-r' : 'koi8-r',
\ 'cskoi8r' : 'koi8-r',
\ 'koi8-u' : 'koi8-u',
\ 'macintosh' : 'macroman',
\ 'mac' : 'macroman',
\ 'csmacintosh' : 'macroman',
\ 'ibm437' : 'cp437',
\ 'cp437' : 'cp437',
\ '437' : 'cp437',
\ 'cspc8codepage437' : 'cp437',
\ 'ibm775' : 'cp775',
\ 'cp775' : 'cp775',
\ 'cspc775baltic' : 'cp775',
\ 'ibm850' : 'cp850',
\ 'cp850' : 'cp850',
\ '850' : 'cp850',
\ 'cspc850multilingual' : 'cp850',
\ 'ibm852' : 'cp852',
\ 'cp852' : 'cp852',
\ '852' : 'cp852',
\ 'cspcp852' : 'cp852',
\ 'ibm855' : 'cp855',
\ 'cp855' : 'cp855',
\ '855' : 'cp855',
\ 'csibm855' : 'cp855',
\ 'ibm857' : 'cp857',
\ 'cp857' : 'cp857',
\ '857' : 'cp857',
\ 'csibm857' : 'cp857',
\ 'ibm860' : 'cp860',
\ 'cp860' : 'cp860',
\ '860' : 'cp860',
\ 'csibm860' : 'cp860',
\ 'ibm861' : 'cp861',
\ 'cp861' : 'cp861',
\ '861' : 'cp861',
\ 'cp-is' : 'cp861',
\ 'csibm861' : 'cp861',
\ 'ibm862' : 'cp862',
\ 'cp862' : 'cp862',
\ '862' : 'cp862',
\ 'cspc862latinhebrew' : 'cp862',
\ 'ibm863' : 'cp863',
\ 'cp863' : 'cp863',
\ '863' : 'cp863',
\ 'csibm863' : 'cp863',
\ 'ibm865' : 'cp865',
\ 'cp865' : 'cp865',
\ '865' : 'cp865',
\ 'csibm865' : 'cp865',
\ 'ibm866' : 'cp866',
\ 'cp866' : 'cp866',
\ '866' : 'cp866',
\ 'csibm866' : 'cp866',
\ 'ibm869' : 'cp869',
\ 'cp869' : 'cp869',
\ '869' : 'cp869',
\ 'cp-gr' : 'cp869',
\ 'csibm869' : 'cp869',
\ 'windows-1250' : 'cp1250',
\ 'windows-1251' : 'cp1251',
\ 'windows-1253' : 'cp1253',
\ 'windows-1254' : 'cp1254',
\ 'windows-1255' : 'cp1255',
\ 'windows-1256' : 'cp1256',
\ 'windows-1257' : 'cp1257',
\ 'windows-1258' : 'cp1258',
\ 'extended_unix_code_packed_format_for_japanese' : 'euc-jp',
\ 'cseucpkdfmtjapanese' : 'euc-jp',
\ 'euc-jp' : 'euc-jp',
\ 'shift_jis' : 'sjis',
\ 'ms_kanji' : 'sjis',
\ 'sjis' : 'sjis',
\ 'csshiftjis' : 'sjis',
\ 'ibm-thai' : 'cp874',
\ 'csibmthai' : 'cp874',
\ 'ks_c_5601-1987' : 'cp949',
\ 'iso-ir-149' : 'cp949',
\ 'ks_c_5601-1989' : 'cp949',
\ 'ksc_5601' : 'cp949',
\ 'korean' : 'cp949',
\ 'csksc56011987' : 'cp949',
\ 'euc-kr' : 'euc-kr',
\ 'cseuckr' : 'euc-kr',
\ 'gbk' : 'cp936',
\ 'cp936' : 'cp936',
\ 'ms936' : 'cp936',
\ 'windows-936' : 'cp936',
\ 'gb_2312-80' : 'euc-cn',
\ 'iso-ir-58' : 'euc-cn',
\ 'chinese' : 'euc-cn',
\ 'csiso58gb231280' : 'euc-cn',
\ 'big5' : 'big5',
\ 'csbig5' : 'big5',
\ 'utf-8' : 'utf-8',
\ 'iso-10646-ucs-2' : 'ucs-2',
\ 'csunicode' : 'ucs-2',
\ 'utf-16' : 'utf-16',
\ 'utf-16be' : 'utf-16',
\ 'utf-16le' : 'utf-16le',
\ 'utf-32' : 'ucs-4',
\ 'utf-32be' : 'ucs-4',
\ 'utf-32le' : 'ucs-4le',
\ 'iso-10646-ucs-4' : 'ucs-4',
\ 'csucs4' : 'ucs-4'
\ }
lockvar g:tohtml#charset_to_encoding
"}}}
func! tohtml#Convert2HTML(line1, line2) "{{{
let s:settings = tohtml#GetUserSettings()
if !&diff || s:settings.diff_one_file "{{{
if a:line2 >= a:line1
let g:html_start_line = a:line1
let g:html_end_line = a:line2
else
let g:html_start_line = a:line2
let g:html_end_line = a:line1
endif
runtime syntax/2html.vim "}}}
else "{{{
let win_list = []
let buf_list = []
windo | if &diff | call add(win_list, winbufnr(0)) | endif
let s:settings.whole_filler = 1
let g:html_diff_win_num = 0
for window in win_list
" switch to the next buffer to convert
exe ":" . bufwinnr(window) . "wincmd w"
" figure out whether current charset and encoding will work, if not
" default to UTF-8
if !exists('g:html_use_encoding') &&
\ (((&l:fileencoding=='' || (&l:buftype!='' && &l:buftype!=?'help'))
\ && &encoding!=?s:settings.vim_encoding)
\ || &l:fileencoding!='' && &l:fileencoding!=?s:settings.vim_encoding)
echohl WarningMsg
echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8"
echohl None
let s:settings.vim_encoding = 'utf-8'
let s:settings.encoding = 'UTF-8'
endif
" set up for diff-mode conversion
let g:html_start_line = 1
let g:html_end_line = line('$')
let g:html_diff_win_num += 1
" convert this file
runtime syntax/2html.vim
" remember the HTML buffer for later combination
call add(buf_list, bufnr('%'))
endfor
unlet g:html_diff_win_num
call tohtml#Diff2HTML(win_list, buf_list)
endif "}}}
unlet g:html_start_line
unlet g:html_end_line
unlet s:settings
endfunc "}}}
func! tohtml#Diff2HTML(win_list, buf_list) "{{{
let xml_line = ""
let tag_close = '>'
let s:old_paste = &paste
set paste
let s:old_magic = &magic
set magic
if s:settings.use_xhtml
if s:settings.encoding != ""
let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>"
else
let xml_line = "<?xml version=\"1.0\"?>"
endif
let tag_close = ' />'
endif
let style = [s:settings.use_xhtml ? "" : '-->']
let body_line = ''
let html = []
if s:settings.use_xhtml
call add(html, xml_line)
endif
if s:settings.use_xhtml
call add(html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
call add(html, '<html xmlns="http://www.w3.org/1999/xhtml">')
elseif s:settings.use_css && !s:settings.no_pre
call add(html, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">")
call add(html, '<html>')
else
call add(html, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"')
call add(html, ' "http://www.w3.org/TR/html4/loose.dtd">')
call add(html, '<html>')
endif
call add(html, '<head>')
" include encoding as close to the top as possible, but only if not already
" contained in XML information
if s:settings.encoding != "" && !s:settings.use_xhtml
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
endif
call add(html, '<title>diff</title>')
call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close)
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
call add(html, '<meta name="settings" content="'.
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
\ ',prevent_copy='.s:settings.prevent_copy.
\ '"'.tag_close)
call add(html, '<meta name="colorscheme" content="'.
\ (exists('g:colors_name')
\ ? g:colors_name
\ : 'none'). '"'.tag_close)
call add(html, '</head>')
let body_line_num = len(html)
if !empty(s:settings.prevent_copy)
call add(html, "<body onload='FixCharWidth();".(s:settings.line_ids ? " JumpToLine();" : "")."'>")
call add(html, "<!-- hidden divs used by javascript to get the width of a char -->")
call add(html, "<div id='oneCharWidth'>0</div>")
call add(html, "<div id='oneInputWidth'><input size='1' value='0'".tag_close."</div>")
call add(html, "<div id='oneEmWidth' style='width: 1em;'></div>")
else
call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
endif
call add(html, "<table border='1' width='100%' id='vimCodeElement".s:settings.id_suffix."'>")
call add(html, '<tr>')
for buf in a:win_list
call add(html, '<th>'.bufname(buf).'</th>')
endfor
call add(html, '</tr><tr>')
let diff_style_start = 0
let insert_index = 0
for buf in a:buf_list
let temp = []
exe bufwinnr(buf) . 'wincmd w'
" If text is folded because of user foldmethod settings, etc. we don't want
" to act on everything in a fold by mistake.
setlocal nofoldenable
" When not using CSS or when using xhtml, the <body> line can be important.
" Assume it will be the same for all buffers and grab it from the first
" buffer. Similarly, need to grab the body end line as well.
if body_line == ''
1
call search('<body')
let body_line = getline('.')
$
call search('</body>', 'b')
let s:body_end_line = getline('.')
endif
" Grab the style information. Some of this will be duplicated so only insert
" it if it's not already there. {{{
1
let style_start = search('^<style type="text/css">')
1
let style_end = search('^</style>')
if style_start > 0 && style_end > 0
let buf_styles = getline(style_start + 1, style_end - 1)
for a_style in buf_styles
if index(style, a_style) == -1
if diff_style_start == 0
if a_style =~ '\<Diff\(Change\|Text\|Add\|Delete\)'
let diff_style_start = len(style)-1
endif
endif
call insert(style, a_style, insert_index)
let insert_index += 1
endif
endfor
endif " }}}
" everything new will get added before the diff styles so diff highlight
" properly overrides normal highlight
if diff_style_start != 0
let insert_index = diff_style_start
endif
" Delete those parts that are not needed so we can include the rest into the
" resulting table.
1,/^<body.*\%(\n<!--.*-->\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_
$
?</body>?,$d_
let temp = getline(1,'$')
" clean out id on the main content container because we already set it on
" the table
let temp[0] = substitute(temp[0], " id='vimCodeElement[^']*'", "", "")
" undo deletion of start and end part
" so we can later save the file as valid html
" TODO: restore using grabbed lines if undolevel is 1?
normal! 2u
if s:settings.use_css
call add(html, '<td valign="top"><div>')
elseif s:settings.use_xhtml
call add(html, '<td nowrap="nowrap" valign="top"><div>')
else
call add(html, '<td nowrap valign="top"><div>')
endif
let html += temp
call add(html, '</div></td>')
" Close this buffer
" TODO: the comment above says we're going to allow saving the file
" later...but here we discard it?
quit!
endfor
let html[body_line_num] = body_line
call add(html, '</tr>')
call add(html, '</table>')
call add(html, s:body_end_line)
call add(html, '</html>')
" The generated HTML is admittedly ugly and takes a LONG time to fold.
" Make sure the user doesn't do syntax folding when loading a generated file,
" using a modeline.
call add(html, '<!-- vim: set foldmethod=manual : -->')
let i = 1
let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html")
" Find an unused file name if current file name is already in use
while filereadable(name)
let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e")
let i += 1
endwhile
exe "topleft new " . name
setlocal modifiable
" just in case some user autocmd creates content in the new buffer, make sure
" it is empty before proceeding
%d
" set the fileencoding to match the charset we'll be using
let &l:fileencoding=s:settings.vim_encoding
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
" order mark is highly recommend on the web when using multibyte encodings. But,
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
" determine when it is actually inserted.
if s:settings.vim_encoding == 'utf-8'
setlocal nobomb
else
setlocal bomb
endif
call append(0, html)
if len(style) > 0
1
let style_start = search('^</head>')-1
" add required javascript in reverse order so we can just call append again
" and again without adjusting {{{
" insert script closing tag
call append(style_start, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
" insert script which corrects the size of small input elements in
" prevent_copy mode. See 2html.vim for details on why this is needed and how
" it works.
if !empty(s:settings.prevent_copy)
call append(style_start, [
\ '',
\ '/* simulate a "ch" unit by asking the browser how big a zero character is */',
\ 'function FixCharWidth() {',
\ ' /* get the hidden element which gives the width of a single character */',
\ ' var goodWidth = document.getElementById("oneCharWidth").clientWidth;',
\ ' /* get all input elements, we''ll filter on class later */',
\ ' var inputTags = document.getElementsByTagName("input");',
\ ' var ratio = 5;',
\ ' var inputWidth = document.getElementById("oneInputWidth").clientWidth;',
\ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;',
\ ' if (inputWidth > goodWidth) {',
\ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
\ ' ratio += 5;',
\ ' }',
\ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;',
\ ' }',
\ '}'
\ ])
endif
"
" insert javascript to get IDs from line numbers, and to open a fold before
" jumping to any lines contained therein
call append(style_start, [
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
\ " * we corrected the raw number to a line ID.",
\ " */",
\ " if (lineElem) {",
\ " lineElem.scrollIntoView(true);",
\ " }",
\ " return true;",
\ "}",
\ "if ('onhashchange' in window) {",
\ " window.onhashchange = JumpToLine;",
\ "}"
\ ])
if s:settings.dynamic_folds
call append(style_start, [
\ "",
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
\ " var node = lineElem;",
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
\ " {",
\ " if (node.className == 'closed-fold')",
\ " {",
\ " /* toggle open the fold ID (remove window ID) */",
\ " toggleFold(node.id.substr(4));",
\ " }",
\ " node = node.parentNode;",
\ " }",
\ ])
endif
call append(style_start, [
\ "",
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
\ "function JumpToLine()",
\ "{",
\ " var lineNum;",
\ " lineNum = window.location.hash;",
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
\ "",
\ " if (lineNum.indexOf('L') == -1) {",
\ " lineNum = 'L'+lineNum;",
\ " }",
\ " if (lineNum.indexOf('W') == -1) {",
\ " lineNum = 'W1'+lineNum;",
\ " }",
\ " lineElem = document.getElementById(lineNum);"
\ ])
" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active.
if s:settings.dynamic_folds
call append(style_start, [
\ " function toggleFold(objID)",
\ " {",
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
\ " {",
\ " var fold;",
\ ' fold = document.getElementById("win"+win_num+objID);',
\ " if(fold.className == 'closed-fold')",
\ " {",
\ " fold.className = 'open-fold';",
\ " }",
\ " else if (fold.className == 'open-fold')",
\ " {",
\ " fold.className = 'closed-fold';",
\ " }",
\ " }",
\ " }",
\ ])
endif
" insert script tag; javascript is always needed for the line number
" normalization for URL hashes
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
" Insert styles from all the generated html documents and additional styles
" for the table-based layout of the side-by-side diff. The diff should take
" up the full browser window (but not more), and be static in size,
" horizontally scrollable when the lines are too long. Otherwise, the diff
" is pretty useless for really long lines. {{{
if s:settings.use_css
call append(style_start,
\ ['<style type="text/css">']+
\ style+
\ [ s:settings.use_xhtml ? '' : '<!--',
\ 'table { table-layout: fixed; }',
\ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
\ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
\ 'td div { overflow: auto; }',
\ s:settings.use_xhtml ? '' : '-->',
\ '</style>'
\])
endif "}}}
endif
let &paste = s:old_paste
let &magic = s:old_magic
endfunc "}}}
" Gets a single user option and sets it in the passed-in Dict, or gives it the
" default value if the option doesn't actually exist.
func! tohtml#GetOption(settings, option, default) "{{{
if exists('g:html_'.a:option)
let a:settings[a:option] = g:html_{a:option}
else
let a:settings[a:option] = a:default
endif
endfunc "}}}
" returns a Dict containing the values of all user options for 2html, including
" default values for those not given an explicit value by the user. Discards the
" html_ prefix of the option for nicer looking code.
func! tohtml#GetUserSettings() "{{{
if exists('s:settings')
" just restore the known options if we've already retrieved them
return s:settings
else
" otherwise figure out which options are set
let user_settings = {}
" Define the correct option if the old option name exists and we haven't
" already defined the correct one. Maybe I'll put out a warnig message about
" this sometime and remove the old option entirely at some even later time,
" but for now just silently accept the old option.
if exists('g:use_xhtml') && !exists("g:html_use_xhtml")
let g:html_use_xhtml = g:use_xhtml
endif
" get current option settings with appropriate defaults {{{
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
call tohtml#GetOption(user_settings, 'number_lines', &number )
call tohtml#GetOption(user_settings, 'pre_wrap', &wrap )
call tohtml#GetOption(user_settings, 'use_css', 1 )
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
call tohtml#GetOption(user_settings, 'no_foldcolumn', user_settings.ignore_folding)
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
call tohtml#GetOption(user_settings, 'no_pre', 0 )
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
call tohtml#GetOption(user_settings, 'line_ids', user_settings.number_lines )
" }}}
" override those settings that need it {{{
" hover opening implies dynamic folding
if user_settings.hover_unfold
let user_settings.dynamic_folds = 1
endif
" ignore folding overrides dynamic folding
if user_settings.ignore_folding && user_settings.dynamic_folds
let user_settings.dynamic_folds = 0
let user_settings.hover_unfold = 0
endif
" dynamic folding with no foldcolumn implies hover opens
if user_settings.dynamic_folds && user_settings.no_foldcolumn
let user_settings.hover_unfold = 1
endif
" dynamic folding implies css
if user_settings.dynamic_folds
let user_settings.use_css = 1
else
let user_settings.no_foldcolumn = 1 " won't do anything but for consistency and for the test suite
endif
" if we're not using CSS we cannot use a pre section because <font> tags
" aren't allowed inside a <pre> block
if !user_settings.use_css
let user_settings.no_pre = 1
endif
" pre_wrap doesn't do anything if not using pre or not using CSS
if user_settings.no_pre || !user_settings.use_css
let user_settings.pre_wrap=0
endif
"}}}
" set up expand_tabs option after all the overrides so we know the
" appropriate defaults {{{
if user_settings.no_pre == 0
call tohtml#GetOption(user_settings,
\ 'expand_tabs',
\ &expandtab || &ts != 8 || user_settings.number_lines ||
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
else
let user_settings.expand_tabs = 1
endif
" }}}
" textual options
if exists("g:html_use_encoding") "{{{
" user specified the desired MIME charset, figure out proper
" 'fileencoding' from it or warn the user if we cannot
let user_settings.encoding = g:html_use_encoding
let user_settings.vim_encoding = tohtml#EncodingFromCharset(g:html_use_encoding)
if user_settings.vim_encoding == ''
echohl WarningMsg
echomsg "TOhtml: file encoding for"
\ g:html_use_encoding
\ "unknown, please set 'fileencoding'"
echohl None
endif
else
" Figure out proper MIME charset from 'fileencoding' if possible
if &l:fileencoding != ''
" If the buffer is not a "normal" type, the 'fileencoding' value may not
" be trusted; since the buffer should not be written the fileencoding is
" not intended to be used.
if &l:buftype=='' || &l:buftype==?'help'
let user_settings.vim_encoding = &l:fileencoding
call tohtml#CharsetFromEncoding(user_settings)
else
let user_settings.encoding = '' " trigger detection using &encoding
endif
endif
" else from 'encoding' if possible
if &l:fileencoding == '' || user_settings.encoding == ''
let user_settings.vim_encoding = &encoding
call tohtml#CharsetFromEncoding(user_settings)
endif
" else default to UTF-8 and warn user
if user_settings.encoding == ''
let user_settings.vim_encoding = 'utf-8'
let user_settings.encoding = 'UTF-8'
echohl WarningMsg
echomsg "TOhtml: couldn't determine MIME charset, using UTF-8"
echohl None
endif
endif "}}}
" Default to making nothing uncopyable, because we default to
" not-standards way of doing things, and also because Microsoft Word and
" others paste the <input> elements anyway.
"
" html_prevent_copy only has an effect when using CSS.
"
" All options:
" f - fold column
" n - line numbers (also within fold text)
" t - fold text
" d - diff filler
" c - concealed text (reserved future)
" l - listchars (reserved possible future)
" s - signs (reserved possible future)
"
" Normal text is always selectable.
let user_settings.prevent_copy = ""
if user_settings.use_css
if exists("g:html_prevent_copy")
if user_settings.dynamic_folds && !user_settings.no_foldcolumn && g:html_prevent_copy =~# 'f'
let user_settings.prevent_copy .= 'f'
endif
if user_settings.number_lines && g:html_prevent_copy =~# 'n'
let user_settings.prevent_copy .= 'n'
endif
if &diff && g:html_prevent_copy =~# 'd'
let user_settings.prevent_copy .= 'd'
endif
if !user_settings.ignore_folding && g:html_prevent_copy =~# 't'
let user_settings.prevent_copy .= 't'
endif
else
let user_settings.prevent_copy = ""
endif
endif
if empty(user_settings.prevent_copy)
let user_settings.no_invalid = 0
endif
if exists('g:html_id_expr')
let user_settings.id_suffix = eval(g:html_id_expr)
if user_settings.id_suffix !~ '^[-_:.A-Za-z0-9]*$'
echohl WarningMsg
echomsg '2html: g:html_id_expr evaluated to invalid string for HTML id attributes'
echomsg '2html: Omitting user-specified suffix'
echohl None
sleep 3
let user_settings.id_suffix=""
endif
else
let user_settings.id_suffix=""
endif
" TODO: font
return user_settings
endif
endfunc "}}}
" get the proper HTML charset name from a Vim encoding option.
function! tohtml#CharsetFromEncoding(settings) "{{{
let l:vim_encoding = a:settings.vim_encoding
if exists('g:html_charset_override') && has_key(g:html_charset_override, l:vim_encoding)
let a:settings.encoding = g:html_charset_override[l:vim_encoding]
else
if l:vim_encoding =~ '^8bit\|^2byte'
" 8bit- and 2byte- prefixes are to indicate encodings available on the
" system that Vim will convert with iconv(), look up just the encoding name,
" not Vim's prefix.
let l:vim_encoding = substitute(l:vim_encoding, '^8bit-\|^2byte-', '', '')
endif
if has_key(g:tohtml#encoding_to_charset, l:vim_encoding)
let a:settings.encoding = g:tohtml#encoding_to_charset[l:vim_encoding]
else
let a:settings.encoding = ""
endif
endif
if a:settings.encoding != ""
let l:vim_encoding = tohtml#EncodingFromCharset(a:settings.encoding)
if l:vim_encoding != ""
" if the Vim encoding to HTML encoding conversion is set up (by default or
" by the user) to convert to a different encoding, we need to also change
" the Vim encoding of the new buffer
let a:settings.vim_encoding = l:vim_encoding
endif
endif
endfun "}}}
" Get the proper Vim encoding option setting from an HTML charset name.
function! tohtml#EncodingFromCharset(encoding) "{{{
if exists('g:html_encoding_override') && has_key(g:html_encoding_override, a:encoding)
return g:html_encoding_override[a:encoding]
elseif has_key(g:tohtml#charset_to_encoding, tolower(a:encoding))
return g:tohtml#charset_to_encoding[tolower(a:encoding)]
else
return ""
endif
endfun "}}}
let &cpo = s:cpo_sav
unlet s:cpo_sav
" Make sure any patches will probably use consistent indent
" vim: ts=8 sw=2 sts=2 noet fdm=marker

@ -0,0 +1,775 @@
" vimball.vim : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: Jan 17, 2012
" Version: 35
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2011 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
" No warranty, express or implied.
" *** *** Use At-Your-Own-Risk! *** ***
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_vimball")
finish
endif
let g:loaded_vimball = "v35"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of vimball needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
" =====================================================================
" Constants: {{{1
if !exists("s:USAGE")
let s:USAGE = 0
let s:WARNING = 1
let s:ERROR = 2
" determine if cygwin is in use or not
if !exists("g:netrw_cygwin")
if has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
let g:netrw_cygwin= 1
else
let g:netrw_cygwin= 0
endif
else
let g:netrw_cygwin= 0
endif
endif
" set up g:vimball_mkdir if the mkdir() call isn't defined
if !exists("*mkdir")
if exists("g:netrw_local_mkdir")
let g:vimball_mkdir= g:netrw_local_mkdir
elseif executable("mkdir")
let g:vimball_mkdir= "mkdir"
elseif executable("makedir")
let g:vimball_mkdir= "makedir"
endif
if !exists(g:vimball_mkdir)
call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
endif
endif
endif
" =====================================================================
" Functions: {{{1
" ---------------------------------------------------------------------
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
" Input:
" line1,line2: a range of lines containing paths to files to be included in the vimball
" writelevel : if true, force a write to filename.vmb, even if it exists
" (usually accomplished with :MkVimball! ...
" filename : base name of file to be created (ie. filename.vmb)
" Output: a filename.vmb using vimball format:
" path
" filesize
" [file]
" path
" filesize
" [file]
fun! vimball#MkVimball(line1,line2,writelevel,...) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
let vbname= substitute(a:1,'\.\a\{3}$','.vmb','')
else
let vbname= a:1
endif
if vbname !~ '\.vmb$'
let vbname= vbname.'.vmb'
endif
" call Decho("vbname<".vbname.">")
if !a:writelevel && a:1 =~ '[\/]'
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes; use ! to insist")
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
return
endif
if !a:writelevel && filereadable(vbname)
call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist")
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
return
endif
" user option bypass
call vimball#SaveSettings()
if a:0 >= 2
" allow user to specify where to get the files
let home= expand(a:2)
else
" use first existing directory from rtp
let home= vimball#VimballHome()
endif
" save current directory
let curdir = getcwd()
call s:ChgDir(home)
" record current tab, initialize while loop index
let curtabnr = tabpagenr()
let linenr = a:line1
" call Decho("curtabnr=".curtabnr)
while linenr <= a:line2
let svfile = getline(linenr)
" call Decho("svfile<".svfile.">")
if !filereadable(svfile)
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
call s:ChgDir(curdir)
call vimball#RestoreSettings()
" call Dret("MkVimball")
return
endif
" create/switch to mkvimball tab
if !exists("vbtabnr")
tabnew
sil! file Vimball
let vbtabnr= tabpagenr()
else
exe "tabn ".vbtabnr
endif
let lastline= line("$") + 1
if lastline == 2 && getline("$") == ""
call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
call setline(2,'UseVimball')
call setline(3,'finish')
let lastline= line("$") + 1
endif
call setline(lastline ,substitute(svfile,'$',' [[[1',''))
call setline(lastline+1,0)
" write the file from the tab
" call Decho("exe $r ".fnameescape(svfile))
exe "$r ".fnameescape(svfile)
call setline(lastline+1,line("$") - lastline - 1)
" call Decho("lastline=".lastline." line$=".line("$"))
" restore to normal tab
exe "tabn ".curtabnr
let linenr= linenr + 1
endwhile
" write the vimball
exe "tabn ".vbtabnr
call s:ChgDir(curdir)
setlocal ff=unix
if a:writelevel
" call Decho("exe w! ".fnameescape(vbname))
exe "w! ".fnameescape(vbname)
else
" call Decho("exe w ".fnameescape(vbname))
exe "w ".fnameescape(vbname)
endif
" call Decho("Vimball<".vbname."> created")
echo "Vimball<".vbname."> created"
" remove the evidence
setlocal nomod bh=wipe
exe "tabn ".curtabnr
exe "tabc ".vbtabnr
" restore options
call vimball#RestoreSettings()
" call Dret("MkVimball")
endfun
" ---------------------------------------------------------------------
" vimball#Vimball: extract and distribute contents from a vimball {{{2
" (invoked the the UseVimball command embedded in
" vimballs' prologue)
fun! vimball#Vimball(really,...)
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)"
" call Dret("vimball#Vimball : needs 7.1 with patch 299 or later")
return
endif
if getline(1) !~ '^" Vimball Archiver'
echoerr "(Vimball) The current file does not appear to be a Vimball!"
" call Dret("vimball#Vimball")
return
endif
" set up standard settings
call vimball#SaveSettings()
let curtabnr = tabpagenr()
let vimballfile = expand("%:tr")
" set up vimball tab
" call Decho("setting up vimball tab")
tabnew
sil! file Vimball
let vbtabnr= tabpagenr()
let didhelp= ""
" go to vim plugin home
if a:0 > 0
" let user specify the directory where the vimball is to be unpacked.
" If, however, the user did not specify a full path, set the home to be below the current directory
let home= expand(a:1)
if has("win32") || has("win95") || has("win64") || has("win16")
if home !~ '^\a:[/\\]'
let home= getcwd().'/'.a:1
endif
elseif home !~ '^/'
let home= getcwd().'/'.a:1
endif
else
let home= vimball#VimballHome()
endif
" call Decho("home<".home.">")
" save current directory and remove older same-named vimball, if any
let curdir = getcwd()
" call Decho("home<".home.">")
" call Decho("curdir<".curdir.">")
call s:ChgDir(home)
let s:ok_unablefind= 1
call vimball#RmVimball(vimballfile)
unlet s:ok_unablefind
let linenr = 4
let filecnt = 0
" give title to listing of (extracted) files from Vimball Archive
if a:really
echohl Title | echomsg "Vimball Archive" | echohl None
else
echohl Title | echomsg "Vimball Archive Listing" | echohl None
echohl Statement | echomsg "files would be placed under: ".home | echohl None
endif
" apportion vimball contents to various files
" call Decho("exe tabn ".curtabnr)
exe "tabn ".curtabnr
" call Decho("linenr=".linenr." line$=".line("$"))
while 1 < linenr && linenr < line("$")
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
let fname = substitute(fname,'\\','/','g')
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
let filecnt = filecnt + 1
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc)
if a:really
echomsg "extracted <".fname.">: ".fsize." lines"
else
echomsg "would extract <".fname.">: ".fsize." lines"
endif
" call Decho("using L#".linenr.": will extract file<".fname.">")
" call Decho("using L#".(linenr+1).": fsize=".fsize)
" Allow AsNeeded/ directory to take place of plugin/ directory
" when AsNeeded/filename is filereadable or was present in VimballRecord
if fname =~ '\<plugin/'
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
" call Decho("using anfname<".anfname."> instead of <".fname.">")
let fname= anfname
endif
endif
" make directories if they don't exist yet
if a:really
" call Decho("making directories if they don't exist yet (fname<".fname.">)")
let fnamebuf= substitute(fname,'\\','/','g')
let dirpath = substitute(home,'\\','/','g')
" call Decho("init: fnamebuf<".fnamebuf.">")
" call Decho("init: dirpath <".dirpath.">")
while fnamebuf =~ '/'
let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
let dirpath = dirname
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
" call Decho("dirname<".dirname.">")
" call Decho("dirpath<".dirpath.">")
if !isdirectory(dirname)
" call Decho("making <".dirname.">")
if exists("g:vimball_mkdir")
call system(g:vimball_mkdir." ".shellescape(dirname))
else
call mkdir(dirname)
endif
call s:RecordInVar(home,"rmdir('".dirname."')")
endif
endwhile
endif
call s:ChgDir(home)
" grab specified qty of lines and place into "a" buffer
" (skip over path/filename and qty-lines)
let linenr = linenr + 2
let lastline = linenr + fsize - 1
" call Decho("exe ".linenr.",".lastline."yank a")
" no point in handling a zero-length file
if lastline >= linenr
exe "silent ".linenr.",".lastline."yank a"
" copy "a" buffer into tab
" call Decho('copy "a buffer into tab#'.vbtabnr)
exe "tabn ".vbtabnr
setlocal ma
sil! %d
silent put a
1
sil! d
" write tab to file
if a:really
let fnamepath= home."/".fname
" call Decho("exe w! ".fnameescape(fnamepath))
if fenc != ""
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
else
exe "silent w! ".fnameescape(fnamepath)
endif
echo "wrote ".fnameescape(fnamepath)
call s:RecordInVar(home,"call delete('".fnamepath."')")
endif
" return to tab with vimball
" call Decho("exe tabn ".curtabnr)
exe "tabn ".curtabnr
" set up help if its a doc/*.txt file
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
" call Decho("didhelp<".didhelp.">")
endif
endif
" update for next file
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
let linenr= linenr + fsize
endwhile
" set up help
" call Decho("about to set up help: didhelp<".didhelp.">")
if didhelp != ""
let htpath= home."/".didhelp
" call Decho("exe helptags ".htpath)
exe "helptags ".fnameescape(htpath)
echo "did helptags"
endif
" make sure a "Press ENTER..." prompt appears to keep the messages showing!
while filecnt <= &ch
echomsg " "
let filecnt= filecnt + 1
endwhile
" record actions in <.VimballRecord>
call s:RecordInFile(home)
" restore events, delete tab and buffer
exe "tabn ".vbtabnr
setlocal nomod bh=wipe
exe "tabn ".curtabnr
exe "tabc ".vbtabnr
call vimball#RestoreSettings()
call s:ChgDir(curdir)
" call Dret("vimball#Vimball")
endfun
" ---------------------------------------------------------------------
" vimball#RmVimball: remove any files, remove any directories made by any {{{2
" previous vimball extraction based on a file of the current
" name.
" Usage: RmVimball (assume current file is a vimball; remove)
" RmVimball vimballname
fun! vimball#RmVimball(...)
" call Dfunc("vimball#RmVimball() a:0=".a:0)
if exists("g:vimball_norecord")
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
return
endif
if a:0 == 0
let curfile= expand("%:tr")
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
else
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
" call Dret("vimball#RmVimball : suspect a:1<".a:1.">")
return
endif
let curfile= a:1
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
endif
if curfile =~ '\.vmb$'
let curfile= substitute(curfile,'\.vmb','','')
elseif curfile =~ '\.vba$'
let curfile= substitute(curfile,'\.vba','','')
endif
if a:0 >= 2
let home= expand(a:2)
else
let home= vimball#VimballHome()
endif
let curdir = getcwd()
" call Decho("home <".home.">")
" call Decho("curfile<".curfile.">")
" call Decho("curdir <".curdir.">")
call s:ChgDir(home)
if filereadable(".VimballRecord")
" call Decho(".VimballRecord is readable")
" call Decho("curfile<".curfile.">")
keepalt keepjumps 1split
sil! keepalt keepjumps e .VimballRecord
let keepsrch= @/
" call Decho('search for ^\M'.curfile.'.\m: ')
" call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ')
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ')
if search('^\M'.curfile."\m: ".'cw')
let foundit= 1
elseif search('^\M'.curfile.".\mvmb: ",'cw')
let foundit= 2
elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw')
let foundit= 2
elseif search('^\M'.curfile.".\mvba: ",'cw')
let foundit= 1
elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw')
let foundit= 1
else
let foundit = 0
endif
if foundit
if foundit == 1
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
else
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
endif
let s:VBRstring= substitute(exestring,'call delete(','','g')
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
" call Decho("exe ".exestring)
sil! keepalt keepjumps exe exestring
sil! keepalt keepjumps d
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
" call Decho("exestring<".exestring.">")
echomsg "removed ".exestring." files"
else
let s:VBRstring= ''
let curfile = substitute(curfile,'\.vmb','','')
" call Decho("unable to find <".curfile."> in .VimballRecord")
if !exists("s:ok_unablefind")
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
endif
endif
sil! keepalt keepjumps g/^\s*$/d
sil! keepalt keepjumps wq!
let @/= keepsrch
endif
call s:ChgDir(curdir)
" call Dret("vimball#RmVimball")
endfun
" ---------------------------------------------------------------------
" vimball#Decompress: attempts to automatically decompress vimballs {{{2
fun! vimball#Decompress(fname,...)
" call Dfunc("Decompress(fname<".a:fname.">) a:0=".a:0)
" decompression:
if expand("%") =~ '.*\.gz' && executable("gunzip")
" handle *.gz with gunzip
silent exe "!gunzip ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
elseif expand("%") =~ '.*\.gz' && executable("gzip")
" handle *.gz with gzip -d
silent exe "!gzip -d ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
" handle *.bz2 with bunzip2
silent exe "!bunzip2 ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
elseif expand("%") =~ '.*\.bz2' && executable("bzip2")
" handle *.bz2 with bzip2 -d
silent exe "!bzip2 -d ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
elseif expand("%") =~ '.*\.zip' && executable("unzip")
" handle *.zip with unzip
silent exe "!unzip ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.zip$','','')
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
endif
if a:0 == 0| setlocal noma bt=nofile fmr=[[[,]]] fdm=marker | endif
" call Dret("Decompress")
endfun
" ---------------------------------------------------------------------
" vimball#ShowMesg: {{{2
fun! vimball#ShowMesg(level,msg)
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
let rulerkeep = &ruler
let showcmdkeep = &showcmd
set noruler noshowcmd
redraw!
if &fo =~ '[ta]'
echomsg "***vimball*** ".a:msg
else
if a:level == s:WARNING || a:level == s:USAGE
echohl WarningMsg
elseif a:level == s:ERROR
echohl Error
endif
echomsg "***vimball*** ".a:msg
echohl None
endif
if a:level != s:USAGE
call inputsave()|let ok= input("Press <cr> to continue")|call inputrestore()
endif
let &ruler = rulerkeep
let &showcmd = showcmdkeep
" call Dret("vimball#ShowMesg")
endfun
" =====================================================================
" s:ChgDir: change directory (in spite of Windoze) {{{2
fun! s:ChgDir(newdir)
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
try
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
catch /^Vim\%((\a\+)\)\=:E/
call mkdir(fnameescape(substitute(a:newdir,'/','\\','g')))
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
endtry
else
try
exe 'silent cd '.fnameescape(a:newdir)
catch /^Vim\%((\a\+)\)\=:E/
call mkdir(fnameescape(a:newdir))
exe 'silent cd '.fnameescape(a:newdir)
endtry
endif
" call Dret("ChgDir : curdir<".getcwd().">")
endfun
" ---------------------------------------------------------------------
" s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2
fun! s:RecordInVar(home,cmd)
" call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)")
if a:cmd =~ '^rmdir'
" if !exists("s:recorddir")
" let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" else
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" endif
elseif !exists("s:recordfile")
let s:recordfile= a:cmd
else
let s:recordfile= s:recordfile."|".a:cmd
endif
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
endfun
" ---------------------------------------------------------------------
" s:RecordInFile: {{{2
fun! s:RecordInFile(home)
" call Dfunc("s:RecordInFile()")
if exists("g:vimball_norecord")
" call Dret("s:RecordInFile : g:vimball_norecord")
return
endif
if exists("s:recordfile") || exists("s:recorddir")
let curdir= getcwd()
call s:ChgDir(a:home)
keepalt keepjumps 1split
let cmd= expand("%:tr").": "
" call Decho("cmd<".cmd.">")
sil! keepalt keepjumps e .VimballRecord
setlocal ma
$
if exists("s:recordfile") && exists("s:recorddir")
let cmd= cmd.s:recordfile."|".s:recorddir
elseif exists("s:recorddir")
let cmd= cmd.s:recorddir
elseif exists("s:recordfile")
let cmd= cmd.s:recordfile
else
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
return
endif
" call Decho("cmd<".cmd.">")
" put command into buffer, write .VimballRecord `file
keepalt keepjumps put=cmd
sil! keepalt keepjumps g/^\s*$/d
sil! keepalt keepjumps wq!
call s:ChgDir(curdir)
if exists("s:recorddir")
" call Decho("unlet s:recorddir<".s:recorddir.">")
unlet s:recorddir
endif
if exists("s:recordfile")
" call Decho("unlet s:recordfile<".s:recordfile.">")
unlet s:recordfile
endif
else
" call Decho("s:record[file|dir] doesn't exist")
endif
" call Dret("s:RecordInFile")
endfun
" ---------------------------------------------------------------------
" vimball#VimballHome: determine/get home directory path (usually from rtp) {{{2
fun! vimball#VimballHome()
" call Dfunc("vimball#VimballHome()")
if exists("g:vimball_home")
let home= g:vimball_home
else
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) && filewritable(home) | break | endif
let basehome= substitute(home,'[/\\]\.vim$','','')
if isdirectory(basehome) && filewritable(basehome)
let home= basehome."/.vim"
break
endif
endfor
if home == ""
" just pick the first directory
let home= substitute(&rtp,',.*$','','')
endif
if (has("win32") || has("win95") || has("win64") || has("win16"))
let home= substitute(home,'/','\\','g')
endif
endif
" insure that the home directory exists
" call Decho("picked home<".home.">")
if !isdirectory(home)
if exists("g:vimball_mkdir")
" call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
" call Decho("system(".g:vimball_mkdir." ".shellescape(home).")")
call system(g:vimball_mkdir." ".shellescape(home))
else
" call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
call mkdir(home)
endif
endif
" call Dret("vimball#VimballHome <".home.">")
return home
endfun
" ---------------------------------------------------------------------
" vimball#SaveSettings: {{{2
fun! vimball#SaveSettings()
" call Dfunc("SaveSettings()")
let s:makeep = getpos("'a")
let s:regakeep= @a
if exists("&acd")
let s:acdkeep = &acd
endif
let s:eikeep = &ei
let s:fenkeep = &l:fen
let s:hidkeep = &hidden
let s:ickeep = &ic
let s:lzkeep = &lz
let s:pmkeep = &pm
let s:repkeep = &report
let s:vekeep = &ve
let s:ffkeep = &l:ff
let s:swfkeep = &l:swf
if exists("&acd")
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
else
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
endif
" vimballs should be in unix format
setlocal ff=unix
" call Dret("SaveSettings")
endfun
" ---------------------------------------------------------------------
" vimball#RestoreSettings: {{{2
fun! vimball#RestoreSettings()
" call Dfunc("RestoreSettings()")
let @a = s:regakeep
if exists("&acd")
let &acd = s:acdkeep
endif
let &l:fen = s:fenkeep
let &hidden = s:hidkeep
let &ic = s:ickeep
let &lz = s:lzkeep
let &pm = s:pmkeep
let &report = s:repkeep
let &ve = s:vekeep
let &ei = s:eikeep
let &l:ff = s:ffkeep
if s:makeep[0] != 0
" restore mark a
" call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",s:makeep)
endif
if exists("&acd")
unlet s:acdkeep
endif
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
" call Dret("RestoreSettings")
endfun
let &cpo = s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker

@ -0,0 +1,232 @@
" Vim completion for WAI-ARIA data file
" Language: HTML + WAI-ARIA
" Maintainer: othree <othree@gmail.com>
" Last Change: 2010 Sep 09
" WAI_ARIA: {{{
" Ref: http://www.w3.org/TR/wai-aria/
" Version: Draft 15 December 2009
let abstract_role = {}
let role_attributes = {}
let default_role = {}
" Ref: http://www.w3.org/TR/wai-aria/roles
" Version: Draft 15 December 2009
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']
let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
let role = extend(widget_role, document_structure)
let role = extend(role, landmark_role)
" http://www.w3.org/TR/wai-aria/states_and_properties#state_prop_taxonomy
"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']}
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': []}
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']}
let drag_and_drop_attributes = {'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'], 'aria-grabbed': ['true', 'false', 'undefined']}
let relationship_attributes = {'aria-activedescendant': [], 'aria-controls': [], 'aria-describedby': [], 'aria-flowto': [], 'aria-labelledby': [], 'aria-owns': [], 'aria-posinset': [], 'aria-setsize': []}
let aria_attributes = widget_attributes
let aria_attributes = extend(aria_attributes, live_region_attributes)
let aria_attributes = extend(aria_attributes, drag_and_drop_attributes)
let aria_attributes = extend(aria_attributes, relationship_attributes)
" Abstract Roles
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']
let role_attributes['default'] = abstract_role['roletype']
let abstract_role['structure'] = abstract_role['roletype']
let abstract_role['widget'] = abstract_role['roletype']
let abstract_role['window'] = abstract_role['roletype'] + ['aria-expanded']
let abstract_role['composite'] = abstract_role['widget'] + ['aria-activedescendant']
let abstract_role['input'] = abstract_role['widget']
let abstract_role['section'] = abstract_role['structure'] + ['aria-expanded']
let abstract_role['sectionhead'] = abstract_role['structure'] + ['aria-expanded']
let role_attributes['group'] = abstract_role['section']
let abstract_role['select'] = abstract_role['composite'] + role_attributes['group'] + abstract_role['input']
let abstract_role['range'] = abstract_role['input'] + ['aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext']
let role_attributes['region'] = abstract_role['section']
let abstract_role['landmark'] = role_attributes['region']
" Widget Roles
let role_attributes['list'] = role_attributes['region']
let role_attributes['listitem'] = abstract_role['section']
let role_attributes['dialog'] = abstract_role['window']
let role_attributes['menuitem'] = abstract_role['input']
let role_attributes['checkbox'] = abstract_role['input'] + ['aria-checked']
let role_attributes['menuitemcheckbox'] = role_attributes['menuitem'] + role_attributes['checkbox']
let role_attributes['option'] = abstract_role['input'] + ['aria-checked', 'aria-posinset', 'aria-selected', 'aria-setsize']
let role_attributes['radio'] = role_attributes['checkbox'] + role_attributes['option']
let role_attributes['directory'] = role_attributes['list']
let role_attributes['alert'] = role_attributes['region']
let role_attributes['alertdialog'] = role_attributes['alert'] + role_attributes['dialog']
let role_attributes['button'] = role_attributes['region'] + role_attributes['menuitemcheckbox']
let role_attributes['combobox'] = abstract_role['select'] + ['aria-expanded', 'aria-required']
let role_attributes['gridcell'] = abstract_role['section'] + abstract_role['widget']
let role_attributes['link'] = abstract_role['widget']
let role_attributes['log'] = role_attributes['region']
let role_attributes['marquee'] = role_attributes['region']
let role_attributes['menuitemradio'] = role_attributes['menuitemcheckbox'] + role_attributes['radio']
let role_attributes['progressbar'] = abstract_role['widget'] + ['aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext']
let role_attributes['radiogroup'] = abstract_role['select'] + ['aria-required']
let role_attributes['scrollbar'] = abstract_role['range'] + ['aria-controls', 'aria-orientation', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow']
let role_attributes['slider'] = abstract_role['range'] + ['aria-valuemax', 'aria-valuemin', 'aria-valuenow']
let role_attributes['spinbutton'] = abstract_role['composite'] + abstract_role['range'] + ['aria-required']
let role_attributes['status'] = abstract_role['composite'] + role_attributes['region']
let role_attributes['tab'] = abstract_role['sectionhead'] + abstract_role['widget'] + ['aria-selected']
let role_attributes['tabpanel'] = role_attributes['region']
let role_attributes['textbox'] = abstract_role['input'] + ['aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required']
let role_attributes['timer'] = role_attributes['status']
let role_attributes['tooltip'] = abstract_role['section']
let role_attributes['treeitem'] = role_attributes['listitem'] + role_attributes['option']
let role_attributes['grid'] = abstract_role['composite'] + role_attributes['region'] + ['aria-level', 'aria-multiselectable', 'aria-readonly']
let role_attributes['listbox'] = role_attributes['list'] + abstract_role['select'] + ['aria-multiselectable', 'aria-required']
let role_attributes['menu'] = role_attributes['list'] + abstract_role['select']
let role_attributes['menubar'] = role_attributes['menu']
let role_attributes['tablist'] = abstract_role['composite'] + role_attributes['directory']
let role_attributes['toolbar'] = role_attributes['group']
let role_attributes['tree'] = abstract_role['select'] + ['aria-multiselectable', 'aria-required']
let role_attributes['treegrid'] = role_attributes['grid'] + role_attributes['tree']
" Document Structure
let role_attributes['document'] = abstract_role['structure'] + ['aria-expanded']
let role_attributes['article'] = role_attributes['document'] + role_attributes['region']
let role_attributes['columnheader'] = role_attributes['gridcell'] + abstract_role['sectionhead'] + ['aria-sort']
let role_attributes['definition'] = abstract_role['section']
let role_attributes['heading'] = abstract_role['sectionhead'] + ['aria-level']
let role_attributes['img'] = abstract_role['section']
let role_attributes['math'] = abstract_role['section']
let role_attributes['note'] = abstract_role['section']
let role_attributes['presentation'] = abstract_role['structure']
let role_attributes['row'] = role_attributes['group'] + ['aria-level', 'aria-selected']
let role_attributes['rowheader'] = role_attributes['gridcell'] + abstract_role['sectionhead']
let role_attributes['separator'] = abstract_role['structure'] + ['aria-expanded']
" Landmark Roles
let role_attributes['application'] = abstract_role['landmark']
let role_attributes['banner'] = abstract_role['landmark']
let role_attributes['complementary'] = abstract_role['landmark']
let role_attributes['contentinfo'] = abstract_role['landmark']
let role_attributes['form'] = abstract_role['landmark']
let role_attributes['main'] = abstract_role['landmark']
let role_attributes['navigation'] = abstract_role['landmark']
let role_attributes['search'] = abstract_role['landmark']
" http://www.w3.org/TR/wai-aria/states_and_properties#state_prop_def
let aria_attributes_value = {
\ 'aria-autocomplete': ['ID', ''],
\ 'aria-checked': ['Token', ''],
\ 'aria-disabled': ['true/false', ''],
\ 'aria-expanded': ['Token', ''],
\ 'aria-haspopup': ['true/false', ''],
\ 'aria-hidden': ['true/false', ''],
\ 'aria-invalid': ['Token', ''],
\ 'aria-label': ['String', ''],
\ 'aria-level': ['Int', ''],
\ 'aria-multiline': ['true/false', ''],
\ 'aria-multiselectable': ['true/false', ''],
\ 'aria-orientation': ['Token', ''],
\ 'aria-pressed': ['Token', ''],
\ 'aria-readonly': ['true/false', ''],
\ 'aria-required': ['true/false', ''],
\ 'aria-selected': ['Token', ''],
\ 'aria-sort': ['Token', ''],
\ 'aria-valuemax': ['Number', ''],
\ 'aria-valuemin': ['Number', ''],
\ 'aria-valuenow': ['Number', ''],
\ 'aria-valuetext': ['String', ''],
\ 'aria-atomic': ['true/false', ''],
\ 'aria-busy': ['true/false', ''],
\ 'aria-live': ['Token', ''],
\ 'aria-relevant': ['*Token', ''],
\ 'aria-dropeffect': ['*Token', ''],
\ 'aria-grabbed': ['Token', ''],
\ 'aria-activedescendant': ['ID', ''],
\ 'aria-controls': ['*ID', ''],
\ 'aria-describedby': ['*ID', ''],
\ 'aria-flowto': ['*ID', ''],
\ 'aria-labelledby': ['*ID', ''],
\ 'aria-owns': ['*ID', ''],
\ 'aria-posinset': ['Int', ''],
\ 'aria-setsize': ['Int', '']
\ }
" http://dev.w3.org/html5/spec/content-models.html#annotations-for-assistive-technology-products-aria
let default_role = {
\ 'a': 'link',
\ 'area': 'link',
\ 'body': 'document',
\ 'button': 'button',
\ 'datalist': 'listbox',
\ 'h1': 'heading',
\ 'h2': 'heading',
\ 'h3': 'heading',
\ 'h4': 'heading',
\ 'h5': 'heading',
\ 'h6': 'heading',
\ 'hgroup': 'heading',
\ 'hr': 'separator',
\ 'img[alt=]': 'presentation',
\ 'input[type=button]': 'button',
\ 'input[type=email]': 'textbox',
\ 'input[type=image]': 'button',
\ 'input[type=number]': 'spinbutton',
\ 'input[type=password]': 'textbox',
\ 'input[type=range]': 'slider',
\ 'input[type=reset]': 'button',
\ 'input[type=search]': 'textbox',
\ 'input[type=submit]': 'button',
\ 'input[type=tel]': 'textbox',
\ 'input[type=text]': 'textbox',
\ 'input[list]': 'combobox',
\ 'input[type=url]': 'textbox',
\ 'input': 'textbox',
\ 'keygen': 'default',
\ 'label': 'default',
\ 'menu[type=list]': 'menu',
\ 'menu[type=toolbar]': 'toolbar',
\ 'menu': 'default',
\ 'link': 'link',
\ 'nav': 'navigation',
\ 'optgroup': 'default',
\ 'option': 'option',
\ 'progress': 'progressbar',
\ 'select': 'listbox',
\ 'summary': 'heading',
\ 'tbody': 'rowgroup',
\ 'td': 'gridcell',
\ 'textarea': 'textbox',
\ 'tfoot': 'rowgroup',
\ 'th[scope=col]': 'columnheader',
\ 'th[scope=row]': 'rowheader',
\ 'tr': 'row',
\ 'address': 'default',
\ 'article': 'article',
\ 'aside': 'note',
\ 'footer': 'default',
\ 'header': 'default',
\ 'details': 'group',
\ 'img': 'img',
\ 'input[type=checkbox]': 'checkbox',
\ 'input[type=radio]': 'radio',
\ 'li': 'listitem',
\ 'ol': 'list',
\ 'output': 'status',
\ 'section': 'region',
\ 'table': 'grid',
\ 'ul': 'list',
\ }
" }}}
let g:xmldata_aria = {
\ 'aria_attributes': aria_attributes,
\ 'role_attributes': role_attributes,
\ 'default_role': default_role,
\ 'vimariaattrinfo': aria_attributes_value
\ }

@ -0,0 +1,383 @@
let g:xmldata_html32 = {
\ 'vimxmlentities': ['AElig', 'Aacute', 'Acirc', 'Agrave', 'Aring', 'Atilde', 'Auml', 'Ccedil', 'ETH', 'Eacute', 'Ecirc', 'Egrave', 'Euml', 'Iacute', 'Icirc', 'Igrave', 'Iuml', 'Ntilde', 'Oacute', 'Ocirc', 'Ograve', 'Oslash', 'Otilde', 'Ouml', 'THORN', 'Uacute', 'Ucirc', 'Ugrave', 'Uuml', 'Yacute', 'aacute', 'acirc', 'acute', 'aelig', 'agrave', 'amp', 'aring', 'atilde', 'auml', 'brvbar', 'ccedil', 'cedil', 'cent', 'copy', 'curren', 'deg', 'divide', 'eacute', 'ecirc', 'egrave', 'eth', 'euml', 'frac12', 'frac14', 'frac34', 'gt', 'iacute', 'icirc', 'iexcl', 'igrave', 'iquest', 'iuml', 'laquo', 'lt', 'macr', 'micro', 'middot', 'nbsp', 'not', 'ntilde', 'oacute', 'ocirc', 'ograve', 'ordf', 'ordm', 'oslash', 'otilde', 'ouml', 'para', 'plusmn', 'pound', 'raquo', 'reg', 'sect', 'shy', 'sup1', 'sup2', 'sup3', 'szlig', 'thorn', 'times', 'uacute', 'ucirc', 'ugrave', 'uml', 'uuml', 'yacute', 'yen', 'yuml'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'rel': [], 'href': [], 'name': [], 'rev': [], 'title': []}
\ ],
\ 'address': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p'],
\ { }
\ ],
\ 'applet': [
\ ['param', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'width': [], 'vspace': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'height': [], 'hspace': [], 'codebase': [], 'code': []}
\ ],
\ 'area': [
\ [],
\ { 'alt': [], 'coords': [], 'nohref': ['BOOL'], 'href': [], 'shape': ['rect', 'circle', 'poly']}
\ ],
\ 'b': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'base': [
\ [],
\ { 'href': []}
\ ],
\ 'basefont': [
\ [],
\ { 'size': []}
\ ],
\ 'big': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'blockquote': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],
\ { }
\ ],
\ 'body': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],
\ { 'link': [], 'vlink': [], 'background': [], 'alink': [], 'bgcolor': [], 'text': []}
\ ],
\ 'br': [
\ [],
\ { 'clear': ['none', 'left', 'all', 'right', 'none']}
\ ],
\ 'caption': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['top', 'bottom']}
\ ],
\ 'center': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],
\ { }
\ ],
\ 'cite': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'code': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'dd': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table'],
\ { }
\ ],
\ 'dfn': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'dir': [
\ ['li'],
\ { 'compact': ['BOOL']}
\ ],
\ 'div': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'compact': ['BOOL']}
\ ],
\ 'dt': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'em': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'font': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'size': [], 'color': []}
\ ],
\ 'form': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'isindex', 'hr', 'table', 'address'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'action': [], 'method': ['GET', 'POST']}
\ ],
\ 'h1': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'h2': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'h3': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'h4': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'h5': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'h6': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'head': [
\ ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link'],
\ { }
\ ],
\ 'hr': [
\ [],
\ { 'width': [], 'align': ['left', 'right', 'center'], 'size': [], 'noshade': ['BOOL']}
\ ],
\ 'html': [
\ ['head', 'body', 'plaintext'],
\ { 'version': ['-//W3C//DTD HTML 3.2 Final//EN']}
\ ],
\ 'i': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'vspace': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'usemap': [], 'ismap': ['BOOL'], 'src': [], 'height': [], 'border': [], 'hspace': []}
\ ],
\ 'input': [
\ [],
\ { 'maxlength': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'size': [], 'checked': ['BOOL'], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE']}
\ ],
\ 'isindex': [
\ [],
\ { 'prompt': []}
\ ],
\ 'kbd': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'li': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table'],
\ { 'value': [], 'type': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'href': [], 'rev': [], 'title': []}
\ ],
\ 'listing': [
\ [],
\ { }
\ ],
\ 'map': [
\ ['area'],
\ { 'name': []}
\ ],
\ 'menu': [
\ ['li'],
\ { 'compact': ['BOOL']}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'name': [], 'content': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'compact': ['BOOL'], 'type': [], 'start': []}
\ ],
\ 'option': [
\ [''],
\ { 'value': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'align': ['left', 'center', 'right']}
\ ],
\ 'param': [
\ [],
\ { 'value': [], 'name': []}
\ ],
\ 'plaintext': [
\ [],
\ { }
\ ],
\ 'pre': [
\ ['tt', 'i', 'b', 'u', 'strike', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'applet', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { 'width': ['#implied']}
\ ],
\ 'samp': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'script': [
\ [],
\ { }
\ ],
\ 'select': [
\ ['option'],
\ { 'name': [], 'size': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'strike': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'strong': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'style': [
\ [],
\ { }
\ ],
\ 'sub': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'sup': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'table': [
\ ['caption', 'tr'],
\ { 'width': [], 'align': ['left', 'center', 'right'], 'border': [], 'cellspacing': [], 'cellpadding': []}
\ ],
\ 'td': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],
\ { 'width': [], 'align': ['left', 'center', 'right'], 'nowrap': ['BOOL'], 'valign': ['top', 'middle', 'bottom'], 'height': [], 'rowspan': ['1'], 'colspan': ['1']}
\ ],
\ 'textarea': [
\ [''],
\ { 'name': [], 'rows': [], 'cols': []}
\ ],
\ 'th': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea', 'p', 'ul', 'ol', 'dir', 'menu', 'pre', 'xmp', 'listing', 'dl', 'div', 'center', 'blockquote', 'form', 'isindex', 'hr', 'table', 'address'],
\ { 'width': [], 'align': ['left', 'center', 'right'], 'nowrap': ['BOOL'], 'valign': ['top', 'middle', 'bottom'], 'height': [], 'rowspan': ['1'], 'colspan': ['1']}
\ ],
\ 'title': [
\ [''],
\ { }
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'align': ['left', 'center', 'right'], 'valign': ['top', 'middle', 'bottom']}
\ ],
\ 'tt': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'u': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'ul': [
\ ['li'],
\ { 'compact': ['BOOL'], 'type': ['disc', 'square', 'circle']}
\ ],
\ 'var': [
\ ['tt', 'i', 'b', 'u', 'strike', 'big', 'small', 'sub', 'sup', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'a', 'img', 'applet', 'font', 'basefont', 'br', 'script', 'map', 'input', 'select', 'textarea'],
\ { }
\ ],
\ 'xmp': [
\ [],
\ { }
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'basefont': ['/>', ''],
\ 'br': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'isindex': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,468 @@
let g:xmldata_html401t = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'rel': [], 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'target': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'p'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'applet': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'object': [], 'id': [], 'code': [], 'vspace': [], 'archive': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'style': [], 'name': [], 'height': [], 'hspace': [], 'title': [], 'class': [], 'codebase': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'target': [], 'nohref': ['BOOL'], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'alt': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'b': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'target': [], 'href': []}
\ ],
\ 'basefont': [
\ [],
\ { 'size': [], 'face': [], 'color': [], 'id': []}
\ ],
\ 'bdo': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'big': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del'],
\ { 'vlink': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'alink': [], 'onkeyup': [], 'bgcolor': [], 'text': [], 'onmouseup': [], 'id': [], 'link': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'background': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'clear': ['none', 'left', 'all', 'right', 'none'], 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'hr', 'table', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'value': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'center': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dir': [
\ ['li'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'font': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'size': [], 'face': [], 'color': [], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'target': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['GET', 'POST'], 'onmouseover': [], 'lang': [], 'accept': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h2': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h3': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h4': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h5': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h6': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'head': [
\ ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'noshade': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'html': [
\ ['head', 'frameset'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'frameset': [
\ ['frameset', 'frame', 'noframes'],
\ { 'rows': [], 'cols': [], 'id': [], 'style': [], 'onunload': [], 'onload': [], 'class': [], 'title': []}
\ ],
\ 'frame': [
\ [],
\ { 'scrolling': ['auto', 'yes', 'no', 'auto'], 'noresize': ['BOOL'], 'marginwidth': [], 'id': [], 'marginheight': [], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'i': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'iframe': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'scrolling': ['auto', 'yes', 'no', 'auto'], 'marginwidth': [], 'id': [], 'marginheight': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'height': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'vspace': [], 'onmouseover': [], 'alt': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'height': [], 'border': [], 'hspace': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE', 'BUTTON'], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'ismap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'tabindex': [], 'accept': [], 'alt': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'isindex': [
\ [],
\ { 'id': [], 'lang': [], 'prompt': [], 'class': [], 'title': [], 'dir': ['ltr', 'rtl'], 'style': []}
\ ],
\ 'kbd': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'label': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'legend': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'target': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'menu': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'noframes': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'vspace': [], 'tabindex': [], 'standby': [], 'archive': [], 'classid': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'height': [], 'border': [], 'codetype': [], 'hspace': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'start': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['DATA', 'REF', 'OBJECT']}
\ ],
\ 'pre': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'br', 'script', 'map', 'q', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'width': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'q': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 's': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'samp': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'script': [
\ [],
\ { 'src': [], 'for': [], 'charset': [], 'event': [], 'type': [], 'defer': ['BOOL'], 'language': []}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'span': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strike': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strong': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'style': [
\ [],
\ { 'media': [], 'lang': [], 'type': [], 'title': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'sub': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'sup': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'datapagesize': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'bgcolor': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'lang': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'tt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'u': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': ['disc', 'square', 'circle'], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'var': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'basefont': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'isindex': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,410 @@
let g:xmldata_html401s = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'rel': [], 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onkeydown': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'name': [], 'style': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'nohref': ['BOOL'], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'alt': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'b': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'href': []}
\ ],
\ 'bdo': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'big': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'script', 'ins', 'del'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'hr', 'table', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'value': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'hr', 'table', 'fieldset', 'address', 'script'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['GET', 'POST'], 'onmouseover': [], 'lang': [], 'accept': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h2': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h3': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h4': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h5': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h6': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'head': [
\ ['title', 'base', 'script', 'style', 'meta', 'link', 'object'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'html': [
\ ['head', 'body'],
\ { 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'i': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'alt': [], 'lang': [], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'height': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE', 'BUTTON'], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'ismap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'accept': [], 'alt': [], 'tabindex': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'kbd': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'label': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'legend': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'archive': [], 'standby': [], 'tabindex': [], 'classid': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'codetype': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['DATA', 'REF', 'OBJECT']}
\ ],
\ 'pre': [
\ ['tt', 'i', 'b', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'br', 'script', 'map', 'q', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'q': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'samp': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'script': [
\ [],
\ { 'src': [], 'for': [], 'charset': [], 'event': [], 'type': [], 'defer': ['BOOL']}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'span': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strong': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'style': [
\ [],
\ { 'media': [], 'lang': [], 'type': [], 'title': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'sub': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'sup': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'datapagesize': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'headers': [], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'headers': [], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'lang': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'tt': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'var': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,460 @@
let g:xmldata_html401t = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'rel': [], 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'target': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'p'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'applet': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'object': [], 'id': [], 'code': [], 'vspace': [], 'archive': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'style': [], 'name': [], 'height': [], 'hspace': [], 'title': [], 'class': [], 'codebase': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'target': [], 'nohref': ['BOOL'], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'alt': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'b': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'target': [], 'href': []}
\ ],
\ 'basefont': [
\ [],
\ { 'size': [], 'face': [], 'color': [], 'id': []}
\ ],
\ 'bdo': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'big': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del'],
\ { 'vlink': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'alink': [], 'onkeyup': [], 'bgcolor': [], 'text': [], 'onmouseup': [], 'id': [], 'link': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'background': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'clear': ['none', 'left', 'all', 'right', 'none'], 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'hr', 'table', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'value': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'center': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dir': [
\ ['li'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'font': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'size': [], 'face': [], 'color': [], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'target': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['GET', 'POST'], 'onmouseover': [], 'lang': [], 'accept': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h2': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h3': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h4': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h5': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h6': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'head': [
\ ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'noshade': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'html': [
\ ['head', 'body'],
\ { 'dir': ['ltr', 'rtl'], 'lang': [], 'version': ['-//W3C//DTD HTML 4.01 Transitional//EN']}
\ ],
\ 'i': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'iframe': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'scrolling': ['auto', 'yes', 'no', 'auto'], 'marginwidth': [], 'id': [], 'marginheight': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'height': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'vspace': [], 'onmouseover': [], 'alt': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'height': [], 'border': [], 'hspace': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE', 'BUTTON'], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'ismap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'tabindex': [], 'accept': [], 'alt': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'isindex': [
\ [],
\ { 'id': [], 'lang': [], 'prompt': [], 'class': [], 'title': [], 'dir': ['ltr', 'rtl'], 'style': []}
\ ],
\ 'kbd': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'label': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'legend': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'target': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'menu': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'noframes': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'vspace': [], 'tabindex': [], 'standby': [], 'archive': [], 'classid': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'height': [], 'border': [], 'codetype': [], 'hspace': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'start': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['DATA', 'REF', 'OBJECT']}
\ ],
\ 'pre': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'br', 'script', 'map', 'q', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'width': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'q': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 's': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'samp': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'script': [
\ [],
\ { 'src': [], 'for': [], 'charset': [], 'event': [], 'type': [], 'defer': ['BOOL'], 'language': []}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'span': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strike': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strong': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'style': [
\ [],
\ { 'media': [], 'lang': [], 'type': [], 'title': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'sub': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'sup': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'datapagesize': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'bgcolor': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'lang': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'tt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'u': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': ['disc', 'square', 'circle'], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'var': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'basefont': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'isindex': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,468 @@
let g:xmldata_html40t = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'rel': [], 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'target': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'p'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'applet': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'object': [], 'id': [], 'code': [], 'vspace': [], 'archive': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'style': [], 'name': [], 'height': [], 'hspace': [], 'title': [], 'class': [], 'codebase': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'target': [], 'nohref': ['BOOL'], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'alt': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'b': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'target': [], 'href': []}
\ ],
\ 'basefont': [
\ [],
\ { 'size': [], 'face': [], 'color': [], 'id': []}
\ ],
\ 'bdo': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'big': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del'],
\ { 'vlink': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'alink': [], 'onkeyup': [], 'bgcolor': [], 'text': [], 'onmouseup': [], 'id': [], 'link': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'background': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'clear': ['none', 'left', 'all', 'right', 'none'], 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'hr', 'table', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'value': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'center': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dir': [
\ ['li'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'font': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'size': [], 'face': [], 'color': [], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'target': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['GET', 'POST'], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h2': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h3': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h4': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h5': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h6': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'head': [
\ ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'width': [], 'ondblclick': [], 'size': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'noshade': ['BOOL'], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'html': [
\ ['head', 'frameset'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'frameset': [
\ ['frameset', 'frame', 'noframes'],
\ { 'rows': [], 'cols': [], 'id': [], 'style': [], 'onunload': [], 'onload': [], 'class': [], 'title': []}
\ ],
\ 'frame': [
\ [],
\ { 'scrolling': ['auto', 'yes', 'no', 'auto'], 'noresize': ['BOOL'], 'marginwidth': [], 'id': [], 'marginheight': [], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'i': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'iframe': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'scrolling': ['auto', 'yes', 'no', 'auto'], 'marginwidth': [], 'id': [], 'marginheight': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'height': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'vspace': [], 'onmouseover': [], 'alt': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'border': [], 'hspace': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE', 'BUTTON'], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'accept': [], 'alt': [], 'tabindex': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'isindex': [
\ [],
\ { 'id': [], 'lang': [], 'prompt': [], 'class': [], 'title': [], 'dir': ['ltr', 'rtl'], 'style': []}
\ ],
\ 'kbd': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'label': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'legend': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'target': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'menu': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'noframes': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'vspace': [], 'tabindex': [], 'standby': [], 'archive': [], 'classid': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'height': [], 'border': [], 'codetype': [], 'hspace': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'start': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['DATA', 'REF', 'OBJECT']}
\ ],
\ 'pre': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'br', 'script', 'map', 'q', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'width': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'q': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 's': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'samp': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'script': [
\ [],
\ { 'src': [], 'for': [], 'charset': [], 'event': [], 'type': [], 'defer': ['BOOL'], 'language': []}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'span': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strike': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strong': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'style': [
\ [],
\ { 'media': [], 'lang': [], 'type': [], 'title': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'sub': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'sup': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'datapagesize': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'bgcolor': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'lang': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'tt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'u': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': ['disc', 'square', 'circle'], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'var': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'basefont': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'isindex': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,410 @@
let g:xmldata_html40s = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'rel': [], 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onkeydown': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'name': [], 'style': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'nohref': ['BOOL'], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'alt': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'b': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'href': []}
\ ],
\ 'bdo': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'big': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'script', 'ins', 'del'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'hr', 'table', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'value': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'hr', 'table', 'fieldset', 'address', 'script'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['GET', 'POST'], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h2': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h3': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h4': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h5': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h6': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'head': [
\ ['title', 'base', 'script', 'style', 'meta', 'link', 'object'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'html': [
\ ['head', 'body'],
\ { 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'i': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'alt': [], 'lang': [], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE', 'BUTTON'], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'accept': [], 'alt': [], 'tabindex': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'kbd': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'label': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'legend': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'archive': [], 'standby': [], 'tabindex': [], 'classid': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'codetype': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['DATA', 'REF', 'OBJECT']}
\ ],
\ 'pre': [
\ ['tt', 'i', 'b', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'br', 'script', 'map', 'q', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'q': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'samp': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'script': [
\ [],
\ { 'src': [], 'for': [], 'charset': [], 'event': [], 'type': [], 'defer': ['BOOL']}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'span': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strong': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'style': [
\ [],
\ { 'media': [], 'lang': [], 'type': [], 'title': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'sub': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'sup': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'datapagesize': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'headers': [], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'pre', 'dl', 'div', 'noscript', 'blockquote', 'form', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'headers': [], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'lang': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'tt': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'var': [
\ ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'object', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,460 @@
let g:xmldata_html40t = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'rel': [], 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'target': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'p'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'applet': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'object': [], 'id': [], 'code': [], 'vspace': [], 'archive': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'style': [], 'name': [], 'height': [], 'hspace': [], 'title': [], 'class': [], 'codebase': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'target': [], 'nohref': ['BOOL'], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'alt': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'b': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'target': [], 'href': []}
\ ],
\ 'basefont': [
\ [],
\ { 'size': [], 'face': [], 'color': [], 'id': []}
\ ],
\ 'bdo': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'big': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del'],
\ { 'vlink': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'alink': [], 'onkeyup': [], 'bgcolor': [], 'text': [], 'onmouseup': [], 'id': [], 'link': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'background': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'clear': ['none', 'left', 'all', 'right', 'none'], 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'hr', 'table', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'value': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'center': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dir': [
\ ['li'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'font': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'dir': ['ltr', 'rtl'], 'size': [], 'face': [], 'color': [], 'id': [], 'lang': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'target': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['GET', 'POST'], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h2': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h3': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h4': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h5': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h6': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'head': [
\ ['title', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'width': [], 'ondblclick': [], 'size': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'noshade': ['BOOL'], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'html': [
\ ['head', 'body'],
\ { 'dir': ['ltr', 'rtl'], 'lang': [], 'version': ['-//W3C//DTD HTML 4.0 Transitional//EN']}
\ ],
\ 'i': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'iframe': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'width': [], 'scrolling': ['auto', 'yes', 'no', 'auto'], 'marginwidth': [], 'id': [], 'marginheight': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'height': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'vspace': [], 'onmouseover': [], 'alt': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'border': [], 'hspace': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'type': ['TEXT', 'PASSWORD', 'CHECKBOX', 'RADIO', 'SUBMIT', 'RESET', 'FILE', 'IMAGE', 'BUTTON'], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'accept': [], 'alt': [], 'tabindex': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'isindex': [
\ [],
\ { 'id': [], 'lang': [], 'prompt': [], 'class': [], 'title': [], 'dir': ['ltr', 'rtl'], 'style': []}
\ ],
\ 'kbd': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'label': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'legend': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'target': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'menu': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'noframes': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'vspace': [], 'tabindex': [], 'standby': [], 'archive': [], 'classid': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'height': [], 'border': [], 'codetype': [], 'hspace': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'start': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['DATA', 'REF', 'OBJECT']}
\ ],
\ 'pre': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'br', 'script', 'map', 'q', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'width': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'q': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 's': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'samp': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'script': [
\ [],
\ { 'src': [], 'for': [], 'charset': [], 'event': [], 'type': [], 'defer': ['BOOL'], 'language': []}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'span': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strike': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'strong': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'style': [
\ [],
\ { 'media': [], 'lang': [], 'type': [], 'title': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'sub': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'sup': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'datapagesize': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'bgcolor': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dir', 'menu', 'pre', 'dl', 'div', 'center', 'noscript', 'noframes', 'blockquote', 'form', 'isindex', 'hr', 'table', 'fieldset', 'address', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'height': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'lang': [], 'dir': ['ltr', 'rtl']}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'char': []}
\ ],
\ 'tt': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'u': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': ['disc', 'square', 'circle'], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': []}
\ ],
\ 'var': [
\ ['tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'a', 'img', 'applet', 'object', 'font', 'basefont', 'br', 'script', 'map', 'q', 'sub', 'sup', 'span', 'bdo', 'iframe', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'basefont': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'isindex': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,791 @@
" Vim completion for HTML5 data file
" Language: HTML5
" Maintainer: othree <othree@gmail.com>
" Last Change: 2011 Apr 9
" Lang Tag: {{{
" Ref: http://www.iana.org/assignments/language-subtag-registry
" Version: 2010/09/07
" Description: only get two-letter language tag
let lang_tag = [
\ 'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'ba', 'be', 'bg', 'bh', 'bi', 'bm',
\ 'bn', 'bo', 'br', 'bs', 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee',
\ 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gu',
\ 'gv', 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'in', 'io',
\ 'is', 'it', 'iu', 'iw', 'ja', 'ji', 'jv', 'jw', 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr',
\ 'ks', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk',
\ 'ml', 'mn', 'mo', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny',
\ 'oc', 'oj', 'om', 'or', 'os', 'pa', 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc',
\ 'sd', 'se', 'sg', 'sh', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw', 'ta',
\ 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've',
\ 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu', 'zh-CN', 'zh-TW']
" }}}
" Charset: {{{
" Ref: http://www.iana.org/assignments/character-sets
" Version: 2010/09/07
let charset = [
\ 'ANSI_X3.4-1968', 'ISO_8859-1:1987', 'ISO_8859-2:1987', 'ISO_8859-3:1988', 'ISO_8859-4:1988', 'ISO_8859-5:1988',
\ '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',
\ 'JIS_Encoding', 'Shift_JIS', 'Extended_UNIX_Code_Packed_Format_for_Japanese', 'Extended_UNIX_Code_Fixed_Width_for_Japanese',
\ 'BS_4730', 'SEN_850200_C', 'IT', 'ES', 'DIN_66003', 'NS_4551-1', 'NF_Z_62-010', 'ISO-10646-UTF-1', 'ISO_646.basic:1983',
\ 'INVARIANT', 'ISO_646.irv:1983', 'NATS-SEFI', 'NATS-SEFI-ADD', 'NATS-DANO', 'NATS-DANO-ADD', 'SEN_850200_B', 'KS_C_5601-1987',
\ 'ISO-2022-KR', 'EUC-KR', 'ISO-2022-JP', 'ISO-2022-JP-2', 'JIS_C6220-1969-jp', 'JIS_C6220-1969-ro', 'PT', 'greek7-old',
\ 'latin-greek', 'NF_Z_62-010_(1973)', 'Latin-greek-1', 'ISO_5427', 'JIS_C6226-1978', 'BS_viewdata', 'INIS', 'INIS-8',
\ 'INIS-cyrillic', 'ISO_5427:1981', 'ISO_5428:1980', 'GB_1988-80', 'GB_2312-80', 'NS_4551-2', 'videotex-suppl', 'PT2',
\ 'ES2', 'MSZ_7795.3', 'JIS_C6226-1983', 'greek7', 'ASMO_449', 'iso-ir-90', 'JIS_C6229-1984-a', 'JIS_C6229-1984-b',
\ 'JIS_C6229-1984-b-add', 'JIS_C6229-1984-hand', 'JIS_C6229-1984-hand-add', 'JIS_C6229-1984-kana', 'ISO_2033-1983',
\ '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',
\ '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',
\ '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',
\ 'ISO_10367-box', 'latin-lap', 'JIS_X0212-1990', 'DS_2089', 'us-dk', 'dk-us', 'KSC5636', 'UNICODE-1-1-UTF-7', 'ISO-2022-CN',
\ 'ISO-2022-CN-EXT', 'UTF-8', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16', 'GBK', 'GB18030', 'OSD_EBCDIC_DF04_15',
\ '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',
\ 'ISO-10646-Unicode-Latin1', 'ISO-10646-J-1', 'ISO-Unicode-IBM-1261', 'ISO-Unicode-IBM-1268', 'ISO-Unicode-IBM-1276',
\ 'ISO-Unicode-IBM-1264', 'ISO-Unicode-IBM-1265', 'UNICODE-1-1', 'SCSU', 'UTF-7', 'UTF-16BE', 'UTF-16LE', 'UTF-16', 'CESU-8',
\ 'UTF-32', 'UTF-32BE', 'UTF-32LE', 'BOCU-1', 'ISO-8859-1-Windows-3.0-Latin-1', 'ISO-8859-1-Windows-3.1-Latin-1',
\ 'ISO-8859-2-Windows-Latin-2', 'ISO-8859-9-Windows-Latin-5', 'hp-roman8', 'Adobe-Standard-Encoding', 'Ventura-US',
\ 'Ventura-International', 'DEC-MCS', 'IBM850', 'PC8-Danish-Norwegian', 'IBM862', 'PC8-Turkish', 'IBM-Symbols', 'IBM-Thai',
\ 'HP-Legal', 'HP-Pi-font', 'HP-Math8', 'Adobe-Symbol-Encoding', 'HP-DeskTop', 'Ventura-Math', 'Microsoft-Publishing',
\ 'Windows-31J', 'GB2312', 'Big5', 'macintosh', 'IBM037', 'IBM038', 'IBM273', 'IBM274', 'IBM275', 'IBM277', 'IBM278',
\ 'IBM280', 'IBM281', 'IBM284', 'IBM285', 'IBM290', 'IBM297', 'IBM420', 'IBM423', 'IBM424', 'IBM437', 'IBM500', 'IBM851',
\ 'IBM852', 'IBM855', 'IBM857', 'IBM860', 'IBM861', 'IBM863', 'IBM864', 'IBM865', 'IBM868', 'IBM869', 'IBM870', 'IBM871',
\ 'IBM880', 'IBM891', 'IBM903', 'IBM904', 'IBM905', 'IBM918', 'IBM1026', 'EBCDIC-AT-DE', 'EBCDIC-AT-DE-A', 'EBCDIC-CA-FR',
\ 'EBCDIC-DK-NO', 'EBCDIC-DK-NO-A', 'EBCDIC-FI-SE', 'EBCDIC-FI-SE-A', 'EBCDIC-FR', 'EBCDIC-IT', 'EBCDIC-PT', 'EBCDIC-ES',
\ 'EBCDIC-ES-A', 'EBCDIC-ES-S', 'EBCDIC-UK', 'EBCDIC-US', 'UNKNOWN-8BIT', 'MNEMONIC', 'MNEM', 'VISCII', 'VIQR', 'KOI8-R',
\ 'HZ-GB-2312', 'IBM866', 'IBM775', 'KOI8-U', 'IBM00858', 'IBM00924', 'IBM01140', 'IBM01141', 'IBM01142', 'IBM01143',
\ 'IBM01144', 'IBM01145', 'IBM01146', 'IBM01147', 'IBM01148', 'IBM01149', 'Big5-HKSCS', 'IBM1047', 'PTCP154', 'Amiga-1251',
\ 'KOI7-switched', 'BRF', 'TSCII', 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255',
\ 'windows-1256', 'windows-1257', 'windows-1258', 'TIS-620', ]
" }}}
" Attributes_and_Settings: {{{
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': []}
let xml_attributes = {'xml:lang': lang_tag, 'xml:space': ['preserve'], 'xml:base': [], 'xmlns': []}
let body_attributes = {}
let global_attributes = extend(core_attributes, xml_attributes)
if !exists('g:event_handler_attributes_complete')
let g:event_handler_attributes_complete = 1
endif
" http://dev.w3.org/html5/spec/Overview.html#attributes-1
let attributes_value = {
\ 'accept': ['MIME', ''],
\ 'accept-charset': ['Charset', ''],
\ 'accesskey': ['Character', ''],
\ 'action': ['URL', ''],
\ 'alt': ['Text', ''],
\ 'async': ['Bool', ''],
\ 'autocomplete': ['on/off', ''],
\ 'autofocus': ['Bool', ''],
\ 'autoplay': ['Bool', ''],
\ 'border': ['1', ''],
\ 'challenge': ['Text', ''],
\ 'charset': ['Charset', ''],
\ 'checked': ['Bool', ''],
\ 'cite': ['URL', ''],
\ 'class': ['*Token', ''],
\ 'cols': ['Int', ''],
\ 'colspan': ['Int', ''],
\ 'content': ['Text', ''],
\ 'contenteditable': ['true/false', ''],
\ 'contextmenu': ['ID', ''],
\ 'controls': ['Bool', ''],
\ 'coords': ['*Int', ''],
\ 'data': ['URL', ''],
\ 'datetime': ['Datetime', ''],
\ 'defer': ['Bool', ''],
\ 'dir': ['ltr/rtl', ''],
\ 'disabled': ['Bool', ''],
\ 'draggable': ['true/false', ''],
\ 'enctype': ['Token', ''],
\ 'for': ['ID', ''],
\ 'form': ['ID', ''],
\ 'formaction': ['URL', ''],
\ 'formenctype': ['Token', ''],
\ 'formmethod': ['HTTP Method', ''],
\ 'formnovalidate': ['Bool', ''],
\ 'formtarget': ['Name', ''],
\ 'headers': ['*ID', ''],
\ 'height': ['Int', ''],
\ 'hidden': ['Bool', ''],
\ 'high': ['Number', ''],
\ 'href': ['URL', ''],
\ 'hreflang': ['Lang Tag', ''],
\ 'http-equiv': ['Text', ''],
\ 'icon': ['URL', ''],
\ 'id': ['Text', ''],
\ 'ismap': ['Bool', ''],
\ 'keytype': ['Text', ''],
\ 'label': ['Text', ''],
\ 'lang': ['Lang Tag', ''],
\ 'list': ['ID', ''],
\ 'loop': ['Bool', ''],
\ 'low': ['Number', ''],
\ 'manifest': ['URL', ''],
\ 'max': ['Number', ''],
\ 'maxlength': ['Int', ''],
\ 'media': ['Text', ''],
\ 'method': ['HTTP Method', ''],
\ 'min': ['Number', ''],
\ 'multiple': ['Bool', ''],
\ 'name': ['Text', ''],
\ 'novalidate': ['Bool', ''],
\ 'open': ['Bool', ''],
\ 'optimum': ['Number', ''],
\ 'pattern': ['Pattern', ''],
\ 'placeholder': ['Text', ''],
\ 'poster': ['URL', ''],
\ 'preload': ['Token', ''],
\ 'pubdate': ['Bool', ''],
\ 'radiogroup': ['Text', ''],
\ 'readonly': ['Bool', ''],
\ 'rel': ['*Token', ''],
\ 'required': ['Bool', ''],
\ 'reversed': ['Bool', ''],
\ 'rows': ['Int', ''],
\ 'rowspan': ['Int', ''],
\ 'sandbox': ['*Token', ''],
\ 'spellcheck': ['true/false', ''],
\ 'scope': ['Token', ''],
\ 'scoped': ['Bool', ''],
\ 'seamless': ['Bool', ''],
\ 'selected': ['Bool', ''],
\ 'shape': ['Token', ''],
\ 'size': ['Int', ''],
\ 'sizes': ['*Token', ''],
\ 'span': ['Int', ''],
\ 'src': ['Int', ''],
\ 'srcdoc': ['Document', ''],
\ 'start': ['Int', ''],
\ 'step': ['Int', ''],
\ 'style': ['Style', ''],
\ 'summary': ['Text', ''],
\ 'tabindex': ['Int', ''],
\ 'target': ['Name', ''],
\ 'title': ['Text', ''],
\ 'type': ['Token', ''],
\ 'usemap': ['Name', ''],
\ 'value': ['Text', ''],
\ 'width': ['Int', ''],
\ 'wrap': ['soft/hard', ''],
\ 'xml:lang': ['Lang tag', ''],
\ 'xml:base': ['*URI', ''],
\ 'xml:space': ['preserve', ''],
\ 'xmlns': ['URI', ''],
\ 'version': ['HTML+RDFa 1.1', ''],
\ 'role': ['*Token', '']
\ }
if g:event_handler_attributes_complete == 1
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': []}
let global_attributes = extend(global_attributes, event_handler_attributes)
let body_attributes = {'onafterprint': [], 'onbeforeprint': [], 'onbeforeunload': [], 'onblur': [], 'onerror': [], 'onfocus': [], 'onhashchange': [], 'onload': [], 'onmessage': [], 'onoffline': [], 'ononline': [], 'onpopstate': [], 'onredo': [], 'onresize': [], 'onstorage': [], 'onundo': [], 'onunload': []}
let event_attributes_value = {
\ 'onabort': ['Script', ''],
\ 'onafterprint': ['Script', ''],
\ 'onbeforeprint': ['Script', ''],
\ 'onbeforeunload': ['Script', ''],
\ 'onblur': ['Script', ''],
\ 'oncanplay': ['Script', ''],
\ 'oncanplaythrough': ['Script', ''],
\ 'onchange': ['Script', ''],
\ 'onclick': ['Script', ''],
\ 'oncontextmenu': ['Script', ''],
\ 'ondblclick': ['Script', ''],
\ 'ondrag': ['Script', ''],
\ 'ondragend': ['Script', ''],
\ 'ondragenter': ['Script', ''],
\ 'ondragleave': ['Script', ''],
\ 'ondragover': ['Script', ''],
\ 'ondragstart': ['Script', ''],
\ 'ondrop': ['Script', ''],
\ 'ondurationchange': ['Script', ''],
\ 'onemptied': ['Script', ''],
\ 'onended': ['Script', ''],
\ 'onerror': ['Script', ''],
\ 'onfocus': ['Script', ''],
\ 'onformchange': ['Script', ''],
\ 'onforminput': ['Script', ''],
\ 'onhashchange': ['Script', ''],
\ 'oninput': ['Script', ''],
\ 'oninvalid': ['Script', ''],
\ 'onkeydown': ['Script', ''],
\ 'onkeypress': ['Script', ''],
\ 'onkeyup': ['Script', ''],
\ 'onload': ['Script', ''],
\ 'onloadeddata': ['Script', ''],
\ 'onloadedmetadata': ['Script', ''],
\ 'onloadstart': ['Script', ''],
\ 'onmessage': ['Script', ''],
\ 'onmousedown': ['Script', ''],
\ 'onmousemove': ['Script', ''],
\ 'onmouseout': ['Script', ''],
\ 'onmouseover': ['Script', ''],
\ 'onmouseup': ['Script', ''],
\ 'onmousewheel': ['Script', ''],
\ 'onoffline': ['Script', ''],
\ 'ononline': ['Script', ''],
\ 'onpagehide': ['Script', ''],
\ 'onpageshow': ['Script', ''],
\ 'onpause': ['Script', ''],
\ 'onplay': ['Script', ''],
\ 'onplaying': ['Script', ''],
\ 'onpopstate': ['Script', ''],
\ 'onprogress': ['Script', ''],
\ 'onratechange': ['Script', ''],
\ 'onreadystatechange': ['Script', ''],
\ 'onredo': ['Script', ''],
\ 'onresize': ['Script', ''],
\ 'onscroll': ['Script', ''],
\ 'onseeked': ['Script', ''],
\ 'onseeking': ['Script', ''],
\ 'onselect': ['Script', ''],
\ 'onshow': ['Script', ''],
\ 'onstalled': ['Script', ''],
\ 'onstorage': ['Script', ''],
\ 'onsubmit': ['Script', ''],
\ 'onsuspend': ['Script', ''],
\ 'ontimeupdate': ['Script', ''],
\ 'onundo': ['Script', ''],
\ 'onunload': ['Script', ''],
\ 'onvolumechange': ['Script', ''],
\ 'onwaiting': ['Script', '']
\ }
let attributes_value = extend(attributes_value, event_attributes_value)
endif
if !exists('g:rdfa_attributes_complete')
let g:rdfa_attributes_complete = 1
endif
if g:rdfa_attributes_complete == 1
" http://www.w3.org/TR/rdfa-syntax/#s_metaAttributes
" http://www.w3.org/TR/rdfa-core/#s_syntax
let relrev = ['chapter', 'contents', 'copyright', 'first', 'glossary', 'help', 'icon', 'index', 'last', 'license', 'meta', 'next', 'p3pv1', 'prev', 'role', 'section', 'stylesheet', 'subsection', 'start', 'top', 'up']
let rdfa_attributes = {'about': [], 'content': [], 'datatype': [], 'prefix': [], 'profile': [], 'property': [], 'resource': [], 'rel': relrev, 'rev': relrev, 'typeof': [], 'vocab': []}
let global_attributes = extend(global_attributes, rdfa_attributes)
let rdfa_attributes_value = {
\ 'about': ['SafeCURIEorCURIEorURI', ''],
\ 'content': ['CDATA String', ''],
\ 'datatype': ['CURIE', ''],
\ 'prefix': ['*Prefix', ''],
\ 'profile': ['String', ''],
\ 'property': ['*TERMorCURIEorAbsURIs', ''],
\ 'resource': ['URIorSafeCURIE', ''],
\ 'rel': ['*TERMorCURIEorAbsURIs', ''],
\ 'rev': ['*TERMorCURIEorAbsURIs', ''],
\ 'typeof': ['*TERMorCURIEorAbsURIs', ''],
\ 'vocab': ['URI', '']
\ }
let attributes_value = extend(attributes_value, rdfa_attributes_value)
endif
if !exists('g:microdata_attributes_complete')
let g:microdata_attributes_complete = 1
endif
if g:microdata_attributes_complete == 1
let microdata_attributes = {'itemid': [], 'itemscope': ['itemscope', ''], 'itemtype': [], 'itemprop': [], 'itemref': []}
let global_attributes = extend(global_attributes, microdata_attributes)
let microdata_attributes_value = {
\ 'itemid': ['URI', ''],
\ 'itemscope': ['Bool', ''],
\ 'itemtype': ['URI', ''],
\ 'itemprop': ['String', ''],
\ 'itemref': ['*ID', '']
\ }
let attributes_value = extend(attributes_value, microdata_attributes_value)
endif
" }}}
" WAI_ARIA: {{{
" Ref: http://www.w3.org/TR/wai-aria/
" Version: Draft 15 December 2009
if !exists('g:aria_attributes_complete')
let g:aria_attributes_complete = 1
endif
if g:aria_attributes_complete == 1
" Ref: http://www.w3.org/TR/wai-aria/roles
" Version: Draft 15 December 2009
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']
let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
let role = extend(widget_role, document_structure)
let role = extend(role, landmark_role)
let global_attributes = extend(global_attributes, {'role': role})
endif
" }}}
" Ref: http://dev.w3.org/html5/markup/
" Version: Draft 05 April 2011
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']
let metadata_elements = ['link', 'style', 'meta', 'script', 'noscript', 'command']
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']
" http://dev.w3.org/html5/spec/Overview.html#linkTypes
let linktypes = ['alternate', 'author', 'bookmark', 'external', 'help', 'icon', 'license', 'next', 'nofollow', 'noreferrer', 'pingback', 'prefetch', 'prev', 'search', 'stylesheet', 'sidebar', 'tag']
" http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html
let linkreltypes = linktypes + ['canonical']
" a and button are special elements for interactive, some element can't be its descendent
let abutton_dec = 'details\\|embed\\|iframe\\|keygen\\|label\\|menu\\|select\\|textarea'
let g:xmldata_html5 = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ filter(copy(flow_elements), "!(v:val =~ '". abutton_dec ."')"),
\ extend(copy(global_attributes), {'name': [], 'href': [], 'target': [], 'rel': linktypes, 'hreflang': lang_tag, 'media': [], 'type': []})
\ ],
\ 'abbr': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'address': [
\ filter(copy(flow_elements), "!(v:val =~ 'address\\|nav\\|article\\|header\\|footer\\|section\\|aside\\|h1\\|h2\\|h3\\|h4\\|h5\\|h6')"),
\ global_attributes
\ ],
\ 'area': [
\ [],
\ extend(copy(global_attributes), {'alt': [], 'href': [], 'target': [], 'rel': linktypes, 'media': [], 'hreflang': lang_tag, 'type': [], 'shape': ['rect', 'circle', 'poly', 'default'], 'coords': []})
\ ],
\ 'article': [
\ flow_elements + ['style'],
\ global_attributes
\ ],
\ 'aside': [
\ flow_elements + ['style'],
\ global_attributes
\ ],
\ 'audio': [
\ flow_elements + ['source', 'track'],
\ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'src': []})
\ ],
\ 'b': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'base': [
\ [],
\ extend(copy(global_attributes), {'href': [], 'target': []})
\ ],
\ 'bdo': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'bdi': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'blockquote': [
\ flow_elements,
\ extend(copy(global_attributes), {'cite': []})
\ ],
\ 'body': [
\ flow_elements,
\ extend(copy(global_attributes), body_attributes)
\ ],
\ 'br': [
\ [],
\ global_attributes
\ ],
\ 'button': [
\ filter(copy(phrasing_elements), "!(v:val =~ '". abutton_dec ."')"),
\ 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', '']})
\ ],
\ 'canvas': [
\ flow_elements,
\ extend(copy(global_attributes), {'height': [], 'width': []})
\ ],
\ 'caption': [
\ filter(copy(flow_elements), "!(v:val =~ 'table')"),
\ global_attributes
\ ],
\ 'cite': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'code': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'col': [
\ [],
\ extend(copy(global_attributes), {'span': []})
\ ],
\ 'colgroup': [
\ [],
\ extend(copy(global_attributes), {'span': []})
\ ],
\ 'command': [
\ ['col'],
\ extend(copy(global_attributes), {'type': ['command', 'radio', 'checkbox'], 'radiogroup': [], 'checked': ['checked', ''], 'label': [], 'icon': [], 'disabled': ['disabled', '']})
\ ],
\ 'datalist': [
\ phrasing_elements + ['option'],
\ global_attributes
\ ],
\ 'dd': [
\ flow_elements,
\ global_attributes
\ ],
\ 'del': [
\ flow_elements,
\ extend(copy(global_attributes), {'cite': [], 'datetime': []})
\ ],
\ 'details': [
\ flow_elements + ['summary'],
\ extend(copy(global_attributes), {'open': ['open', '']})
\ ],
\ 'dfn': [
\ filter(copy(phrasing_elements), "!(v:val =~ 'dfn')"),
\ global_attributes
\ ],
\ 'div': [
\ flow_elements + ['style'],
\ global_attributes
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ global_attributes
\ ],
\ 'dt': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'em': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'embed': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'type': [], 'height': [], 'width': []})
\ ],
\ 'fieldset': [
\ flow_elements + ['legend'],
\ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': []})
\ ],
\ 'figcaption': [
\ flow_elements,
\ global_attributes
\ ],
\ 'figure': [
\ flow_elements + ['figcaption'],
\ global_attributes
\ ],
\ 'footer': [
\ filter(copy(flow_elements), "!(v:val =~ 'address\\|header\\|footer')"),
\ global_attributes
\ ],
\ 'form': [
\ flow_elements,
\ 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']})
\ ],
\ 'h1': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'h2': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'h3': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'h4': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'h5': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'h6': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'head': [
\ metadata_elements + ['title', 'base'],
\ global_attributes
\ ],
\ 'header': [
\ filter(copy(flow_elements), "!(v:val =~ 'address\\|header\\|footer')"),
\ global_attributes
\ ],
\ 'hgroup': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
\ global_attributes
\ ],
\ 'hr': [
\ [],
\ global_attributes
\ ],
\ 'html': [
\ ['head', 'body'],
\ extend(copy(global_attributes), {'manifest': [], 'version': ['HTML+RDFa 1.1']})
\ ],
\ 'i': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'iframe': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', '']})
\ ],
\ 'img': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'usemap': [], 'ismap': ['ismap', '']})
\ ],
\ 'input': [
\ [],
\ 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', '']})
\ ],
\ 'ins': [
\ flow_elements,
\ extend(copy(global_attributes), {'cite': [], 'datetime': []})
\ ],
\ 'kbd': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'keygen': [
\ [],
\ extend(copy(global_attributes), {'challenge': [], 'keytype': ['rsa'], 'autofocus': ['autofocus', ''], 'name': [], 'disabled': ['disabled', ''], 'form': []})
\ ],
\ 'label': [
\ filter(copy(phrasing_elements), "!(v:val =~ 'label')"),
\ extend(copy(global_attributes), {'for': [], 'form': []})
\ ],
\ 'legend': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'li': [
\ flow_elements,
\ extend(copy(global_attributes), {'value': []})
\ ],
\ 'link': [
\ [],
\ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any']})
\ ],
\ 'map': [
\ flow_elements,
\ extend(copy(global_attributes), {'name': []})
\ ],
\ 'mark': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'menu': [
\ flow_elements + ['li'],
\ extend(copy(global_attributes), {'type': ['toolbar', 'context'], 'label': []})
\ ],
\ 'meta': [
\ [],
\ extend(copy(global_attributes), {'name': [], 'http-equiv': ['refresh', 'default-style', 'content-type'], 'content': [], 'charset': charset})
\ ],
\ 'meter': [
\ phrasing_elements,
\ extend(copy(global_attributes), {'value': [], 'min': [], 'low': [], 'high': [], 'max': [], 'optimum': []})
\ ],
\ 'nav': [
\ flow_elements,
\ global_attributes
\ ],
\ 'noscript': [
\ flow_elements + ['link', 'meta', 'style'],
\ global_attributes
\ ],
\ 'object': [
\ flow_elements + ['param'],
\ extend(copy(global_attributes), {'data': [], 'type': [], 'height': [], 'width': [], 'usemap': [], 'name': [], 'form': []})
\ ],
\ 'ol': [
\ ['li'],
\ extend(copy(global_attributes), {'start': [], 'reversed': ['reversed', '']})
\ ],
\ 'optgroup': [
\ ['option'],
\ extend(copy(global_attributes), {'label': [], 'disabled': ['disabled', '']})
\ ],
\ 'option': [
\ [''],
\ extend(copy(global_attributes), {'disabled': ['disabled', ''], 'selected': ['selected', ''], 'label': [], 'value': []})
\ ],
\ 'output': [
\ phrasing_elements,
\ extend(copy(global_attributes), {'name': [], 'form': [], 'for': []})
\ ],
\ 'p': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'param': [
\ [],
\ extend(copy(global_attributes), {'name': [], 'value': []})
\ ],
\ 'pre': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'progress': [
\ filter(copy(phrasing_elements), "!(v:val =~ 'progress')"),
\ extend(copy(global_attributes), {'value': [], 'max': []})
\ ],
\ 'q': [
\ phrasing_elements,
\ extend(copy(global_attributes), {'cite': []})
\ ],
\ 'rp': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'rt': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'ruby': [
\ phrasing_elements + ['rp', 'rt'],
\ global_attributes
\ ],
\ 'samp': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'script': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'defer': ['defer', ''], 'async': ['async', ''], 'type': [], 'charset': charset})
\ ],
\ 'section': [
\ flow_elements + ['style'],
\ global_attributes
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': [], 'size': [], 'multiple': ['multiple', '']})
\ ],
\ 'small': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'source': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'type': [], 'media': []})
\ ],
\ 'span': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'strong': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'style': [
\ [],
\ extend(copy(global_attributes), {'type': [], 'media': [], 'scoped': ['scoped', '']})
\ ],
\ 'sub': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'summary': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'sup': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'],
\ extend(copy(global_attributes), {'border': []})
\ ],
\ 'tbody': [
\ ['tr'],
\ global_attributes
\ ],
\ 'td': [
\ flow_elements,
\ extend(copy(global_attributes), {'colspan': [], 'rowspan': [], 'headers': []})
\ ],
\ 'textarea': [
\ [''],
\ extend(copy(global_attributes), {'name': [], 'disabled': ['disabled', ''], 'form': [], 'readonly': ['readonly', ''], 'maxlength': [], 'autofocus': ['autofocus', ''], 'required': ['required', ''], 'placeholder': [], 'rows': [], 'wrap': ['hard', 'soft'], 'cols': []})
\ ],
\ 'tfoot': [
\ ['tr'],
\ global_attributes
\ ],
\ 'th': [
\ phrasing_elements,
\ extend(copy(global_attributes), {'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'colspan': [], 'rowspan': [], 'headers': []})
\ ],
\ 'thead': [
\ ['tr'],
\ global_attributes
\ ],
\ 'time': [
\ phrasing_elements,
\ extend(copy(global_attributes), {'datetime': [], 'pubdate': ['pubdate', '']})
\ ],
\ 'title': [
\ [''],
\ global_attributes
\ ],
\ 'tr': [
\ ['th', 'td'],
\ global_attributes
\ ],
\ 'track': [
\ [],
\ extend(copy(global_attributes), {'kind': ['subtitles', 'captions', 'descriptions', 'chapters', 'metadata'], 'src': [], 'charset': charset, 'srclang': lang_tag, 'label': []})
\ ],
\ 'u': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'ul': [
\ ['li'],
\ global_attributes
\ ],
\ 'var': [
\ phrasing_elements,
\ global_attributes
\ ],
\ 'video': [
\ flow_elements + ['source', 'track'],
\ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'poster': [], 'height': [], 'width': [], 'src': []})
\ ],
\ 'wbr': [
\ [],
\ global_attributes
\ ],
\ 'vimxmlattrinfo' : attributes_value,
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'command': ['/>', ''],
\ 'embed': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'keygen': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ 'source': ['/>', ''],
\ 'track': ['/>', ''],
\ 'wbr': ['/>', ''],
\ },
\ }

@ -0,0 +1,469 @@
let g:xmldata_xhtml10f = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'accesskey': [], 'rel': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'target': [], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'charset': [], 'xml:lang': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script', 'p'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'applet': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'width': [], 'object': [], 'id': [], 'code': [], 'vspace': [], 'archive': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'style': [], 'name': [], 'height': [], 'hspace': [], 'title': [], 'class': [], 'codebase': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'nohref': ['BOOL'], 'target': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'alt': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'b': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'target': [], 'href': [], 'id': []}
\ ],
\ 'basefont': [
\ [],
\ { 'size': [], 'face': [], 'color': [], 'id': []}
\ ],
\ 'bdo': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'big': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'vlink': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'alink': [], 'onkeyup': [], 'bgcolor': [], 'text': [], 'onmouseup': [], 'id': [], 'link': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'background': [], 'xml:lang': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'clear': ['none', 'left', 'all', 'right', 'none'], 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'table', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'noscript', 'ins', 'del', 'script'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'value': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'center': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dir': [
\ ['li'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'font': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'dir': ['ltr', 'rtl'], 'size': [], 'face': [], 'color': [], 'id': [], 'lang': [], 'style': [], 'xml:lang': [], 'title': [], 'class': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'target': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['get', 'post'], 'onmouseover': [], 'lang': [], 'accept': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'frame': [
\ [],
\ { 'scrolling': ['auto', 'yes', 'no', 'auto'], 'noresize': ['BOOL'], 'marginwidth': [], 'id': [], 'marginheight': [], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'frameset': [
\ ['frameset', 'frame', 'noframes'],
\ { 'rows': [], 'cols': [], 'id': [], 'style': [], 'onunload': [], 'onload': [], 'class': [], 'title': []}
\ ],
\ 'h1': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h2': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h3': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h4': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h5': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h6': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'head': [
\ ['script', 'style', 'meta', 'link', 'object', 'isindex', 'title', 'script', 'style', 'meta', 'link', 'object', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object', 'isindex', 'title', 'script', 'style', 'meta', 'link', 'object', 'isindex'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'noshade': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'html': [
\ ['head', 'frameset'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'i': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'iframe': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'width': [], 'scrolling': ['auto', 'yes', 'no', 'auto'], 'marginwidth': [], 'id': [], 'marginheight': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'height': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'vspace': [], 'onmouseover': [], 'alt': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'height': [], 'border': [], 'hspace': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['text', 'password', 'checkbox', 'radio', 'submit', 'reset', 'file', 'hidden', 'image', 'button'], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'size': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'accept': [], 'tabindex': [], 'alt': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'isindex': [
\ [],
\ { 'id': [], 'lang': [], 'prompt': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'xml:lang': []}
\ ],
\ 'kbd': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'label': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'legend': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'target': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'noscript', 'ins', 'del', 'script', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'onclick': [], 'title': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmouseout': [], 'onmousemove': [], 'xml:lang': []}
\ ],
\ 'menu': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'id': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'noframes': [
\ ['body'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'vspace': [], 'tabindex': [], 'standby': [], 'archive': [], 'classid': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'height': [], 'xml:lang': [], 'border': [], 'codetype': [], 'hspace': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'start': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['data', 'ref', 'object']}
\ ],
\ 'pre': [
\ ['a', 'br', 'span', 'bdo', 'tt', 'i', 'b', 'u', 's', 'strike', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'xml:space': ['preserve'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'q': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 's': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'samp': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'script': [
\ [''],
\ { 'id': [], 'src': [], 'charset': [], 'xml:space': ['preserve'], 'type': ['text/javascript'], 'defer': ['BOOL'], 'language': []}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'span': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'strike': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'strong': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'style': [
\ [''],
\ { 'media': [], 'id': [], 'lang': [], 'xml:space': ['preserve'], 'title': [], 'type': ['text/css'], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'sub': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'sup': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'bgcolor': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'height': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'height': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'id': [], 'lang': [], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'tt': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'u': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': ['disc', 'square', 'circle'], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'var': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'basefont': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'frame': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'isindex': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,410 @@
let g:xmldata_xhtml10s = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'accesskey': [], 'rel': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onkeydown': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'name': [], 'style': [], 'charset': [], 'xml:lang': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'nohref': ['BOOL'], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'alt': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'b': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'href': [], 'id': []}
\ ],
\ 'bdo': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'big': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'table', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'noscript', 'ins', 'del', 'script'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'value': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'noscript', 'ins', 'del', 'script'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['get', 'post'], 'onmouseover': [], 'lang': [], 'accept': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h2': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h3': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h4': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h5': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h6': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'head': [
\ ['script', 'style', 'meta', 'link', 'object', 'title', 'script', 'style', 'meta', 'link', 'object', 'base', 'script', 'style', 'meta', 'link', 'object', 'base', 'script', 'style', 'meta', 'link', 'object', 'title', 'script', 'style', 'meta', 'link', 'object'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'html': [
\ ['head', 'body'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'i': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'alt': [], 'lang': [], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'height': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['text', 'password', 'checkbox', 'radio', 'submit', 'reset', 'file', 'hidden', 'image', 'button'], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'size': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'accept': [], 'tabindex': [], 'alt': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'kbd': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'label': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'legend': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'noscript', 'ins', 'del', 'script', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'onclick': [], 'title': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmouseout': [], 'onmousemove': [], 'xml:lang': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'id': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'archive': [], 'standby': [], 'tabindex': [], 'classid': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'height': [], 'codetype': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['data', 'ref', 'object']}
\ ],
\ 'pre': [
\ ['a', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'br', 'span', 'bdo', 'map', 'ins', 'del', 'script', 'input', 'select', 'textarea', 'label', 'button'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'xml:space': ['preserve'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'q': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'samp': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'script': [
\ [''],
\ { 'id': [], 'src': [], 'charset': [], 'xml:space': ['preserve'], 'type': ['text/javascript'], 'defer': ['BOOL']}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'span': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'strong': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'style': [
\ [''],
\ { 'media': [], 'id': [], 'lang': [], 'xml:space': ['preserve'], 'title': [], 'type': ['text/css'], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'sub': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'sup': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'headers': [], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'headers': [], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'id': [], 'lang': [], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'tt': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'var': [
\ ['a', 'br', 'span', 'bdo', 'map', 'object', 'img', 'tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,460 @@
let g:xmldata_xhtml10t = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'accesskey': [], 'rel': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'target': [], 'onfocus': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'charset': [], 'xml:lang': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'acronym': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script', 'p'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'applet': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'width': [], 'object': [], 'id': [], 'code': [], 'vspace': [], 'archive': [], 'alt': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'style': [], 'name': [], 'height': [], 'hspace': [], 'title': [], 'class': [], 'codebase': []}
\ ],
\ 'area': [
\ [],
\ { 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'nohref': ['BOOL'], 'target': [], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'alt': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'b': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'target': [], 'href': [], 'id': []}
\ ],
\ 'basefont': [
\ [],
\ { 'size': [], 'face': [], 'color': [], 'id': []}
\ ],
\ 'bdo': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'big': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'vlink': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'alink': [], 'onkeyup': [], 'bgcolor': [], 'text': [], 'onmouseup': [], 'id': [], 'link': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'background': [], 'xml:lang': [], 'onunload': [], 'onkeypress': [], 'onmousedown': [], 'onload': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'br': [
\ [],
\ { 'clear': ['none', 'left', 'all', 'right', 'none'], 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'table', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'noscript', 'ins', 'del', 'script'],
\ { 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onkeydown': [], 'onfocus': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'lang': [], 'value': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'center': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dir': [
\ ['li'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'font': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'dir': ['ltr', 'rtl'], 'size': [], 'face': [], 'color': [], 'id': [], 'lang': [], 'style': [], 'xml:lang': [], 'title': [], 'class': []}
\ ],
\ 'form': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'enctype': ['application/x-www-form-urlencoded'], 'onsubmit': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'target': [], 'onkeyup': [], 'onmouseup': [], 'onreset': [], 'id': [], 'method': ['get', 'post'], 'onmouseover': [], 'lang': [], 'accept': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h2': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h3': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h4': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h5': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h6': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'head': [
\ ['script', 'style', 'meta', 'link', 'object', 'isindex', 'title', 'script', 'style', 'meta', 'link', 'object', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object', 'isindex', 'base', 'script', 'style', 'meta', 'link', 'object', 'isindex', 'title', 'script', 'style', 'meta', 'link', 'object', 'isindex'],
\ { 'profile': [], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right'], 'lang': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'noshade': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'html': [
\ ['head', 'body'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'id': [], 'lang': [], 'xml:lang': []}
\ ],
\ 'i': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'iframe': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'width': [], 'scrolling': ['auto', 'yes', 'no', 'auto'], 'marginwidth': [], 'id': [], 'marginheight': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'longdesc': [], 'src': [], 'style': [], 'name': [], 'height': [], 'frameborder': ['1', '0'], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'width': [], 'usemap': [], 'ismap': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'vspace': [], 'onmouseover': [], 'alt': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'src': [], 'longdesc': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'height': [], 'border': [], 'hspace': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'input': [
\ [],
\ { 'ondblclick': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'value': [], 'src': [], 'name': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['text', 'password', 'checkbox', 'radio', 'submit', 'reset', 'file', 'hidden', 'image', 'button'], 'accesskey': [], 'disabled': ['BOOL'], 'usemap': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'size': [], 'onfocus': [], 'maxlength': [], 'onselect': [], 'accept': [], 'tabindex': [], 'alt': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'ins': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'cite': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'isindex': [
\ [],
\ { 'id': [], 'lang': [], 'prompt': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'xml:lang': []}
\ ],
\ 'kbd': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'label': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'for': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'legend': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['top', 'bottom', 'left', 'right'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'li': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'link': [
\ [],
\ { 'rel': [], 'ondblclick': [], 'onkeydown': [], 'target': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'charset': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'map': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'noscript', 'ins', 'del', 'script', 'area'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'onclick': [], 'title': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmouseout': [], 'onmousemove': [], 'xml:lang': []}
\ ],
\ 'menu': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'meta': [
\ [],
\ { 'http-equiv': [], 'content': [], 'id': [], 'lang': [], 'name': [], 'scheme': [], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'noframes': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'noscript': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'object': [
\ ['param', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['top', 'middle', 'bottom', 'left', 'right'], 'name': [], 'data': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'width': [], 'usemap': [], 'dir': ['ltr', 'rtl'], 'vspace': [], 'tabindex': [], 'standby': [], 'archive': [], 'classid': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'height': [], 'xml:lang': [], 'border': [], 'codetype': [], 'hspace': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': [], 'class': [], 'title': [], 'onclick': [], 'start': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'option': [
\ [''],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'value': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify'], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'param': [
\ [],
\ { 'id': [], 'value': [], 'name': [], 'type': [], 'valuetype': ['data', 'ref', 'object']}
\ ],
\ 'pre': [
\ ['a', 'br', 'span', 'bdo', 'tt', 'i', 'b', 'u', 's', 'strike', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'xml:space': ['preserve'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'q': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'cite': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 's': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'samp': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'script': [
\ [''],
\ { 'id': [], 'src': [], 'charset': [], 'xml:space': ['preserve'], 'type': ['text/javascript'], 'defer': ['BOOL'], 'language': []}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'ondblclick': [], 'onkeydown': [], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'disabled': ['BOOL'], 'dir': ['ltr', 'rtl'], 'size': [], 'onblur': [], 'onfocus': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'span': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'strike': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'strong': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'style': [
\ [''],
\ { 'media': [], 'id': [], 'lang': [], 'xml:space': ['preserve'], 'title': [], 'type': ['text/css'], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'sub': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'sup': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'summary': [], 'bgcolor': [], 'cellspacing': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'border': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'td': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'height': [], 'char': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'ondblclick': [], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onchange': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'name': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'accesskey': [], 'disabled': ['BOOL'], 'rows': [], 'dir': ['ltr', 'rtl'], 'onblur': [], 'onfocus': [], 'onselect': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'th': [
\ ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'ul', 'ol', 'dl', 'menu', 'dir', 'pre', 'hr', 'blockquote', 'address', 'center', 'noframes', 'isindex', 'fieldset', 'table', 'form', 'a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'noscript', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'axis': [], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'lang': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'width': [], 'headers': [], 'nowrap': ['BOOL'], 'dir': ['ltr', 'rtl'], 'rowspan': ['1'], 'colspan': ['1'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'height': [], 'char': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'title': [
\ [''],
\ { 'id': [], 'lang': [], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'lang': [], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'bgcolor': [], 'charoff': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': []}
\ ],
\ 'tt': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'u': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'compact': ['BOOL'], 'onmouseover': [], 'lang': [], 'onkeypress': [], 'onmousedown': [], 'type': ['disc', 'square', 'circle'], 'class': [], 'title': [], 'onclick': [], 'dir': ['ltr', 'rtl'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': []}
\ ],
\ 'var': [
\ ['a', 'br', 'span', 'bdo', 'object', 'applet', 'img', 'map', 'iframe', 'tt', 'i', 'b', 'u', 's', 'strike', 'big', 'small', 'font', 'basefont', 'em', 'strong', 'dfn', 'code', 'q', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script'],
\ { 'ondblclick': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': [], 'dir': ['ltr', 'rtl'], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'basefont': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'isindex': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,434 @@
let g:xmldata_xhtml11 = {
\ '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'],
\ 'vimxmlroot': ['html'],
\ 'a': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'coords': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'abbr': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'onclick': [], 'class': [], 'title': []}
\ ],
\ 'acronym': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'address': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'area': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'accesskey': [], 'coords': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'nohref': ['BOOL'], 'onkeyup': [], 'href': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'alt': [], 'tabindex': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'shape': ['rect', 'circle', 'poly', 'default']}
\ ],
\ 'b': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'base': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'href': []}
\ ],
\ 'bdo': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'id': [], 'style': [], 'xml:lang': [], 'class': [], 'title': []}
\ ],
\ 'big': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'blockquote': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'body': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'br': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'id': [], 'style': [], 'class': [], 'title': []}
\ ],
\ 'button': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'ins', 'del', 'script', 'noscript', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'img', 'map', 'object'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'value': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': ['submit', 'button', 'submit', 'reset']}
\ ],
\ 'caption': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'cite': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'code': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'col': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'colgroup': [
\ ['col'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'span': ['1'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dd': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'del': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'dfn': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'div': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dl': [
\ ['dt', 'dd'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'dt': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'em': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'fieldset': [
\ ['legend', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'form': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'ins', 'del', 'script', 'noscript', 'fieldset'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'enctype': ['application/x-www-form-urlencoded'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'method': ['get', 'post'], 'onmouseover': [], 'accept': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'accept-charset': [], 'onkeypress': [], 'onmousedown': [], 'action': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'h1': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h2': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h3': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h4': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h5': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'h6': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'head': [
\ ['script', 'style', 'meta', 'link', 'object', 'title', 'script', 'style', 'meta', 'link', 'object', 'base', 'script', 'style', 'meta', 'link', 'object', 'base', 'script', 'style', 'meta', 'link', 'object', 'title', 'script', 'style', 'meta', 'link', 'object'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'profile': [''], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'hr': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'html': [
\ ['head', 'body'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'version': ['-//W3C//DTD XHTML 1.1//EN'], 'xml:lang': []}
\ ],
\ 'i': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'img': [
\ [],
\ { 'ismap': ['BOOL']}
\ ],
\ 'input': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onkeyup': [], 'onmouseup': [], 'id': [], 'maxlength': [], 'onmouseover': [], 'alt': [], 'tabindex': [], 'accept': [], 'value': [], 'src': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'xml:lang': [], 'checked': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'type': ['text', 'password', 'checkbox', 'radio', 'submit', 'reset', 'file', 'hidden', 'image', 'button'], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'ins': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'datetime': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'kbd': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'label': [
\ ['input', 'select', 'textarea', 'button', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'bdo', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'a', 'img', 'map', 'object', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'accesskey': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'for': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'legend': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'accesskey': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'li': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'link': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'rel': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'href': [], 'media': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'charset': [], 'xml:lang': [], 'hreflang': [], 'onkeypress': [], 'onmousedown': [], 'rev': [], 'class': [], 'title': [], 'onclick': [], 'type': []}
\ ],
\ 'map': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'ins', 'del', 'script', 'noscript', 'area'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'meta': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'http-equiv': [], 'content': [], 'dir': ['ltr', 'rtl'], 'name': [], 'scheme': [], 'xml:lang': []}
\ ],
\ 'noscript': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'object': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript', 'param'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'width': [], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'archive': [], 'standby': [], 'tabindex': [], 'classid': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'name': [], 'data': [], 'xml:lang': [], 'height': [], 'codetype': [], 'declare': ['BOOL'], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'type': [], 'codebase': []}
\ ],
\ 'ol': [
\ ['li'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'optgroup': [
\ ['option'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': []}
\ ],
\ 'option': [
\ [''],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'value': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'label': [], 'selected': ['BOOL']}
\ ],
\ 'p': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'param': [
\ [],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'id': [], 'value': [], 'name': [], 'valuetype': ['data', 'ref', 'object'], 'type': []}
\ ],
\ 'pre': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'bdo', 'a', 'script', 'map'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:space': ['preserve'], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'q': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'cite': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'rb': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'rbc': [
\ ['rb'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'rp': [
\ [''],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'rt': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'rtc': [
\ ['rt'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'ruby': [
\ ['rb', 'rt', 'rp', 'rt', 'rp', 'rbc', 'rtc'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'samp': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'script': [
\ [''],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'defer': ['BOOL'], 'src': [], 'charset': [], 'xml:space': ['preserve'], 'type': ['text/javascript']}
\ ],
\ 'select': [
\ ['optgroup', 'option'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'disabled': ['BOOL'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'size': [], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'multiple': ['BOOL']}
\ ],
\ 'small': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'span': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'strong': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'style': [
\ [''],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'media': [], 'xml:lang': [], 'xml:space': ['preserve'], 'title': [], 'type': ['text/css']}
\ ],
\ 'sub': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'sup': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'table': [
\ ['caption', 'col', 'colgroup', 'thead', 'tfoot', 'tbody', 'tr'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'width': [], 'ondblclick': [], 'frame': ['void', 'above', 'below', 'hsides', 'lhs', 'rhs', 'vsides', 'box', 'border'], 'rules': ['none', 'groups', 'rows', 'cols', 'all'], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'summary': [], 'onmouseup': [], 'cellspacing': [], 'id': [], 'onmouseover': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'border': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': [], 'cellpadding': []}
\ ],
\ 'tbody': [
\ ['tr'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'td': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'headers': [], 'ondblclick': [], 'axis': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'rowspan': ['1'], 'colspan': ['1'], 'onmouseup': [], 'id': [], 'charoff': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'textarea': [
\ [''],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'accesskey': [], 'disabled': ['BOOL'], 'ondblclick': [], 'rows': [], 'dir': ['ltr', 'rtl'], 'cols': [], 'onkeydown': [], 'readonly': ['BOOL'], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'tabindex': [], 'name': [], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'tfoot': [
\ ['tr'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'th': [
\ ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'dl', 'p', 'div', 'pre', 'blockquote', 'address', 'hr', 'table', 'form', 'fieldset', 'br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'headers': [], 'ondblclick': [], 'axis': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'abbr': [], 'onkeyup': [], 'rowspan': ['1'], 'colspan': ['1'], 'onmouseup': [], 'id': [], 'charoff': [], 'scope': ['row', 'col', 'rowgroup', 'colgroup'], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'onkeypress': [], 'onmousedown': [], 'char': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'thead': [
\ ['tr'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'title': [
\ [''],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'dir': ['ltr', 'rtl'], 'xml:lang': []}
\ ],
\ 'tr': [
\ ['th', 'td'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'charoff': [], 'onmouseover': [], 'align': ['left', 'center', 'right', 'justify', 'char'], 'valign': ['top', 'middle', 'bottom', 'baseline'], 'onmouseout': [], 'onmousemove': [], 'style': [], 'xml:lang': [], 'char': [], 'onkeypress': [], 'onmousedown': [], 'class': [], 'title': [], 'onclick': []}
\ ],
\ 'tt': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'ul': [
\ ['li'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'var': [
\ ['br', 'span', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'tt', 'i', 'b', 'big', 'small', 'sub', 'sup', 'bdo', 'a', 'img', 'map', 'object', 'input', 'select', 'textarea', 'label', 'button', 'ruby', 'ins', 'del', 'script', 'noscript'],
\ { 'xmlns': ['http://www.w3.org/1999/xhtml'], 'ondblclick': [], 'dir': ['ltr', 'rtl'], 'onkeydown': [], 'onkeyup': [], 'onmouseup': [], 'id': [], 'onmouseover': [], 'style': [], 'onmousemove': [], 'onmouseout': [], 'xml:lang': [], 'onmousedown': [], 'onkeypress': [], 'onclick': [], 'title': [], 'class': []}
\ ],
\ 'vimxmlattrinfo' : {
\ 'accept' : ['ContentType', ''],
\ 'accesskey' : ['Character', ''],
\ 'action' : ['*URI', ''],
\ 'align' : ['String', ''],
\ 'alt' : ['*Text', ''],
\ 'archive' : ['UriList', ''],
\ 'axis' : ['CDATA', ''],
\ 'border' : ['Pixels', ''],
\ 'cellpadding' : ['Length', ''],
\ 'cellspacing' : ['Length', ''],
\ 'char' : ['Character', ''],
\ 'charoff' : ['Length', ''],
\ 'charset' : ['LangCode', ''],
\ 'checked' : ['Bool', ''],
\ 'class' : ['CDATA', ''],
\ 'codetype' : ['ContentType', ''],
\ 'cols' : ['*Number', ''],
\ 'colspan' : ['Number', ''],
\ 'content' : ['*CDATA', ''],
\ 'coords' : ['Coords', ''],
\ 'data' : ['URI', ''],
\ 'datetime' : ['DateTime', ''],
\ 'declare' : ['Bool', ''],
\ 'defer' : ['Bool', ''],
\ 'dir' : ['String', ''],
\ 'disabled' : ['Bool', ''],
\ 'enctype' : ['ContentType', ''],
\ 'for' : ['ID', ''],
\ 'headers' : ['IDREFS', ''],
\ 'height' : ['Number', ''],
\ 'href' : ['*URI', ''],
\ 'hreflang' : ['LangCode', ''],
\ 'id' : ['ID', ''],
\ 'ismap' : ['Bool', ''],
\ 'label' : ['*Text', ''],
\ 'lang' : ['LangCode', ''],
\ 'longdesc' : ['URI', ''],
\ 'maxlength' : ['Number', ''],
\ 'media' : ['MediaDesc', ''],
\ 'method' : ['String', ''],
\ 'multiple' : ['Bool', ''],
\ 'name' : ['CDATA', ''],
\ 'nohref' : ['Bool', ''],
\ 'onblur' : ['Script', ''],
\ 'onchange' : ['Script', ''],
\ 'onclick' : ['Script', ''],
\ 'ondblclick' : ['Script', ''],
\ 'onfocus' : ['Script', ''],
\ 'onkeydown' : ['Script', ''],
\ 'onkeypress' : ['Script', ''],
\ 'onkeyup' : ['Script', ''],
\ 'onload' : ['Script', ''],
\ 'onmousedown' : ['Script', ''],
\ 'onmousemove' : ['Script', ''],
\ 'onmouseout' : ['Script', ''],
\ 'onmouseover' : ['Script', ''],
\ 'onmouseup' : ['Script', ''],
\ 'onreset' : ['Script', ''],
\ 'onselect' : ['Script', ''],
\ 'onsubmit' : ['Script', ''],
\ 'onunload' : ['Script', ''],
\ 'profile' : ['URI', ''],
\ 'readonly' : ['Bool', ''],
\ 'rel' : ['LinkTypes', ''],
\ 'rev' : ['LinkTypes', ''],
\ 'rows' : ['*Number', ''],
\ 'rules' : ['String', ''],
\ 'scheme' : ['CDATA', ''],
\ 'selected' : ['Bool', ''],
\ 'shape' : ['Shape', ''],
\ 'size' : ['CDATA', ''],
\ 'span' : ['Number', ''],
\ 'src' : ['*URI', ''],
\ 'standby' : ['Text', ''],
\ 'style' : ['StyleSheet', ''],
\ 'summary' : ['*Text', ''],
\ 'tabindex' : ['Number', ''],
\ 'title' : ['Text', ''],
\ 'type' : ['*ContentType', ''],
\ 'usemap' : ['URI', ''],
\ 'valign' : ['String', ''],
\ 'valuetype' : ['String', ''],
\ 'width' : ['Number', ''],
\ 'xmlns' : ['URI', '']
\ },
\ 'vimxmltaginfo': {
\ 'area': ['/>', ''],
\ 'base': ['/>', ''],
\ 'br': ['/>', ''],
\ 'col': ['/>', ''],
\ 'hr': ['/>', ''],
\ 'img': ['/>', ''],
\ 'input': ['/>', ''],
\ 'link': ['/>', ''],
\ 'meta': ['/>', ''],
\ 'param': ['/>', ''],
\ }
\ }

@ -0,0 +1,130 @@
" Author: Thomas Barthel
" Last change: 2007 May 8
let g:xmldata_xsd = {
\ 'schema': [
\ [ 'include', 'import', 'redefine', 'annotation', 'simpleType', 'complexType', 'element', 'attribute', 'attributeGroup', 'group', 'notation', 'annotation'],
\ { 'targetNamespace' : [], 'version' : [], 'xmlns' : [], 'finalDefault' : [], 'blockDefault' : [], 'id' : [], 'elementFormDefault' : [], 'attributeFormDefault' : [], 'xml:lang' : [] }],
\ 'redefine' : [
\ ['annotation', 'simpleType', 'complexType', 'attributeGroup', 'group'],
\ {'schemaLocation' : [], 'id' : []} ],
\ 'include' : [
\ ['annotation'],
\ {'namespace' : [], 'id' : []} ],
\ 'import' : [
\ ['annotation'],
\ {'namespace' : [], 'schemaLocation' : [], 'id' : []} ],
\ 'complexType' : [
\ ['annotation', 'simpleContent', 'complexContent', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
\ {'name' : [], 'id' : [], 'abstract' : [], 'final' : [], 'block' : [], 'mixed' : []} ],
\ 'complexContent' : [
\ ['annotation', 'restriction', 'extension'],
\ {'mixed' : [], 'id' : [] } ],
\ 'simpleType' : [
\ ['annotation', 'restriction', 'list', 'union'],
\ {'name' : [], 'final' : [], 'id' : []} ],
\ 'simpleContent' : [
\ ['annotation', 'restriction', 'extension'],
\ {'id' : []} ],
\ 'element' : [
\ ['annotation', 'complexType', 'simpleType', 'unique', 'key', 'keyref'],
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'minOccurs' : [], 'maxOccurs' : [], 'nillable' : [], 'substitutionGroup' : [], 'abstract' : [], 'final' : [], 'block' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
\ 'attribute' : [
\ ['annotation', 'simpleType'],
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'use' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
\ 'group' : [
\ ['annotation', 'all', 'choice', 'sequence'],
\ {'name' : [], 'ref' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'choice' : [
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'sequence' : [
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'all' : [
\ ['annotation', 'element'],
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'any' : [
\ ['annotation'],
\ {'namespace' : [], 'processContents' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'unique' : [
\ ['annotation', 'selector', 'field'],
\ {'name' : [], 'id' : []} ],
\ 'key' : [
\ ['annotation', 'selector', 'field'],
\ {'name' : [], 'id' : []} ],
\ 'keyref' : [
\ ['annotation', 'selector', 'field'],
\ {'name' : [], 'refer' : [], 'id' : []} ],
\ 'selector' : [
\ ['annotation'],
\ {'xpath' : [], 'id' : []} ],
\ 'field' : [
\ ['annotation'],
\ {'xpath' : [], 'id' : []} ],
\ 'restriction' : [
\ ['annotation', 'simpleType', 'minExclusive', 'maxExclusive', 'minInclusive', 'maxInclusive', 'totalDigits', 'fractionDigits', 'length', 'minLength', 'maxLength', 'enumeration', 'whiteSpace', 'pattern'],
\ {'base' : [], 'id' : []} ],
\ 'minExclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'maxExclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'minInclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'maxInclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'totalDigits' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'fractionDigits' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'length' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'minLength' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'maxLength' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'enumeration' : [
\ ['annotation'],
\ {'value' : [], 'id' : []}],
\ 'whiteSpace' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'pattern' : [
\ ['annotation'],
\ {'value' : [], 'id' : []}],
\ 'extension' : [
\ ['annotation', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
\ {'base' : [], 'id' : []} ],
\ 'attributeGroup' : [
\ ['annotation', 'attribute', 'attributeGroup', 'anyAttribute'],
\ {'name' : [], 'id' : [], 'ref' : []} ],
\ 'anyAttribute' : [
\ ['annotation'],
\ {'namespace' : [], 'processContents' : [], 'id' : []} ],
\ 'list' : [
\ ['annotation', 'simpleType'],
\ {'itemType' : [], 'id' : []} ],
\ 'union' : [
\ ['annotation', 'simpleType'],
\ {'id' : [], 'memberTypes' : []} ],
\ 'notation' : [
\ ['annotation'],
\ {'name' : [], 'id' : [], 'public' : [], 'system' : []} ],
\ 'annotation' : [
\ ['appinfo', 'documentation'],
\ {} ],
\ 'appinfo' : [
\ [],
\ {'source' : [], 'id' : []} ],
\ 'documentation' : [
\ [],
\ {'source' : [], 'id' : [], 'xml' : []} ]
\ }

@ -0,0 +1,38 @@
" Author: Mikolaj Machowski, Thomas Bartel
" Last change: 2007 May 8
let g:xmldata_xsl = {
\ 'apply-imports' : [[], {}],
\ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}],
\ 'attribute' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : []}],
\ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}],
\ 'call-template' : [['with-param'], {'name' : []}],
\ 'choose' : [['when', 'otherwise'], {}],
\ 'comment' : [[], {}],
\ 'copy' : [[], {'use-attribute-sets' : []}],
\ 'copy-of' : [[], {'select' : []}],
\ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}],
\ 'element' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
\ 'fallback' : [[], {}],
\ 'for-each' : [['sort'], {'select' : []}],
\ 'if' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'test' : []}],
\ 'import' : [[], {'href' : []}],
\ 'include' : [[], {'href' : []}],
\ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}],
\ 'message' : [[], {'terminate' : ['yes', 'no']}],
\ 'namespace-alias' : [[], {'stylesheet-prefix' : ['#default'], 'result-prefix' : ['#default']}],
\ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}],
\ 'otherwise' : [[], {}],
\ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}],
\ 'param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
\ 'preserve-space' : [[], {'elements' : []}],
\ 'processing-instructionruction' : [[], {'name' : []}],
\ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}],
\ 'strip-space' : [[], {'elements' : []}],
\ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}],
\ 'template' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
\ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}],
\ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}],
\ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}],
\ 'variable' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
\ 'when' : [[], {'test' : []}],
\ 'with-param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}]}

@ -0,0 +1,539 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2013 Jun 29
" Version: 1.9
"
" Changelog:
" 1.9 - 2007 Aug 15
" - fix closing of namespaced tags (Johannes Weiss)
" 1.8 - 2006 Jul 18
" - allow for closing of xml tags even when data file isn't available
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
" descriptive to avoid any future conflicts. For example 'xhtml10s' should be
" name for data of XHTML 1.0 Strict and 'xhtml10t' for XHTML 1.0 Transitional
" User interface will be provided by XMLns command defined in ftplugin/xml.vim
" Currently supported canonicals are:
" xhtml10s - XHTML 1.0 Strict
" xsl - XSL
function! xmlcomplete#CreateConnection(canonical, ...) " {{{
" When only one argument provided treat name as default namespace (without
" 'prefix:').
if exists("a:1")
let users = a:1
else
let users = 'DEFAULT'
endif
" Source data file. Due to suspected errors in autoload do it with
" :runtime.
" TODO: make it properly (using autoload, that is) later
exe "runtime autoload/xml/".a:canonical.".vim"
" Remove all traces of unexisting files to return [] when trying
" omnicomplete something
" TODO: give warning about non-existing canonicals - should it be?
if !exists("g:xmldata_".a:canonical)
unlet! g:xmldata_connection
return 0
endif
" We need to initialize Dictionary to add key-value pair
if !exists("g:xmldata_connection")
let g:xmldata_connection = {}
endif
let g:xmldata_connection[users] = a:canonical
endfunction
" }}}
function! xmlcomplete#CreateEntConnection(...) " {{{
if a:0 > 0
let g:xmldata_entconnect = a:1
else
let g:xmldata_entconnect = 'DEFAULT'
endif
endfunction
" }}}
function! xmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let curline = line('.')
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|[:.-]\)'
let start -= 1
endwhile
if start >= 0 && line[start - 1] =~ '&'
let b:entitiescompl = 1
let b:compl_context = ''
return start
endif
let b:compl_context = getline('.')[0:(compl_begin)]
if b:compl_context !~ '<[^>]*$'
" Look like we may have broken tag. Check previous lines. Up to
" 10?
let i = 1
while 1
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$' || i == curline
" Normal tag line, no need for completion at all
" OR reached first line without tag at all
let b:compl_context = ''
break
endif
let i += 1
endwhile
" Make sure we don't have counter
unlet! i
endif
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
" Make sure we will have only current namespace
unlet! b:xml_namespace
let b:xml_namespace = matchstr(b:compl_context, '^<\zs\k*\ze:')
if b:xml_namespace == ''
let b:xml_namespace = 'DEFAULT'
endif
return start
else
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
return []
endif
let context = matchstr(b:compl_context, '^<\zs.*')
unlet! b:compl_context
" There is no connection of namespace and data file.
if !exists("g:xmldata_connection") || g:xmldata_connection == {}
" There is still possibility we may do something - eg. close tag
let b:unaryTagsStack = "base meta link hr br param img area input col"
if context =~ '^\/'
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return [opentag.">"]
else
return []
endif
endif
" Make entities completion
if exists("b:entitiescompl")
unlet! b:entitiescompl
if !exists("g:xmldata_entconnect") || g:xmldata_entconnect == 'DEFAULT'
let values = g:xmldata{'_'.g:xmldata_connection['DEFAULT']}['vimxmlentities']
else
let values = g:xmldata{'_'.g:xmldata_entconnect}['vimxmlentities']
endif
" Get only lines with entity declarations but throw out
" parameter-entities - they may be completed in future
let entdecl = filter(getline(1, "$"), 'v:val =~ "<!ENTITY\\s\\+[^%]"')
if len(entdecl) > 0
let intent = map(copy(entdecl), 'matchstr(v:val, "<!ENTITY\\s\\+\\zs\\(\\k\\|[.-:]\\)\\+\\ze")')
let values = intent + values
endif
if len(a:base) == 1
for m in values
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
else
for m in values
if m =~? '^'.a:base
call add(res, m.';')
elseif m =~? a:base
call add(res2, m.';')
endif
endfor
return res + res2
endif
endif
if context =~ '>'
" Generally if context contains > it means we are outside of tag and
" should abandon action
return []
endif
" find tags matching with "a:base"
" If a:base contains white space it is attribute.
" It could be also value of attribute...
" We have to get first word to offer
" proper completions
if context == ''
let tag = ''
else
let tag = split(context)[0]
endif
" Get rid of namespace
let tag = substitute(tag, '^'.b:xml_namespace.':', '', '')
" Get last word, it should be attr name
let attr = matchstr(context, '.*\s\zs.*')
" Possible situations where any prediction would be difficult:
" 1. Events attributes
if context =~ '\s'
" If attr contains =\s*[\"'] we catched value of attribute
if attr =~ "=\s*[\"']" || attr =~ "=\s*$"
" Let do attribute specific completion
let attrname = matchstr(attr, '.*\ze\s*=')
let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*")
if tag =~ '^[?!]'
" Return nothing if we are inside of ! or ? tag
return []
else
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag) && has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1], attrname)
let values = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][attrname]
else
return []
endif
endif
if len(values) == 0
return []
endif
" We need special version of sbase
let attrbase = matchstr(context, ".*[\"']")
let attrquote = matchstr(attrbase, '.$')
if attrquote !~ "['\"]"
let attrquoteopen = '"'
let attrquote = '"'
else
let attrquoteopen = ''
endif
for m in values
" This if is needed to not offer all completions as-is
" alphabetically but sort them. Those beginning with entered
" part will be as first choices
if m =~ '^'.entered_value
call add(res, attrquoteopen . m . attrquote.' ')
elseif m =~ entered_value
call add(res2, attrquoteopen . m . attrquote.' ')
endif
endfor
return res + res2
endif
if tag =~ '?xml'
" Two possible arguments for <?xml> plus variation
let attrs = ['encoding', 'version="1.0"', 'version']
elseif tag =~ '^!'
" Don't make completion at all
"
return []
else
if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag)
" Abandon when data file isn't complete
return []
endif
let attrs = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1])
endif
for m in sort(attrs)
if m =~ '^'.attr
call add(res, m)
elseif m =~ attr
call add(res2, m)
endif
endfor
let menu = res + res2
let final_menu = []
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmlattrinfo')
for i in range(len(menu))
let item = menu[i]
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'], item)
let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][0]
let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
else
let item .= '="'
endif
let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
endfor
else
for i in range(len(menu))
let item = menu[i]
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
else
let item .= '="'
endif
let final_menu += [item]
endfor
endif
return final_menu
endif
" Close tag
let b:unaryTagsStack = "base meta link hr br param img area input col"
if context =~ '^\/'
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return [opentag.">"]
endif
" Complete elements of XML structure
" TODO: #REQUIRED, #IMPLIED, #FIXED, #PCDATA - but these should be detected like
" entities - in first run
" keywords: CDATA, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS
" are hardly recognizable but keep it in reserve
" also: EMPTY ANY SYSTEM PUBLIC DATA
if context =~ '^!'
let tags = ['!ELEMENT', '!DOCTYPE', '!ATTLIST', '!ENTITY', '!NOTATION', '![CDATA[', '![INCLUDE[', '![IGNORE[']
for m in tags
if m =~ '^'.context
let m = substitute(m, '^!\[\?', '', '')
call add(res, m)
elseif m =~ context
let m = substitute(m, '^!\[\?', '', '')
call add(res2, m)
endif
endfor
return res + res2
endif
" Complete text declaration
if context =~ '^?'
let tags = ['?xml']
for m in tags
if m =~ '^'.context
call add(res, substitute(m, '^?', '', ''))
elseif m =~ context
call add(res, substitute(m, '^?', '', ''))
endif
endfor
return res + res2
endif
" Deal with tag completion.
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
let opentag = substitute(opentag, '^\k*:', '', '')
if opentag == ''
"return []
let tags = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]})
call filter(tags, 'v:val !~ "^vimxml"')
else
if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, opentag)
" Abandon when data file isn't complete
return []
endif
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
endif
let context = substitute(context, '^\k*:', '', '')
for m in tags
if m =~ '^'.context
call add(res, m)
elseif m =~ context
call add(res2, m)
endif
endfor
let menu = res + res2
if b:xml_namespace == 'DEFAULT'
let xml_namespace = ''
else
let xml_namespace = b:xml_namespace.':'
endif
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmltaginfo')
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'], item)
let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][0]
let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
let final_menu += [{'word':xml_namespace.item, 'menu':m_menu, 'info':m_info}]
endfor
else
let final_menu = map(menu, 'xml_namespace.v:val')
endif
return final_menu
endif
endfunction
" MM: This is severely reduced closetag.vim used with kind permission of Steven
" Mueller
" Changes: strip all comments; delete error messages; add checking for
" namespace
" Author: Steven Mueller <diffusor@ugcs.caltech.edu>
" Last Modified: Tue May 24 13:29:48 PDT 2005
" Version: 0.9.1
function! xmlcomplete#GetLastOpenTag(unaryTagsStack)
let linenum=line('.')
let lineend=col('.') - 1 " start: cursor position
let first=1 " flag for first line searched
let b:TagStack='' " main stack of tags
let startInComment=s:InComment()
if exists("b:xml_namespace")
if b:xml_namespace == 'DEFAULT'
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
else
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
endif
else
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
endif
while (linenum>0)
let line=getline(linenum)
if first
let line=strpart(line,0,lineend)
else
let lineend=strlen(line)
endif
let b:lineTagStack=''
let mpos=0
let b:TagCol=0
while (mpos > -1)
let mpos=matchend(line,tagpat)
if mpos > -1
let b:TagCol=b:TagCol+mpos
let tag=matchstr(line,tagpat)
if exists('b:closetag_disable_synID') || startInComment==s:InCommentAt(linenum, b:TagCol)
let b:TagLine=linenum
call s:Push(matchstr(tag,'[^<>]\+'),'b:lineTagStack')
endif
let lineend=lineend-mpos
let line=strpart(line,mpos,lineend)
endif
endwhile
while (!s:EmptystackP('b:lineTagStack'))
let tag=s:Pop('b:lineTagStack')
if match(tag, '^/') == 0 "found end tag
call s:Push(tag,'b:TagStack')
elseif s:EmptystackP('b:TagStack') && !s:Instack(tag, a:unaryTagsStack) "found unclosed tag
return tag
else
let endtag=s:Peekstack('b:TagStack')
if endtag == '/'.tag || endtag == '/'
call s:Pop('b:TagStack') "found a open/close tag pair
elseif !s:Instack(tag, a:unaryTagsStack) "we have a mismatch error
return ''
endif
endif
endwhile
let linenum=linenum-1 | let first=0
endwhile
return ''
endfunction
function! s:InComment()
return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment\|String'
endfunction
function! s:InCommentAt(line, col)
return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment\|String'
endfunction
function! s:SetKeywords()
let s:IsKeywordBak=&l:iskeyword
let &l:iskeyword='33-255'
endfunction
function! s:RestoreKeywords()
let &l:iskeyword=s:IsKeywordBak
endfunction
function! s:Push(el, sname)
if !s:EmptystackP(a:sname)
exe 'let '.a:sname."=a:el.' '.".a:sname
else
exe 'let '.a:sname.'=a:el'
endif
endfunction
function! s:EmptystackP(sname)
exe 'let stack='.a:sname
if match(stack,'^ *$') == 0
return 1
else
return 0
endif
endfunction
function! s:Instack(el, sname)
exe 'let stack='.a:sname
call s:SetKeywords()
let m=match(stack, '\<'.a:el.'\>')
call s:RestoreKeywords()
if m < 0
return 0
else
return 1
endif
endfunction
function! s:Peekstack(sname)
call s:SetKeywords()
exe 'let stack='.a:sname
let top=matchstr(stack, '\<.\{-1,}\>')
call s:RestoreKeywords()
return top
endfunction
function! s:Pop(sname)
if s:EmptystackP(a:sname)
return ''
endif
exe 'let stack='.a:sname
call s:SetKeywords()
let loc=matchend(stack,'\<.\{-1,}\>')
exe 'let '.a:sname.'=strpart(stack, loc+1, strlen(stack))'
let top=strpart(stack, match(stack, '\<'), loc)
call s:RestoreKeywords()
return top
endfunction
function! s:Clearstack(sname)
exe 'let '.a:sname."=''"
endfunction
" vim:set foldmethod=marker:

@ -0,0 +1,405 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: Jul 02, 2013
" Version: 27
" Maintainer: Charles E Campbell <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2013 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" zip.vim and zipPlugin.vim are provided *as is* and comes with
" no warranty of any kind, either expressed or implied. By using
" this plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
"redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_zip")
finish
endif
let g:loaded_zip= "v27"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of zip needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
let s:zipfile_escape = ' ?&;\'
let s:ERROR = 2
let s:WARNING = 1
let s:NOTE = 0
" ---------------------------------------------------------------------
" Global Values: {{{1
if !exists("g:zip_shq")
if &shq != ""
let g:zip_shq= &shq
elseif has("unix")
let g:zip_shq= "'"
else
let g:zip_shq= '"'
endif
endif
if !exists("g:zip_zipcmd")
let g:zip_zipcmd= "zip"
endif
if !exists("g:zip_unzipcmd")
let g:zip_unzipcmd= "unzip"
endif
" ----------------
" Functions: {{{1
" ----------------
" ---------------------------------------------------------------------
" zip#Browse: {{{2
fun! zip#Browse(zipfile)
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
" sanity check: insure that the zipfile has "PK" as its first two letters
" (zipped files have a leading PK as a "magic cookie")
if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK'
exe "noautocmd e ".fnameescape(a:zipfile)
" call Dret("zip#Browse : not a zipfile<".a:zipfile.">")
return
" else " Decho
" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - its a zip file")
endif
let repkeep= &report
set report=10
" sanity checks
if !exists("*fnameescape")
if &verbose > 1
echoerr "the zip plugin is not available (your vim doens't support fnameescape())"
endif
return
endif
if !executable(g:zip_unzipcmd)
redraw!
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Browse")
return
endif
if !filereadable(a:zipfile)
if a:zipfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
redraw!
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let &report= repkeep
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
return
endif
" call Decho("passed sanity checks")
if &ma != 1
set ma
endif
let b:zipfile= a:zipfile
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal nobuflisted
setlocal nowrap
set ft=tar
" give header
call append(0, ['" zip.vim version '.g:loaded_zip,
\ '" Browsing zipfile '.a:zipfile,
\ '" Select a file with cursor and press ENTER'])
keepj $
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
exe "keepj sil! r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1)
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
keepj sil! %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "keepj r ".fnameescape(a:zipfile)
let &ei= eikeep
keepj 1d
" call Dret("zip#Browse")
return
endif
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
let &report= repkeep
" call Dret("zip#Browse")
endfun
" ---------------------------------------------------------------------
" ZipBrowseSelect: {{{2
fun! s:ZipBrowseSelect()
" call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("ZipBrowseSelect")
return
endif
if fname =~ '/$'
redraw!
echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("ZipBrowseSelect")
return
endif
" call Decho("fname<".fname.">")
" get zipfile to the new-window
let zipfile = b:zipfile
let curfile= expand("%")
" call Decho("zipfile<".zipfile.">")
" call Decho("curfile<".curfile.">")
new
if !exists("g:zip_nomax") || g:zip_nomax == 0
wincmd _
endif
let s:zipfile_{winnr()}= curfile
" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname))
exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
filetype detect
let &report= repkeep
" call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
endfun
" ---------------------------------------------------------------------
" zip#Read: {{{2
fun! zip#Read(fname,mode)
" call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")")
let repkeep= &report
set report=10
if has("unix")
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
else
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
let fname = substitute(fname, '[', '[[]', 'g')
endif
" call Decho("zipfile<".zipfile.">")
" call Decho("fname <".fname.">")
" the following code does much the same thing as
" exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
" but allows zipfile:... entries in quickfix lists
let temp = tempname()
" call Decho("using temp file<".temp.">")
let fn = expand('%:p')
exe "sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp
" call Decho("exe sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1).' > '.temp)
sil exe 'keepalt file '.temp
sil keepj e!
sil exe 'keepalt file '.fnameescape(fn)
call delete(temp)
filetype detect
" cleanup
" keepj 0d " used to be needed for the ...r! ... method
set nomod
let &report= repkeep
" call Dret("zip#Read")
endfun
" ---------------------------------------------------------------------
" zip#Write: {{{2
fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
let repkeep= &report
set report=10
" sanity checks
if !executable(g:zip_zipcmd)
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
endif
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
" call Decho("orig tempname<".tmpdir.">")
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
" call Decho("tmpdir<".tmpdir.">")
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
let &report= repkeep
" call Dret("zip#Write")
return
endif
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
if has("unix")
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}::\([^\\].*\)$','\1','')
else
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
endif
" call Decho("zipfile<".zipfile.">")
" call Decho("fname <".fname.">")
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
endif
" call Decho("mkdir(dirpath<".dirpath.">,p)")
call mkdir(dirpath,"p")
endif
if zipfile !~ '/'
let zipfile= curdir.'/'.zipfile
endif
" call Decho("zipfile<".zipfile."> fname<".fname.">")
exe "w! ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
endif
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
let fname = substitute(fname, '[', '[[]', 'g')
endif
" call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
elseif s:zipfile_{winnr()} =~ '^\a\+://'
" support writing zipfiles across a network
let netzipfile= s:zipfile_{winnr()}
" call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "e! ".fnameescape(zipfile)
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
endif
" cleanup and restore current directory
cd ..
call s:Rmdir("_ZIPVIM_")
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
call s:Rmdir(tmpdir)
setlocal nomod
let &report= repkeep
" call Dret("zip#Write")
endfun
" ---------------------------------------------------------------------
" s:Escape: {{{2
fun! s:Escape(fname,isfilt)
" call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")")
if exists("*shellescape")
if a:isfilt
let qnameq= shellescape(a:fname,1)
else
let qnameq= shellescape(a:fname)
endif
else
let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
endif
" call Dret("QuoteFileDir <".qnameq.">")
return qnameq
endfun
" ---------------------------------------------------------------------
" ChgDir: {{{2
fun! s:ChgDir(newdir,errlvl,errmsg)
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
try
exe "cd ".fnameescape(a:newdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
if a:errlvl == s:NOTE
echo "***note*** ".a:errmsg
elseif a:errlvl == s:WARNING
echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
elseif a:errlvl == s:ERROR
echohl Error | echo "***error*** ".a:errmsg | echohl NONE
endif
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call Dret("ChgDir 1")
return 1
endtry
" call Dret("ChgDir 0")
return 0
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
call system("rmdir /S/Q ".s:Escape(a:fname,0))
else
call system("/bin/rm -rf ".s:Escape(a:fname,0))
endif
" call Dret("Rmdir")
endfun
" ------------------------------------------------------------------------
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker

@ -0,0 +1,88 @@
:" Use this script to create the file "bugreport.txt", which contains
:" information about the environment of a possible bug in Vim.
:"
:" Maintainer: Bram Moolenaar <Bram@vim.org>
:" Last change: 2005 Jun 12
:"
:" To use inside Vim:
:" :so $VIMRUNTIME/bugreport.vim
:" Or, from the command line:
:" vim -s $VIMRUNTIME/bugreport.vim
:"
:" The "if 1" lines are to avoid error messages when expression evaluation is
:" not compiled in.
:"
:if 1
: let more_save = &more
:endif
:set nomore
:if has("unix")
: !echo "uname -a" >bugreport.txt
: !uname -a >>bugreport.txt
:endif
:redir >>bugreport.txt
:version
:if 1
: func <SID>CheckDir(n)
: if isdirectory(a:n)
: echo 'directory "' . a:n . '" exists'
: else
: echo 'directory "' . a:n . '" does NOT exist'
: endif
: endfun
: func <SID>CheckFile(n)
: if filereadable(a:n)
: echo '"' . a:n . '" is readable'
: else
: echo '"' . a:n . '" is NOT readable'
: endif
: endfun
: echo "--- Directories and Files ---"
: echo '$VIM = "' . $VIM . '"'
: call <SID>CheckDir($VIM)
: echo '$VIMRUNTIME = "' . $VIMRUNTIME . '"'
: call <SID>CheckDir($VIMRUNTIME)
: call <SID>CheckFile(&helpfile)
: call <SID>CheckFile(fnamemodify(&helpfile, ":h") . "/tags")
: call <SID>CheckFile($VIMRUNTIME . "/menu.vim")
: call <SID>CheckFile($VIMRUNTIME . "/filetype.vim")
: call <SID>CheckFile($VIMRUNTIME . "/syntax/synload.vim")
: delfun <SID>CheckDir
: delfun <SID>CheckFile
: echo "--- Scripts sourced ---"
: scriptnames
:endif
:set all
:set termcap
:if has("autocmd")
: au
:endif
:if 1
: echo "--- Normal/Visual mode mappings ---"
:endif
:map
:if 1
: echo "--- Insert/Command-line mode mappings ---"
:endif
:map!
:if 1
: echo "--- Abbreviations ---"
:endif
:ab
:if 1
: echo "--- Highlighting ---"
:endif
:highlight
:if 1
: echo "--- Variables ---"
:endif
:if 1
: let
:endif
:redir END
:set more&
:if 1
: let &more = more_save
: unlet more_save
:endif
:e bugreport.txt

@ -0,0 +1,84 @@
This is a mirror of http://www.vim.org/scripts/script.php?script_id=2423
This is vimscript for gist (http://gist.github.com)
Usage:
:Gist
post whole text to gist.
:'<,'>Gist
post selected text to gist.
:Gist -p
post whole text to gist with private.
if you got empty gist list, try :Gist --abandon
:Gist -a
post whole text to gist with anonymous.
:Gist -m
post multi buffer to gist.
:Gist -e
edit the gist. (shoud be work on gist buffer)
you can update the gist with :w command on gist buffer.
:Gist -e foo.js
edit the gist with name 'foo.js'. (shoud be work on gist buffer)
:Gist -d
delete the gist. (should be work on gist buffer)
password authentication is needed.
:Gist -f
fork the gist. (should be work on gist buffer)
password authentication is needed.
:Gist XXXXX
get gist XXXXX.
:Gist -c XXXXX.
get gist XXXXX and put to clipboard.
:Gist -l
list gists from mine.
:Gist -la
list gists from all.
Tips:
if set g:gist_clip_command, gist.vim will copy the gist code
with option '-c'.
# mac
let g:gist_clip_command = 'pbcopy'
# linux
let g:gist_clip_command = 'xclip -selection clipboard'
# others(cygwin?)
let g:gist_clip_command = 'putclip'
if you want to detect filetype from filename...
let g:gist_detect_filetype = 1
if you want to open browser after the post...
let g:gist_open_browser_after_post = 1
if you want to change the browser...
let g:gist_browser_command = 'w3m %URL%'
or
let g:gist_browser_command = 'opera %URL% &'
on windows, should work with original setting.
Require:
curl command (http://curl.haxx.se/)
and if you want to use profile of git, it require git command.

@ -0,0 +1,203 @@
### Gist.vim
This is a vimscript for creating gists (http://gist.github.com).
For the latest version please see https://github.com/mattn/gist-vim.
## Usage:
- Post current buffer to gist, using default privacy option.
:Gist
- Post selected text to gist, using default privacy option.
This applies to all permutations listed below (except multi).
:'<,'>Gist
- Create a private gist.
:Gist -p
- Create a public gist.
(Only relevant if you've set gists to be private by default.)
:Gist -P
> This is only relevant if you've set gists to be private by default;
> if you get an empty gist list, try ":Gist --abandon".
- Create a gist anonymously.
:Gist -a
- Create a gist with all open buffers.
:Gist -m
- Edit the gist (you need to have opened the gist buffer first).
You can update the gist with the ":w" command within the gist buffer.
:Gist -e
- Edit the gist with name 'foo.js' (you need to have opened the gist buffer
first).
:Gist -e foo.js
- Post/Edit with the description " (you need to have opened the gist buffer
first). >
:Gist -s something
:Gist -e -s something
- Delete the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist -d
- Fork the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist -f
- Star the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist +1
- Unstar the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist -1
- Get gist XXXXX.
:Gist XXXXX
- Get gist XXXXX and add to clipboard.
:Gist -c XXXXX
- List your public gists.
:Gist -l
- List gists from user "mattn".
:Gist -l mattn
- List everyone's gists.
:Gist -la
- List gists from your starred gists.
:Gist -ls
## Tips:
If you set g:gist_clip_command, gist.vim will copy the gist code with option
'-c'.
- Mac:
let g:gist_clip_command = 'pbcopy'
- Linux:
let g:gist_clip_command = 'xclip -selection clipboard'
- Others (cygwin?):
let g:gist_clip_command = 'putclip'
If you want to detect filetype from the filename:
let g:gist_detect_filetype = 1
If you want to open browser after the post:
let g:gist_open_browser_after_post = 1
If you want to change the browser:
let g:gist_browser_command = 'w3m %URL%'
or:
let g:gist_browser_command = 'opera %URL% &'
On windows, this should work with your user settings.
If you want to show your private gists with ":Gist -l":
let g:gist_show_privates = 1
If you want your gist to be private by default:
let g:gist_post_private = 1
If you want to manipulate multiple files in a gist:
let g:gist_get_multiplefile = 1
You need to either set global git config:
$ git config --global github.user Username
## Requirements:
- curl command (http://curl.haxx.se/)
- webapi-vim (https://github.com/mattn/webapi-vim)
- and if you want to use your git profile, the git command-line client.
## License:
Copyright 2010 by Yasuhiro Matsumoto
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
## Install:
Copy it to your plugin directory.
gist.vim will create a curl cookie-jar file in your runtimepath.
- rtp:
- plugin/gist.vim
- cookies/github
If you want to uninstall gist.vim, remember to also remove `~/.gist-vim`.
## Setup:
This plugin uses github API v3. Setting value is stored in `~/.gist-vim`.
gist-vim have two ways to access APIs.
First, you need to set your Github username in global git config:
$ git config --global github.user Username
Then, gist.vim will ask for your password to create an authorization when you
first use it. The password is not stored and only the OAuth access token will
be kept for later use. You can revoke the token at any time from the list of
["Authorized applications" on Github's "Account Settings" page](https://github.com/settings/applications).

@ -0,0 +1,894 @@
"=============================================================================
" File: gist.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" Last Change: 27-Sep-2012.
" Version: 7.0
" WebPage: http://github.com/mattn/gist-vim
" License: BSD
let s:save_cpo = &cpo
set cpo&vim
let s:configfile = expand('~/.gist-vim')
if !exists('g:github_user')
let s:system = function(get(g:, 'webapi#system_function', 'system'))
let g:github_user = substitute(s:system('git config --get github.user'), "\n", '', '')
if strlen(g:github_user) == 0
let g:github_user = $GITHUB_USER
end
endif
function! s:get_browser_command()
let gist_browser_command = get(g:, 'gist_browser_command', '')
if gist_browser_command == ''
if has('win32') || has('win64')
let gist_browser_command = '!start rundll32 url.dll,FileProtocolHandler %URL%'
elseif has('mac') || has('macunix') || has('gui_macvim') || system('uname') =~? '^darwin'
let gist_browser_command = 'open %URL%'
elseif executable('xdg-open')
let gist_browser_command = 'xdg-open %URL%'
elseif executable('firefox')
let gist_browser_command = 'firefox %URL% &'
else
let gist_browser_command = ''
endif
endif
return gist_browser_command
endfunction
function! s:open_browser(url)
let cmd = s:get_browser_command()
if len(cmd) == 0
redraw
echohl WarningMsg
echo "It seems that you don't have general web browser. Open URL below."
echohl None
echo a:url
return
endif
if cmd =~ '^!'
let cmd = substitute(cmd, '%URL%', '\=shellescape(a:url)', 'g')
silent! exec cmd
elseif cmd =~ '^:[A-Z]'
let cmd = substitute(cmd, '%URL%', '\=a:url', 'g')
exec cmd
else
let cmd = substitute(cmd, '%URL%', '\=shellescape(a:url)', 'g')
call system(cmd)
endif
endfunction
function! s:shellwords(str)
let words = split(a:str, '\%(\([^ \t\''"]\+\)\|''\([^\'']*\)''\|"\(\%([^\"\\]\|\\.\)*\)"\)\zs\s*\ze')
let words = map(words, 'substitute(v:val, ''\\\([\\ ]\)'', ''\1'', "g")')
let words = map(words, 'matchstr(v:val, ''^\%\("\zs\(.*\)\ze"\|''''\zs\(.*\)\ze''''\|.*\)$'')')
return words
endfunction
function! s:format_gist(gist)
let files = sort(keys(a:gist.files))
if empty(files)
return ""
endif
let file = a:gist.files[files[0]]
if has_key(file, "content")
let code = file.content
let code = "\n".join(map(split(code, "\n"), '" ".v:val'), "\n")
else
let code = ""
endif
return printf("gist: %s %s%s", a:gist.id, type(a:gist.description)==0?"": a:gist.description, code)
endfunction
" Note: A colon in the file name has side effects on Windows due to NTFS Alternate Data Streams; avoid it.
let s:bufprefix = 'gist' . (has('unix') ? ':' : '_')
function! s:GistList(gistls, page)
if a:gistls == '-all'
let url = 'https://api.github.com/gists/public'
elseif get(g:, 'gist_show_privates', 0) && a:gistls == 'starred'
let url = 'https://api.github.com/gists/starred'
elseif get(g:, 'gist_show_privates') && a:gistls == 'mine'
let url = 'https://api.github.com/gists'
else
let url = 'https://api.github.com/users/'.a:gistls.'/gists'
endif
let winnum = bufwinnr(bufnr(s:bufprefix.a:gistls))
if winnum != -1
if winnum != bufwinnr('%')
exe winnum 'wincmd w'
endif
setlocal modifiable
else
exec 'silent noautocmd split' s:bufprefix.a:gistls
endif
if a:page > 1
let oldlines = getline(0, line('$'))
let url = url . '?page=' . a:page
endif
setlocal modifiable
let old_undolevels = &undolevels
let oldlines = []
silent %d _
redraw | echon 'Listing gists... '
let auth = s:GistGetAuthHeader()
if len(auth) == 0
bw!
redraw
echohl ErrorMsg | echomsg 'Canceled' | echohl None
return
endif
let res = webapi#http#get(url, '', { "Authorization": auth })
if v:shell_error != 0
bw!
redraw
echohl ErrorMsg | echomsg 'Gists not found' | echohl None
return
endif
let content = webapi#json#decode(res.content)
if type(content) == 4 && has_key(content, 'message') && len(content.message)
bw!
redraw
echohl ErrorMsg | echomsg content.message | echohl None
if content.message == 'Bad credentials'
call delete(s:configfile)
endif
return
endif
let lines = map(filter(content, '!empty(v:val.files)'), 's:format_gist(v:val)')
call setline(1, split(join(lines, "\n"), "\n"))
$put='more...'
let b:gistls = a:gistls
let b:page = a:page
setlocal buftype=nofile bufhidden=hide noswapfile
setlocal nomodified
setlocal nomodifiable
syntax match SpecialKey /^gist:/he=e-1
nnoremap <silent> <buffer> <cr> :call <SID>GistListAction(0)<cr>
nnoremap <silent> <buffer> <s-cr> :call <SID>GistListAction(1)<cr>
cal cursor(1+len(oldlines),1)
nohlsearch
redraw | echo ''
endfunction
function! gist#list(user, ...)
let page = get(a:000, 0, 0)
if a:user == '-all'
let url = 'https://api.github.com/gists/public'
elseif get(g:, 'gist_show_privates', 0) && a:user == 'starred'
let url = 'https://api.github.com/gists/starred'
elseif get(g:, 'gist_show_privates') && a:user == 'mine'
let url = 'https://api.github.com/gists'
else
let url = 'https://api.github.com/users/'.a:user.'/gists'
endif
let auth = s:GistGetAuthHeader()
if len(auth) == 0
return []
endif
let res = webapi#http#get(url, '', { "Authorization": auth })
return webapi#json#decode(res.content)
endfunction
function! s:GistGetFileName(gistid)
let auth = s:GistGetAuthHeader()
if len(auth) == 0
return ''
endif
let res = webapi#http#get('https://api.github.com/gists/'.a:gistid, '', { "Authorization": auth })
let gist = webapi#json#decode(res.content)
if has_key(gist, 'files')
return sort(keys(gist.files))[0]
endif
return ''
endfunction
function! s:GistDetectFiletype(gistid)
let auth = s:GistGetAuthHeader()
if len(auth) == 0
return ''
endif
let res = webapi#http#get('https://api.github.com/gists/'.a:gistid, '', { "Authorization": auth })
let gist = webapi#json#decode(res.content)
let filename = sort(keys(gist.files))[0]
let ext = fnamemodify(filename, ':e')
if has_key(s:extmap, ext)
let type = s:extmap[ext]
else
let type = get(gist.files[filename], "type", "text")
endif
silent! exec "setlocal ft=".tolower(type)
endfunction
function! s:GistWrite(fname)
if substitute(a:fname, '\\', '/', 'g') == expand("%:p:gs@\\@/@")
Gist -e
else
exe "w".(v:cmdbang ? "!" : "") fnameescape(v:cmdarg) fnameescape(a:fname)
silent! exe "file" fnameescape(a:fname)
silent! au! BufWriteCmd <buffer>
endif
endfunction
function! s:GistGet(gistid, clipboard)
redraw | echon 'Getting gist... '
let res = webapi#http#get('https://api.github.com/gists/'.a:gistid, '', { "Authorization": s:GistGetAuthHeader() })
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
let gist = webapi#json#decode(res.content)
if get(g:, 'gist_get_multiplefile', 0) != 0
let num_file = len(keys(gist.files))
else
let num_file = 1
endif
redraw
if num_file > len(keys(gist.files))
echohl ErrorMsg | echomsg 'Gist not found' | echohl None
return
endif
for n in range(num_file)
try
let old_undolevels = &undolevels
let filename = sort(keys(gist.files))[n]
let winnum = bufwinnr(bufnr(s:bufprefix.a:gistid."/".filename))
if winnum != -1
if winnum != bufwinnr('%')
exe winnum 'wincmd w'
endif
setlocal modifiable
else
exec 'silent noautocmd new'
setlocal noswapfile
exec 'noautocmd file' s:bufprefix.a:gistid."/".fnameescape(filename)
endif
set undolevels=-1
filetype detect
silent %d _
let content = gist.files[filename].content
call setline(1, split(content, "\n"))
let b:gist = {
\ "filename": filename,
\ "id": gist.id,
\ "description": gist.description,
\ "private": gist.public =~ 'true',
\}
catch
let &undolevels = old_undolevels
bw!
redraw
echohl ErrorMsg | echomsg 'Gist contains binary' | echohl None
return
endtry
let &undolevels = old_undolevels
setlocal buftype=acwrite bufhidden=delete noswapfile
setlocal nomodified
doau StdinReadPost,BufRead,BufReadPost
let gist_detect_filetype = get(g:, 'gist_detect_filetype', 0)
if (&ft == '' && gist_detect_filetype == 1) || gist_detect_filetype == 2
call s:GistDetectFiletype(a:gistid)
endif
if a:clipboard
if exists('g:gist_clip_command')
exec 'silent w !'.g:gist_clip_command
elseif has('clipboard')
silent! %yank +
else
%yank
endif
endif
1
au! BufWriteCmd <buffer> call s:GistWrite(expand("<amatch>"))
endfor
else
bw!
redraw
echohl ErrorMsg | echomsg 'Gist not found' | echohl None
return
endif
endfunction
function! s:GistListAction(shift)
let line = getline('.')
let mx = '^gist:\s*\zs\(\w\+\)\ze.*'
if line =~# mx
let gistid = matchstr(line, mx)
if a:shift
call s:open_browser("https://gist.github.com/" . gistid)
else
call s:GistGet(gistid, 0)
endif
return
endif
if line =~# '^more\.\.\.$'
call s:GistList(b:gistls, b:page+1)
return
endif
endfunction
function! s:GistUpdate(content, gistid, gistnm, desc)
let gist = { "id": a:gistid, "files" : {}, "description": "","public": function('webapi#json#true') }
if exists('b:gist')
if has_key(b:gist, 'private') && b:gist.private | let gist["public"] = function('webapi#json#false') | endif
if has_key(b:gist, 'description') | let gist["description"] = b:gist.description | endif
if has_key(b:gist, 'filename') | let filename = b:gist.filename | endif
else
let filename = a:gistnm
if len(filename) == 0 | let filename = s:GistGetFileName(a:gistid) | endif
if len(filename) == 0 | let filename = s:get_current_filename(1) | endif
endif
let auth = s:GistGetAuthHeader()
if len(auth) == 0
redraw
echohl ErrorMsg | echomsg 'Canceled' | echohl None
return
endif
" Update description
" If no new description specified, keep the old description
if a:desc != ' '
let gist["description"] = a:desc
else
let res = webapi#http#get('https://api.github.com/gists/'.a:gistid, '', { "Authorization": auth })
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
let old_gist = webapi#json#decode(res.content)
let gist["description"] = old_gist.description
endif
endif
let gist.files[filename] = { "content": a:content, "filename": filename }
redraw | echon 'Updating gist... '
let res = webapi#http#post('https://api.github.com/gists/' . a:gistid,
\ webapi#json#encode(gist), {
\ "Authorization": auth,
\ "Content-Type": "application/json",
\})
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
let obj = webapi#json#decode(res.content)
let loc = obj["html_url"]
redraw | echomsg 'Done: '.loc
let b:gist = {"id": a:gistid, "filename": filename}
setlocal nomodified
else
let loc = ''
let status = matchstr(status, '^\d\+\s*\zs.*')
echohl ErrorMsg | echomsg 'Post failed: '.status | echohl None
endif
return loc
endfunction
function! s:GistDelete(gistid)
let auth = s:GistGetAuthHeader()
if len(auth) == 0
redraw
echohl ErrorMsg | echomsg 'Canceled' | echohl None
return
endif
redraw | echon 'Deleting gist... '
let res = webapi#http#post('https://api.github.com/gists/'.a:gistid, '', {
\ "Authorization": auth,
\ "Content-Type": "application/json",
\}, 'DELETE')
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
redraw | echomsg 'Done: '
if exists('b:gist')
unlet b:gist
endif
else
let status = matchstr(status, '^\d\+\s*\zs.*')
echohl ErrorMsg | echomsg 'Delete failed: '.status | echohl None
endif
endfunction
function! s:get_current_filename(no)
let filename = expand('%:t')
if len(filename) == 0 && &ft != ''
let pair = filter(items(s:extmap), 'v:val[1] == &ft')
if len(pair) > 0
let filename = printf('gistfile%d%s', a:no, pair[0][0])
endif
endif
if filename == ''
let filename = printf('gistfile%d.txt', a:no)
endif
return filename
endfunction
" GistPost function:
" Post new gist to github
"
" if there is an embedded gist url or gist id in your file,
" it will just update it.
" -- by c9s
"
" embedded gist url format:
"
" Gist: https://gist.github.com/123123
"
" embedded gist id format:
"
" GistID: 123123
"
function! s:GistPost(content, private, desc, anonymous)
let gist = { "files" : {}, "description": "","public": function('webapi#json#true') }
if a:desc != ' ' | let gist["description"] = a:desc | endif
if a:private | let gist["public"] = function('webapi#json#false') | endif
let filename = s:get_current_filename(1)
let gist.files[filename] = { "content": a:content, "filename": filename }
let header = {"Content-Type": "application/json"}
if !a:anonymous
let auth = s:GistGetAuthHeader()
if len(auth) == 0
redraw
echohl ErrorMsg | echomsg 'Canceled' | echohl None
return
endif
let header["Authorization"] = auth
endif
redraw | echon 'Posting it to gist... '
let res = webapi#http#post('https://api.github.com/gists', webapi#json#encode(gist), header)
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
let obj = webapi#json#decode(res.content)
let loc = obj["html_url"]
redraw | echomsg 'Done: '.loc
let b:gist = {
\ "filename": filename,
\ "id": matchstr(loc, '[^/]\+$'),
\ "description": gist['description'],
\ "private": a:private,
\}
else
let loc = ''
let status = matchstr(status, '^\d\+\s*\zs.*')
echohl ErrorMsg | echomsg 'Post failed: '.status | echohl None
endif
return loc
endfunction
function! s:GistPostBuffers(private, desc, anonymous)
let bufnrs = range(1, bufnr("$"))
let bn = bufnr('%')
let query = []
let gist = { "files" : {}, "description": "","public": function('webapi#json#true') }
if a:desc != ' ' | let gist["description"] = a:desc | endif
if a:private | let gist["public"] = function('webapi#json#false') | endif
let index = 1
for bufnr in bufnrs
if !bufexists(bufnr) || buflisted(bufnr) == 0
continue
endif
echo "Creating gist content".index."... "
silent! exec "buffer!" bufnr
let content = join(getline(1, line('$')), "\n")
let filename = s:get_current_filename(index)
let gist.files[filename] = { "content": content, "filename": filename }
let index = index + 1
endfor
silent! exec "buffer!" bn
let header = {"Content-Type": "application/json"}
if !a:anonymous
let auth = s:GistGetAuthHeader()
if len(auth) == 0
redraw
echohl ErrorMsg | echomsg 'Canceled' | echohl None
return
endif
let header["Authorization"] = auth
endif
redraw | echon 'Posting it to gist... '
let res = webapi#http#post('https://api.github.com/gists', webapi#json#encode(gist), header)
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
let obj = webapi#json#decode(res.content)
let loc = obj["html_url"]
redraw | echomsg 'Done: '.loc
let b:gist = {"id": matchstr(loc, '[^/]\+$'), "filename": filename, "private": a:private}
else
let loc = ''
let status = matchstr(status, '^\d\+\s*\zs.*')
echohl ErrorMsg | echomsg 'Post failed: '.status | echohl None
endif
return loc
endfunction
function! gist#Gist(count, line1, line2, ...)
redraw
if strlen(g:github_user) == 0
echohl ErrorMsg | echomsg "You don't have github account. read ':help gist-vim-setup'." | echohl None
return
endif
let bufname = bufname("%")
" find GistID: in content , then we should just update
let gistid = ''
let gistls = ''
let gistnm = ''
let gistdesc = ' '
let private = get(g:, 'gist_post_private', 0)
let multibuffer = 0
let clipboard = 0
let deletepost = 0
let editpost = 0
let anonymous = 0
let listmx = '^\%(-l\|--list\)\s*\([^\s]\+\)\?$'
let bufnamemx = '^' . s:bufprefix .'\(\zs[0-9a-f]\+\ze\|\zs[0-9a-f]\+\ze[/\\].*\)$'
if bufname =~ bufnamemx
let gistidbuf = matchstr(bufname, bufnamemx)
else
let gistidbuf = matchstr(join(getline(a:line1, a:line2), "\n"), 'GistID:\s*\zs\w\+')
endif
let args = (a:0 > 0) ? s:shellwords(a:1) : []
for arg in args
if arg =~ '^\(-h\|--help\)$\C'
help :Gist
return
elseif arg =~ '^\(-la\|--listall\)$\C'
let gistls = '-all'
elseif arg =~ '^\(-ls\|--liststar\)$\C'
let gistls = 'starred'
elseif arg =~ '^\(-l\|--list\)$\C'
if get(g:, 'gist_show_privates')
let gistls = 'mine'
else
let gistls = g:github_user
endif
elseif arg =~ '^\(-m\|--multibuffer\)$\C'
let multibuffer = 1
elseif arg =~ '^\(-p\|--private\)$\C'
let private = 1
elseif arg =~ '^\(-P\|--public\)$\C'
let private = 0
elseif arg =~ '^\(-a\|--anonymous\)$\C'
let anonymous = 1
elseif arg =~ '^\(-s\|--description\)$\C'
let gistdesc = ''
elseif arg =~ '^\(-c\|--clipboard\)$\C'
let clipboard = 1
elseif arg =~ '^\(-d\|--delete\)$\C' && gistidbuf != ''
let gistid = gistidbuf
let deletepost = 1
elseif arg =~ '^\(-e\|--edit\)$\C' && gistidbuf != ''
let gistid = gistidbuf
let editpost = 1
elseif arg =~ '^\(+1\|--star\)$\C' && gistidbuf != ''
let auth = s:GistGetAuthHeader()
if len(auth) == 0
echohl ErrorMsg | echomsg 'Canceled' | echohl None
else
let gistid = gistidbuf
let res = webapi#http#post('https://api.github.com/gists/'.gistid.'/star', '', { "Authorization": auth }, 'PUT')
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
echomsg "Stared" gistid
else
echohl ErrorMsg | echomsg 'Star failed' | echohl None
endif
endif
return
elseif arg =~ '^\(-1\|--unstar\)$\C' && gistidbuf != ''
let auth = s:GistGetAuthHeader()
if len(auth) == 0
echohl ErrorMsg | echomsg 'Canceled' | echohl None
else
let gistid = gistidbuf
let res = webapi#http#post('https://api.github.com/gists/'.gistid.'/star', '', { "Authorization": auth }, 'DELETE')
if status =~ '^2'
echomsg "Unstared" gistid
else
echohl ErrorMsg | echomsg 'Unstar failed' | echohl None
endif
endif
return
elseif arg =~ '^\(-f\|--fork\)$\C' && gistidbuf != ''
let auth = s:GistGetAuthHeader()
if len(auth) == 0
echohl ErrorMsg | echomsg 'Canceled' | echohl None
return
else
let gistid = gistidbuf
let res = webapi#http#post('https://api.github.com/gists/'.gistid.'/fork', '', { "Authorization": auth })
let status = matchstr(matchstr(res.header, '^Status:'), '^[^:]\+: \zs.*')
if status =~ '^2'
let obj = webapi#json#decode(res.content)
let gistid = obj["id"]
else
echohl ErrorMsg | echomsg 'Fork failed' | echohl None
return
endif
endif
elseif arg !~ '^-' && len(gistnm) == 0
if gistdesc != ' '
let gistdesc = matchstr(arg, '^\s*\zs.*\ze\s*$')
elseif editpost == 1 || deletepost == 1
let gistnm = arg
elseif len(gistls) > 0 && arg != '^\w\+$\C'
let gistls = arg
elseif arg =~ '^[0-9a-z]\+$\C'
let gistid = arg
else
echohl ErrorMsg | echomsg 'Invalid arguments: '.arg | echohl None
unlet args
return 0
endif
elseif len(arg) > 0
echohl ErrorMsg | echomsg 'Invalid arguments: '.arg | echohl None
unlet args
return 0
endif
endfor
unlet args
"echo "gistid=".gistid
"echo "gistls=".gistls
"echo "gistnm=".gistnm
"echo "gistdesc=".gistdesc
"echo "private=".private
"echo "clipboard=".clipboard
"echo "editpost=".editpost
"echo "deletepost=".deletepost
if gistidbuf != '' && gistid == '' && editpost == 0 && deletepost == 0
let editpost = 1
let gistid = gistidbuf
endif
if len(gistls) > 0
call s:GistList(gistls, 1)
elseif len(gistid) > 0 && editpost == 0 && deletepost == 0
call s:GistGet(gistid, clipboard)
else
let url = ''
if multibuffer == 1
let url = s:GistPostBuffers(private, gistdesc, anonymous)
else
if a:count < 1
let content = join(getline(a:line1, a:line2), "\n")
else
let save_regcont = @"
let save_regtype = getregtype('"')
silent! normal! gvy
let content = @"
call setreg('"', save_regcont, save_regtype)
endif
if editpost == 1
let url = s:GistUpdate(content, gistid, gistnm, gistdesc)
elseif deletepost == 1
call s:GistDelete(gistid)
else
let url = s:GistPost(content, private, gistdesc, anonymous)
endif
if a:count >= 1 && get(g:, 'gist_keep_selection', 0) == 1
silent! normal! gv
endif
endif
if len(url) > 0
if get(g:, 'gist_open_browser_after_post', 0) == 1
call s:open_browser(url)
endif
let gist_put_url_to_clipboard_after_post = get(g:, 'gist_put_url_to_clipboard_after_post', 1)
if gist_put_url_to_clipboard_after_post > 0
if gist_put_url_to_clipboard_after_post == 2
let url = url . "\n"
endif
if exists('g:gist_clip_command')
call system(g:gist_clip_command, url)
elseif has('unix') && !has('xterm_clipboard')
let @" = url
else
let @+ = url
endif
endif
endif
endif
return 1
endfunction
function! s:GistGetAuthHeader()
if get(g:, 'gist_use_password_in_gitconfig', 0) != 0
let password = substitute(system('git config --get github.password'), "\n", '', '')
if password =~ '^!' | let password = system(password[1:]) | endif
return printf("basic %s", webapi#base64#b64encode(g:github_user.":".password))
endif
let auth = ""
if filereadable(s:configfile)
let str = join(readfile(s:configfile), "")
if type(str) == 1
let auth = str
endif
endif
if len(auth) > 0
return auth
endif
redraw
echohl WarningMsg
echo 'Gist.vim requires authorization to use the Github API. These settings are stored in "~/.gist-vim". If you want to revoke, do "rm ~/.gist-vim".'
echohl None
let password = inputsecret("Github Password for ".g:github_user.":")
if len(password) > 0
let insecureSecret = printf("basic %s", webapi#base64#b64encode(g:github_user.":".password))
let res = webapi#http#post('https://api.github.com/authorizations', webapi#json#encode({
\ "scopes" : ["gist"],
\ "note" : "Gist.vim on ".hostname(),
\ "note_url" : "http://www.vim.org/scripts/script.php?script_id=2423"
\}), {
\ "Content-Type" : "application/json",
\ "Authorization" : insecureSecret,
\})
let authorization = webapi#json#decode(res.content)
if has_key(authorization, 'token')
let secret = printf("token %s", authorization.token)
call writefile([secret], s:configfile)
if !(has('win32') || has('win64'))
call system("chmod go= ".s:configfile)
endif
elseif has_key(authorization, 'message')
echohl WarningMsg
echo authorization.message
echohl None
let secret = ''
endif
else
let secret = ''
endif
return secret
endfunction
let s:extmap = {
\".adb": "ada",
\".ahk": "ahk",
\".arc": "arc",
\".as": "actionscript",
\".asm": "asm",
\".asp": "asp",
\".aw": "php",
\".b": "b",
\".bat": "bat",
\".befunge": "befunge",
\".bmx": "bmx",
\".boo": "boo",
\".c-objdump": "c-objdump",
\".c": "c",
\".cfg": "cfg",
\".cfm": "cfm",
\".ck": "ck",
\".cl": "cl",
\".clj": "clj",
\".cmake": "cmake",
\".coffee": "coffee",
\".cpp": "cpp",
\".cppobjdump": "cppobjdump",
\".cs": "csharp",
\".css": "css",
\".cw": "cw",
\".d-objdump": "d-objdump",
\".d": "d",
\".darcspatch": "darcspatch",
\".diff": "diff",
\".duby": "duby",
\".dylan": "dylan",
\".e": "e",
\".ebuild": "ebuild",
\".eclass": "eclass",
\".el": "lisp",
\".erb": "erb",
\".erl": "erlang",
\".f90": "f90",
\".factor": "factor",
\".feature": "feature",
\".fs": "fs",
\".fy": "fy",
\".go": "go",
\".groovy": "groovy",
\".gs": "gs",
\".gsp": "gsp",
\".haml": "haml",
\".hs": "haskell",
\".html": "html",
\".hx": "hx",
\".ik": "ik",
\".ino": "ino",
\".io": "io",
\".j": "j",
\".java": "java",
\".js": "javascript",
\".json": "json",
\".jsp": "jsp",
\".kid": "kid",
\".lhs": "lhs",
\".lisp": "lisp",
\".ll": "ll",
\".lua": "lua",
\".ly": "ly",
\".m": "objc",
\".mak": "mak",
\".man": "man",
\".mao": "mao",
\".matlab": "matlab",
\".md": "markdown",
\".minid": "minid",
\".ml": "ml",
\".moo": "moo",
\".mu": "mu",
\".mustache": "mustache",
\".mxt": "mxt",
\".myt": "myt",
\".n": "n",
\".nim": "nim",
\".nu": "nu",
\".numpy": "numpy",
\".objdump": "objdump",
\".ooc": "ooc",
\".parrot": "parrot",
\".pas": "pas",
\".pasm": "pasm",
\".pd": "pd",
\".phtml": "phtml",
\".pir": "pir",
\".pl": "perl",
\".po": "po",
\".py": "python",
\".pytb": "pytb",
\".pyx": "pyx",
\".r": "r",
\".raw": "raw",
\".rb": "ruby",
\".rhtml": "rhtml",
\".rkt": "rkt",
\".rs": "rs",
\".rst": "rst",
\".s": "s",
\".sass": "sass",
\".sc": "sc",
\".scala": "scala",
\".scm": "scheme",
\".scpt": "scpt",
\".scss": "scss",
\".self": "self",
\".sh": "sh",
\".sml": "sml",
\".sql": "sql",
\".st": "smalltalk",
\".tcl": "tcl",
\".tcsh": "tcsh",
\".tex": "tex",
\".textile": "textile",
\".tpl": "smarty",
\".twig": "twig",
\".txt" : "text",
\".v": "verilog",
\".vala": "vala",
\".vb": "vbnet",
\".vhd": "vhdl",
\".vim": "vim",
\".weechatlog": "weechatlog",
\".xml": "xml",
\".xq": "xquery",
\".xs": "xs",
\".yml": "yaml",
\}
let &cpo = s:save_cpo
unlet s:save_cpo
" vim:set et:

@ -0,0 +1,251 @@
*Gist.vim* Vimscript for creating gists (http://gist.github.com)
Usage |gist-vim-usage|
Tips |gist-vim-tips|
Requirements |gist-vim-requirements|
License |gist-vim-license|
Install |gist-vim-install|
Setup |gist-vim-setup|
This is a vimscript for creating gists (http://gist.github.com)
For the latest version please see https://github.com/mattn/gist-vim.
==============================================================================
USAGE *:Gist* *gist-vim-usage*
- Post current buffer to gist, using default privacy option. >
:Gist
<
- Post selected text to gist, using defualt privacy option.
This applies to all permutations listed below (except multi). >
:'<,'>Gist
<
- Create a private gist. >
:Gist -p
<
- Create a public gist.
(Only relevant if you've set gists to be private by default.) >
:Gist -P
<
- Post whole text to gist as public.
This is only relevant if you've set gists to be private by default.
>
:Gist -P
<
- Create a gist anonymously. >
:Gist -a
<
- Create a gist with all open buffers. >
:Gist -m
<
- Edit the gist (you need to have opened the gist buffer first).
You can update the gist with the {:w} command within the gist buffer. >
:Gist -e
<
- Edit the gist with name "foo.js" (you need to have opened the gist buffer
first). >
:Gist -e foo.js
<
- Post/Edit with the description " (you need to have opened the gist buffer
first). >
:Gist -s something
:Gist -e -s something
<
- Delete the gist (you need to have opened the gist buffer first).
Password authentication is needed. >
:Gist -d
<
- Fork the gist (you need to have opened the gist buffer first).
Password authentication is needed. >
:Gist -f
<
- Star the gist (you need to have opened the gist buffer first).
Password authentication is needed.
>
:Gist +1
<
- Unstar the gist (you need to have opened the gist buffer first).
Password authentication is needed.
>
:Gist -1
<
- Get gist XXXXX. >
:Gist XXXXX
<
- Get gist XXXXX and add to clipboard. >
:Gist -c XXXXX
<
- List your public gists. >
:Gist -l
<
- List gists from user "mattn". >
:Gist -l mattn
<
- List everyone's gists. >
:Gist -la
<
- List gists from your starred gists.
>
:Gist -ls
<
==============================================================================
TIPS *gist-vim-tips*
If you set "g:gist_clip_command", gist.vim will copy the gist code with option
"-c".
- Mac: >
let g:gist_clip_command = 'pbcopy'
<
- Linux: >
let g:gist_clip_command = 'xclip -selection clipboard'
<
- Others (cygwin?): >
let g:gist_clip_command = 'putclip'
<
If you want to detect filetype from the filename: >
let g:gist_detect_filetype = 1
<
If you want to open the browser after the post: >
let g:gist_open_browser_after_post = 1
<
If you want to change the browser: >
let g:gist_browser_command = 'w3m %URL%'
<
or: >
let g:gist_browser_command = 'opera %URL% &'
<
On windows, this should work with your user settings.
If you want to show your private gists with ":Gist -l": >
let g:gist_show_privates = 1
<
If you want to edit all files for gists containing more than one: >
let g:gist_get_multiplefile = 1
<
If you want to update a gist, embed >
GistID: xxxxx
>
in your local file, then call >
:Gist
>
==============================================================================
REQUIREMENTS *gist-vim-requirements*
- curl command (http://curl.haxx.se/)
- webapi-vim (https://github.com/mattn/webapi-vim)
- and, if you want to use your git profile, the git command-line client.
==============================================================================
LICENSE *gist-vim-license*
Copyright 2010 by Yasuhiro Matsumoto
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
==============================================================================
INSTALL *gist-vim-install*
Copy gist.vim to your plugin directory.
gist.vim will create a curl cookie-jar file in your runtimepath.
rtp:
- plugin/gist.vim
- cookies/github
If you want to uninstall gist.vim, remember to also remove "cookies/github".
==============================================================================
SETUP *gist-vim-setup*
This plugin uses github API v3. Setting value is stored in `~/.gist.vim`.
gist-vim have two ways to access APIs.
First, you need to set your Github username in global git config:
>
$ git config --global github.user Username
<
Then, gist.vim will ask for your password to create an authorization when you
first use it. The password is not stored and only the OAuth access token will
be kept for later use. You can revoke the token at any time from the list of
"Authorized applications" on Github's "Account Settings" page.
(https://github.com/settings/applications)
If you happen to have your password already written in ~/.gitconfig like
below:
>
[github]
password = xxxxx
<
Then, add following into your ~/.vimrc
>
let g:gist_use_password_in_gitconfig = 1
<
This is not secure at all, so strongly discouraged.
==============================================================================
THANKS *gist-vim-thanks*
AD7six
Bruno Bigras
c9s
Daniel Bretoi
Jeremy Michael Cantrell
Kien N
kongo2002
MATSUU Takuto
Matthew Weier O'Phinney
ornicar
Roland Schilter
steve
tyru
Will Gray
netj
vim:tw=78:ts=8:ft=help:norl:

@ -0,0 +1,9 @@
:Gist gist-vim.txt /*:Gist*
Gist.vim gist-vim.txt /*Gist.vim*
gist-vim-install gist-vim.txt /*gist-vim-install*
gist-vim-license gist-vim.txt /*gist-vim-license*
gist-vim-requirements gist-vim.txt /*gist-vim-requirements*
gist-vim-setup gist-vim.txt /*gist-vim-setup*
gist-vim-thanks gist-vim.txt /*gist-vim-thanks*
gist-vim-tips gist-vim.txt /*gist-vim-tips*
gist-vim-usage gist-vim.txt /*gist-vim-usage*

@ -0,0 +1,26 @@
"=============================================================================
" File: gist.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
" WebPage: http://github.com/mattn/gist-vim
" License: BSD
" GetLatestVimScripts: 2423 1 :AutoInstall: gist.vim
" script type: plugin
if &cp || (exists('g:loaded_gist_vim') && g:loaded_gist_vim)
finish
endif
let g:loaded_gist_vim = 1
if !exists('g:github_user') && !executable('git')
echohl ErrorMsg | echomsg "Gist: require 'git' command" | echohl None
finish
endif
if !executable('curl')
echohl ErrorMsg | echomsg "Gist: require 'curl' command" | echohl None
finish
endif
command! -nargs=? -range=% Gist :call gist#Gist(<count>, <line1>, <line2>, <f-args>)
" vim:set et:

@ -0,0 +1,16 @@
post.pl
vim_passfile
doc/tags
.*.un~
.*.sw*
# ignore csv files for tests
*.csv
# ignore vimballs
*.vba
*.vmb
# ignore *.orig files
*.orig
*.*~
# various testfiles
file*.*
testfile*

@ -0,0 +1,41 @@
SCRIPT=ftplugin/csv.vim
DOC=doc/ft-csv.txt
PLUGIN=csv
VERSION=$(shell sed -n '/Version:/{s/^.*\(\S\.\S\+\)$$/\1/;p}' $(SCRIPT))
.PHONY : csv.vmb csv
all: vimball
release: $(PLUGIN) $(PLUGIN).vmb
clean:
find . -type f \( -name "*.vba" -o -name "*.vmb" -o -name "*.orig" \
-o -name "*.~*" -o -name ".VimballRecord" -o -name ".*.un~" \
-o -name "*.sw*" -o -name tags \) -delete
dist-clean: clean
vimball: $(PLUGIN).vmb install
install:
vim -N -c 'ru! vimballPlugin.vim' -c':so %' -c':q!' ${PLUGIN}.vmb
uninstall:
vim -N -c 'ru! vimballPlugin.vim' -c':RmVimball ${PLUGIN}.vmb'
undo:
for i in */*.orig; do mv -f "$$i" "$${i%.*}"; done
csv.vmb:
vim -N -c 'ru! vimballPlugin.vim' -c ':let g:vimball_home=getcwd()' -c ':call append("0", ["ftplugin/csv.vim", "doc/ft-csv.txt", "syntax/csv.vim", "ftdetect/csv.vim", "plugin/csv.vim"])' -c '$$d' -c ':%MkVimball! ${PLUGIN}' -c':q!'
ln -f $(PLUGIN).vmb $(PLUGIN)-$(VERSION).vmb
csv:
rm -f ${PLUGIN}.vmb
perl -i.orig -pne 'if (/Version:/) {s/\.(\d+)*/sprintf(".%d", 1+$$1)/e}' ${SCRIPT}
perl -i -pne 'if (/GetLatestVimScripts:/) {s/(\d+)\s+:AutoInstall:/sprintf("%d :AutoInstall:", 1+$$1)/e}' ${SCRIPT}
perl -i -pne 'if (/Last Change:/) {s/(:\s+).*\n$$/sprintf(": %s", `date -R`)/e}' ${SCRIPT}
perl -i -pne 'if (/Last Change:/) {s/(:\s+).*\n$$/sprintf(": %s", `LC_TIME=C date +"%a, %d %b %Y"`)/e}' ${DOC}
perl -i.orig -pne 'if (/Version:/) {s/\.(\d+).*/sprintf(".%d", 1+$$1)/e}' ${DOC}
cp -f $(DOC) README

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
" Install Filetype detection for CSV files
au BufRead,BufNewFile *.csv,*.dat,*.tsv,*.tab set filetype=csv

File diff suppressed because it is too large Load Diff

@ -0,0 +1,79 @@
if exists('g:loaded_csv') && g:loaded_csv
finish
endif
let g:loaded_csv = 1
let s:cpo_save = &cpo
set cpo&vim
if exists("g:csv_autocmd_arrange") &&
\ !exists("#CSV_Edit#BufReadPost")
aug CSV_Editing
au!
au BufReadPost,BufWritePost *.csv,*.dat,*.tsv,*.tab :ru! ftplugin/csv.vim | exe ":sil! InitCSV" | exe ":sil! %ArrangeCol" | setl noro
au BufWritePre *.csv,*.dat,*.tsv,*.tab :%UnArrangeCol
aug end
elseif exists("#CSV_Edit#BufReadPost")
aug CSV_Edit
au!
aug end
aug! CSV_Edit
endif
com! -range -bang CSVTable call <sid>Table(<bang>0, <line1>, <line2>)
fu! <sid>Table(bang, line1, line2)
" save and restore some options
if has("conceal")
let _a = [ &l:lz, &l:syntax, &l:ft, &l:sol, &l:tw, &l:wrap, &l:cole, &l:cocu, &l:fen, &l:fdm, &l:fdl, &l:fdc, &l:fml, &l:fdt, &l:ma, &l:ml]
else
let _a = [ &l:lz, &l:syntax, &l:ft, &l:sol, &l:tw, &l:wrap, &l:fen, &l:fdm, &l:fdl, &l:fdc, &l:fml, &l:fdt, &l:ma, &l:ml]
endif
let _b = winsaveview()
let line1 = a:line1
let line2 = a:line2
if line1 == line2
" use the current paragraph
let line1 = line("'{") + 1
let line2 = line("'}") - 1
endif
" try to guess the delimiter from the specified region, therefore, we need
" to initialize the plugin to inspect only those lines
let [ b:csv_start, b:csv_end ] = [ line1, line2 ]
" Reset b:did_ftplugin just to be sure
unlet! b:did_ftplugin
setl noml ft=csv lz ma
" get indent
let indent = matchstr(getline(a:line1), '^\s\+')
exe printf(':sil %d,%ds/^\s\+//e', line1, line2)
let last = line('$')
try
let b:csv_list=getline(line1, line2)
call filter(b:csv_list, '!empty(v:val)')
call map(b:csv_list, 'split(v:val, b:col.''\zs'')')
if exists(":CSVTabularize")
exe printf("%d,%dCSVTabularize%s", line1, line2, empty(a:bang) ? '' : '!')
else
echoerr "Not possible to call :CSVTabularize"
endif
unlet! b:col_width b:csv_list
catch
finally
if !empty(indent)
" Added one line above a:line1 and several lines below, so need to
" correct the range
exe printf(':sil %d,%ds/^/%s/e', (line1 - 1), (line2 + line('$') - last), indent)
endif
if has("conceal")
let [ &l:lz, &l:syntax, &l:ft, &l:sol, &l:tw, &l:wrap, &l:cole, &l:cocu, &l:fen, &l:fdm, &l:fdl, &l:fdc, &l:fml, &l:fdt, &l:ma, &l:ml] = _a
else
let [ &l:lz, &l:syntax, &l:ft, &l:sol, &l:tw, &l:wrap, &l:fen, &l:fdm, &l:fdl, &l:fdc, &l:fml, &l:fdt, &l:ma, &l:ml] = _a
endif
call winrestview(_b)
endtry
endfu
let &cpo = s:cpo_save
unlet s:cpo_save

@ -0,0 +1,188 @@
" A simple syntax highlighting, simply alternate colors between two
" adjacent columns
" Init {{{2
let s:cpo_save = &cpo
set cpo&vim
scriptencoding utf8
if version < 600
syn clear
elseif exists("b:current_syntax")
finish
endif
" Helper functions "{{{2
fu! <sid>Warning(msg) "{{{3
" Don't redraw, so we are not overwriting messages from the ftplugin
" script
"redraw!
echohl WarningMsg
echomsg "CSV Syntax:" . a:msg
echohl Normal
endfu
fu! <sid>Esc(val, char) "{{2
return '\V'.escape(a:val, '\\'.a:char).'\m'
endfu
fu! <sid>CheckSaneSearchPattern() "{{{3
let s:del_def = ','
let s:col_def = '\%([^' . s:del_def . ']*' . s:del_def . '\|$\)'
let s:col_def_end = '\%([^' . s:del_def . ']*' . s:del_def . '\)'
" First:
" Check for filetype plugin. This syntax script relies on the filetype
" plugin, else, it won't work properly.
redir => s:a |sil filetype | redir end
let s:a=split(s:a, "\n")[0]
if match(s:a, '\cplugin:off') > 0
call <sid>Warning("No filetype support, only simple highlighting using"
\ . s:del_def . " as delimiter! See :h csv-installation")
endif
" Check Comment setting
if !exists("g:csv_comment")
let b:csv_cmt = split(&cms, '%s')
else
let b:csv_cmt = split(g:csv_comment, '%s')
endif
" Second: Check for sane defaults for the column pattern
" Not necessary to check for fixed width columns
if exists("b:csv_fixed_width_cols")
return
endif
" Try a simple highlighting, if the defaults from the ftplugin
" don't exist
let s:col = exists("b:col") && !empty(b:col) ? b:col
\ : s:col_def
let s:col_end = exists("b:col_end") && !empty(b:col_end) ? b:col_end
\ : s:col_def_end
let s:del = exists("b:delimiter") && !empty(b:delimiter) ? b:delimiter
\ : s:del_def
let s:cmts = exists("b:csv_cmt") ? b:csv_cmt[0] : split(&cms, '&s')[0]
let s:cmte = exists("b:csv_cmt") && len(b:csv_cmt) == 2 ? b:csv_cmt[1]
\ : ''
if line('$') > 1 && (!exists("b:col") || empty(b:col))
" check for invalid pattern, ftplugin hasn't been loaded yet
call <sid>Warning("Invalid column pattern, using default pattern " . s:col_def)
endif
endfu
" Syntax rules {{{2
fu! <sid>DoHighlight() "{{{3
if has("conceal") && !exists("g:csv_no_conceal") &&
\ !exists("b:csv_fixed_width_cols")
" old val
"\ '\%(.\)\@=/ms=e,me=e contained conceal cchar=' .
" Has a problem with the last line!
exe "syn match CSVDelimiter /" . s:col_end .
\ '/ms=e,me=e contained conceal cchar=' .
\ (&enc == "utf-8" ? "│" : '|')
"exe "syn match CSVDelimiterEOL /" . s:del .
" \ '\?$/ contained conceal cchar=' .
" \ (&enc == "utf-8" ? "│" : '|')
hi def link CSVDelimiter Conceal
elseif !exists("b:csv_fixed_width_cols")
" The \%(.\)\@<= makes sure, the last char won't be concealed,
" if it isn't a delimiter
"exe "syn match CSVDelimiter /" . s:col . '\%(.\)\@<=/ms=e,me=e contained'
exe "syn match CSVDelimiter /" . s:col_end . '/ms=e,me=e contained'
"exe "syn match CSVDelimiterEOL /" . s:del . '\?$/ contained'
if has("conceal")
hi def link CSVDelimiter Conceal
else
hi def link CSVDelimiter Ignore
endif
endif " There is no delimiter for csv fixed width columns
if !exists("b:csv_fixed_width_cols")
exe 'syn match CSVColumnEven nextgroup=CSVColumnOdd /'
\ . s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnOdd nextgroup=CSVColumnEven /'
\ . s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnHeaderEven nextgroup=CSVColumnHeaderOdd /\%1l'
\. s:col . '/ contains=CSVDelimiter'
exe 'syn match CSVColumnHeaderOdd nextgroup=CSVColumnHeaderEven /\%1l'
\. s:col . '/ contains=CSVDelimiter'
else
for i in range(len(b:csv_fixed_width_cols))
let pat = '/\%' . b:csv_fixed_width_cols[i] . 'c.*' .
\ ((i == len(b:csv_fixed_width_cols)-1) ? '/' :
\ '\%' . b:csv_fixed_width_cols[i+1] . 'c/')
let group = "CSVColumn" . (i%2 ? "Odd" : "Even" )
let ngroup = "CSVColumn" . (i%2 ? "Even" : "Odd" )
exe "syn match " group pat " nextgroup=" . ngroup
endfor
endif
" Comment regions
exe 'syn match CSVComment /'. <sid>Esc(s:cmts, '/'). '.*'.
\ (!empty(s:cmte) ? '\%('. <sid>Esc(s:cmte, '/'). '\)\?'
\: ''). '/'
hi def link CSVComment Comment
endfun
fu! <sid>DoSyntaxDefinitions() "{{{3
syn spell toplevel
" Not really needed
syn case ignore
hi def link CSVColumnHeaderOdd WarningMsg
hi def link CSVColumnHeaderEven WarningMsg
hi def link CSVColumnOdd DiffAdd
hi def link CSVColumnEven DiffChange
" Old Version
if 0
if &t_Co < 88
if !exists("b:csv_fixed_width_cols")
hi default CSVColumnHeaderOdd ctermfg=DarkRed ctermbg=15
\ guibg=grey80 guifg=black term=underline cterm=standout,bold
\ gui=bold,underline
endif
hi default CSVColumnOdd ctermfg=DarkRed ctermbg=15 guibg=grey80
\ guifg=black term=underline cterm=bold gui=underline
else
if !exists("b:csv_fixed_width_cols")
hi default CSVColumnHeaderOdd ctermfg=darkblue ctermbg=white
\ guibg=grey80 guifg=black cterm=standout,underline
\ gui=bold,underline
endif
hi default CSVColumnOdd ctermfg=darkblue ctermbg=white guibg=grey80
\ guifg=black cterm=reverse,underline gui=underline
endif
" ctermbg=8 should be safe, even in 8 color terms
if !exists("b:csv_fixed_width_cols")
hi default CSVColumnHeaderEven ctermfg=white ctermbg=darkgrey
\ guibg=grey50 guifg=black term=bold cterm=standout,underline
\ gui=bold,underline
endif
hi default CSVColumnEven ctermfg=white ctermbg=darkgrey guibg=grey50
\ guifg=black term=bold cterm=underline gui=bold,underline
endif
endfun
" Main: {{{2
" Make sure, we are using a sane, valid pattern for syntax
" highlighting
call <sid>CheckSaneSearchPattern()
" Define all necessary syntax groups
call <sid>DoSyntaxDefinitions()
" Highlight the file
call <sid>DoHighlight()
" Set the syntax variable {{{2
let b:current_syntax="csv"
let &cpo = s:cpo_save
unlet s:cpo_save

@ -0,0 +1,76 @@
## Open items ##
----------------
- when using :VHeader, comments are not copied over
- wrap/shorten long fields (scopus.csv). Is this even possible with Vim?
(maybe conceal trailing and leading whitespace?)
This should work:
1) set a max width per column
2) for each column issue something like this:
:exe 'syn match CSVConcealed /\%'.line.'l\%>'.width. 'c.*/ conceal cchar=…'
- Allow to set only a range of the file to filetype csv
(helps when writing text and one wants to insert some csv data)
- Add more scripting functions? (which ones?)
- Better support for newlines within a column (Is this worth the
effort?)
- add vertical folding (concealing columns)
(works partly, can't conceal single columns?)
- make plugin autoloadable (shouldn't be necessary, as the code is only
loaded for file with &ft=csv)
## Fixed items ##
-----------------
- Better syntax highlighting (last char in last line is concealed)
- Convert to a visual table, something like this:
a,header,line
foo,bar,10
baz,bum,5
:VisualTable results in:
-------------------
|a |header| line|
-----|------|-----|
|foo |bar | 10|
|baz |bum | 5|
-------------------
(works using :Tabularize command)
- Header/VHeader command should be more robust. May be use the preview
window to display the header? Does scrollbinding then still work?
(should work now)
- Transposing columns (should work now)
- add a wizard, for defining fixed-width columns
(should work now)
- Reapply Filter, in case Search register changed
(use :Filters!, should work now)
- Sum should account for different number formats
(e.g. 10 000.01 should be counted as 10,000.01 in Australia,
10.000 should be counted as 10,000 in Germany.
How can the user configure how to handle certain delimiters?
:SumCol 3 /.:,/ should use the ',' as decimal separator?
:SumCol 3 /,: / should use the ' ' as thousands separator?
:SumCol 3 /,: / /.:,/ treats ' ' as thousands separator and
, as decimal separator?
(should work now)
- When filtering, move all folded values together, so your file needs to
be reorded (and changed), but will leave all non-folded items
together. Make this configurable and only possible, when the file is
!read-only and modifiable)
(should work now)
- apply Filter negatively, e.g. pressing enter on a value, hides all
values, that don't have this value. (Maybe use <Space>, on the value?)
(should work now)
- document how to "substitute in column" command, may be even provide a
command for that?
- new command: AddColumn adds an empty column after cursor or after
specified column number (possibly followed by number of columns to
add)
vim:tw=72

@ -0,0 +1,16 @@
This is a mirror of http://www.vim.org/scripts/script.php?script_id=39
The matchit.vim script allows you to configure % to match more than just
single characters. You can match words and even regular expressions.
Also, matching treats strings and comments (as recognized by the
syntax highlighting mechanism) intelligently.
The default ftplugins include settings for several languages:
Ada, ASP with VBS, Csh, DTD, Essbase, Fortran, HTML, JSP
(same as HTML), LaTeX, Lua, Pascal, SGML, Shell, Tcsh, Vim, XML.
(I no longer keep track, so there may be others.)
The documentation (included in the zip file) explains how to configure
the script for a new language and how to modify the defaults.
Since vim 6.0, matchit.vim has been included in the standard vim distribution,
under the macros/ directory; the version here may be more recent.

@ -0,0 +1,406 @@
*matchit.txt* Extended "%" matching
For instructions on installing this file, type
:help matchit-install
inside Vim.
For Vim version 6.3. Last change: 2007 Aug 29
VIM REFERENCE MANUAL by Benji Fisher
*matchit* *matchit.vim*
1. Extended matching with "%" |matchit-intro|
2. Activation |matchit-activate|
3. Configuration |matchit-configure|
4. Supporting a New Language |matchit-newlang|
5. Known Bugs and Limitations |matchit-bugs|
The functionality mentioned here is a plugin, see |add-plugin|.
This plugin is only available if 'compatible' is not set.
You can avoid loading this plugin by setting the "loaded_matchit" variable
in your |vimrc| file: >
:let loaded_matchit = 1
{Vi does not have any of this}
==============================================================================
1. Extended matching with "%" *matchit-intro*
*matchit-%*
% Cycle forward through matching groups, such as "if", "else", "endif",
as specified by |b:match_words|.
*g%* *v_g%* *o_g%*
g% Cycle backwards through matching groups, as specified by
|b:match_words|. For example, go from "if" to "endif" to "else".
*[%* *v_[%* *o_[%*
[% Go to [count] previous unmatched group, as specified by
|b:match_words|. Similar to |[{|.
*]%* *v_]%* *o_]%*
]% Go to [count] next unmatched group, as specified by
|b:match_words|. Similar to |]}|.
*v_a%*
a% In Visual mode, select the matching group, as specified by
|b:match_words|, containing the cursor. Similar to |v_a[|.
A [count] is ignored, and only the first character of the closing
pattern is selected.
In Vim, as in plain vi, the percent key, |%|, jumps the cursor from a brace,
bracket, or paren to its match. This can be configured with the 'matchpairs'
option. The matchit plugin extends this in several ways:
You can match whole words, such as "if" and "endif", not just
single characters. You can also specify a |regular-expression|.
You can define groups with more than two words, such as "if",
"else", "endif". Banging on the "%" key will cycle from the "if" to
the first "else", the next "else", ..., the closing "endif", and back
to the opening "if". Nested structures are skipped. Using |g%| goes
in the reverse direction.
By default, words inside comments and strings are ignored, unless
the cursor is inside a comment or string when you type "%". If the
only thing you want to do is modify the behavior of "%" so that it
behaves this way, you do not have to define |b:match_words|, since the
script uses the 'matchpairs' option as well as this variable.
See |matchit-details| for details on what the script does, and |b:match_words|
for how to specify matching patterns.
MODES: *matchit-modes* *matchit-v_%* *matchit-o_%*
Mostly, % and related motions (|g%| and |[%| and |]%|) work just like built-in
|motion| commands in |Operator-pending| and |Visual| modes. However, you
cannot make these motions |linewise| or |characterwise|, since the |:omap|s
that define them start with "v" in order to make the default behavior
inclusive. (See |o_v|.) In other words, "dV%" will not work. The
work-around is to go through Visual mode: "V%d" will work.
LANGUAGES: *matchit-languages*
Currently, the following languages are supported: Ada, ASP with VBS, Csh,
DTD, Entity, Essbase, Fortran, HTML, JSP (same as HTML), LaTeX, Lua, Pascal,
SGML, Shell, Tcsh, Vim, XML. Other languages may already have support via
the default |filetype-plugin|s in the standard vim distribution.
To support a new language, see |matchit-newlang| below.
DETAILS: *matchit-details* *matchit-parse*
Here is an outline of what matchit.vim does each time you hit the "%" key. If
there are |backref|s in |b:match_words| then the first step is to produce a
version in which these back references have been eliminated; if there are no
|backref|s then this step is skipped. This step is called parsing. For
example, "\(foo\|bar\):end\1" is parsed to yield
"\(foo\|bar\):end\(foo\|bar\)". This can get tricky, especially if there are
nested groups. If debugging is turned on, the parsed version is saved as
|b:match_pat|.
*matchit-choose*
Next, the script looks for a word on the current line that matches the pattern
just constructed. It includes the patterns from the 'matchpairs' option.
The goal is to do what you expect, which turns out to be a little complicated.
The script follows these rules:
Insist on a match that ends on or after the cursor.
Prefer a match that includes the cursor position (that is, one that
starts on or before the cursor).
Prefer a match that starts as close to the cursor as possible.
If more than one pattern in |b:match_words| matches, choose the one
that is listed first.
Examples:
Suppose you >
:let b:match_words = '<:>,<tag>:</tag>'
< and hit "%" with the cursor on or before the "<" in "a <tag> is born".
The pattern '<' comes first, so it is preferred over '<tag>', which
also matches. If the cursor is on the "t", however, then '<tag>' is
preferred, because this matches a bit of text containing the cursor.
If the two groups of patterns were reversed then '<' would never be
preferred.
Suppose you >
:let b:match_words = 'if:end if'
< (Note the space!) and hit "%" with the cursor at the end of "end if".
Then "if" matches, which is probably not what you want, but if the
cursor starts on the "end " then "end if" is chosen. (You can avoid
this problem by using a more complicated pattern.)
If there is no match, the cursor does not move. (Before version 1.13 of the
script, it would fall back on the usual behavior of |%|). If debugging is
turned on, the matched bit of text is saved as |b:match_match| and the cursor
column of the start of the match is saved as |b:match_col|.
Next, the script looks through |b:match_words| (original and parsed versions)
for the group and pattern that match. If debugging is turned on, the group is
saved as |b:match_ini| (the first pattern) and |b:match_tail| (the rest). If
there are |backref|s then, in addition, the matching pattern is saved as
|b:match_word| and a table of translations is saved as |b:match_table|. If
there are |backref|s, these are determined from the matching pattern and
|b:match_match| and substituted into each pattern in the matching group.
The script decides whether to search forwards or backwards and chooses
arguments for the |searchpair()| function. Then, the cursor is moved to the
start of the match, and |searchpair()| is called. By default, matching
structures inside strings and comments are ignored. This can be changed by
setting |b:match_skip|.
==============================================================================
2. Activation *matchit-activate*
You can use this script as a plugin, by copying it to your plugin directory.
See |add-global-plugin| for instructions. You can also add a line to your
|vimrc| file, such as >
:source $VIMRUNTIME/macros/matchit.vim
or >
:runtime macros/matchit.vim
Either way, the script should start working the next time you start up Vim.
(Earlier versions of the script did nothing unless a |buffer-variable| named
|b:match_words| was defined. Even earlier versions contained autocommands
that set this variable for various file types. Now, |b:match_words| is
defined in many of the default |filetype-plugin|s instead.)
For a new language, you can add autocommands to the script or to your vimrc
file, but the recommended method is to add a line such as >
let b:match_words = '\<foo\>:\<bar\>'
to the |filetype-plugin| for your language. See |b:match_words| below for how
this variable is interpreted.
TROUBLESHOOTING *matchit-troubleshoot*
The script should work in most installations of Vim. It may not work if Vim
was compiled with a minimal feature set, for example if the |+syntax| option
was not enabled. If your Vim has support for syntax compiled in, but you do
not have |syntax| highlighting turned on, matchit.vim should work, but it may
fail to skip matching groups in comments and strings. If the |filetype|
mechanism is turned off, the |b:match_words| variable will probably not be
defined automatically.
==============================================================================
3. Configuration *matchit-configure*
There are several variables that govern the behavior of matchit.vim. Note
that these are variables local to the buffer, not options, so use |:let| to
define them, not |:set|. Some of these variables have values that matter; for
others, it only matters whether the variable has been defined. All of these
can be defined in the |filetype-plugin| or autocommand that defines
|b:match_words| or "on the fly."
The main variable is |b:match_words|. It is described in the section below on
supporting a new language.
*MatchError* *matchit-hl* *matchit-highlight*
MatchError is the highlight group for error messages from the script. By
default, it is linked to WarningMsg. If you do not want to be bothered by
error messages, you can define this to be something invisible. For example,
if you use the GUI version of Vim and your command line is normally white, you
can do >
:hi MatchError guifg=white guibg=white
<
*b:match_ignorecase*
If you >
:let b:match_ignorecase = 1
then matchit.vim acts as if 'ignorecase' is set: for example, "end" and "END"
are equivalent. If you >
:let b:match_ignorecase = 0
then matchit.vim treats "end" and "END" differently. (There will be no
b:match_infercase option unless someone requests it.)
*b:match_debug*
Define b:match_debug if you want debugging information to be saved. See
|matchit-debug|, below.
*b:match_skip*
If b:match_skip is defined, it is passed as the skip argument to
|searchpair()|. This controls when matching structures are skipped, or
ignored. By default, they are ignored inside comments and strings, as
determined by the |syntax| mechanism. (If syntax highlighting is turned off,
nothing is skipped.) You can set b:match_skip to a string, which evaluates to
a non-zero, numerical value if the match is to be skipped or zero if the match
should not be skipped. In addition, the following special values are
supported by matchit.vim:
s:foo becomes (current syntax item) =~ foo
S:foo becomes (current syntax item) !~ foo
r:foo becomes (line before cursor) =~ foo
R:foo becomes (line before cursor) !~ foo
(The "s" is meant to suggest "syntax", and the "r" is meant to suggest
"regular expression".)
Examples:
You can get the default behavior with >
:let b:match_skip = 's:comment\|string'
<
If you want to skip matching structures unless they are at the start
of the line (ignoring whitespace) then you can >
:let b:match_skip = 'R:^\s*'
< Do not do this if strings or comments can span several lines, since
the normal syntax checking will not be done if you set b:match_skip.
In LaTeX, since "%" is used as the comment character, you can >
:let b:match_skip = 'r:%'
< Unfortunately, this will skip anything after "\%", an escaped "%". To
allow for this, and also "\\%" (an excaped backslash followed by the
comment character) you can >
:let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
<
See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both
syntax and a regular expression.
==============================================================================
4. Supporting a New Language *matchit-newlang*
*b:match_words*
In order for matchit.vim to support a new language, you must define a suitable
pattern for |b:match_words|. You may also want to set some of the
|matchit-configure| variables, as described above. If your language has a
complicated syntax, or many keywords, you will need to know something about
Vim's |regular-expression|s.
The format for |b:match_words| is similar to that of the 'matchpairs' option:
it is a comma (,)-separated list of groups; each group is a colon(:)-separated
list of patterns (regular expressions). Commas and backslashes that are part
of a pattern should be escaped with backslashes ('\:' and '\,'). It is OK to
have only one group; the effect is undefined if a group has only one pattern.
A simple example is >
:let b:match_words = '\<if\>:\<endif\>,'
\ . '\<while\>:\<continue\>:\<break\>:\<endwhile\>'
(In Vim regular expressions, |\<| and |\>| denote word boundaries. Thus "if"
matches the end of "endif" but "\<if\>" does not.) Then banging on the "%"
key will bounce the cursor between "if" and the matching "endif"; and from
"while" to any matching "continue" or "break", then to the matching "endwhile"
and back to the "while". It is almost always easier to use |literal-string|s
(single quotes) as above: '\<if\>' rather than "\\<if\\>" and so on.
Exception: If the ":" character does not appear in b:match_words, then it is
treated as an expression to be evaluated. For example, >
:let b:match_words = 'GetMatchWords()'
allows you to define a function. This can return a different string depending
on the current syntax, for example.
Once you have defined the appropriate value of |b:match_words|, you will
probably want to have this set automatically each time you edit the
appropriate file type. The recommended way to do this is by adding the
definition to a |filetype-plugin| file.
Tips: Be careful that your initial pattern does not match your final pattern.
See the example above for the use of word-boundary expressions. It is usually
better to use ".\{-}" (as many as necessary) instead of ".*" (as many as
possible). See |\{-|. For example, in the string "<tag>label</tag>", "<.*>"
matches the whole string whereas "<.\{-}>" and "<[^>]*>" match "<tag>" and
"</tag>".
*matchit-spaces* *matchit-s:notend*
If "if" is to be paired with "end if" (Note the space!) then word boundaries
are not enough. Instead, define a regular expression s:notend that will match
anything but "end" and use it as follows: >
:let s:notend = '\%(\<end\s\+\)\@<!'
:let b:match_words = s:notend . '\<if\>:\<end\s\+if\>'
< *matchit-s:sol*
This is a simplified version of what is done for Ada. The s:notend is a
|script-variable|. Similarly, you may want to define a start-of-line regular
expression >
:let s:sol = '\%(^\|;\)\s*'
if keywords are only recognized after the start of a line or after a
semicolon (;), with optional white space.
*matchit-backref* *matchit-\1*
In any group, the expressions |\1|, |\2|, ..., |\9| refer to parts of the
INITIAL pattern enclosed in |\(|escaped parentheses|\)|. These are referred
to as back references, or backrefs. For example, >
:let b:match_words = '\<b\(o\+\)\>:\(h\)\1\>'
means that "bo" pairs with "ho" and "boo" pairs with "hoo" and so on. Note
that "\1" does not refer to the "\(h\)" in this example. If you have
"\(nested \(parentheses\)\) then "\d" refers to the d-th "\(" and everything
up to and including the matching "\)": in "\(nested\(parentheses\)\)", "\1"
refers to everything and "\2" refers to "\(parentheses\)". If you use a
variable such as |s:notend| or |s:sol| in the previous paragraph then remember
to count any "\(" patterns in this variable. You do not have to count groups
defined by |\%(\)|.
It should be possible to resolve back references from any pattern in the
group. For example, >
:let b:match_words = '\(foo\)\(bar\):more\1:and\2:end\1\2'
would not work because "\2" cannot be determined from "morefoo" and "\1"
cannot be determined from "andbar". On the other hand, >
:let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1'
should work (and have the same effect as "foobar:barfoo:endfoobar"), although
this has not been thoroughly tested.
You can use |zero-width| patterns such as |\@<=| and |\zs|. (The latter has
not been thouroughly tested in matchit.vim.) For example, if the keyword "if"
must occur at the start of the line, with optional white space, you might use
the pattern "\(^\s*\)\@<=if" so that the cursor will end on the "i" instead of
at the start of the line. For another example, if HTML had only one tag then
one could >
:let b:match_words = '<:>,<\@<=tag>:<\@<=/tag>'
so that "%" can bounce between matching "<" and ">" pairs or (starting on
"tag" or "/tag") between matching tags. Without the |\@<=|, the script would
bounce from "tag" to the "<" in "</tag>", and another "%" would not take you
back to where you started.
DEBUGGING *matchit-debug* *:MatchDebug*
If you are having trouble figuring out the appropriate definition of
|b:match_words| then you can take advantage of the same information I use when
debugging the script. This is especially true if you are not sure whether
your patterns or my script are at fault! To make this more convenient, I have
made the command :MatchDebug, which defines the variable |b:match_debug| and
creates a Matchit menu. This menu makes it convenient to check the values of
the variables described below. You will probably also want to read
|matchit-details| above.
Defining the variable |b:match_debug| causes the script to set the following
variables, each time you hit the "%" key. Several of these are only defined
if |b:match_words| includes |backref|s.
*b:match_pat*
The b:match_pat variable is set to |b:match_words| with |backref|s parsed.
*b:match_match*
The b:match_match variable is set to the bit of text that is recognized as a
match.
*b:match_col*
The b:match_col variable is set to the cursor column of the start of the
matching text.
*b:match_wholeBR*
The b:match_wholeBR variable is set to the comma-separated group of patterns
that matches, with |backref|s unparsed.
*b:match_iniBR*
The b:match_iniBR variable is set to the first pattern in |b:match_wholeBR|.
*b:match_ini*
The b:match_ini variable is set to the first pattern in |b:match_wholeBR|,
with |backref|s resolved from |b:match_match|.
*b:match_tail*
The b:match_tail variable is set to the remaining patterns in
|b:match_wholeBR|, with |backref|s resolved from |b:match_match|.
*b:match_word*
The b:match_word variable is set to the pattern from |b:match_wholeBR| that
matches |b:match_match|.
*b:match_table*
The back reference '\'.d refers to the same thing as '\'.b:match_table[d] in
|b:match_word|.
==============================================================================
5. Known Bugs and Limitations *matchit-bugs*
Just because I know about a bug does not mean that it is on my todo list. I
try to respond to reports of bugs that cause real problems. If it does not
cause serious problems, or if there is a work-around, a bug may sit there for
a while. Moral: if a bug (known or not) bothers you, let me know.
The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may
have undesired effects in Select mode |Select-mode-mapping|. At least, if you
want to replace the selection with any character in "ag%[]" there will be a
pause of |'updatetime'| first.
It would be nice if "\0" were recognized as the entire pattern. That is, it
would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1". I may
try to implement this in a future version. (This is not so easy to arrange as
you might think!)
==============================================================================
vim:tw=78:fo=tcq2:

@ -0,0 +1,50 @@
:MatchDebug matchit.txt /*:MatchDebug*
MatchError matchit.txt /*MatchError*
[% matchit.txt /*[%*
]% matchit.txt /*]%*
b:match_col matchit.txt /*b:match_col*
b:match_debug matchit.txt /*b:match_debug*
b:match_ignorecase matchit.txt /*b:match_ignorecase*
b:match_ini matchit.txt /*b:match_ini*
b:match_iniBR matchit.txt /*b:match_iniBR*
b:match_match matchit.txt /*b:match_match*
b:match_pat matchit.txt /*b:match_pat*
b:match_skip matchit.txt /*b:match_skip*
b:match_table matchit.txt /*b:match_table*
b:match_tail matchit.txt /*b:match_tail*
b:match_wholeBR matchit.txt /*b:match_wholeBR*
b:match_word matchit.txt /*b:match_word*
b:match_words matchit.txt /*b:match_words*
g% matchit.txt /*g%*
matchit matchit.txt /*matchit*
matchit-% matchit.txt /*matchit-%*
matchit-\1 matchit.txt /*matchit-\\1*
matchit-activate matchit.txt /*matchit-activate*
matchit-backref matchit.txt /*matchit-backref*
matchit-bugs matchit.txt /*matchit-bugs*
matchit-choose matchit.txt /*matchit-choose*
matchit-configure matchit.txt /*matchit-configure*
matchit-debug matchit.txt /*matchit-debug*
matchit-details matchit.txt /*matchit-details*
matchit-highlight matchit.txt /*matchit-highlight*
matchit-hl matchit.txt /*matchit-hl*
matchit-intro matchit.txt /*matchit-intro*
matchit-languages matchit.txt /*matchit-languages*
matchit-modes matchit.txt /*matchit-modes*
matchit-newlang matchit.txt /*matchit-newlang*
matchit-o_% matchit.txt /*matchit-o_%*
matchit-parse matchit.txt /*matchit-parse*
matchit-s:notend matchit.txt /*matchit-s:notend*
matchit-s:sol matchit.txt /*matchit-s:sol*
matchit-spaces matchit.txt /*matchit-spaces*
matchit-troubleshoot matchit.txt /*matchit-troubleshoot*
matchit-v_% matchit.txt /*matchit-v_%*
matchit.txt matchit.txt /*matchit.txt*
matchit.vim matchit.txt /*matchit.vim*
o_[% matchit.txt /*o_[%*
o_]% matchit.txt /*o_]%*
o_g% matchit.txt /*o_g%*
v_[% matchit.txt /*v_[%*
v_]% matchit.txt /*v_]%*
v_a% matchit.txt /*v_a%*
v_g% matchit.txt /*v_g%*

@ -0,0 +1,812 @@
" matchit.vim: (global plugin) Extended "%" matching
" Last Change: Fri Jan 25 10:00 AM 2008 EST
" Maintainer: Benji Fisher PhD <benji@member.AMS.org>
" Version: 1.13.2, for Vim 6.3+
" URL: http://www.vim.org/script.php?script_id=39
" Documentation:
" The documentation is in a separate file, matchit.txt .
" Credits:
" Vim editor by Bram Moolenaar (Thanks, Bram!)
" Original script and design by Raul Segura Acevedo
" Support for comments by Douglas Potts
" Support for back references and other improvements by Benji Fisher
" Support for many languages by Johannes Zellner
" Suggestions for improvement, bug reports, and support for additional
" languages by Jordi-Albert Batalla, Neil Bird, Servatius Brandt, Mark
" Collett, Stephen Wall, Dany St-Amant, Yuheng Xie, and Johannes Zellner.
" Debugging:
" If you'd like to try the built-in debugging commands...
" :MatchDebug to activate debugging for the current buffer
" This saves the values of several key script variables as buffer-local
" variables. See the MatchDebug() function, below, for details.
" TODO: I should think about multi-line patterns for b:match_words.
" This would require an option: how many lines to scan (default 1).
" This would be useful for Python, maybe also for *ML.
" TODO: Maybe I should add a menu so that people will actually use some of
" the features that I have implemented.
" TODO: Eliminate the MultiMatch function. Add yet another argument to
" Match_wrapper() instead.
" TODO: Allow :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1'
" TODO: Make backrefs safer by using '\V' (very no-magic).
" TODO: Add a level of indirection, so that custom % scripts can use my
" work but extend it.
" allow user to prevent loading
" and prevent duplicate loading
if exists("loaded_matchit") || &cp
finish
endif
let loaded_matchit = 1
let s:last_mps = ""
let s:last_words = ":"
let s:save_cpo = &cpo
set cpo&vim
nnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'n') <CR>
nnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'n') <CR>
vnoremap <silent> % :<C-U>call <SID>Match_wrapper('',1,'v') <CR>m'gv``
vnoremap <silent> g% :<C-U>call <SID>Match_wrapper('',0,'v') <CR>m'gv``
onoremap <silent> % v:<C-U>call <SID>Match_wrapper('',1,'o') <CR>
onoremap <silent> g% v:<C-U>call <SID>Match_wrapper('',0,'o') <CR>
" Analogues of [{ and ]} using matching patterns:
nnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "n") <CR>
nnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "n") <CR>
vmap [% <Esc>[%m'gv``
vmap ]% <Esc>]%m'gv``
" vnoremap <silent> [% :<C-U>call <SID>MultiMatch("bW", "v") <CR>m'gv``
" vnoremap <silent> ]% :<C-U>call <SID>MultiMatch("W", "v") <CR>m'gv``
onoremap <silent> [% v:<C-U>call <SID>MultiMatch("bW", "o") <CR>
onoremap <silent> ]% v:<C-U>call <SID>MultiMatch("W", "o") <CR>
" text object:
vmap a% <Esc>[%v]%
" Auto-complete mappings: (not yet "ready for prime time")
" TODO Read :help write-plugin for the "right" way to let the user
" specify a key binding.
" let g:match_auto = '<C-]>'
" let g:match_autoCR = '<C-CR>'
" if exists("g:match_auto")
" execute "inoremap " . g:match_auto . ' x<Esc>"=<SID>Autocomplete()<CR>Pls'
" endif
" if exists("g:match_autoCR")
" execute "inoremap " . g:match_autoCR . ' <CR><C-R>=<SID>Autocomplete()<CR>'
" endif
" if exists("g:match_gthhoh")
" execute "inoremap " . g:match_gthhoh . ' <C-O>:call <SID>Gthhoh()<CR>'
" endif " gthhoh = "Get the heck out of here!"
let s:notslash = '\\\@<!\%(\\\\\)*'
function! s:Match_wrapper(word, forward, mode) range
" In s:CleanUp(), :execute "set" restore_options .
let restore_options = (&ic ? " " : " no") . "ignorecase"
if exists("b:match_ignorecase")
let &ignorecase = b:match_ignorecase
endif
let restore_options = " ve=" . &ve . restore_options
set ve=
" If this function was called from Visual mode, make sure that the cursor
" is at the correct end of the Visual range:
if a:mode == "v"
execute "normal! gv\<Esc>"
endif
" In s:CleanUp(), we may need to check whether the cursor moved forward.
let startline = line(".")
let startcol = col(".")
" Use default behavior if called with a count.
if v:count
exe "normal! " . v:count . "%"
return s:CleanUp(restore_options, a:mode, startline, startcol)
end
" First step: if not already done, set the script variables
" s:do_BR flag for whether there are backrefs
" s:pat parsed version of b:match_words
" s:all regexp based on s:pat and the default groups
"
if !exists("b:match_words") || b:match_words == ""
let match_words = ""
" Allow b:match_words = "GetVimMatchWords()" .
elseif b:match_words =~ ":"
let match_words = b:match_words
else
execute "let match_words =" b:match_words
endif
" Thanks to Preben "Peppe" Guldberg and Bram Moolenaar for this suggestion!
if (match_words != s:last_words) || (&mps != s:last_mps) ||
\ exists("b:match_debug")
let s:last_words = match_words
let s:last_mps = &mps
" The next several lines were here before
" BF started messing with this script.
" quote the special chars in 'matchpairs', replace [,:] with \| and then
" append the builtin pairs (/*, */, #if, #ifdef, #else, #elif, #endif)
" let default = substitute(escape(&mps, '[$^.*~\\/?]'), '[,:]\+',
" \ '\\|', 'g').'\|\/\*\|\*\/\|#if\>\|#ifdef\>\|#else\>\|#elif\>\|#endif\>'
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
" s:all = pattern with all the keywords
let match_words = match_words . (strlen(match_words) ? "," : "") . default
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g')
let s:all = '\%(' . s:all . '\)'
" let s:all = '\%(' . substitute(s:all, '\\\ze[,:]', '', 'g') . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
endif
" Second step: set the following local variables:
" matchline = line on which the cursor started
" curcol = number of characters before match
" prefix = regexp for start of line to start of match
" suffix = regexp for end of match to end of line
" Require match to end on or after the cursor and prefer it to
" start on or before the cursor.
let matchline = getline(startline)
if a:word != ''
" word given
if a:word !~ s:all
echohl WarningMsg|echo 'Missing rule for word:"'.a:word.'"'|echohl NONE
return s:CleanUp(restore_options, a:mode, startline, startcol)
endif
let matchline = a:word
let curcol = 0
let prefix = '^\%('
let suffix = '\)$'
" Now the case when "word" is not given
else " Find the match that ends on or after the cursor and set curcol.
let regexp = s:Wholematch(matchline, s:all, startcol-1)
let curcol = match(matchline, regexp)
" If there is no match, give up.
if curcol == -1
return s:CleanUp(restore_options, a:mode, startline, startcol)
endif
let endcol = matchend(matchline, regexp)
let suf = strlen(matchline) - endcol
let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(')
let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$')
endif
if exists("b:match_debug")
let b:match_match = matchstr(matchline, regexp)
let b:match_col = curcol+1
endif
" Third step: Find the group and single word that match, and the original
" (backref) versions of these. Then, resolve the backrefs.
" Set the following local variable:
" group = colon-separated list of patterns, one of which matches
" = ini:mid:fin or ini:fin
"
" Reconstruct the version with unresolved backrefs.
let patBR = substitute(match_words.',',
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let patBR = substitute(patBR, s:notslash.'\zs:\{2,}', ':', 'g')
" Now, set group and groupBR to the matching group: 'if:endif' or
" 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
" group . "," . groupBR, and we pick it apart.
let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
let i = matchend(group, s:notslash . ",")
let groupBR = strpart(group, i)
let group = strpart(group, 0, i-1)
" Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
if s:do_BR " Do the hard part: resolve those backrefs!
let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
endif
if exists("b:match_debug")
let b:match_wholeBR = groupBR
let i = matchend(groupBR, s:notslash . ":")
let b:match_iniBR = strpart(groupBR, 0, i-1)
endif
" Fourth step: Set the arguments for searchpair().
let i = matchend(group, s:notslash . ":")
let j = matchend(group, '.*' . s:notslash . ":")
let ini = strpart(group, 0, i-1)
let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g')
let fin = strpart(group, j)
"Un-escape the remaining , and : characters.
let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
" searchpair() requires that these patterns avoid \(\) groups.
let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g')
let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g')
let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g')
" Set mid. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline =~ prefix . ini . suffix
let mid = ""
endif
" Set flag. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline !~ prefix . ini . suffix
let flag = "bW"
else
let flag = "W"
endif
" Set skip.
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
else
let skip = 's:comment\|string'
endif
let skip = s:ParseSkip(skip)
if exists("b:match_debug")
let b:match_ini = ini
let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin
endif
" Fifth step: actually start moving the cursor and call searchpair().
" Later, :execute restore_cursor to get to the original screen.
let restore_cursor = virtcol(".") . "|"
normal! g0
let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor
normal! H
let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
execute restore_cursor
call cursor(0, curcol + 1)
" normal! 0
" if curcol
" execute "normal!" . curcol . "l"
" endif
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = "0"
else
execute "if " . skip . "| let skip = '0' | endif"
endif
let sp_return = searchpair(ini, mid, fin, flag, skip)
let final_position = "call cursor(" . line(".") . "," . col(".") . ")"
" Restore cursor position and original screen.
execute restore_cursor
normal! m'
if sp_return > 0
execute final_position
endif
return s:CleanUp(restore_options, a:mode, startline, startcol, mid.'\|'.fin)
endfun
" Restore options and do some special handling for Operator-pending mode.
" The optional argument is the tail of the matching group.
fun! s:CleanUp(options, mode, startline, startcol, ...)
execute "set" a:options
" Open folds, if appropriate.
if a:mode != "o"
if &foldopen =~ "percent"
normal! zv
endif
" In Operator-pending mode, we want to include the whole match
" (for example, d%).
" This is only a problem if we end up moving in the forward direction.
elseif (a:startline < line(".")) ||
\ (a:startline == line(".") && a:startcol < col("."))
if a:0
" Check whether the match is a single character. If not, move to the
" end of the match.
let matchline = getline(".")
let currcol = col(".")
let regexp = s:Wholematch(matchline, a:1, currcol-1)
let endcol = matchend(matchline, regexp)
if endcol > currcol " This is NOT off by one!
execute "normal!" . (endcol - currcol) . "l"
endif
endif " a:0
endif " a:mode != "o" && etc.
return 0
endfun
" Example (simplified HTML patterns): if
" a:groupBR = '<\(\k\+\)>:</\1>'
" a:prefix = '^.\{3}\('
" a:group = '<\(\k\+\)>:</\(\k\+\)>'
" a:suffix = '\).\{2}$'
" a:matchline = "123<tag>12" or "123</tag>12"
" then extract "tag" from a:matchline and return "<tag>:</tag>" .
fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
if a:matchline !~ a:prefix .
\ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix
return a:group
endif
let i = matchend(a:groupBR, s:notslash . ':')
let ini = strpart(a:groupBR, 0, i-1)
let tailBR = strpart(a:groupBR, i)
let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix,
\ a:groupBR)
let i = matchend(word, s:notslash . ":")
let wordBR = strpart(word, i)
let word = strpart(word, 0, i-1)
" Now, a:matchline =~ a:prefix . word . a:suffix
if wordBR != ini
let table = s:Resolve(ini, wordBR, "table")
else
" let table = "----------"
let table = ""
let d = 0
while d < 10
if tailBR =~ s:notslash . '\\' . d
" let table[d] = d
let table = table . d
else
let table = table . "-"
endif
let d = d + 1
endwhile
endif
let d = 9
while d
if table[d] != "-"
let backref = substitute(a:matchline, a:prefix.word.a:suffix,
\ '\'.table[d], "")
" Are there any other characters that should be escaped?
let backref = escape(backref, '*,:')
execute s:Ref(ini, d, "start", "len")
let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len)
let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d,
\ escape(backref, '\\'), 'g')
endif
let d = d-1
endwhile
if exists("b:match_debug")
if s:do_BR
let b:match_table = table
let b:match_word = word
else
let b:match_table = ""
let b:match_word = ""
endif
endif
return ini . ":" . tailBR
endfun
" Input a comma-separated list of groups with backrefs, such as
" a:groups = '\(foo\):end\1,\(bar\):end\1'
" and return a comma-separated list of groups with backrefs replaced:
" return '\(foo\):end\(foo\),\(bar\):end\(bar\)'
fun! s:ParseWords(groups)
let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g')
let parsed = ""
while groups =~ '[^,:]'
let i = matchend(groups, s:notslash . ':')
let j = matchend(groups, s:notslash . ',')
let ini = strpart(groups, 0, i-1)
let tail = strpart(groups, i, j-i-1) . ":"
let groups = strpart(groups, j)
let parsed = parsed . ini
let i = matchend(tail, s:notslash . ':')
while i != -1
" In 'if:else:endif', ini='if' and word='else' and then word='endif'.
let word = strpart(tail, 0, i-1)
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . ':')
let parsed = parsed . ":" . s:Resolve(ini, word, "word")
endwhile " Now, tail has been used up.
let parsed = parsed . ","
endwhile " groups =~ '[^,:]'
let parsed = substitute(parsed, ',$', '', '')
return parsed
endfun
" TODO I think this can be simplified and/or made more efficient.
" TODO What should I do if a:start is out of range?
" Return a regexp that matches all of a:string, such that
" matchstr(a:string, regexp) represents the match for a:pat that starts
" as close to a:start as possible, before being preferred to after, and
" ends after a:start .
" Usage:
" let regexp = s:Wholematch(getline("."), 'foo\|bar', col(".")-1)
" let i = match(getline("."), regexp)
" let j = matchend(getline("."), regexp)
" let match = matchstr(getline("."), regexp)
fun! s:Wholematch(string, pat, start)
let group = '\%(' . a:pat . '\)'
let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^')
let len = strlen(a:string)
let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$')
if a:string !~ prefix . group . suffix
let prefix = ''
endif
return prefix . group . suffix
endfun
" No extra arguments: s:Ref(string, d) will
" find the d'th occurrence of '\(' and return it, along with everything up
" to and including the matching '\)'.
" One argument: s:Ref(string, d, "start") returns the index of the start
" of the d'th '\(' and any other argument returns the length of the group.
" Two arguments: s:Ref(string, d, "foo", "bar") returns a string to be
" executed, having the effect of
" :let foo = s:Ref(string, d, "start")
" :let bar = s:Ref(string, d, "len")
fun! s:Ref(string, d, ...)
let len = strlen(a:string)
if a:d == 0
let start = 0
else
let cnt = a:d
let match = a:string
while cnt
let cnt = cnt - 1
let index = matchend(match, s:notslash . '\\(')
if index == -1
return ""
endif
let match = strpart(match, index)
endwhile
let start = len - strlen(match)
if a:0 == 1 && a:1 == "start"
return start - 2
endif
let cnt = 1
while cnt
let index = matchend(match, s:notslash . '\\(\|\\)') - 1
if index == -2
return ""
endif
" Increment if an open, decrement if a ')':
let cnt = cnt + (match[index]=="(" ? 1 : -1) " ')'
" let cnt = stridx('0(', match[index]) + cnt
let match = strpart(match, index+1)
endwhile
let start = start - 2
let len = len - start - strlen(match)
endif
if a:0 == 1
return len
elseif a:0 == 2
return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len
else
return strpart(a:string, start, len)
endif
endfun
" Count the number of disjoint copies of pattern in string.
" If the pattern is a literal string and contains no '0' or '1' characters
" then s:Count(string, pattern, '0', '1') should be faster than
" s:Count(string, pattern).
fun! s:Count(string, pattern, ...)
let pat = escape(a:pattern, '\\')
if a:0 > 1
let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g")
let foo = substitute(a:string, pat, a:2, "g")
let foo = substitute(foo, '[^' . a:2 . ']', "", "g")
return strlen(foo)
endif
let result = 0
let foo = a:string
let index = matchend(foo, pat)
while index != -1
let result = result + 1
let foo = strpart(foo, index)
let index = matchend(foo, pat)
endwhile
return result
endfun
" s:Resolve('\(a\)\(b\)', '\(c\)\2\1\1\2') should return table.word, where
" word = '\(c\)\(b\)\(a\)\3\2' and table = '-32-------'. That is, the first
" '\1' in target is replaced by '\(a\)' in word, table[1] = 3, and this
" indicates that all other instances of '\1' in target are to be replaced
" by '\3'. The hard part is dealing with nesting...
" Note that ":" is an illegal character for source and target,
" unless it is preceded by "\".
fun! s:Resolve(source, target, output)
let word = a:target
let i = matchend(word, s:notslash . '\\\d') - 1
let table = "----------"
while i != -2 " There are back references to be replaced.
let d = word[i]
let backref = s:Ref(a:source, d)
" The idea is to replace '\d' with backref. Before we do this,
" replace any \(\) groups in backref with :1, :2, ... if they
" correspond to the first, second, ... group already inserted
" into backref. Later, replace :1 with \1 and so on. The group
" number w+b within backref corresponds to the group number
" s within a:source.
" w = number of '\(' in word before the current one
let w = s:Count(
\ substitute(strpart(word, 0, i-1), '\\\\', '', 'g'), '\(', '1')
let b = 1 " number of the current '\(' in backref
let s = d " number of the current '\(' in a:source
while b <= s:Count(substitute(backref, '\\\\', '', 'g'), '\(', '1')
\ && s < 10
if table[s] == "-"
if w + b < 10
" let table[s] = w + b
let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1)
endif
let b = b + 1
let s = s + 1
else
execute s:Ref(backref, b, "start", "len")
let ref = strpart(backref, start, len)
let backref = strpart(backref, 0, start) . ":". table[s]
\ . strpart(backref, start+len)
let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1')
endif
endwhile
let word = strpart(word, 0, i-1) . backref . strpart(word, i+1)
let i = matchend(word, s:notslash . '\\\d') - 1
endwhile
let word = substitute(word, s:notslash . '\zs:', '\\', 'g')
if a:output == "table"
return table
elseif a:output == "word"
return word
else
return table . word
endif
endfun
" Assume a:comma = ",". Then the format for a:patterns and a:1 is
" a:patterns = "<pat1>,<pat2>,..."
" a:1 = "<alt1>,<alt2>,..."
" If <patn> is the first pattern that matches a:string then return <patn>
" if no optional arguments are given; return <patn>,<altn> if a:1 is given.
fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma)
let i = matchend(tail, s:notslash . a:comma)
if a:0
let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma)
let j = matchend(alttail, s:notslash . a:comma)
endif
let current = strpart(tail, 0, i-1)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
endif
while a:string !~ a:prefix . currpat . a:suffix
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . a:comma)
if i == -1
return -1
endif
let current = strpart(tail, 0, i-1)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
endif
if a:0
let alttail = strpart(alttail, j)
let j = matchend(alttail, s:notslash . a:comma)
endif
endwhile
if a:0
let current = current . a:comma . strpart(alttail, 0, j-1)
endif
return current
endfun
" Call this function to turn on debugging information. Every time the main
" script is run, buffer variables will be saved. These can be used directly
" or viewed using the menu items below.
if !exists(":MatchDebug")
command! -nargs=0 MatchDebug call s:Match_debug()
endif
fun! s:Match_debug()
let b:match_debug = 1 " Save debugging information.
" pat = all of b:match_words with backrefs parsed
amenu &Matchit.&pat :echo b:match_pat<CR>
" match = bit of text that is recognized as a match
amenu &Matchit.&match :echo b:match_match<CR>
" curcol = cursor column of the start of the matching text
amenu &Matchit.&curcol :echo b:match_col<CR>
" wholeBR = matching group, original version
amenu &Matchit.wh&oleBR :echo b:match_wholeBR<CR>
" iniBR = 'if' piece, original version
amenu &Matchit.ini&BR :echo b:match_iniBR<CR>
" ini = 'if' piece, with all backrefs resolved from match
amenu &Matchit.&ini :echo b:match_ini<CR>
" tail = 'else\|endif' piece, with all backrefs resolved from match
amenu &Matchit.&tail :echo b:match_tail<CR>
" fin = 'endif' piece, with all backrefs resolved from match
amenu &Matchit.&word :echo b:match_word<CR>
" '\'.d in ini refers to the same thing as '\'.table[d] in word.
amenu &Matchit.t&able :echo '0:' . b:match_table . ':9'<CR>
endfun
" Jump to the nearest unmatched "(" or "if" or "<tag>" if a:spflag == "bW"
" or the nearest unmatched "</tag>" or "endif" or ")" if a:spflag == "W".
" Return a "mark" for the original position, so that
" let m = MultiMatch("bW", "n") ... execute m
" will return to the original position. If there is a problem, do not
" move the cursor and return "", unless a count is given, in which case
" go up or down as many levels as possible and again return "".
" TODO This relies on the same patterns as % matching. It might be a good
" idea to give it its own matching patterns.
fun! s:MultiMatch(spflag, mode)
if !exists("b:match_words") || b:match_words == ""
return ""
end
let restore_options = (&ic ? "" : "no") . "ignorecase"
if exists("b:match_ignorecase")
let &ignorecase = b:match_ignorecase
endif
let startline = line(".")
let startcol = col(".")
" First step: if not already done, set the script variables
" s:do_BR flag for whether there are backrefs
" s:pat parsed version of b:match_words
" s:all regexp based on s:pat and the default groups
" This part is copied and slightly modified from s:Match_wrapper().
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
\ '\/\*:\*\/,#if\%(def\)\=:#else\>:#elif\>:#endif\>'
" Allow b:match_words = "GetVimMatchWords()" .
if b:match_words =~ ":"
let match_words = b:match_words
else
execute "let match_words =" b:match_words
endif
if (match_words != s:last_words) || (&mps != s:last_mps) ||
\ exists("b:match_debug")
let s:last_words = match_words
let s:last_mps = &mps
if match_words !~ s:notslash . '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = '\%(' . substitute(s:pat . (strlen(s:pat)?",":"") . default,
\ '[,:]\+','\\|','g') . '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
endif
" Second step: figure out the patterns for searchpair()
" and save the screen, cursor position, and 'ignorecase'.
" - TODO: A lot of this is copied from s:Match_wrapper().
" - maybe even more functionality should be split off
" - into separate functions!
let cdefault = (s:pat =~ '[^,]$' ? "," : "") . default
let open = substitute(s:pat . cdefault,
\ s:notslash . '\zs:.\{-}' . s:notslash . ',', '\\),\\(', 'g')
let open = '\(' . substitute(open, s:notslash . '\zs:.*$', '\\)', '')
let close = substitute(s:pat . cdefault,
\ s:notslash . '\zs,.\{-}' . s:notslash . ':', '\\),\\(', 'g')
let close = substitute(close, '^.\{-}' . s:notslash . ':', '\\(', '') . '\)'
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
else
let skip = 's:comment\|string'
endif
let skip = s:ParseSkip(skip)
" let restore_cursor = line(".") . "G" . virtcol(".") . "|"
" normal! H
" let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
let restore_cursor = virtcol(".") . "|"
normal! g0
let restore_cursor = line(".") . "G" . virtcol(".") . "|zs" . restore_cursor
normal! H
let restore_cursor = "normal!" . line(".") . "Gzt" . restore_cursor
execute restore_cursor
" Third step: call searchpair().
" Replace '\('--but not '\\('--with '\%(' and ',' with '\|'.
let openpat = substitute(open, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
let openpat = substitute(openpat, ',', '\\|', 'g')
let closepat = substitute(close, '\(\\\@<!\(\\\\\)*\)\@<=\\(', '\\%(', 'g')
let closepat = substitute(closepat, ',', '\\|', 'g')
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = '0'
else
execute "if " . skip . "| let skip = '0' | endif"
endif
mark '
let level = v:count1
while level
if searchpair(openpat, '', closepat, a:spflag, skip) < 1
call s:CleanUp(restore_options, a:mode, startline, startcol)
return ""
endif
let level = level - 1
endwhile
" Restore options and return a string to restore the original position.
call s:CleanUp(restore_options, a:mode, startline, startcol)
return restore_cursor
endfun
" Search backwards for "if" or "while" or "<tag>" or ...
" and return "endif" or "endwhile" or "</tag>" or ... .
" For now, this uses b:match_words and the same script variables
" as s:Match_wrapper() . Later, it may get its own patterns,
" either from a buffer variable or passed as arguments.
" fun! s:Autocomplete()
" echo "autocomplete not yet implemented :-("
" if !exists("b:match_words") || b:match_words == ""
" return ""
" end
" let startpos = s:MultiMatch("bW")
"
" if startpos == ""
" return ""
" endif
" " - TODO: figure out whether 'if' or '<tag>' matched, and construct
" " - the appropriate closing.
" let matchline = getline(".")
" let curcol = col(".") - 1
" " - TODO: Change the s:all argument if there is a new set of match pats.
" let regexp = s:Wholematch(matchline, s:all, curcol)
" let suf = strlen(matchline) - matchend(matchline, regexp)
" let prefix = (curcol ? '^.\{' . curcol . '}\%(' : '^\%(')
" let suffix = (suf ? '\).\{' . suf . '}$' : '\)$')
" " Reconstruct the version with unresolved backrefs.
" let patBR = substitute(b:match_words.',', '[,:]*,[,:]*', ',', 'g')
" let patBR = substitute(patBR, ':\{2,}', ':', "g")
" " Now, set group and groupBR to the matching group: 'if:endif' or
" " 'while:endwhile' or whatever.
" let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, patBR)
" let i = matchend(group, s:notslash . ",")
" let groupBR = strpart(group, i)
" let group = strpart(group, 0, i-1)
" " Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
" if s:do_BR
" let group = s:InsertRefs(groupBR, prefix, group, suffix, matchline)
" endif
" " let g:group = group
"
" " - TODO: Construct the closing from group.
" let fake = "end" . expand("<cword>")
" execute startpos
" return fake
" endfun
" Close all open structures. "Get the heck out of here!"
" fun! s:Gthhoh()
" let close = s:Autocomplete()
" while strlen(close)
" put=close
" let close = s:Autocomplete()
" endwhile
" endfun
" Parse special strings as typical skip arguments for searchpair():
" s:foo becomes (current syntax item) =~ foo
" S:foo becomes (current syntax item) !~ foo
" r:foo becomes (line before cursor) =~ foo
" R:foo becomes (line before cursor) !~ foo
fun! s:ParseSkip(str)
let skip = a:str
if skip[1] == ":"
if skip[0] == "s"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" .
\ strpart(skip,2) . "'"
elseif skip[0] == "S"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" .
\ strpart(skip,2) . "'"
elseif skip[0] == "r"
let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'"
elseif skip[0] == "R"
let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'"
endif
endif
return skip
endfun
let &cpo = s:save_cpo
" vim:sts=2:sw=2:

@ -0,0 +1,3 @@
*~
*.swp
tags

@ -0,0 +1,108 @@
The NERD Tree
=============
Intro
-----
The NERD tree allows you to explore your filesystem and to open files and
directories. It presents the filesystem to you in the form of a tree which you
manipulate with the keyboard and/or mouse. It also allows you to perform
simple filesystem operations.
The following features and functionality are provided by the NERD tree:
* Files and directories are displayed in a hierarchical tree structure
* Different highlighting is provided for the following types of nodes:
* files
* directories
* sym-links
* windows .lnk files
* read-only files
* executable files
* Many (customisable) mappings are provided to manipulate the tree:
* Mappings to open/close/explore directory nodes
* Mappings to open files in new/existing windows/tabs
* Mappings to change the current root of the tree
* Mappings to navigate around the tree
* ...
* Directories and files can be bookmarked.
* Most NERD tree navigation can also be done with the mouse
* Filtering of tree content (can be toggled at runtime)
* custom file filters to prevent e.g. vim backup files being displayed
* optional displaying of hidden files (. files)
* files can be "turned off" so that only directories are displayed
* The position and size of the NERD tree window can be customised
* The order in which the nodes in the tree are listed can be customised.
* A model of your filesystem is created/maintained as you explore it. This
has several advantages:
* All filesystem information is cached and is only re-read on demand
* If you revisit a part of the tree that you left earlier in your
session, the directory nodes will be opened/closed as you left them
* The script remembers the cursor position and window position in the NERD
tree so you can toggle it off (or just close the tree window) and then
reopen it (with NERDTreeToggle) the NERD tree window will appear exactly
as you left it
* You can have a separate NERD tree for each tab, share trees across tabs,
or a mix of both.
* By default the script overrides the default file browser (netrw), so if
you :edit a directory a (slightly modified) NERD tree will appear in the
current window
* A programmable menu system is provided (simulates right clicking on a node)
* one default menu plugin is provided to perform basic filesystem
operations (create/delete/move/copy files/directories)
* There's an API for adding your own keymappings
Installation
------------
[pathogen.vim](https://github.com/tpope/vim-pathogen) is the recommended way to install nerdtree.
cd ~/.vim/bundle
git clone https://github.com/scrooloose/nerdtree.git
Then reload vim, run `:helptags`, and check out `:help NERD_tree.txt`.
Faq
---
__Q. Can I have the nerdtree on every tab automatically?__
A. Nope. If this is something you want then chances are you aren't using tabs
and buffers as they were intended to be used. Read this
http://stackoverflow.com/questions/102384/using-vims-tabs-like-buffers
If you are interested in this behaviour then consider [vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs)
__Q. How can I open a NERDTree automatically when vim starts up?__
A. Stick this in your vimrc: `autocmd vimenter * NERDTree`
__Q. How can I open a NERDTree automatically when vim starts up if no files were specified?__
A. Stick this in your vimrc `autocmd vimenter * if !argc() | NERDTree | endif`
__Q. How can I map a specific key or shortcut to open NERDTree?__
A. Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever key you want): `map <C-n> :NERDTreeToggle<CR>`
__Q. How can I close vim if the only window left open is a NERDTree?__
A. Stick this in your vimrc:
`autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif`
Changelog
---------
4.2.0 (2011-12-28)
* Add NERDTreeDirArrows option to make the UI use pretty arrow chars instead of the old +~| chars to define the tree structure (sickill)
* shift the syntax highlighting out into its own syntax file (gnap) * add some mac specific options to the filesystem menu - for macvim only (andersonfreitas)
* Add NERDTreeMinimalUI option to remove some non functional parts of the nerdtree ui (camthompson)
* tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the new behaviour (benjamingeiger)
* if no name is given to :Bookmark, make it default to the name of the target file/dir (minyoung)
* use 'file' completion when doing copying, create, and move operations (EvanDotPro)
* lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,315 @@
"CLASS: Bookmark
"============================================================
let s:Bookmark = {}
let g:NERDTreeBookmark = s:Bookmark
" FUNCTION: Bookmark.activate() {{{1
function! s:Bookmark.activate(...)
call self.open(a:0 ? a:1 : {})
endfunction
" FUNCTION: Bookmark.AddBookmark(name, path) {{{1
" Class method to add a new bookmark to the list, if a previous bookmark exists
" with the same name, just update the path for that bookmark
function! s:Bookmark.AddBookmark(name, path)
for i in s:Bookmark.Bookmarks()
if i.name ==# a:name
let i.path = a:path
return
endif
endfor
call add(s:Bookmark.Bookmarks(), s:Bookmark.New(a:name, a:path))
call s:Bookmark.Sort()
endfunction
" FUNCTION: Bookmark.Bookmarks() {{{1
" Class method to get all bookmarks. Lazily initializes the bookmarks global
" variable
function! s:Bookmark.Bookmarks()
if !exists("g:NERDTreeBookmarks")
let g:NERDTreeBookmarks = []
endif
return g:NERDTreeBookmarks
endfunction
" FUNCTION: Bookmark.BookmarkExistsFor(name) {{{1
" class method that returns 1 if a bookmark with the given name is found, 0
" otherwise
function! s:Bookmark.BookmarkExistsFor(name)
try
call s:Bookmark.BookmarkFor(a:name)
return 1
catch /^NERDTree.BookmarkNotFoundError/
return 0
endtry
endfunction
" FUNCTION: Bookmark.BookmarkFor(name) {{{1
" Class method to get the bookmark that has the given name. {} is return if no
" bookmark is found
function! s:Bookmark.BookmarkFor(name)
for i in s:Bookmark.Bookmarks()
if i.name ==# a:name
return i
endif
endfor
throw "NERDTree.BookmarkNotFoundError: no bookmark found for name: \"". a:name .'"'
endfunction
" FUNCTION: Bookmark.BookmarkNames() {{{1
" Class method to return an array of all bookmark names
function! s:Bookmark.BookmarkNames()
let names = []
for i in s:Bookmark.Bookmarks()
call add(names, i.name)
endfor
return names
endfunction
" FUNCTION: Bookmark.CacheBookmarks(silent) {{{1
" Class method to read all bookmarks from the bookmarks file initialize
" bookmark objects for each one.
"
" Args:
" silent - dont echo an error msg if invalid bookmarks are found
function! s:Bookmark.CacheBookmarks(silent)
if filereadable(g:NERDTreeBookmarksFile)
let g:NERDTreeBookmarks = []
let g:NERDTreeInvalidBookmarks = []
let bookmarkStrings = readfile(g:NERDTreeBookmarksFile)
let invalidBookmarksFound = 0
for i in bookmarkStrings
"ignore blank lines
if i != ''
let name = substitute(i, '^\(.\{-}\) .*$', '\1', '')
let path = substitute(i, '^.\{-} \(.*\)$', '\1', '')
try
let bookmark = s:Bookmark.New(name, g:NERDTreePath.New(path))
call add(g:NERDTreeBookmarks, bookmark)
catch /^NERDTree.InvalidArgumentsError/
call add(g:NERDTreeInvalidBookmarks, i)
let invalidBookmarksFound += 1
endtry
endif
endfor
if invalidBookmarksFound
call s:Bookmark.Write()
if !a:silent
call nerdtree#echo(invalidBookmarksFound . " invalid bookmarks were read. See :help NERDTreeInvalidBookmarks for info.")
endif
endif
call s:Bookmark.Sort()
endif
endfunction
" FUNCTION: Bookmark.compareTo(otherbookmark) {{{1
" Compare these two bookmarks for sorting purposes
function! s:Bookmark.compareTo(otherbookmark)
return a:otherbookmark.name < self.name
endfunction
" FUNCTION: Bookmark.ClearAll() {{{1
" Class method to delete all bookmarks.
function! s:Bookmark.ClearAll()
for i in s:Bookmark.Bookmarks()
call i.delete()
endfor
call s:Bookmark.Write()
endfunction
" FUNCTION: Bookmark.delete() {{{1
" Delete this bookmark. If the node for this bookmark is under the current
" root, then recache bookmarks for its Path object
function! s:Bookmark.delete()
let node = {}
try
let node = self.getNode(1)
catch /^NERDTree.BookmarkedNodeNotFoundError/
endtry
call remove(s:Bookmark.Bookmarks(), index(s:Bookmark.Bookmarks(), self))
if !empty(node)
call node.path.cacheDisplayString()
endif
call s:Bookmark.Write()
endfunction
" FUNCTION: Bookmark.getNode(searchFromAbsoluteRoot) {{{1
" Gets the treenode for this bookmark
"
" Args:
" searchFromAbsoluteRoot: specifies whether we should search from the current
" tree root, or the highest cached node
function! s:Bookmark.getNode(searchFromAbsoluteRoot)
let searchRoot = a:searchFromAbsoluteRoot ? g:NERDTreeDirNode.AbsoluteTreeRoot() : b:NERDTreeRoot
let targetNode = searchRoot.findNode(self.path)
if empty(targetNode)
throw "NERDTree.BookmarkedNodeNotFoundError: no node was found for bookmark: " . self.name
endif
return targetNode
endfunction
" FUNCTION: Bookmark.GetNodeForName(name, searchFromAbsoluteRoot) {{{1
" Class method that finds the bookmark with the given name and returns the
" treenode for it.
function! s:Bookmark.GetNodeForName(name, searchFromAbsoluteRoot)
let bookmark = s:Bookmark.BookmarkFor(a:name)
return bookmark.getNode(a:searchFromAbsoluteRoot)
endfunction
" FUNCTION: Bookmark.GetSelected() {{{1
" returns the Bookmark the cursor is over, or {}
function! s:Bookmark.GetSelected()
let line = getline(".")
let name = substitute(line, '^>\(.\{-}\) .\+$', '\1', '')
if name != line
try
return s:Bookmark.BookmarkFor(name)
catch /^NERDTree.BookmarkNotFoundError/
return {}
endtry
endif
return {}
endfunction
" FUNCTION: Bookmark.InvalidBookmarks() {{{1
" Class method to get all invalid bookmark strings read from the bookmarks
" file
function! s:Bookmark.InvalidBookmarks()
if !exists("g:NERDTreeInvalidBookmarks")
let g:NERDTreeInvalidBookmarks = []
endif
return g:NERDTreeInvalidBookmarks
endfunction
" FUNCTION: Bookmark.mustExist() {{{1
function! s:Bookmark.mustExist()
if !self.path.exists()
call s:Bookmark.CacheBookmarks(1)
throw "NERDTree.BookmarkPointsToInvalidLocationError: the bookmark \"".
\ self.name ."\" points to a non existing location: \"". self.path.str()
endif
endfunction
" FUNCTION: Bookmark.New(name, path) {{{1
" Create a new bookmark object with the given name and path object
function! s:Bookmark.New(name, path)
if a:name =~# ' '
throw "NERDTree.IllegalBookmarkNameError: illegal name:" . a:name
endif
let newBookmark = copy(self)
let newBookmark.name = a:name
let newBookmark.path = a:path
return newBookmark
endfunction
" FUNCTION: Bookmark.open([options]) {{{1
"Args:
"A dictionary containing the following keys (all optional):
" 'where': Specifies whether the node should be opened in new split/tab or in
" the previous window. Can be either 'v' (vertical split), 'h'
" (horizontal split), 't' (new tab) or 'p' (previous window).
" 'reuse': if a window is displaying the file then jump the cursor there
" 'keepopen': dont close the tree window
" 'stay': open the file, but keep the cursor in the tree win
"
function! s:Bookmark.open(...)
let opts = a:0 ? a:1 : {}
if self.path.isDirectory && !has_key(opts, 'where')
call self.toRoot()
else
let opener = g:NERDTreeOpener.New(self.path, opts)
call opener.open(self)
endif
endfunction
" FUNCTION: Bookmark.openInNewTab(options) {{{1
" Create a new bookmark object with the given name and path object
function! s:Bookmark.openInNewTab(options)
call nerdtree#deprecated('Bookmark.openInNewTab', 'is deprecated, use open() instead')
call self.open(a:options)
endfunction
" FUNCTION: Bookmark.setPath(path) {{{1
" makes this bookmark point to the given path
function! s:Bookmark.setPath(path)
let self.path = a:path
endfunction
" FUNCTION: Bookmark.Sort() {{{1
" Class method that sorts all bookmarks
function! s:Bookmark.Sort()
let CompareFunc = function("nerdtree#compareBookmarks")
call sort(s:Bookmark.Bookmarks(), CompareFunc)
endfunction
" FUNCTION: Bookmark.str() {{{1
" Get the string that should be rendered in the view for this bookmark
function! s:Bookmark.str()
let pathStrMaxLen = winwidth(nerdtree#getTreeWinNum()) - 4 - len(self.name)
if &nu
let pathStrMaxLen = pathStrMaxLen - &numberwidth
endif
let pathStr = self.path.str({'format': 'UI'})
if len(pathStr) > pathStrMaxLen
let pathStr = '<' . strpart(pathStr, len(pathStr) - pathStrMaxLen)
endif
return '>' . self.name . ' ' . pathStr
endfunction
" FUNCTION: Bookmark.toRoot() {{{1
" Make the node for this bookmark the new tree root
function! s:Bookmark.toRoot()
if self.validate()
try
let targetNode = self.getNode(1)
catch /^NERDTree.BookmarkedNodeNotFoundError/
let targetNode = g:NERDTreeFileNode.New(s:Bookmark.BookmarkFor(self.name).path)
endtry
call targetNode.makeRoot()
call nerdtree#renderView()
call targetNode.putCursorHere(0, 0)
endif
endfunction
" FUNCTION: Bookmark.ToRoot(name) {{{1
" Make the node for this bookmark the new tree root
function! s:Bookmark.ToRoot(name)
let bookmark = s:Bookmark.BookmarkFor(a:name)
call bookmark.toRoot()
endfunction
" FUNCTION: Bookmark.validate() {{{1
function! s:Bookmark.validate()
if self.path.exists()
return 1
else
call s:Bookmark.CacheBookmarks(1)
call nerdtree#renderView()
call nerdtree#echo(self.name . "now points to an invalid location. See :help NERDTreeInvalidBookmarks for info.")
return 0
endif
endfunction
" FUNCTION: Bookmark.Write() {{{1
" Class method to write all bookmarks to the bookmarks file
function! s:Bookmark.Write()
let bookmarkStrings = []
for i in s:Bookmark.Bookmarks()
call add(bookmarkStrings, i.name . ' ' . i.path.str())
endfor
"add a blank line before the invalid ones
call add(bookmarkStrings, "")
for j in s:Bookmark.InvalidBookmarks()
call add(bookmarkStrings, j)
endfor
call writefile(bookmarkStrings, g:NERDTreeBookmarksFile)
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,322 @@
"CLASS: Creator
"Creates primary/secondary/mirror nerdtree windows. Sets up all the window and
"buffer options and key mappings etc.
"============================================================
let s:Creator = {}
let g:NERDTreeCreator = s:Creator
"FUNCTION: s:Creator._bindMappings() {{{1
function! s:Creator._bindMappings()
"make <cr> do the same as the default 'o' mapping
exec "nnoremap <silent> <buffer> <cr> :call nerdtree#invokeKeyMap('". g:NERDTreeMapActivateNode ."')<cr>"
call g:NERDTreeKeyMap.BindAll()
command! -buffer -nargs=? Bookmark :call nerdtree#bookmarkNode('<args>')
command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 RevealBookmark :call nerdtree#revealBookmark('<args>')
command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=1 OpenBookmark :call nerdtree#openBookmark('<args>')
command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=* ClearBookmarks call nerdtree#clearBookmarks('<args>')
command! -buffer -complete=customlist,nerdtree#completeBookmarks -nargs=+ BookmarkToRoot call g:NERDTreeBookmark.ToRoot('<args>')
command! -buffer -nargs=0 ClearAllBookmarks call g:NERDTreeBookmark.ClearAll() <bar> call nerdtree#renderView()
command! -buffer -nargs=0 ReadBookmarks call g:NERDTreeBookmark.CacheBookmarks(0) <bar> call nerdtree#renderView()
command! -buffer -nargs=0 WriteBookmarks call g:NERDTreeBookmark.Write()
endfunction
"FUNCTION: s:Creator._broadcastInitEvent() {{{1
function! s:Creator._broadcastInitEvent()
silent doautocmd User NERDTreeInit
endfunction
" FUNCTION: s:Creator.BufNamePrefix() {{{2
function! s:Creator.BufNamePrefix()
return 'NERD_tree_'
endfunction
"FUNCTION: s:Creator.CreatePrimary(a:name) {{{1
function! s:Creator.CreatePrimary(name)
let creator = s:Creator.New()
call creator.createPrimary(a:name)
endfunction
"FUNCTION: s:Creator.createPrimary(a:name) {{{1
"name: the name of a bookmark or a directory
function! s:Creator.createPrimary(name)
let path = self._pathForString(a:name)
"if instructed to, then change the vim CWD to the dir the NERDTree is
"inited in
if g:NERDTreeChDirMode != 0
call path.changeToDir()
endif
if nerdtree#treeExistsForTab()
if nerdtree#isTreeOpen()
call nerdtree#closeTree()
endif
unlet t:NERDTreeBufName
endif
let newRoot = g:NERDTreeDirNode.New(path)
call newRoot.open()
call self._createTreeWin()
let b:treeShowHelp = 0
let b:NERDTreeIgnoreEnabled = 1
let b:NERDTreeShowFiles = g:NERDTreeShowFiles
let b:NERDTreeShowHidden = g:NERDTreeShowHidden
let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks
let b:NERDTreeRoot = newRoot
let b:NERDTreeType = "primary"
call nerdtree#renderView()
call b:NERDTreeRoot.putCursorHere(0, 0)
call self._broadcastInitEvent()
endfunction
"FUNCTION: s:Creator.CreateSecondary(dir) {{{1
function! s:Creator.CreateSecondary(dir)
let creator = s:Creator.New()
call creator.createSecondary(a:dir)
endfunction
"FUNCTION: s:Creator.createSecondary(dir) {{{1
function! s:Creator.createSecondary(dir)
try
let path = g:NERDTreePath.New(a:dir)
catch /^NERDTree.InvalidArgumentsError/
call nerdtree#echo("Invalid directory name:" . a:name)
return
endtry
"we want the directory buffer to disappear when we do the :edit below
setlocal bufhidden=wipe
let previousBuf = expand("#")
"we need a unique name for each secondary tree buffer to ensure they are
"all independent
exec "silent edit " . self._nextBufferName()
let b:NERDTreePreviousBuf = bufnr(previousBuf)
let b:NERDTreeRoot = g:NERDTreeDirNode.New(path)
call b:NERDTreeRoot.open()
call self._setCommonBufOptions()
let b:NERDTreeType = "secondary"
call nerdtree#renderView()
call self._broadcastInitEvent()
endfunction
" FUNCTION: s:Creator.CreateMirror() {{{1
function! s:Creator.CreateMirror()
let creator = s:Creator.New()
call creator.createMirror()
endfunction
" FUNCTION: s:Creator.createMirror() {{{1
function! s:Creator.createMirror()
"get the names off all the nerd tree buffers
let treeBufNames = []
for i in range(1, tabpagenr("$"))
let nextName = nerdtree#tabpagevar(i, 'NERDTreeBufName')
if nextName != -1 && (!exists("t:NERDTreeBufName") || nextName != t:NERDTreeBufName)
call add(treeBufNames, nextName)
endif
endfor
let treeBufNames = nerdtree#unique(treeBufNames)
"map the option names (that the user will be prompted with) to the nerd
"tree buffer names
let options = {}
let i = 0
while i < len(treeBufNames)
let bufName = treeBufNames[i]
let treeRoot = getbufvar(bufName, "NERDTreeRoot")
let options[i+1 . '. ' . treeRoot.path.str() . ' (buf name: ' . bufName . ')'] = bufName
let i = i + 1
endwhile
"work out which tree to mirror, if there is more than 1 then ask the user
let bufferName = ''
if len(keys(options)) > 1
let choices = ["Choose a tree to mirror"]
let choices = extend(choices, sort(keys(options)))
let choice = inputlist(choices)
if choice < 1 || choice > len(options) || choice ==# ''
return
endif
let bufferName = options[sort(keys(options))[choice-1]]
elseif len(keys(options)) ==# 1
let bufferName = values(options)[0]
else
call nerdtree#echo("No trees to mirror")
return
endif
if nerdtree#treeExistsForTab() && nerdtree#isTreeOpen()
call nerdtree#closeTree()
endif
let t:NERDTreeBufName = bufferName
call self._createTreeWin()
exec 'buffer ' . bufferName
if !&hidden
call nerdtree#renderView()
endif
endfunction
"FUNCTION: s:Creator._createTreeWin() {{{1
"Inits the NERD tree window. ie. opens it, sizes it, sets all the local
"options etc
function! s:Creator._createTreeWin()
"create the nerd tree window
let splitLocation = g:NERDTreeWinPos ==# "left" ? "topleft " : "botright "
let splitSize = g:NERDTreeWinSize
if !exists('t:NERDTreeBufName')
let t:NERDTreeBufName = self._nextBufferName()
silent! exec splitLocation . 'vertical ' . splitSize . ' new'
silent! exec "edit " . t:NERDTreeBufName
else
silent! exec splitLocation . 'vertical ' . splitSize . ' split'
silent! exec "buffer " . t:NERDTreeBufName
endif
setlocal winfixwidth
call self._setCommonBufOptions()
endfunction
"FUNCTION: s:Creator.New() {{{1
function! s:Creator.New()
let newCreator = copy(self)
return newCreator
endfunction
" FUNCTION: s:Creator._nextBufferName() {{{2
" returns the buffer name for the next nerd tree
function! s:Creator._nextBufferName()
let name = s:Creator.BufNamePrefix() . self._nextBufferNumber()
return name
endfunction
" FUNCTION: s:Creator._nextBufferNumber() {{{2
" the number to add to the nerd tree buffer name to make the buf name unique
function! s:Creator._nextBufferNumber()
if !exists("s:Creator._NextBufNum")
let s:Creator._NextBufNum = 1
else
let s:Creator._NextBufNum += 1
endif
return s:Creator._NextBufNum
endfunction
"FUNCTION: s:Creator._pathForString(str) {{{1
"find a bookmark or adirectory for the given string
function! s:Creator._pathForString(str)
let path = {}
if g:NERDTreeBookmark.BookmarkExistsFor(a:str)
let path = g:NERDTreeBookmark.BookmarkFor(a:str).path
else
let dir = a:str ==# '' ? getcwd() : a:str
"hack to get an absolute path if a relative path is given
if dir =~# '^\.'
let dir = getcwd() . g:NERDTreePath.Slash() . dir
endif
let dir = g:NERDTreePath.Resolve(dir)
try
let path = g:NERDTreePath.New(dir)
catch /^NERDTree.InvalidArgumentsError/
call nerdtree#echo("No bookmark or directory found for: " . a:str)
return
endtry
endif
if !path.isDirectory
let path = path.getParent()
endif
return path
endfunction
"FUNCTION: s:Creator._setCommonBufOptions() {{{1
function! s:Creator._setCommonBufOptions()
"throwaway buffer options
setlocal noswapfile
setlocal buftype=nofile
setlocal bufhidden=hide
setlocal nowrap
setlocal foldcolumn=0
setlocal foldmethod=manual
setlocal nofoldenable
setlocal nobuflisted
setlocal nospell
if g:NERDTreeShowLineNumbers
setlocal nu
else
setlocal nonu
if v:version >= 703
setlocal nornu
endif
endif
iabc <buffer>
if g:NERDTreeHighlightCursorline
setlocal cursorline
endif
call self._setupStatusline()
let b:treeShowHelp = 0
let b:NERDTreeIgnoreEnabled = 1
let b:NERDTreeShowFiles = g:NERDTreeShowFiles
let b:NERDTreeShowHidden = g:NERDTreeShowHidden
let b:NERDTreeShowBookmarks = g:NERDTreeShowBookmarks
setfiletype nerdtree
call self._bindMappings()
endfunction
"FUNCTION: s:Creator._setupStatusline() {{{1
function! s:Creator._setupStatusline()
if g:NERDTreeStatusline != -1
let &l:statusline = g:NERDTreeStatusline
endif
endfunction
"FUNCTION: s:Creator.TogglePrimary(dir) {{{1
function! s:Creator.TogglePrimary(dir)
let creator = s:Creator.New()
call creator.togglePrimary(a:dir)
endfunction
"FUNCTION: s:Creator.togglePrimary(dir) {{{1
"Toggles the NERD tree. I.e the NERD tree is open, it is closed, if it is
"closed it is restored or initialized (if it doesnt exist)
"
"Args:
"dir: the full path for the root node (is only used if the NERD tree is being
"initialized.
function! s:Creator.togglePrimary(dir)
if nerdtree#treeExistsForTab()
if !nerdtree#isTreeOpen()
call self._createTreeWin()
if !&hidden
call nerdtree#renderView()
endif
call nerdtree#restoreScreenState()
else
call nerdtree#closeTree()
endif
else
call self.createPrimary(a:dir)
endif
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,143 @@
"CLASS: KeyMap
"============================================================
let s:KeyMap = {}
let g:NERDTreeKeyMap = s:KeyMap
"FUNCTION: KeyMap.All() {{{1
function! s:KeyMap.All()
if !exists("s:keyMaps")
let s:keyMaps = []
endif
return s:keyMaps
endfunction
"FUNCTION: KeyMap.FindFor(key, scope) {{{1
function! s:KeyMap.FindFor(key, scope)
for i in s:KeyMap.All()
if i.key ==# a:key && i.scope ==# a:scope
return i
endif
endfor
return {}
endfunction
"FUNCTION: KeyMap.BindAll() {{{1
function! s:KeyMap.BindAll()
for i in s:KeyMap.All()
call i.bind()
endfor
endfunction
"FUNCTION: KeyMap.bind() {{{1
function! s:KeyMap.bind()
" If the key sequence we're trying to map contains any '<>' notation, we
" must replace each of the '<' characters with '<lt>' to ensure the string
" is not translated into its corresponding keycode during the later part
" of the map command below
" :he <>
let specialNotationRegex = '\m<\([[:alnum:]_-]\+>\)'
if self.key =~# specialNotationRegex
let keymapInvokeString = substitute(self.key, specialNotationRegex, '<lt>\1', 'g')
else
let keymapInvokeString = self.key
endif
let premap = self.key == "<LeftRelease>" ? " <LeftRelease>" : " "
exec 'nnoremap <buffer> <silent> '. self.key . premap . ':call nerdtree#invokeKeyMap("'. keymapInvokeString .'")<cr>'
endfunction
"FUNCTION: KeyMap.Remove(key, scope) {{{1
function! s:KeyMap.Remove(key, scope)
let maps = s:KeyMap.All()
for i in range(len(maps))
if maps[i].key ==# a:key && maps[i].scope ==# a:scope
return remove(maps, i)
endif
endfor
endfunction
"FUNCTION: KeyMap.invoke() {{{1
"Call the KeyMaps callback function
function! s:KeyMap.invoke(...)
let Callback = function(self.callback)
if a:0
call Callback(a:1)
else
call Callback()
endif
endfunction
"FUNCTION: KeyMap.Invoke() {{{1
"Find a keymapping for a:key and the current scope invoke it.
"
"Scope is determined as follows:
" * if the cursor is on a dir node then "DirNode"
" * if the cursor is on a file node then "FileNode"
" * if the cursor is on a bookmark then "Bookmark"
"
"If a keymap has the scope of "all" then it will be called if no other keymap
"is found for a:key and the scope.
function! s:KeyMap.Invoke(key)
let node = g:NERDTreeFileNode.GetSelected()
if !empty(node)
"try file node
if !node.path.isDirectory
let km = s:KeyMap.FindFor(a:key, "FileNode")
if !empty(km)
return km.invoke(node)
endif
endif
"try dir node
if node.path.isDirectory
let km = s:KeyMap.FindFor(a:key, "DirNode")
if !empty(km)
return km.invoke(node)
endif
endif
"try generic node
let km = s:KeyMap.FindFor(a:key, "Node")
if !empty(km)
return km.invoke(node)
endif
endif
"try bookmark
let bm = g:NERDTreeBookmark.GetSelected()
if !empty(bm)
let km = s:KeyMap.FindFor(a:key, "Bookmark")
if !empty(km)
return km.invoke(bm)
endif
endif
"try all
let km = s:KeyMap.FindFor(a:key, "all")
if !empty(km)
return km.invoke()
endif
endfunction
"FUNCTION: KeyMap.Create(options) {{{1
function! s:KeyMap.Create(options)
let newKeyMap = copy(self)
let opts = extend({'scope': 'all', 'quickhelpText': ''}, copy(a:options))
let newKeyMap.key = opts['key']
let newKeyMap.quickhelpText = opts['quickhelpText']
let newKeyMap.callback = opts['callback']
let newKeyMap.scope = opts['scope']
call s:KeyMap.Add(newKeyMap)
endfunction
"FUNCTION: KeyMap.Add(keymap) {{{1
function! s:KeyMap.Add(keymap)
call s:KeyMap.Remove(a:keymap.key, a:keymap.scope)
call add(s:KeyMap.All(), a:keymap)
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,180 @@
"CLASS: MenuController
"============================================================
let s:MenuController = {}
let g:NERDTreeMenuController = s:MenuController
"FUNCTION: MenuController.New(menuItems) {{{1
"create a new menu controller that operates on the given menu items
function! s:MenuController.New(menuItems)
let newMenuController = copy(self)
if a:menuItems[0].isSeparator()
let newMenuController.menuItems = a:menuItems[1:-1]
else
let newMenuController.menuItems = a:menuItems
endif
return newMenuController
endfunction
"FUNCTION: MenuController.showMenu() {{{1
"start the main loop of the menu and get the user to choose/execute a menu
"item
function! s:MenuController.showMenu()
call self._saveOptions()
try
let self.selection = 0
let done = 0
while !done
redraw!
call self._echoPrompt()
let key = nr2char(getchar())
let done = self._handleKeypress(key)
endwhile
finally
call self._restoreOptions()
endtry
if self.selection != -1
let m = self._current()
call m.execute()
endif
endfunction
"FUNCTION: MenuController._echoPrompt() {{{1
function! s:MenuController._echoPrompt()
echo "NERDTree Menu. Use j/k/enter and the shortcuts indicated"
echo "=========================================================="
for i in range(0, len(self.menuItems)-1)
if self.selection == i
echo "> " . self.menuItems[i].text
else
echo " " . self.menuItems[i].text
endif
endfor
endfunction
"FUNCTION: MenuController._current(key) {{{1
"get the MenuItem that is currently selected
function! s:MenuController._current()
return self.menuItems[self.selection]
endfunction
"FUNCTION: MenuController._handleKeypress(key) {{{1
"change the selection (if appropriate) and return 1 if the user has made
"their choice, 0 otherwise
function! s:MenuController._handleKeypress(key)
if a:key == 'j'
call self._cursorDown()
elseif a:key == 'k'
call self._cursorUp()
elseif a:key == nr2char(27) "escape
let self.selection = -1
return 1
elseif a:key == "\r" || a:key == "\n" "enter and ctrl-j
return 1
else
let index = self._nextIndexFor(a:key)
if index != -1
let self.selection = index
if len(self._allIndexesFor(a:key)) == 1
return 1
endif
endif
endif
return 0
endfunction
"FUNCTION: MenuController._allIndexesFor(shortcut) {{{1
"get indexes to all menu items with the given shortcut
function! s:MenuController._allIndexesFor(shortcut)
let toReturn = []
for i in range(0, len(self.menuItems)-1)
if self.menuItems[i].shortcut == a:shortcut
call add(toReturn, i)
endif
endfor
return toReturn
endfunction
"FUNCTION: MenuController._nextIndexFor(shortcut) {{{1
"get the index to the next menu item with the given shortcut, starts from the
"current cursor location and wraps around to the top again if need be
function! s:MenuController._nextIndexFor(shortcut)
for i in range(self.selection+1, len(self.menuItems)-1)
if self.menuItems[i].shortcut == a:shortcut
return i
endif
endfor
for i in range(0, self.selection)
if self.menuItems[i].shortcut == a:shortcut
return i
endif
endfor
return -1
endfunction
"FUNCTION: MenuController._setCmdheight() {{{1
"sets &cmdheight to whatever is needed to display the menu
function! s:MenuController._setCmdheight()
let &cmdheight = len(self.menuItems) + 3
endfunction
"FUNCTION: MenuController._saveOptions() {{{1
"set any vim options that are required to make the menu work (saving their old
"values)
function! s:MenuController._saveOptions()
let self._oldLazyredraw = &lazyredraw
let self._oldCmdheight = &cmdheight
set nolazyredraw
call self._setCmdheight()
endfunction
"FUNCTION: MenuController._restoreOptions() {{{1
"restore the options we saved in _saveOptions()
function! s:MenuController._restoreOptions()
let &cmdheight = self._oldCmdheight
let &lazyredraw = self._oldLazyredraw
endfunction
"FUNCTION: MenuController._cursorDown() {{{1
"move the cursor to the next menu item, skipping separators
function! s:MenuController._cursorDown()
let done = 0
while !done
if self.selection < len(self.menuItems)-1
let self.selection += 1
else
let self.selection = 0
endif
if !self._current().isSeparator()
let done = 1
endif
endwhile
endfunction
"FUNCTION: MenuController._cursorUp() {{{1
"move the cursor to the previous menu item, skipping separators
function! s:MenuController._cursorUp()
let done = 0
while !done
if self.selection > 0
let self.selection -= 1
else
let self.selection = len(self.menuItems)-1
endif
if !self._current().isSeparator()
let done = 1
endif
endwhile
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,114 @@
"CLASS: MenuItem
"============================================================
let s:MenuItem = {}
let g:NERDTreeMenuItem = s:MenuItem
"FUNCTION: MenuItem.All() {{{1
"get all top level menu items
function! s:MenuItem.All()
if !exists("s:menuItems")
let s:menuItems = []
endif
return s:menuItems
endfunction
"FUNCTION: MenuItem.AllEnabled() {{{1
"get all top level menu items that are currently enabled
function! s:MenuItem.AllEnabled()
let toReturn = []
for i in s:MenuItem.All()
if i.enabled()
call add(toReturn, i)
endif
endfor
return toReturn
endfunction
"FUNCTION: MenuItem.Create(options) {{{1
"make a new menu item and add it to the global list
function! s:MenuItem.Create(options)
let newMenuItem = copy(self)
let newMenuItem.text = a:options['text']
let newMenuItem.shortcut = a:options['shortcut']
let newMenuItem.children = []
let newMenuItem.isActiveCallback = -1
if has_key(a:options, 'isActiveCallback')
let newMenuItem.isActiveCallback = a:options['isActiveCallback']
endif
let newMenuItem.callback = -1
if has_key(a:options, 'callback')
let newMenuItem.callback = a:options['callback']
endif
if has_key(a:options, 'parent')
call add(a:options['parent'].children, newMenuItem)
else
call add(s:MenuItem.All(), newMenuItem)
endif
return newMenuItem
endfunction
"FUNCTION: MenuItem.CreateSeparator(options) {{{1
"make a new separator menu item and add it to the global list
function! s:MenuItem.CreateSeparator(options)
let standard_options = { 'text': '--------------------',
\ 'shortcut': -1,
\ 'callback': -1 }
let options = extend(a:options, standard_options, "force")
return s:MenuItem.Create(options)
endfunction
"FUNCTION: MenuItem.CreateSubmenu(options) {{{1
"make a new submenu and add it to global list
function! s:MenuItem.CreateSubmenu(options)
let standard_options = { 'callback': -1 }
let options = extend(a:options, standard_options, "force")
return s:MenuItem.Create(options)
endfunction
"FUNCTION: MenuItem.enabled() {{{1
"return 1 if this menu item should be displayed
"
"delegates off to the isActiveCallback, and defaults to 1 if no callback was
"specified
function! s:MenuItem.enabled()
if self.isActiveCallback != -1
return {self.isActiveCallback}()
endif
return 1
endfunction
"FUNCTION: MenuItem.execute() {{{1
"perform the action behind this menu item, if this menuitem has children then
"display a new menu for them, otherwise deletegate off to the menuitem's
"callback
function! s:MenuItem.execute()
if len(self.children)
let mc = s:MenuController.New(self.children)
call mc.showMenu()
else
if self.callback != -1
call {self.callback}()
endif
endif
endfunction
"FUNCTION: MenuItem.isSeparator() {{{1
"return 1 if this menuitem is a separator
function! s:MenuItem.isSeparator()
return self.callback == -1 && self.children == []
endfunction
"FUNCTION: MenuItem.isSubmenu() {{{1
"return 1 if this menuitem is a submenu
function! s:MenuItem.isSubmenu()
return self.callback == -1 && !empty(self.children)
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,264 @@
"CLASS: Opener
"============================================================
let s:Opener = {}
let g:NERDTreeOpener = s:Opener
"FUNCTION: Opener._checkToCloseTree(newtab) {{{1
"Check the class options and global options (i.e. NERDTreeQuitOnOpen) to see
"if the tree should be closed now.
"
"Args:
"a:newtab - boolean. If set, only close the tree now if we are opening the
"target in a new tab. This is needed because we have to close tree before we
"leave the tab
function! s:Opener._checkToCloseTree(newtab)
if self._keepopen
return
endif
if (a:newtab && self._where == 't') || !a:newtab
call nerdtree#closeTreeIfQuitOnOpen()
endif
endfunction
"FUNCTION: Opener._gotoTargetWin() {{{1
function! s:Opener._gotoTargetWin()
if b:NERDTreeType ==# "secondary"
if self._where == 'v'
vsplit
elseif self._where == 'h'
split
elseif self._where == 't'
tabnew
endif
else
call self._checkToCloseTree(1)
if self._where == 'v'
call self._newVSplit()
elseif self._where == 'h'
call self._newSplit()
elseif self._where == 't'
tabnew
elseif self._where == 'p'
call self._previousWindow()
endif
call self._checkToCloseTree(0)
endif
endfunction
"FUNCTION: Opener.New(path, opts) {{{1
"Args:
"
"a:path: The path object that is to be opened.
"
"a:opts:
"
"A dictionary containing the following keys (all optional):
" 'where': Specifies whether the node should be opened in new split/tab or in
" the previous window. Can be either 'v' or 'h' or 't' (for open in
" new tab)
" 'reuse': if a window is displaying the file then jump the cursor there
" 'keepopen': dont close the tree window
" 'stay': open the file, but keep the cursor in the tree win
function! s:Opener.New(path, opts)
let newObj = copy(self)
let newObj._path = a:path
let newObj._stay = nerdtree#has_opt(a:opts, 'stay')
let newObj._reuse = nerdtree#has_opt(a:opts, 'reuse')
let newObj._keepopen = nerdtree#has_opt(a:opts, 'keepopen')
let newObj._where = has_key(a:opts, 'where') ? a:opts['where'] : ''
let newObj._treetype = b:NERDTreeType
call newObj._saveCursorPos()
return newObj
endfunction
"FUNCTION: Opener._newSplit() {{{1
function! s:Opener._newSplit()
" Save the user's settings for splitbelow and splitright
let savesplitbelow=&splitbelow
let savesplitright=&splitright
" 'there' will be set to a command to move from the split window
" back to the explorer window
"
" 'back' will be set to a command to move from the explorer window
" back to the newly split window
"
" 'right' and 'below' will be set to the settings needed for
" splitbelow and splitright IF the explorer is the only window.
"
let there= g:NERDTreeWinPos ==# "left" ? "wincmd h" : "wincmd l"
let back = g:NERDTreeWinPos ==# "left" ? "wincmd l" : "wincmd h"
let right= g:NERDTreeWinPos ==# "left"
let below=0
" Attempt to go to adjacent window
call nerdtree#exec(back)
let onlyOneWin = (winnr("$") ==# 1)
" If no adjacent window, set splitright and splitbelow appropriately
if onlyOneWin
let &splitright=right
let &splitbelow=below
else
" found adjacent window - invert split direction
let &splitright=!right
let &splitbelow=!below
endif
let splitMode = onlyOneWin ? "vertical" : ""
" Open the new window
try
exec(splitMode." sp ")
catch /^Vim\%((\a\+)\)\=:E37/
call nerdtree#putCursorInTreeWin()
throw "NERDTree.FileAlreadyOpenAndModifiedError: ". self._path.str() ." is already open and modified."
catch /^Vim\%((\a\+)\)\=:/
"do nothing
endtry
"resize the tree window if no other window was open before
if onlyOneWin
let size = exists("b:NERDTreeOldWindowSize") ? b:NERDTreeOldWindowSize : g:NERDTreeWinSize
call nerdtree#exec(there)
exec("silent ". splitMode ." resize ". size)
call nerdtree#exec('wincmd p')
endif
" Restore splitmode settings
let &splitbelow=savesplitbelow
let &splitright=savesplitright
endfunction
"FUNCTION: Opener._newVSplit() {{{1
function! s:Opener._newVSplit()
let winwidth = winwidth(".")
if winnr("$")==#1
let winwidth = g:NERDTreeWinSize
endif
call nerdtree#exec("wincmd p")
vnew
"resize the nerd tree back to the original size
call nerdtree#putCursorInTreeWin()
exec("silent vertical resize ". winwidth)
call nerdtree#exec('wincmd p')
endfunction
"FUNCTION: Opener.open(target) {{{1
function! s:Opener.open(target)
if self._path.isDirectory
call self._openDirectory(a:target)
else
call self._openFile()
endif
endfunction
"FUNCTION: Opener._openFile() {{{1
function! s:Opener._openFile()
if self._reuse && self._reuseWindow()
return
endif
call self._gotoTargetWin()
if self._treetype ==# "secondary"
call self._path.edit()
else
call self._path.edit()
if self._stay
call self._restoreCursorPos()
endif
endif
endfunction
"FUNCTION: Opener._openDirectory(node) {{{1
function! s:Opener._openDirectory(node)
if self._treetype ==# "secondary"
call self._gotoTargetWin()
call g:NERDTreeCreator.CreateSecondary(a:node.path.str())
else
call self._gotoTargetWin()
if empty(self._where)
call a:node.makeRoot()
call nerdtree#renderView()
call a:node.putCursorHere(0, 0)
elseif self._where == 't'
call g:NERDTreeCreator.CreatePrimary(a:node.path.str())
else
call g:NERDTreeCreator.CreateSecondary(a:node.path.str())
endif
endif
if self._stay
call self._restoreCursorPos()
endif
endfunction
"FUNCTION: Opener._previousWindow() {{{1
function! s:Opener._previousWindow()
if !nerdtree#isWindowUsable(winnr("#")) && nerdtree#firstUsableWindow() ==# -1
call self._newSplit()
else
try
if !nerdtree#isWindowUsable(winnr("#"))
call nerdtree#exec(nerdtree#firstUsableWindow() . "wincmd w")
else
call nerdtree#exec('wincmd p')
endif
catch /^Vim\%((\a\+)\)\=:E37/
call nerdtree#putCursorInTreeWin()
throw "NERDTree.FileAlreadyOpenAndModifiedError: ". self._path.str() ." is already open and modified."
catch /^Vim\%((\a\+)\)\=:/
echo v:exception
endtry
endif
endfunction
"FUNCTION: Opener._restoreCursorPos(){{{1
function! s:Opener._restoreCursorPos()
call nerdtree#exec('normal ' . self._tabnr . 'gt')
call nerdtree#exec(bufwinnr(self._bufnr) . 'wincmd w')
endfunction
"FUNCTION: Opener._reuseWindow(){{{1
"put the cursor in the first window we find for this file
"
"return 1 if we were successful
function! s:Opener._reuseWindow()
"check the current tab for the window
let winnr = bufwinnr('^' . self._path.str() . '$')
if winnr != -1
call nerdtree#exec(winnr . "wincmd w")
call self._checkToCloseTree(0)
return 1
else
"check other tabs
let tabnr = self._path.tabnr()
if tabnr
call self._checkToCloseTree(1)
call nerdtree#exec('normal! ' . tabnr . 'gt')
let winnr = bufwinnr('^' . self._path.str() . '$')
call nerdtree#exec(winnr . "wincmd w")
return 1
endif
endif
return 0
endfunction
"FUNCTION: Opener._saveCursorPos(){{{1
function! s:Opener._saveCursorPos()
let self._bufnr = bufnr("")
let self._tabnr = tabpagenr()
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,724 @@
"we need to use this number many times for sorting... so we calculate it only
"once here
let s:NERDTreeSortStarIndex = index(g:NERDTreeSortOrder, '*')
"CLASS: Path
"============================================================
let s:Path = {}
let g:NERDTreePath = s:Path
"FUNCTION: Path.AbsolutePathFor(str) {{{1
function! s:Path.AbsolutePathFor(str)
let prependCWD = 0
if nerdtree#runningWindows()
let prependCWD = a:str !~# '^.:\(\\\|\/\)' && a:str !~# '^\(\\\\\|\/\/\)'
else
let prependCWD = a:str !~# '^/'
endif
let toReturn = a:str
if prependCWD
let toReturn = getcwd() . s:Path.Slash() . a:str
endif
return toReturn
endfunction
"FUNCTION: Path.bookmarkNames() {{{1
function! s:Path.bookmarkNames()
if !exists("self._bookmarkNames")
call self.cacheDisplayString()
endif
return self._bookmarkNames
endfunction
"FUNCTION: Path.cacheDisplayString() {{{1
function! s:Path.cacheDisplayString()
let self.cachedDisplayString = self.getLastPathComponent(1)
if self.isExecutable
let self.cachedDisplayString = self.cachedDisplayString . '*'
endif
let self._bookmarkNames = []
for i in g:NERDTreeBookmark.Bookmarks()
if i.path.equals(self)
call add(self._bookmarkNames, i.name)
endif
endfor
if !empty(self._bookmarkNames)
let self.cachedDisplayString .= ' {' . join(self._bookmarkNames) . '}'
endif
if self.isSymLink
let self.cachedDisplayString .= ' -> ' . self.symLinkDest
endif
if self.isReadOnly
let self.cachedDisplayString .= ' [RO]'
endif
endfunction
"FUNCTION: Path.changeToDir() {{{1
function! s:Path.changeToDir()
let dir = self.str({'format': 'Cd'})
if self.isDirectory ==# 0
let dir = self.getParent().str({'format': 'Cd'})
endif
try
execute "cd " . dir
call nerdtree#echo("CWD is now: " . getcwd())
catch
throw "NERDTree.PathChangeError: cannot change CWD to " . dir
endtry
endfunction
"FUNCTION: Path.compareTo() {{{1
"
"Compares this Path to the given path and returns 0 if they are equal, -1 if
"this Path is "less than" the given path, or 1 if it is "greater".
"
"Args:
"path: the path object to compare this to
"
"Return:
"1, -1 or 0
function! s:Path.compareTo(path)
let thisPath = self.getLastPathComponent(1)
let thatPath = a:path.getLastPathComponent(1)
"if the paths are the same then clearly we return 0
if thisPath ==# thatPath
return 0
endif
let thisSS = self.getSortOrderIndex()
let thatSS = a:path.getSortOrderIndex()
"compare the sort sequences, if they are different then the return
"value is easy
if thisSS < thatSS
return -1
elseif thisSS > thatSS
return 1
else
"if the sort sequences are the same then compare the paths
"alphabetically
let pathCompare = g:NERDTreeCaseSensitiveSort ? thisPath <# thatPath : thisPath <? thatPath
if pathCompare
return -1
else
return 1
endif
endif
endfunction
"FUNCTION: Path.Create(fullpath) {{{1
"
"Factory method.
"
"Creates a path object with the given path. The path is also created on the
"filesystem. If the path already exists, a NERDTree.Path.Exists exception is
"thrown. If any other errors occur, a NERDTree.Path exception is thrown.
"
"Args:
"fullpath: the full filesystem path to the file/dir to create
function! s:Path.Create(fullpath)
"bail if the a:fullpath already exists
if isdirectory(a:fullpath) || filereadable(a:fullpath)
throw "NERDTree.CreatePathError: Directory Exists: '" . a:fullpath . "'"
endif
try
"if it ends with a slash, assume its a dir create it
if a:fullpath =~# '\(\\\|\/\)$'
"whack the trailing slash off the end if it exists
let fullpath = substitute(a:fullpath, '\(\\\|\/\)$', '', '')
call mkdir(fullpath, 'p')
"assume its a file and create
else
call writefile([], a:fullpath)
endif
catch
throw "NERDTree.CreatePathError: Could not create path: '" . a:fullpath . "'"
endtry
return s:Path.New(a:fullpath)
endfunction
"FUNCTION: Path.copy(dest) {{{1
"
"Copies the file/dir represented by this Path to the given location
"
"Args:
"dest: the location to copy this dir/file to
function! s:Path.copy(dest)
if !s:Path.CopyingSupported()
throw "NERDTree.CopyingNotSupportedError: Copying is not supported on this OS"
endif
let dest = s:Path.WinToUnixPath(a:dest)
let cmd = g:NERDTreeCopyCmd . " " . escape(self.str(), nerdtree#escChars()) . " " . escape(dest, nerdtree#escChars())
let success = system(cmd)
if success != 0
throw "NERDTree.CopyError: Could not copy ''". self.str() ."'' to: '" . a:dest . "'"
endif
endfunction
"FUNCTION: Path.CopyingSupported() {{{1
"
"returns 1 if copying is supported for this OS
function! s:Path.CopyingSupported()
return exists('g:NERDTreeCopyCmd')
endfunction
"FUNCTION: Path.copyingWillOverwrite(dest) {{{1
"
"returns 1 if copy this path to the given location will cause files to
"overwritten
"
"Args:
"dest: the location this path will be copied to
function! s:Path.copyingWillOverwrite(dest)
if filereadable(a:dest)
return 1
endif
if isdirectory(a:dest)
let path = s:Path.JoinPathStrings(a:dest, self.getLastPathComponent(0))
if filereadable(path)
return 1
endif
endif
endfunction
"FUNCTION: Path.delete() {{{1
"
"Deletes the file represented by this path.
"Deletion of directories is not supported
"
"Throws NERDTree.Path.Deletion exceptions
function! s:Path.delete()
if self.isDirectory
let cmd = g:NERDTreeRemoveDirCmd . self.str({'escape': 1})
let success = system(cmd)
if v:shell_error != 0
throw "NERDTree.PathDeletionError: Could not delete directory: '" . self.str() . "'"
endif
else
let success = delete(self.str())
if success != 0
throw "NERDTree.PathDeletionError: Could not delete file: '" . self.str() . "'"
endif
endif
"delete all bookmarks for this path
for i in self.bookmarkNames()
let bookmark = g:NERDTreeBookmark.BookmarkFor(i)
call bookmark.delete()
endfor
endfunction
"FUNCTION: Path.displayString() {{{1
"
"Returns a string that specifies how the path should be represented as a
"string
function! s:Path.displayString()
if self.cachedDisplayString ==# ""
call self.cacheDisplayString()
endif
return self.cachedDisplayString
endfunction
"FUNCTION: Path.edit() {{{1
function! s:Path.edit()
exec "edit " . self.str({'format': 'Edit'})
endfunction
"FUNCTION: Path.extractDriveLetter(fullpath) {{{1
"
"If running windows, cache the drive letter for this path
function! s:Path.extractDriveLetter(fullpath)
if nerdtree#runningWindows()
if a:fullpath =~ '^\(\\\\\|\/\/\)'
"For network shares, the 'drive' consists of the first two parts of the path, i.e. \\boxname\share
let self.drive = substitute(a:fullpath, '^\(\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\).*', '\1', '')
let self.drive = substitute(self.drive, '/', '\', "g")
else
let self.drive = substitute(a:fullpath, '\(^[a-zA-Z]:\).*', '\1', '')
endif
else
let self.drive = ''
endif
endfunction
"FUNCTION: Path.exists() {{{1
"return 1 if this path points to a location that is readable or is a directory
function! s:Path.exists()
let p = self.str()
return filereadable(p) || isdirectory(p)
endfunction
"FUNCTION: Path.getDir() {{{1
"
"Returns this path if it is a directory, else this paths parent.
"
"Return:
"a Path object
function! s:Path.getDir()
if self.isDirectory
return self
else
return self.getParent()
endif
endfunction
"FUNCTION: Path.getParent() {{{1
"
"Returns a new path object for this paths parent
"
"Return:
"a new Path object
function! s:Path.getParent()
if nerdtree#runningWindows()
let path = self.drive . '\' . join(self.pathSegments[0:-2], '\')
else
let path = '/'. join(self.pathSegments[0:-2], '/')
endif
return s:Path.New(path)
endfunction
"FUNCTION: Path.getLastPathComponent(dirSlash) {{{1
"
"Gets the last part of this path.
"
"Args:
"dirSlash: if 1 then a trailing slash will be added to the returned value for
"directory nodes.
function! s:Path.getLastPathComponent(dirSlash)
if empty(self.pathSegments)
return ''
endif
let toReturn = self.pathSegments[-1]
if a:dirSlash && self.isDirectory
let toReturn = toReturn . '/'
endif
return toReturn
endfunction
"FUNCTION: Path.getSortOrderIndex() {{{1
"returns the index of the pattern in g:NERDTreeSortOrder that this path matches
function! s:Path.getSortOrderIndex()
let i = 0
while i < len(g:NERDTreeSortOrder)
if self.getLastPathComponent(1) =~# g:NERDTreeSortOrder[i]
return i
endif
let i = i + 1
endwhile
return s:NERDTreeSortStarIndex
endfunction
"FUNCTION: Path.isUnixHiddenFile() {{{1
"check for unix hidden files
function! s:Path.isUnixHiddenFile()
return self.getLastPathComponent(0) =~# '^\.'
endfunction
"FUNCTION: Path.isUnixHiddenPath() {{{1
"check for unix path with hidden components
function! s:Path.isUnixHiddenPath()
if self.getLastPathComponent(0) =~# '^\.'
return 1
else
for segment in self.pathSegments
if segment =~# '^\.'
return 1
endif
endfor
return 0
endif
endfunction
"FUNCTION: Path.ignore() {{{1
"returns true if this path should be ignored
function! s:Path.ignore()
"filter out the user specified paths to ignore
if b:NERDTreeIgnoreEnabled
for i in g:NERDTreeIgnore
if self._ignorePatternMatches(i)
return 1
endif
endfor
endif
"dont show hidden files unless instructed to
if b:NERDTreeShowHidden ==# 0 && self.isUnixHiddenFile()
return 1
endif
if b:NERDTreeShowFiles ==# 0 && self.isDirectory ==# 0
return 1
endif
if exists("*NERDTreeCustomIgnoreFilter") && NERDTreeCustomIgnoreFilter(self)
return 1
endif
return 0
endfunction
"FUNCTION: Path._ignorePatternMatches(pattern) {{{1
"returns true if this path matches the given ignore pattern
function! s:Path._ignorePatternMatches(pattern)
let pat = a:pattern
if strpart(pat,len(pat)-7) == '[[dir]]'
if !self.isDirectory
return 0
endif
let pat = strpart(pat,0, len(pat)-7)
elseif strpart(pat,len(pat)-8) == '[[file]]'
if self.isDirectory
return 0
endif
let pat = strpart(pat,0, len(pat)-8)
endif
return self.getLastPathComponent(0) =~# pat
endfunction
"FUNCTION: Path.isUnder(path) {{{1
"return 1 if this path is somewhere under the given path in the filesystem.
"
"a:path should be a dir
function! s:Path.isUnder(path)
if a:path.isDirectory == 0
return 0
endif
let this = self.str()
let that = a:path.str()
return stridx(this, that . s:Path.Slash()) == 0
endfunction
"FUNCTION: Path.JoinPathStrings(...) {{{1
function! s:Path.JoinPathStrings(...)
let components = []
for i in a:000
let components = extend(components, split(i, '/'))
endfor
return '/' . join(components, '/')
endfunction
"FUNCTION: Path.equals() {{{1
"
"Determines whether 2 path objects are "equal".
"They are equal if the paths they represent are the same
"
"Args:
"path: the other path obj to compare this with
function! s:Path.equals(path)
return self.str() ==# a:path.str()
endfunction
"FUNCTION: Path.New() {{{1
"The Constructor for the Path object
function! s:Path.New(path)
let newPath = copy(self)
call newPath.readInfoFromDisk(s:Path.AbsolutePathFor(a:path))
let newPath.cachedDisplayString = ""
return newPath
endfunction
"FUNCTION: Path.Slash() {{{1
"return the slash to use for the current OS
function! s:Path.Slash()
return nerdtree#runningWindows() ? '\' : '/'
endfunction
"FUNCTION: Path.Resolve() {{{1
"Invoke the vim resolve() function and return the result
"This is necessary because in some versions of vim resolve() removes trailing
"slashes while in other versions it doesn't. This always removes the trailing
"slash
function! s:Path.Resolve(path)
let tmp = resolve(a:path)
return tmp =~# '.\+/$' ? substitute(tmp, '/$', '', '') : tmp
endfunction
"FUNCTION: Path.readInfoFromDisk(fullpath) {{{1
"
"
"Throws NERDTree.Path.InvalidArguments exception.
function! s:Path.readInfoFromDisk(fullpath)
call self.extractDriveLetter(a:fullpath)
let fullpath = s:Path.WinToUnixPath(a:fullpath)
if getftype(fullpath) ==# "fifo"
throw "NERDTree.InvalidFiletypeError: Cant handle FIFO files: " . a:fullpath
endif
let self.pathSegments = split(fullpath, '/')
let self.isReadOnly = 0
if isdirectory(a:fullpath)
let self.isDirectory = 1
elseif filereadable(a:fullpath)
let self.isDirectory = 0
let self.isReadOnly = filewritable(a:fullpath) ==# 0
else
throw "NERDTree.InvalidArgumentsError: Invalid path = " . a:fullpath
endif
let self.isExecutable = 0
if !self.isDirectory
let self.isExecutable = getfperm(a:fullpath) =~# 'x'
endif
"grab the last part of the path (minus the trailing slash)
let lastPathComponent = self.getLastPathComponent(0)
"get the path to the new node with the parent dir fully resolved
let hardPath = s:Path.Resolve(self.strTrunk()) . '/' . lastPathComponent
"if the last part of the path is a symlink then flag it as such
let self.isSymLink = (s:Path.Resolve(hardPath) != hardPath)
if self.isSymLink
let self.symLinkDest = s:Path.Resolve(fullpath)
"if the link is a dir then slap a / on the end of its dest
if isdirectory(self.symLinkDest)
"we always wanna treat MS windows shortcuts as files for
"simplicity
if hardPath !~# '\.lnk$'
let self.symLinkDest = self.symLinkDest . '/'
endif
endif
endif
endfunction
"FUNCTION: Path.refresh() {{{1
function! s:Path.refresh()
call self.readInfoFromDisk(self.str())
call self.cacheDisplayString()
endfunction
"FUNCTION: Path.rename() {{{1
"
"Renames this node on the filesystem
function! s:Path.rename(newPath)
if a:newPath ==# ''
throw "NERDTree.InvalidArgumentsError: Invalid newPath for renaming = ". a:newPath
endif
let success = rename(self.str(), a:newPath)
if success != 0
throw "NERDTree.PathRenameError: Could not rename: '" . self.str() . "'" . 'to:' . a:newPath
endif
call self.readInfoFromDisk(a:newPath)
for i in self.bookmarkNames()
let b = g:NERDTreeBookmark.BookmarkFor(i)
call b.setPath(copy(self))
endfor
call g:NERDTreeBookmark.Write()
endfunction
"FUNCTION: Path.str() {{{1
"
"Returns a string representation of this Path
"
"Takes an optional dictionary param to specify how the output should be
"formatted.
"
"The dict may have the following keys:
" 'format'
" 'escape'
" 'truncateTo'
"
"The 'format' key may have a value of:
" 'Cd' - a string to be used with the :cd command
" 'Edit' - a string to be used with :e :sp :new :tabedit etc
" 'UI' - a string used in the NERD tree UI
"
"The 'escape' key, if specified will cause the output to be escaped with
"shellescape()
"
"The 'truncateTo' key causes the resulting string to be truncated to the value
"'truncateTo' maps to. A '<' char will be prepended.
function! s:Path.str(...)
let options = a:0 ? a:1 : {}
let toReturn = ""
if has_key(options, 'format')
let format = options['format']
if has_key(self, '_strFor' . format)
exec 'let toReturn = self._strFor' . format . '()'
else
raise 'NERDTree.UnknownFormatError: unknown format "'. format .'"'
endif
else
let toReturn = self._str()
endif
if nerdtree#has_opt(options, 'escape')
let toReturn = shellescape(toReturn)
endif
if has_key(options, 'truncateTo')
let limit = options['truncateTo']
if len(toReturn) > limit
let toReturn = "<" . strpart(toReturn, len(toReturn) - limit + 1)
endif
endif
return toReturn
endfunction
"FUNCTION: Path._strForUI() {{{1
function! s:Path._strForUI()
let toReturn = '/' . join(self.pathSegments, '/')
if self.isDirectory && toReturn != '/'
let toReturn = toReturn . '/'
endif
return toReturn
endfunction
"FUNCTION: Path._strForCd() {{{1
"
" returns a string that can be used with :cd
function! s:Path._strForCd()
return escape(self.str(), nerdtree#escChars())
endfunction
"FUNCTION: Path._strForEdit() {{{1
"
"Return: the string for this path that is suitable to be used with the :edit
"command
function! s:Path._strForEdit()
let p = escape(self.str({'format': 'UI'}), nerdtree#escChars())
let cwd = getcwd() . s:Path.Slash()
"return a relative path if we can
let isRelative = 0
if nerdtree#runningWindows()
let isRelative = stridx(tolower(p), tolower(cwd)) == 0
else
let isRelative = stridx(p, cwd) == 0
endif
if isRelative
let p = strpart(p, strlen(cwd))
"handle the edge case where the file begins with a + (vim interprets
"the +foo in `:e +foo` as an option to :edit)
if p[0] == "+"
let p = '\' . p
endif
endif
if p ==# ''
let p = '.'
endif
return p
endfunction
"FUNCTION: Path._strForGlob() {{{1
function! s:Path._strForGlob()
let lead = s:Path.Slash()
"if we are running windows then slap a drive letter on the front
if nerdtree#runningWindows()
let lead = self.drive . '\'
endif
let toReturn = lead . join(self.pathSegments, s:Path.Slash())
if !nerdtree#runningWindows()
let toReturn = escape(toReturn, nerdtree#escChars())
endif
return toReturn
endfunction
"FUNCTION: Path._str() {{{1
"
"Gets the string path for this path object that is appropriate for the OS.
"EG, in windows c:\foo\bar
" in *nix /foo/bar
function! s:Path._str()
let lead = s:Path.Slash()
"if we are running windows then slap a drive letter on the front
if nerdtree#runningWindows()
let lead = self.drive . '\'
endif
return lead . join(self.pathSegments, s:Path.Slash())
endfunction
"FUNCTION: Path.strTrunk() {{{1
"Gets the path without the last segment on the end.
function! s:Path.strTrunk()
return self.drive . '/' . join(self.pathSegments[0:-2], '/')
endfunction
" FUNCTION: Path.tabnr() {{{1
" return the number of the first tab that is displaying this file
"
" return 0 if no tab was found
function! s:Path.tabnr()
let str = self.str()
for t in range(tabpagenr('$'))
for b in tabpagebuflist(t+1)
if str == expand('#' . b . ':p')
return t+1
endif
endfor
endfor
return 0
endfunction
"FUNCTION: Path.WinToUnixPath(pathstr){{{1
"Takes in a windows path and returns the unix equiv
"
"A class level method
"
"Args:
"pathstr: the windows path to convert
function! s:Path.WinToUnixPath(pathstr)
if !nerdtree#runningWindows()
return a:pathstr
endif
let toReturn = a:pathstr
"remove the x:\ of the front
let toReturn = substitute(toReturn, '^.*:\(\\\|/\)\?', '/', "")
"remove the \\ network share from the front
let toReturn = substitute(toReturn, '^\(\\\\\|\/\/\)[^\\\/]*\(\\\|\/\)[^\\\/]*\(\\\|\/\)\?', '/', "")
"convert all \ chars to /
let toReturn = substitute(toReturn, '\', '/', "g")
return toReturn
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,528 @@
"CLASS: TreeDirNode
"A subclass of NERDTreeFileNode.
"
"The 'composite' part of the file/dir composite.
"============================================================
let s:TreeDirNode = copy(g:NERDTreeFileNode)
let g:NERDTreeDirNode = s:TreeDirNode
"FUNCTION: TreeDirNode.AbsoluteTreeRoot(){{{1
"class method that returns the highest cached ancestor of the current root
function! s:TreeDirNode.AbsoluteTreeRoot()
let currentNode = b:NERDTreeRoot
while currentNode.parent != {}
let currentNode = currentNode.parent
endwhile
return currentNode
endfunction
"FUNCTION: TreeDirNode.activate([options]) {{{1
unlet s:TreeDirNode.activate
function! s:TreeDirNode.activate(...)
let opts = a:0 ? a:1 : {}
call self.toggleOpen(opts)
call nerdtree#renderView()
call self.putCursorHere(0, 0)
endfunction
"FUNCTION: TreeDirNode.addChild(treenode, inOrder) {{{1
"Adds the given treenode to the list of children for this node
"
"Args:
"-treenode: the node to add
"-inOrder: 1 if the new node should be inserted in sorted order
function! s:TreeDirNode.addChild(treenode, inOrder)
call add(self.children, a:treenode)
let a:treenode.parent = self
if a:inOrder
call self.sortChildren()
endif
endfunction
"FUNCTION: TreeDirNode.close() {{{1
"Closes this directory
function! s:TreeDirNode.close()
let self.isOpen = 0
endfunction
"FUNCTION: TreeDirNode.closeChildren() {{{1
"Closes all the child dir nodes of this node
function! s:TreeDirNode.closeChildren()
for i in self.children
if i.path.isDirectory
call i.close()
call i.closeChildren()
endif
endfor
endfunction
"FUNCTION: TreeDirNode.createChild(path, inOrder) {{{1
"Instantiates a new child node for this node with the given path. The new
"nodes parent is set to this node.
"
"Args:
"path: a Path object that this node will represent/contain
"inOrder: 1 if the new node should be inserted in sorted order
"
"Returns:
"the newly created node
function! s:TreeDirNode.createChild(path, inOrder)
let newTreeNode = g:NERDTreeFileNode.New(a:path)
call self.addChild(newTreeNode, a:inOrder)
return newTreeNode
endfunction
"FUNCTION: TreeDirNode.findNode(path) {{{1
"Will find one of the children (recursively) that has the given path
"
"Args:
"path: a path object
unlet s:TreeDirNode.findNode
function! s:TreeDirNode.findNode(path)
if a:path.equals(self.path)
return self
endif
if stridx(a:path.str(), self.path.str(), 0) ==# -1
return {}
endif
if self.path.isDirectory
for i in self.children
let retVal = i.findNode(a:path)
if retVal != {}
return retVal
endif
endfor
endif
return {}
endfunction
"FUNCTION: TreeDirNode.getChildCount() {{{1
"Returns the number of children this node has
function! s:TreeDirNode.getChildCount()
return len(self.children)
endfunction
"FUNCTION: TreeDirNode.getChild(path) {{{1
"Returns child node of this node that has the given path or {} if no such node
"exists.
"
"This function doesnt not recurse into child dir nodes
"
"Args:
"path: a path object
function! s:TreeDirNode.getChild(path)
if stridx(a:path.str(), self.path.str(), 0) ==# -1
return {}
endif
let index = self.getChildIndex(a:path)
if index ==# -1
return {}
else
return self.children[index]
endif
endfunction
"FUNCTION: TreeDirNode.getChildByIndex(indx, visible) {{{1
"returns the child at the given index
"Args:
"indx: the index to get the child from
"visible: 1 if only the visible children array should be used, 0 if all the
"children should be searched.
function! s:TreeDirNode.getChildByIndex(indx, visible)
let array_to_search = a:visible? self.getVisibleChildren() : self.children
if a:indx > len(array_to_search)
throw "NERDTree.InvalidArgumentsError: Index is out of bounds."
endif
return array_to_search[a:indx]
endfunction
"FUNCTION: TreeDirNode.getChildIndex(path) {{{1
"Returns the index of the child node of this node that has the given path or
"-1 if no such node exists.
"
"This function doesnt not recurse into child dir nodes
"
"Args:
"path: a path object
function! s:TreeDirNode.getChildIndex(path)
if stridx(a:path.str(), self.path.str(), 0) ==# -1
return -1
endif
"do a binary search for the child
let a = 0
let z = self.getChildCount()
while a < z
let mid = (a+z)/2
let diff = a:path.compareTo(self.children[mid].path)
if diff ==# -1
let z = mid
elseif diff ==# 1
let a = mid+1
else
return mid
endif
endwhile
return -1
endfunction
"FUNCTION: TreeDirNode.GetSelected() {{{1
"Returns the current node if it is a dir node, or else returns the current
"nodes parent
unlet s:TreeDirNode.GetSelected
function! s:TreeDirNode.GetSelected()
let currentDir = g:NERDTreeFileNode.GetSelected()
if currentDir != {} && !currentDir.isRoot()
if currentDir.path.isDirectory ==# 0
let currentDir = currentDir.parent
endif
endif
return currentDir
endfunction
"FUNCTION: TreeDirNode.getVisibleChildCount() {{{1
"Returns the number of visible children this node has
function! s:TreeDirNode.getVisibleChildCount()
return len(self.getVisibleChildren())
endfunction
"FUNCTION: TreeDirNode.getVisibleChildren() {{{1
"Returns a list of children to display for this node, in the correct order
"
"Return:
"an array of treenodes
function! s:TreeDirNode.getVisibleChildren()
let toReturn = []
for i in self.children
if i.path.ignore() ==# 0
call add(toReturn, i)
endif
endfor
return toReturn
endfunction
"FUNCTION: TreeDirNode.hasVisibleChildren() {{{1
"returns 1 if this node has any childre, 0 otherwise..
function! s:TreeDirNode.hasVisibleChildren()
return self.getVisibleChildCount() != 0
endfunction
"FUNCTION: TreeDirNode._initChildren() {{{1
"Removes all childen from this node and re-reads them
"
"Args:
"silent: 1 if the function should not echo any "please wait" messages for
"large directories
"
"Return: the number of child nodes read
function! s:TreeDirNode._initChildren(silent)
"remove all the current child nodes
let self.children = []
"get an array of all the files in the nodes dir
let dir = self.path
let globDir = dir.str({'format': 'Glob'})
if version >= 703
let filesStr = globpath(globDir, '*', 1) . "\n" . globpath(globDir, '.*', 1)
else
let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')
endif
let files = split(filesStr, "\n")
if !a:silent && len(files) > g:NERDTreeNotificationThreshold
call nerdtree#echo("Please wait, caching a large dir ...")
endif
let invalidFilesFound = 0
for i in files
"filter out the .. and . directories
"Note: we must match .. AND ../ cos sometimes the globpath returns
"../ for path with strange chars (eg $)
if i !~# '\/\.\.\/\?$' && i !~# '\/\.\/\?$'
"put the next file in a new node and attach it
try
let path = g:NERDTreePath.New(i)
call self.createChild(path, 0)
catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/
let invalidFilesFound += 1
endtry
endif
endfor
call self.sortChildren()
if !a:silent && len(files) > g:NERDTreeNotificationThreshold
call nerdtree#echo("Please wait, caching a large dir ... DONE (". self.getChildCount() ." nodes cached).")
endif
if invalidFilesFound
call nerdtree#echoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree")
endif
return self.getChildCount()
endfunction
"FUNCTION: TreeDirNode.New(path) {{{1
"Returns a new TreeNode object with the given path and parent
"
"Args:
"path: a path object representing the full filesystem path to the file/dir that the node represents
unlet s:TreeDirNode.New
function! s:TreeDirNode.New(path)
if a:path.isDirectory != 1
throw "NERDTree.InvalidArgumentsError: A TreeDirNode object must be instantiated with a directory Path object."
endif
let newTreeNode = copy(self)
let newTreeNode.path = a:path
let newTreeNode.isOpen = 0
let newTreeNode.children = []
let newTreeNode.parent = {}
return newTreeNode
endfunction
"FUNCTION: TreeDirNode.open([opts]) {{{1
"Open the dir in the current tree or in a new tree elsewhere.
"
"If opening in the current tree, return the number of cached nodes.
unlet s:TreeDirNode.open
function! s:TreeDirNode.open(...)
let opts = a:0 ? a:1 : {}
if has_key(opts, 'where') && !empty(opts['where'])
let opener = g:NERDTreeOpener.New(self.path, opts)
call opener.open(self)
else
let self.isOpen = 1
if self.children ==# []
return self._initChildren(0)
else
return 0
endif
endif
endfunction
"FUNCTION: TreeDirNode.openAlong([opts]) {{{1
"recursive open the dir if it has only one directory child.
"
"return the level of opened directories.
function! s:TreeDirNode.openAlong(...)
let opts = a:0 ? a:1 : {}
let level = 0
let node = self
while node.path.isDirectory
call node.open(opts)
let level += 1
if node.getVisibleChildCount() == 1
let node = node.getChildByIndex(0, 1)
else
break
endif
endwhile
return level
endfunction
" FUNCTION: TreeDirNode.openExplorer() {{{1
" opens an explorer window for this node in the previous window (could be a
" nerd tree or a netrw)
function! s:TreeDirNode.openExplorer()
call self.open({'where': 'p'})
endfunction
"FUNCTION: TreeDirNode.openInNewTab(options) {{{1
unlet s:TreeDirNode.openInNewTab
function! s:TreeDirNode.openInNewTab(options)
call nerdtree#deprecated('TreeDirNode.openInNewTab', 'is deprecated, use open() instead')
call self.open({'where': 't'})
endfunction
"FUNCTION: TreeDirNode._openInNewTab() {{{1
function! s:TreeDirNode._openInNewTab()
tabnew
call g:NERDTreeCreator.CreatePrimary(self.path.str())
endfunction
"FUNCTION: TreeDirNode.openRecursively() {{{1
"Opens this treenode and all of its children whose paths arent 'ignored'
"because of the file filters.
"
"This method is actually a wrapper for the OpenRecursively2 method which does
"the work.
function! s:TreeDirNode.openRecursively()
call self._openRecursively2(1)
endfunction
"FUNCTION: TreeDirNode._openRecursively2() {{{1
"Opens this all children of this treenode recursively if either:
" *they arent filtered by file filters
" *a:forceOpen is 1
"
"Args:
"forceOpen: 1 if this node should be opened regardless of file filters
function! s:TreeDirNode._openRecursively2(forceOpen)
if self.path.ignore() ==# 0 || a:forceOpen
let self.isOpen = 1
if self.children ==# []
call self._initChildren(1)
endif
for i in self.children
if i.path.isDirectory ==# 1
call i._openRecursively2(0)
endif
endfor
endif
endfunction
"FUNCTION: TreeDirNode.refresh() {{{1
unlet s:TreeDirNode.refresh
function! s:TreeDirNode.refresh()
call self.path.refresh()
"if this node was ever opened, refresh its children
if self.isOpen || !empty(self.children)
"go thru all the files/dirs under this node
let newChildNodes = []
let invalidFilesFound = 0
let dir = self.path
let globDir = dir.str({'format': 'Glob'})
let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')
let files = split(filesStr, "\n")
for i in files
"filter out the .. and . directories
"Note: we must match .. AND ../ cos sometimes the globpath returns
"../ for path with strange chars (eg $)
if i !~# '\/\.\.\/\?$' && i !~# '\/\.\/\?$'
try
"create a new path and see if it exists in this nodes children
let path = g:NERDTreePath.New(i)
let newNode = self.getChild(path)
if newNode != {}
call newNode.refresh()
call add(newChildNodes, newNode)
"the node doesnt exist so create it
else
let newNode = g:NERDTreeFileNode.New(path)
let newNode.parent = self
call add(newChildNodes, newNode)
endif
catch /^NERDTree.\(InvalidArguments\|InvalidFiletype\)Error/
let invalidFilesFound = 1
endtry
endif
endfor
"swap this nodes children out for the children we just read/refreshed
let self.children = newChildNodes
call self.sortChildren()
if invalidFilesFound
call nerdtree#echoWarning("some files could not be loaded into the NERD tree")
endif
endif
endfunction
"FUNCTION: TreeDirNode.reveal(path) {{{1
"reveal the given path, i.e. cache and open all treenodes needed to display it
"in the UI
function! s:TreeDirNode.reveal(path)
if !a:path.isUnder(self.path)
throw "NERDTree.InvalidArgumentsError: " . a:path.str() . " should be under " . self.path.str()
endif
call self.open()
if self.path.equals(a:path.getParent())
let n = self.findNode(a:path)
call nerdtree#renderView()
call n.putCursorHere(1,0)
return
endif
let p = a:path
while !p.getParent().equals(self.path)
let p = p.getParent()
endwhile
let n = self.findNode(p)
call n.reveal(a:path)
endfunction
"FUNCTION: TreeDirNode.removeChild(treenode) {{{1
"
"Removes the given treenode from this nodes set of children
"
"Args:
"treenode: the node to remove
"
"Throws a NERDTree.ChildNotFoundError if the given treenode is not found
function! s:TreeDirNode.removeChild(treenode)
for i in range(0, self.getChildCount()-1)
if self.children[i].equals(a:treenode)
call remove(self.children, i)
return
endif
endfor
throw "NERDTree.ChildNotFoundError: child node was not found"
endfunction
"FUNCTION: TreeDirNode.sortChildren() {{{1
"
"Sorts the children of this node according to alphabetical order and the
"directory priority.
"
function! s:TreeDirNode.sortChildren()
let CompareFunc = function("nerdtree#compareNodes")
call sort(self.children, CompareFunc)
endfunction
"FUNCTION: TreeDirNode.toggleOpen([options]) {{{1
"Opens this directory if it is closed and vice versa
function! s:TreeDirNode.toggleOpen(...)
let opts = a:0 ? a:1 : {}
if self.isOpen ==# 1
call self.close()
else
if g:NERDTreeCasadeOpenSingleChildDir == 0
call self.open(opts)
else
call self.openAlong(opts)
endif
endif
endfunction
"FUNCTION: TreeDirNode.transplantChild(newNode) {{{1
"Replaces the child of this with the given node (where the child node's full
"path matches a:newNode's fullpath). The search for the matching node is
"non-recursive
"
"Arg:
"newNode: the node to graft into the tree
function! s:TreeDirNode.transplantChild(newNode)
for i in range(0, self.getChildCount()-1)
if self.children[i].equals(a:newNode)
let self.children[i] = a:newNode
let a:newNode.parent = self
break
endif
endfor
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,485 @@
"CLASS: TreeFileNode
"This class is the parent of the TreeDirNode class and is the
"'Component' part of the composite design pattern between the treenode
"classes.
"============================================================
let s:TreeFileNode = {}
let g:NERDTreeFileNode = s:TreeFileNode
"FUNCTION: TreeFileNode.activate(...) {{{1
function! s:TreeFileNode.activate(...)
call self.open(a:0 ? a:1 : {})
endfunction
"FUNCTION: TreeFileNode.bookmark(name) {{{1
"bookmark this node with a:name
function! s:TreeFileNode.bookmark(name)
"if a bookmark exists with the same name and the node is cached then save
"it so we can update its display string
let oldMarkedNode = {}
try
let oldMarkedNode = g:NERDTreeBookmark.GetNodeForName(a:name, 1)
catch /^NERDTree.BookmarkNotFoundError/
catch /^NERDTree.BookmarkedNodeNotFoundError/
endtry
call g:NERDTreeBookmark.AddBookmark(a:name, self.path)
call self.path.cacheDisplayString()
call g:NERDTreeBookmark.Write()
if !empty(oldMarkedNode)
call oldMarkedNode.path.cacheDisplayString()
endif
endfunction
"FUNCTION: TreeFileNode.cacheParent() {{{1
"initializes self.parent if it isnt already
function! s:TreeFileNode.cacheParent()
if empty(self.parent)
let parentPath = self.path.getParent()
if parentPath.equals(self.path)
throw "NERDTree.CannotCacheParentError: already at root"
endif
let self.parent = s:TreeFileNode.New(parentPath)
endif
endfunction
"FUNCTION: TreeFileNode.clearBookmarks() {{{1
function! s:TreeFileNode.clearBookmarks()
for i in g:NERDTreeBookmark.Bookmarks()
if i.path.equals(self.path)
call i.delete()
end
endfor
call self.path.cacheDisplayString()
endfunction
"FUNCTION: TreeFileNode.copy(dest) {{{1
function! s:TreeFileNode.copy(dest)
call self.path.copy(a:dest)
let newPath = g:NERDTreePath.New(a:dest)
let parent = b:NERDTreeRoot.findNode(newPath.getParent())
if !empty(parent)
call parent.refresh()
return parent.findNode(newPath)
else
return {}
endif
endfunction
"FUNCTION: TreeFileNode.delete {{{1
"Removes this node from the tree and calls the Delete method for its path obj
function! s:TreeFileNode.delete()
call self.path.delete()
call self.parent.removeChild(self)
endfunction
"FUNCTION: TreeFileNode.displayString() {{{1
"
"Returns a string that specifies how the node should be represented as a
"string
"
"Return:
"a string that can be used in the view to represent this node
function! s:TreeFileNode.displayString()
return self.path.displayString()
endfunction
"FUNCTION: TreeFileNode.equals(treenode) {{{1
"
"Compares this treenode to the input treenode and returns 1 if they are the
"same node.
"
"Use this method instead of == because sometimes when the treenodes contain
"many children, vim seg faults when doing ==
"
"Args:
"treenode: the other treenode to compare to
function! s:TreeFileNode.equals(treenode)
return self.path.str() ==# a:treenode.path.str()
endfunction
"FUNCTION: TreeFileNode.findNode(path) {{{1
"Returns self if this node.path.Equals the given path.
"Returns {} if not equal.
"
"Args:
"path: the path object to compare against
function! s:TreeFileNode.findNode(path)
if a:path.equals(self.path)
return self
endif
return {}
endfunction
"FUNCTION: TreeFileNode.findOpenDirSiblingWithVisibleChildren(direction) {{{1
"
"Finds the next sibling for this node in the indicated direction. This sibling
"must be a directory and may/may not have children as specified.
"
"Args:
"direction: 0 if you want to find the previous sibling, 1 for the next sibling
"
"Return:
"a treenode object or {} if no appropriate sibling could be found
function! s:TreeFileNode.findOpenDirSiblingWithVisibleChildren(direction)
"if we have no parent then we can have no siblings
if self.parent != {}
let nextSibling = self.findSibling(a:direction)
while nextSibling != {}
if nextSibling.path.isDirectory && nextSibling.hasVisibleChildren() && nextSibling.isOpen
return nextSibling
endif
let nextSibling = nextSibling.findSibling(a:direction)
endwhile
endif
return {}
endfunction
"FUNCTION: TreeFileNode.findSibling(direction) {{{1
"
"Finds the next sibling for this node in the indicated direction
"
"Args:
"direction: 0 if you want to find the previous sibling, 1 for the next sibling
"
"Return:
"a treenode object or {} if no sibling could be found
function! s:TreeFileNode.findSibling(direction)
"if we have no parent then we can have no siblings
if self.parent != {}
"get the index of this node in its parents children
let siblingIndx = self.parent.getChildIndex(self.path)
if siblingIndx != -1
"move a long to the next potential sibling node
let siblingIndx = a:direction ==# 1 ? siblingIndx+1 : siblingIndx-1
"keep moving along to the next sibling till we find one that is valid
let numSiblings = self.parent.getChildCount()
while siblingIndx >= 0 && siblingIndx < numSiblings
"if the next node is not an ignored node (i.e. wont show up in the
"view) then return it
if self.parent.children[siblingIndx].path.ignore() ==# 0
return self.parent.children[siblingIndx]
endif
"go to next node
let siblingIndx = a:direction ==# 1 ? siblingIndx+1 : siblingIndx-1
endwhile
endif
endif
return {}
endfunction
"FUNCTION: TreeFileNode.getLineNum(){{{1
"returns the line number this node is rendered on, or -1 if it isnt rendered
function! s:TreeFileNode.getLineNum()
"if the node is the root then return the root line no.
if self.isRoot()
return s:TreeFileNode.GetRootLineNum()
endif
let totalLines = line("$")
"the path components we have matched so far
let pathcomponents = [substitute(b:NERDTreeRoot.path.str({'format': 'UI'}), '/ *$', '', '')]
"the index of the component we are searching for
let curPathComponent = 1
let fullpath = self.path.str({'format': 'UI'})
let lnum = s:TreeFileNode.GetRootLineNum()
while lnum > 0
let lnum = lnum + 1
"have we reached the bottom of the tree?
if lnum ==# totalLines+1
return -1
endif
let curLine = getline(lnum)
let indent = nerdtree#indentLevelFor(curLine)
if indent ==# curPathComponent
let curLine = nerdtree#stripMarkupFromLine(curLine, 1)
let curPath = join(pathcomponents, '/') . '/' . curLine
if stridx(fullpath, curPath, 0) ==# 0
if fullpath ==# curPath || strpart(fullpath, len(curPath)-1,1) ==# '/'
let curLine = substitute(curLine, '/ *$', '', '')
call add(pathcomponents, curLine)
let curPathComponent = curPathComponent + 1
if fullpath ==# curPath
return lnum
endif
endif
endif
endif
endwhile
return -1
endfunction
"FUNCTION: TreeFileNode.GetRootForTab(){{{1
"get the root node for this tab
function! s:TreeFileNode.GetRootForTab()
if nerdtree#treeExistsForTab()
return getbufvar(t:NERDTreeBufName, 'NERDTreeRoot')
end
return {}
endfunction
"FUNCTION: TreeFileNode.GetRootLineNum(){{{1
"gets the line number of the root node
function! s:TreeFileNode.GetRootLineNum()
let rootLine = 1
while getline(rootLine) !~# '^\(/\|<\)'
let rootLine = rootLine + 1
endwhile
return rootLine
endfunction
"FUNCTION: TreeFileNode.GetSelected() {{{1
"gets the treenode that the cursor is currently over
function! s:TreeFileNode.GetSelected()
try
let path = nerdtree#getPath(line("."))
if path ==# {}
return {}
endif
return b:NERDTreeRoot.findNode(path)
catch /^NERDTree/
return {}
endtry
endfunction
"FUNCTION: TreeFileNode.isVisible() {{{1
"returns 1 if this node should be visible according to the tree filters and
"hidden file filters (and their on/off status)
function! s:TreeFileNode.isVisible()
return !self.path.ignore()
endfunction
"FUNCTION: TreeFileNode.isRoot() {{{1
"returns 1 if this node is b:NERDTreeRoot
function! s:TreeFileNode.isRoot()
if !nerdtree#treeExistsForBuf()
throw "NERDTree.NoTreeError: No tree exists for the current buffer"
endif
return self.equals(b:NERDTreeRoot)
endfunction
"FUNCTION: TreeFileNode.makeRoot() {{{1
"Make this node the root of the tree
function! s:TreeFileNode.makeRoot()
if self.path.isDirectory
let b:NERDTreeRoot = self
else
call self.cacheParent()
let b:NERDTreeRoot = self.parent
endif
call b:NERDTreeRoot.open()
"change dir to the dir of the new root if instructed to
if g:NERDTreeChDirMode ==# 2
exec "cd " . b:NERDTreeRoot.path.str({'format': 'Edit'})
endif
silent doautocmd User NERDTreeNewRoot
endfunction
"FUNCTION: TreeFileNode.New(path) {{{1
"Returns a new TreeNode object with the given path and parent
"
"Args:
"path: a path object representing the full filesystem path to the file/dir that the node represents
function! s:TreeFileNode.New(path)
if a:path.isDirectory
return g:NERDTreeDirNode.New(a:path)
else
let newTreeNode = copy(self)
let newTreeNode.path = a:path
let newTreeNode.parent = {}
return newTreeNode
endif
endfunction
"FUNCTION: TreeFileNode.open() {{{1
function! s:TreeFileNode.open(...)
let opts = a:0 ? a:1 : {}
let opener = g:NERDTreeOpener.New(self.path, opts)
call opener.open(self)
endfunction
"FUNCTION: TreeFileNode.openSplit() {{{1
"Open this node in a new window
function! s:TreeFileNode.openSplit()
call nerdtree#deprecated('TreeFileNode.openSplit', 'is deprecated, use .open() instead.')
call self.open({'where': 'h'})
endfunction
"FUNCTION: TreeFileNode.openVSplit() {{{1
"Open this node in a new vertical window
function! s:TreeFileNode.openVSplit()
call nerdtree#deprecated('TreeFileNode.openVSplit', 'is deprecated, use .open() instead.')
call self.open({'where': 'v'})
endfunction
"FUNCTION: TreeFileNode.openInNewTab(options) {{{1
function! s:TreeFileNode.openInNewTab(options)
echomsg 'TreeFileNode.openInNewTab is deprecated'
call self.open(extend({'where': 't'}, a:options))
endfunction
"FUNCTION: TreeFileNode.putCursorHere(isJump, recurseUpward){{{1
"Places the cursor on the line number this node is rendered on
"
"Args:
"isJump: 1 if this cursor movement should be counted as a jump by vim
"recurseUpward: try to put the cursor on the parent if the this node isnt
"visible
function! s:TreeFileNode.putCursorHere(isJump, recurseUpward)
let ln = self.getLineNum()
if ln != -1
if a:isJump
mark '
endif
call cursor(ln, col("."))
else
if a:recurseUpward
let node = self
while node != {} && node.getLineNum() ==# -1
let node = node.parent
call node.open()
endwhile
call nerdtree#renderView()
call node.putCursorHere(a:isJump, 0)
endif
endif
endfunction
"FUNCTION: TreeFileNode.refresh() {{{1
function! s:TreeFileNode.refresh()
call self.path.refresh()
endfunction
"FUNCTION: TreeFileNode.rename() {{{1
"Calls the rename method for this nodes path obj
function! s:TreeFileNode.rename(newName)
let newName = substitute(a:newName, '\(\\\|\/\)$', '', '')
call self.path.rename(newName)
call self.parent.removeChild(self)
let parentPath = self.path.getParent()
let newParent = b:NERDTreeRoot.findNode(parentPath)
if newParent != {}
call newParent.createChild(self.path, 1)
call newParent.refresh()
endif
endfunction
"FUNCTION: TreeFileNode.renderToString {{{1
"returns a string representation for this tree to be rendered in the view
function! s:TreeFileNode.renderToString()
return self._renderToString(0, 0, [], self.getChildCount() ==# 1)
endfunction
"Args:
"depth: the current depth in the tree for this call
"drawText: 1 if we should actually draw the line for this node (if 0 then the
"child nodes are rendered only)
"vertMap: a binary array that indicates whether a vertical bar should be draw
"for each depth in the tree
"isLastChild:true if this curNode is the last child of its parent
function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild)
let output = ""
if a:drawText ==# 1
let treeParts = ''
"get all the leading spaces and vertical tree parts for this line
if a:depth > 1
for j in a:vertMap[0:-2]
if g:NERDTreeDirArrows
let treeParts = treeParts . ' '
else
if j ==# 1
let treeParts = treeParts . '| '
else
let treeParts = treeParts . ' '
endif
endif
endfor
endif
"get the last vertical tree part for this line which will be different
"if this node is the last child of its parent
if !g:NERDTreeDirArrows
if a:isLastChild
let treeParts = treeParts . '`'
else
let treeParts = treeParts . '|'
endif
endif
"smack the appropriate dir/file symbol on the line before the file/dir
"name itself
if self.path.isDirectory
if self.isOpen
if g:NERDTreeDirArrows
let treeParts = treeParts . '▾ '
else
let treeParts = treeParts . '~'
endif
else
if g:NERDTreeDirArrows
let treeParts = treeParts . '▸ '
else
let treeParts = treeParts . '+'
endif
endif
else
if g:NERDTreeDirArrows
let treeParts = treeParts . ' '
else
let treeParts = treeParts . '-'
endif
endif
let line = treeParts . self.displayString()
let output = output . line . "\n"
endif
"if the node is an open dir, draw its children
if self.path.isDirectory ==# 1 && self.isOpen ==# 1
let childNodesToDraw = self.getVisibleChildren()
if len(childNodesToDraw) > 0
"draw all the nodes children except the last
let lastIndx = len(childNodesToDraw)-1
if lastIndx > 0
for i in childNodesToDraw[0:lastIndx-1]
let output = output . i._renderToString(a:depth + 1, 1, add(copy(a:vertMap), 1), 0)
endfor
endif
"draw the last child, indicating that it IS the last
let output = output . childNodesToDraw[lastIndx]._renderToString(a:depth + 1, 1, add(copy(a:vertMap), 0), 1)
endif
endif
return output
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,41 @@
" ============================================================================
" File: exec_menuitem.vim
" Description: plugin for NERD Tree that provides an execute file menu item
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
" Last Change: 22 July, 2009
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" ============================================================================
if exists("g:loaded_nerdtree_exec_menuitem")
finish
endif
let g:loaded_nerdtree_exec_menuitem = 1
call NERDTreeAddMenuItem({
\ 'text': '(!)Execute file',
\ 'shortcut': '!',
\ 'callback': 'NERDTreeExecFile',
\ 'isActiveCallback': 'NERDTreeExecFileActive' })
function! NERDTreeExecFileActive()
let node = g:NERDTreeFileNode.GetSelected()
return !node.path.isDirectory && node.path.isExecutable
endfunction
function! NERDTreeExecFile()
let treenode = g:NERDTreeFileNode.GetSelected()
echo "==========================================================\n"
echo "Complete the command to execute (add arguments etc):\n"
let cmd = treenode.path.str({'escape': 1})
let cmd = input(':!', cmd . ' ')
if cmd != ''
exec ':!' . cmd
else
echo "Aborted"
endif
endfunction

@ -0,0 +1,262 @@
" ============================================================================
" File: fs_menu.vim
" Description: plugin for the NERD Tree that provides a file system menu
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
" Last Change: 17 July, 2009
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" ============================================================================
if exists("g:loaded_nerdtree_fs_menu")
finish
endif
let g:loaded_nerdtree_fs_menu = 1
"Automatically delete the buffer after deleting or renaming a file
if !exists("g:NERDTreeAutoDeleteBuffer")
let g:NERDTreeAutoDeleteBuffer = 0
endif
call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
if has("gui_mac") || has("gui_macvim")
call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'})
call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'})
call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'})
endif
if g:NERDTreePath.CopyingSupported()
call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
endif
"FUNCTION: s:echo(msg){{{1
function! s:echo(msg)
redraw
echomsg "NERDTree: " . a:msg
endfunction
"FUNCTION: s:echoWarning(msg){{{1
function! s:echoWarning(msg)
echohl warningmsg
call s:echo(a:msg)
echohl normal
endfunction
"FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1
"prints out the given msg and, if the user responds by pushing 'y' then the
"buffer with the given bufnum is deleted
"
"Args:
"bufnum: the buffer that may be deleted
"msg: a message that will be echoed to the user asking them if they wish to
" del the buffer
function! s:promptToDelBuffer(bufnum, msg)
echo a:msg
if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y'
" 1. ensure that all windows which display the just deleted filename
" now display an empty buffer (so a layout is preserved).
" Is not it better to close single tabs with this file only ?
let s:originalTabNumber = tabpagenr()
let s:originalWindowNumber = winnr()
exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':enew! ' | endif"
exec "tabnext " . s:originalTabNumber
exec s:originalWindowNumber . "wincmd w"
" 3. We don't need a previous buffer anymore
exec "bwipeout! " . a:bufnum
endif
endfunction
"FUNCTION: s:promptToRenameBuffer(bufnum, msg){{{1
"prints out the given msg and, if the user responds by pushing 'y' then the
"buffer with the given bufnum is replaced with a new one
"
"Args:
"bufnum: the buffer that may be deleted
"msg: a message that will be echoed to the user asking them if they wish to
" del the buffer
function! s:promptToRenameBuffer(bufnum, msg, newFileName)
echo a:msg
if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y'
" 1. ensure that a new buffer is loaded
exec "badd " . a:newFileName
" 2. ensure that all windows which display the just deleted filename
" display a buffer for a new filename.
let s:originalTabNumber = tabpagenr()
let s:originalWindowNumber = winnr()
exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':e! " . a:newFileName . "' | endif"
exec "tabnext " . s:originalTabNumber
exec s:originalWindowNumber . "wincmd w"
" 3. We don't need a previous buffer anymore
exec "bwipeout! " . a:bufnum
endif
endfunction
"FUNCTION: NERDTreeAddNode(){{{1
function! NERDTreeAddNode()
let curDirNode = g:NERDTreeDirNode.GetSelected()
let newNodeName = input("Add a childnode\n".
\ "==========================================================\n".
\ "Enter the dir/file name to be created. Dirs end with a '/'\n" .
\ "", curDirNode.path.str() . g:NERDTreePath.Slash(), "file")
if newNodeName ==# ''
call s:echo("Node Creation Aborted.")
return
endif
try
let newPath = g:NERDTreePath.Create(newNodeName)
let parentNode = b:NERDTreeRoot.findNode(newPath.getParent())
let newTreeNode = g:NERDTreeFileNode.New(newPath)
if parentNode.isOpen || !empty(parentNode.children)
call parentNode.addChild(newTreeNode, 1)
call NERDTreeRender()
call newTreeNode.putCursorHere(1, 0)
endif
catch /^NERDTree/
call s:echoWarning("Node Not Created.")
endtry
endfunction
"FUNCTION: NERDTreeMoveNode(){{{1
function! NERDTreeMoveNode()
let curNode = g:NERDTreeFileNode.GetSelected()
let newNodePath = input("Rename the current node\n" .
\ "==========================================================\n" .
\ "Enter the new path for the node: \n" .
\ "", curNode.path.str(), "file")
if newNodePath ==# ''
call s:echo("Node Renaming Aborted.")
return
endif
try
let bufnum = bufnr(curNode.path.str())
call curNode.rename(newNodePath)
call NERDTreeRender()
"if the node is open in a buffer, ask the user if they want to
"close that buffer
if bufnum != -1
let prompt = "\nNode renamed.\n\nThe old file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Replace this buffer with a new file? (yN)"
call s:promptToRenameBuffer(bufnum, prompt, newNodePath)
endif
call curNode.putCursorHere(1, 0)
redraw
catch /^NERDTree/
call s:echoWarning("Node Not Renamed.")
endtry
endfunction
" FUNCTION: NERDTreeDeleteNode() {{{1
function! NERDTreeDeleteNode()
let currentNode = g:NERDTreeFileNode.GetSelected()
let confirmed = 0
if currentNode.path.isDirectory
let choice =input("Delete the current node\n" .
\ "==========================================================\n" .
\ "STOP! To delete this entire directory, type 'yes'\n" .
\ "" . currentNode.path.str() . ": ")
let confirmed = choice ==# 'yes'
else
echo "Delete the current node\n" .
\ "==========================================================\n".
\ "Are you sure you wish to delete the node:\n" .
\ "" . currentNode.path.str() . " (yN):"
let choice = nr2char(getchar())
let confirmed = choice ==# 'y'
endif
if confirmed
try
call currentNode.delete()
call NERDTreeRender()
"if the node is open in a buffer, ask the user if they want to
"close that buffer
let bufnum = bufnr(currentNode.path.str())
if buflisted(bufnum)
let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)"
call s:promptToDelBuffer(bufnum, prompt)
endif
redraw
catch /^NERDTree/
call s:echoWarning("Could not remove node")
endtry
else
call s:echo("delete aborted")
endif
endfunction
" FUNCTION: NERDTreeCopyNode() {{{1
function! NERDTreeCopyNode()
let currentNode = g:NERDTreeFileNode.GetSelected()
let newNodePath = input("Copy the current node\n" .
\ "==========================================================\n" .
\ "Enter the new path to copy the node to: \n" .
\ "", currentNode.path.str(), "file")
if newNodePath != ""
"strip trailing slash
let newNodePath = substitute(newNodePath, '\/$', '', '')
let confirmed = 1
if currentNode.path.copyingWillOverwrite(newNodePath)
call s:echo("Warning: copying may overwrite files! Continue? (yN)")
let choice = nr2char(getchar())
let confirmed = choice ==# 'y'
endif
if confirmed
try
let newNode = currentNode.copy(newNodePath)
if !empty(newNode)
call NERDTreeRender()
call newNode.putCursorHere(0, 0)
endif
catch /^NERDTree/
call s:echoWarning("Could not copy node")
endtry
endif
else
call s:echo("Copy aborted.")
endif
redraw
endfunction
function! NERDTreeQuickLook()
let treenode = g:NERDTreeFileNode.GetSelected()
if treenode != {}
call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'")
endif
endfunction
function! NERDTreeRevealInFinder()
let treenode = g:NERDTreeFileNode.GetSelected()
if treenode != {}
let x = system("open -R '" . treenode.path.str() . "'")
endif
endfunction
function! NERDTreeExecuteFile()
let treenode = g:NERDTreeFileNode.GetSelected()
if treenode != {}
let x = system("open '" . treenode.path.str() . "'")
endif
endfunction
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,210 @@
" ============================================================================
" File: NERD_tree.vim
" Description: vim global plugin that provides a nice tree explorer
" Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
" Last Change: 28 December, 2011
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" ============================================================================
"
" SECTION: Script init stuff {{{1
"============================================================
if exists("loaded_nerd_tree")
finish
endif
if v:version < 700
echoerr "NERDTree: this plugin requires vim >= 7. DOWNLOAD IT! You'll thank me later!"
finish
endif
let loaded_nerd_tree = 1
"for line continuation - i.e dont want C in &cpo
let s:old_cpo = &cpo
set cpo&vim
"Function: s:initVariable() function {{{2
"This function is used to initialise a given variable to a given value. The
"variable is only initialised if it does not exist prior
"
"Args:
"var: the name of the var to be initialised
"value: the value to initialise var to
"
"Returns:
"1 if the var is set, 0 otherwise
function! s:initVariable(var, value)
if !exists(a:var)
exec 'let ' . a:var . ' = ' . "'" . substitute(a:value, "'", "''", "g") . "'"
return 1
endif
return 0
endfunction
"SECTION: Init variable calls and other random constants {{{2
call s:initVariable("g:NERDChristmasTree", 1)
call s:initVariable("g:NERDTreeAutoCenter", 1)
call s:initVariable("g:NERDTreeAutoCenterThreshold", 3)
call s:initVariable("g:NERDTreeCaseSensitiveSort", 0)
call s:initVariable("g:NERDTreeChDirMode", 0)
call s:initVariable("g:NERDTreeMinimalUI", 0)
if !exists("g:NERDTreeIgnore")
let g:NERDTreeIgnore = ['\~$']
endif
call s:initVariable("g:NERDTreeBookmarksFile", expand('$HOME') . '/.NERDTreeBookmarks')
call s:initVariable("g:NERDTreeHighlightCursorline", 1)
call s:initVariable("g:NERDTreeHijackNetrw", 1)
call s:initVariable("g:NERDTreeMouseMode", 1)
call s:initVariable("g:NERDTreeNotificationThreshold", 100)
call s:initVariable("g:NERDTreeQuitOnOpen", 0)
call s:initVariable("g:NERDTreeShowBookmarks", 0)
call s:initVariable("g:NERDTreeShowFiles", 1)
call s:initVariable("g:NERDTreeShowHidden", 0)
call s:initVariable("g:NERDTreeShowLineNumbers", 0)
call s:initVariable("g:NERDTreeSortDirs", 1)
call s:initVariable("g:NERDTreeDirArrows", !nerdtree#runningWindows())
call s:initVariable("g:NERDTreeCasadeOpenSingleChildDir", 1)
if !exists("g:NERDTreeSortOrder")
let g:NERDTreeSortOrder = ['\/$', '*', '\.swp$', '\.bak$', '\~$']
else
"if there isnt a * in the sort sequence then add one
if count(g:NERDTreeSortOrder, '*') < 1
call add(g:NERDTreeSortOrder, '*')
endif
endif
if !exists('g:NERDTreeStatusline')
"the exists() crap here is a hack to stop vim spazzing out when
"loading a session that was created with an open nerd tree. It spazzes
"because it doesnt store b:NERDTreeRoot (its a b: var, and its a hash)
let g:NERDTreeStatusline = "%{exists('b:NERDTreeRoot')?b:NERDTreeRoot.path.str():''}"
endif
call s:initVariable("g:NERDTreeWinPos", "left")
call s:initVariable("g:NERDTreeWinSize", 31)
"init the shell commands that will be used to copy nodes, and remove dir trees
"
"Note: the space after the command is important
if nerdtree#runningWindows()
call s:initVariable("g:NERDTreeRemoveDirCmd", 'rmdir /s /q ')
else
call s:initVariable("g:NERDTreeRemoveDirCmd", 'rm -rf ')
call s:initVariable("g:NERDTreeCopyCmd", 'cp -r ')
endif
"SECTION: Init variable calls for key mappings {{{2
call s:initVariable("g:NERDTreeMapActivateNode", "o")
call s:initVariable("g:NERDTreeMapChangeRoot", "C")
call s:initVariable("g:NERDTreeMapChdir", "cd")
call s:initVariable("g:NERDTreeMapCloseChildren", "X")
call s:initVariable("g:NERDTreeMapCloseDir", "x")
call s:initVariable("g:NERDTreeMapDeleteBookmark", "D")
call s:initVariable("g:NERDTreeMapMenu", "m")
call s:initVariable("g:NERDTreeMapHelp", "?")
call s:initVariable("g:NERDTreeMapJumpFirstChild", "K")
call s:initVariable("g:NERDTreeMapJumpLastChild", "J")
call s:initVariable("g:NERDTreeMapJumpNextSibling", "<C-j>")
call s:initVariable("g:NERDTreeMapJumpParent", "p")
call s:initVariable("g:NERDTreeMapJumpPrevSibling", "<C-k>")
call s:initVariable("g:NERDTreeMapJumpRoot", "P")
call s:initVariable("g:NERDTreeMapOpenExpl", "e")
call s:initVariable("g:NERDTreeMapOpenInTab", "t")
call s:initVariable("g:NERDTreeMapOpenInTabSilent", "T")
call s:initVariable("g:NERDTreeMapOpenRecursively", "O")
call s:initVariable("g:NERDTreeMapOpenSplit", "i")
call s:initVariable("g:NERDTreeMapOpenVSplit", "s")
call s:initVariable("g:NERDTreeMapPreview", "g" . NERDTreeMapActivateNode)
call s:initVariable("g:NERDTreeMapPreviewSplit", "g" . NERDTreeMapOpenSplit)
call s:initVariable("g:NERDTreeMapPreviewVSplit", "g" . NERDTreeMapOpenVSplit)
call s:initVariable("g:NERDTreeMapQuit", "q")
call s:initVariable("g:NERDTreeMapRefresh", "r")
call s:initVariable("g:NERDTreeMapRefreshRoot", "R")
call s:initVariable("g:NERDTreeMapToggleBookmarks", "B")
call s:initVariable("g:NERDTreeMapToggleFiles", "F")
call s:initVariable("g:NERDTreeMapToggleFilters", "f")
call s:initVariable("g:NERDTreeMapToggleHidden", "I")
call s:initVariable("g:NERDTreeMapToggleZoom", "A")
call s:initVariable("g:NERDTreeMapUpdir", "u")
call s:initVariable("g:NERDTreeMapUpdirKeepOpen", "U")
call s:initVariable("g:NERDTreeMapCWD", "CD")
"SECTION: Load class files{{{2
call nerdtree#loadClassFiles()
" SECTION: Commands {{{1
"============================================================
"init the command that users start the nerd tree with
command! -n=? -complete=dir -bar NERDTree :call g:NERDTreeCreator.CreatePrimary('<args>')
command! -n=? -complete=dir -bar NERDTreeToggle :call g:NERDTreeCreator.TogglePrimary('<args>')
command! -n=0 -bar NERDTreeClose :call nerdtree#closeTreeIfOpen()
command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreatePrimary('<args>')
command! -n=0 -bar NERDTreeMirror call g:NERDTreeCreator.CreateMirror()
command! -n=0 -bar NERDTreeFind call nerdtree#findAndRevealPath()
command! -n=0 -bar NERDTreeFocus call NERDTreeFocus()
command! -n=0 -bar NERDTreeCWD call NERDTreeCWD()
" SECTION: Auto commands {{{1
"============================================================
augroup NERDTree
"Save the cursor position whenever we close the nerd tree
exec "autocmd BufWinLeave ". g:NERDTreeCreator.BufNamePrefix() ."* call nerdtree#saveScreenState()"
"disallow insert mode in the NERDTree
exec "autocmd BufEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert"
augroup END
if g:NERDTreeHijackNetrw
augroup NERDTreeHijackNetrw
autocmd VimEnter * silent! autocmd! FileExplorer
au BufEnter,VimEnter * call nerdtree#checkForBrowse(expand("<amatch>"))
augroup END
endif
" SECTION: Public API {{{1
"============================================================
function! NERDTreeAddMenuItem(options)
call g:NERDTreeMenuItem.Create(a:options)
endfunction
function! NERDTreeAddMenuSeparator(...)
let opts = a:0 ? a:1 : {}
call g:NERDTreeMenuItem.CreateSeparator(opts)
endfunction
function! NERDTreeAddSubmenu(options)
return g:NERDTreeMenuItem.Create(a:options)
endfunction
function! NERDTreeAddKeyMap(options)
call g:NERDTreeKeyMap.Create(a:options)
endfunction
function! NERDTreeRender()
call nerdtree#renderView()
endfunction
function! NERDTreeFocus()
if nerdtree#isTreeOpen()
call nerdtree#putCursorInTreeWin()
else
call g:NERDTreeCreator.TogglePrimary("")
endif
endfunction
function! NERDTreeCWD()
call NERDTreeFocus()
call nerdtree#chRootCwd()
endfunction
" SECTION: Post Source Actions {{{1
call nerdtree#postSourceActions()
"reset &cpo back to users setting
let &cpo = s:old_cpo
" vim: set sw=4 sts=4 et fdm=marker:

@ -0,0 +1,88 @@
let s:tree_up_dir_line = '.. (up a dir)'
"NERDTreeFlags are syntax items that should be invisible, but give clues as to
"how things should be highlighted
syn match NERDTreeFlag #\~#
syn match NERDTreeFlag #\[RO\]#
"highlighting for the .. (up dir) line at the top of the tree
execute "syn match NERDTreeUp #\\V". s:tree_up_dir_line ."#"
"highlighting for the ~/+ symbols for the directory nodes
syn match NERDTreeClosable #\~\<#
syn match NERDTreeClosable #\~\.#
syn match NERDTreeOpenable #+\<#
syn match NERDTreeOpenable #+\.#he=e-1
"highlighting for the tree structural parts
syn match NERDTreePart #|#
syn match NERDTreePart #`#
syn match NERDTreePartFile #[|`]-#hs=s+1 contains=NERDTreePart
"quickhelp syntax elements
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*:#hs=s+2,he=e-1
syn match NERDTreeHelpKey #" \{1,2\}[^ ]*,#hs=s+2,he=e-1
syn match NERDTreeHelpTitle #" .*\~#hs=s+2,he=e-1 contains=NERDTreeFlag
syn match NERDTreeToggleOn #".*(on)#hs=e-2,he=e-1 contains=NERDTreeHelpKey
syn match NERDTreeToggleOff #".*(off)#hs=e-3,he=e-1 contains=NERDTreeHelpKey
syn match NERDTreeHelpCommand #" :.\{-}\>#hs=s+3
syn match NERDTreeHelp #^".*# contains=NERDTreeHelpKey,NERDTreeHelpTitle,NERDTreeFlag,NERDTreeToggleOff,NERDTreeToggleOn,NERDTreeHelpCommand
"highlighting for readonly files
syn match NERDTreeRO #.*\[RO\]#hs=s+2 contains=NERDTreeFlag,NERDTreeBookmark,NERDTreePart,NERDTreePartFile
"highlighting for sym links
syn match NERDTreeLink #[^-| `].* -> # contains=NERDTreeBookmark,NERDTreeOpenable,NERDTreeClosable,NERDTreeDirSlash
"highlighing for directory nodes and file nodes
syn match NERDTreeDirSlash #/#
syn match NERDTreeDir #[^-| `].*/# contains=NERDTreeLink,NERDTreeDirSlash,NERDTreeOpenable,NERDTreeClosable
syn match NERDTreeExecFile #[|` ].*\*\($\| \)# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark
syn match NERDTreeFile #|-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
syn match NERDTreeFile #`-.*# contains=NERDTreeLink,NERDTreePart,NERDTreeRO,NERDTreePartFile,NERDTreeBookmark,NERDTreeExecFile
syn match NERDTreeCWD #^[</].*$#
"highlighting for bookmarks
syn match NERDTreeBookmark # {.*}#hs=s+1
"highlighting for the bookmarks table
syn match NERDTreeBookmarksLeader #^>#
syn match NERDTreeBookmarksHeader #^>-\+Bookmarks-\+$# contains=NERDTreeBookmarksLeader
syn match NERDTreeBookmarkName #^>.\{-} #he=e-1 contains=NERDTreeBookmarksLeader
syn match NERDTreeBookmark #^>.*$# contains=NERDTreeBookmarksLeader,NERDTreeBookmarkName,NERDTreeBookmarksHeader
if exists("g:NERDChristmasTree") && g:NERDChristmasTree
hi def link NERDTreePart Special
hi def link NERDTreePartFile Type
hi def link NERDTreeFile Normal
hi def link NERDTreeExecFile Title
hi def link NERDTreeDirSlash Identifier
hi def link NERDTreeClosable Type
else
hi def link NERDTreePart Normal
hi def link NERDTreePartFile Normal
hi def link NERDTreeFile Normal
hi def link NERDTreeClosable Title
endif
hi def link NERDTreeBookmarksHeader statement
hi def link NERDTreeBookmarksLeader ignore
hi def link NERDTreeBookmarkName Identifier
hi def link NERDTreeBookmark normal
hi def link NERDTreeHelp String
hi def link NERDTreeHelpKey Identifier
hi def link NERDTreeHelpCommand Identifier
hi def link NERDTreeHelpTitle Macro
hi def link NERDTreeToggleOn Question
hi def link NERDTreeToggleOff WarningMsg
hi def link NERDTreeDir Directory
hi def link NERDTreeUp Directory
hi def link NERDTreeCWD Statement
hi def link NERDTreeLink Macro
hi def link NERDTreeOpenable Title
hi def link NERDTreeFlag ignore
hi def link NERDTreeRO WarningMsg
hi def link NERDTreeBookmark Statement
hi def link NERDTreeCurrentNode Search

@ -0,0 +1,5 @@
Quickly install with:
git clone git://github.com/msanders/snipmate.vim.git
cd snipmate.vim
cp -R * ~/.vim

@ -0,0 +1,40 @@
" These are the mappings for snipMate.vim. Putting it here ensures that it
" will be mapped after other plugins such as supertab.vim.
if !exists('loaded_snips') || exists('s:did_snips_mappings')
finish
endif
let s:did_snips_mappings = 1
" This is put here in the 'after' directory in order for snipMate to override
" other plugin mappings (e.g., supertab).
"
" You can safely adjust these mappings to your preferences (as explained in
" :help snipMate-remap).
ino <silent> <tab> <c-r>=TriggerSnippet()<cr>
snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr>
snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr>
ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
" The default mappings for these are annoying & sometimes break snipMate.
" You can change them back if you want, I've put them here for convenience.
snor <bs> b<bs>
snor <right> <esc>a
snor <left> <esc>bi
snor ' b<bs>'
snor ` b<bs>`
snor % b<bs>%
snor U b<bs>U
snor ^ b<bs>^
snor \ b<bs>\
snor <c-x> b<bs><c-x>
" By default load snippets in snippets_dir
if empty(snippets_dir)
finish
endif
call GetSnippets(snippets_dir, '_') " Get global snippets
au FileType * if &ft != 'help' | call GetSnippets(snippets_dir, &ft) | endif
" vim:noet:sw=4:ts=4:ft=vim

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save