summaryrefslogtreecommitdiffstats
path: root/runtime/autoload
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--runtime/autoload/README.txt22
-rw-r--r--runtime/autoload/RstFold.vim62
-rw-r--r--runtime/autoload/ada.vim637
-rw-r--r--runtime/autoload/adacomplete.vim109
-rw-r--r--runtime/autoload/bitbake.vim95
-rw-r--r--runtime/autoload/ccomplete.vim693
-rw-r--r--runtime/autoload/clojurecomplete.vim23
-rw-r--r--runtime/autoload/context.vim100
-rw-r--r--runtime/autoload/contextcomplete.vim25
-rw-r--r--runtime/autoload/csscomplete.vim742
-rw-r--r--runtime/autoload/decada.vim75
-rw-r--r--runtime/autoload/dist/ft.vim1108
-rw-r--r--runtime/autoload/dist/man.vim196
-rw-r--r--runtime/autoload/dist/script.vim434
-rw-r--r--runtime/autoload/dist/vimindent.vim1257
-rw-r--r--runtime/autoload/freebasic.vim40
-rw-r--r--runtime/autoload/getscript.vim667
-rw-r--r--runtime/autoload/gnat.vim147
-rw-r--r--runtime/autoload/gzip.vim220
-rw-r--r--runtime/autoload/haskellcomplete.vim3385
-rw-r--r--runtime/autoload/htmlcomplete.vim809
-rw-r--r--runtime/autoload/javascriptcomplete.vim647
-rw-r--r--runtime/autoload/netrw.vim12741
-rw-r--r--runtime/autoload/netrwFileHandlers.vim362
-rw-r--r--runtime/autoload/netrwSettings.vim249
-rw-r--r--runtime/autoload/netrw_gitignore.vim22
-rw-r--r--runtime/autoload/paste.vim25
-rw-r--r--runtime/autoload/phpcomplete.vim2988
-rw-r--r--runtime/autoload/python.vim249
-rw-r--r--runtime/autoload/python3complete.vim611
-rw-r--r--runtime/autoload/pythoncomplete.vim627
-rw-r--r--runtime/autoload/rubycomplete.vim872
-rw-r--r--runtime/autoload/rust.vim415
-rw-r--r--runtime/autoload/rustfmt.vim107
-rw-r--r--runtime/autoload/spellfile.vim206
-rw-r--r--runtime/autoload/sqlcomplete.vim996
-rw-r--r--runtime/autoload/syntaxcomplete.vim810
-rw-r--r--runtime/autoload/tar.vim818
-rw-r--r--runtime/autoload/tohtml.vim950
-rw-r--r--runtime/autoload/typeset.vim233
-rw-r--r--runtime/autoload/vimball.vim775
-rw-r--r--runtime/autoload/xml/html32.vim383
-rw-r--r--runtime/autoload/xml/html401f.vim468
-rw-r--r--runtime/autoload/xml/html401s.vim410
-rw-r--r--runtime/autoload/xml/html401t.vim460
-rw-r--r--runtime/autoload/xml/html40f.vim468
-rw-r--r--runtime/autoload/xml/html40s.vim410
-rw-r--r--runtime/autoload/xml/html40t.vim460
-rw-r--r--runtime/autoload/xml/xhtml10f.vim469
-rw-r--r--runtime/autoload/xml/xhtml10s.vim410
-rw-r--r--runtime/autoload/xml/xhtml10t.vim460
-rw-r--r--runtime/autoload/xml/xhtml11.vim434
-rw-r--r--runtime/autoload/xml/xsd.vim130
-rw-r--r--runtime/autoload/xml/xsl.vim38
-rw-r--r--runtime/autoload/xmlcomplete.vim539
-rw-r--r--runtime/autoload/xmlformat.vim203
-rw-r--r--runtime/autoload/zig/fmt.vim100
-rw-r--r--runtime/autoload/zip.vim470
58 files changed, 41861 insertions, 0 deletions
diff --git a/runtime/autoload/README.txt b/runtime/autoload/README.txt
new file mode 100644
index 0000000..3b18d3d
--- /dev/null
+++ b/runtime/autoload/README.txt
@@ -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)
diff --git a/runtime/autoload/RstFold.vim b/runtime/autoload/RstFold.vim
new file mode 100644
index 0000000..238b1e3
--- /dev/null
+++ b/runtime/autoload/RstFold.vim
@@ -0,0 +1,62 @@
+" Author: Antony Lee <anntzer.lee@gmail.com>
+" Description: Helper functions for reStructuredText syntax folding
+" Last Modified: 2018-12-29
+
+function s:CacheRstFold()
+ if !g:rst_fold_enabled
+ return
+ endif
+
+ let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
+ function closure.Process(match) dict
+ let curline = getcurpos()[1]
+ if has_key(self.levels, curline - 1)
+ " For over+under-lined headers, the regex will match both at the
+ " overline and at the title itself; in that case, skip the second match.
+ return
+ endif
+ let lines = split(a:match, '\n')
+ let key = repeat(lines[-1][0], len(lines))
+ if !has_key(self.header_types, key)
+ let self.max_level += 1
+ let self.header_types[key] = self.max_level
+ endif
+ let self.levels[curline] = self.header_types[key]
+ endfunction
+ let save_cursor = getcurpos()
+ let save_mark = getpos("'[")
+ silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
+ call setpos('.', save_cursor)
+ call setpos("'[", save_mark)
+ let b:RstFoldCache = closure.levels
+endfunction
+
+function RstFold#GetRstFold()
+ if !g:rst_fold_enabled
+ return
+ endif
+
+ if !has_key(b:, 'RstFoldCache')
+ call s:CacheRstFold()
+ endif
+ if has_key(b:RstFoldCache, v:lnum)
+ return '>' . b:RstFoldCache[v:lnum]
+ else
+ return '='
+ endif
+endfunction
+
+function RstFold#GetRstFoldText()
+ if !g:rst_fold_enabled
+ return
+ endif
+
+ if !has_key(b:, 'RstFoldCache')
+ call s:CacheRstFold()
+ endif
+ let indent = repeat(' ', b:RstFoldCache[v:foldstart] - 1)
+ let thisline = getline(v:foldstart)
+ " For over+under-lined headers, skip the overline.
+ let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline
+ return indent . text
+endfunction
diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim
new file mode 100644
index 0000000..3f1b403
--- /dev/null
+++ b/runtime/autoload/ada.vim
@@ -0,0 +1,637 @@
+"------------------------------------------------------------------------------
+" Description: Perform Ada specific completion & tagging.
+" Language: Ada (2005)
+" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
+" Maintainer: Mathias Brousset <mathiasb17@gmail.com>
+" Martin Krischik <krischik@users.sourceforge.net>
+" Taylor Venable <taylor@metasyntax.net>
+" Neil Bird <neil@fnxweb.com>
+" Ned Okie <nokie@radford.edu>
+" $Author: krischik $
+" $Date: 2017-01-31 20:20:05 +0200 (Mon, 01 Jan 2017) $
+" 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
+" 31.01.2017 MB fix more 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 standard 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 standard 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
+ " backwards 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 actually 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>" .
+ \ " <Leader>a" . a:Keys .
+ \" :" . a:Command
+ execute
+ \ "inoremap <buffer>" .
+ \ " <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
diff --git a/runtime/autoload/adacomplete.vim b/runtime/autoload/adacomplete.vim
new file mode 100644
index 0000000..d7bba93
--- /dev/null
+++ b/runtime/autoload/adacomplete.vim
@@ -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 against 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
diff --git a/runtime/autoload/bitbake.vim b/runtime/autoload/bitbake.vim
new file mode 100644
index 0000000..bb3fc5c
--- /dev/null
+++ b/runtime/autoload/bitbake.vim
@@ -0,0 +1,95 @@
+" Support for bitbake indenting, see runtime/indent/bitbake.vim
+
+function s:is_bb_python_func_def(lnum)
+ let stack = synstack(a:lnum, 1)
+ if len(stack) == 0
+ return 0
+ endif
+
+ return synIDattr(stack[0], "name") == "bbPyFuncDef"
+endfunction
+
+function bitbake#Indent(lnum)
+ if !has('syntax_items')
+ return -1
+ endif
+
+ let stack = synstack(a:lnum, 1)
+ if len(stack) == 0
+ return -1
+ endif
+
+ let name = synIDattr(stack[0], "name")
+
+ " TODO: support different styles of indentation for assignments. For now,
+ " we only support like this:
+ " VAR = " \
+ " value1 \
+ " value2 \
+ " "
+ "
+ " i.e. each value indented by shiftwidth(), with the final quote " completely unindented.
+ if name == "bbVarValue"
+ " Quote handling is tricky. kernel.bbclass has this line for instance:
+ " EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" " HOSTCPP="${BUILD_CPP}""
+ " Instead of trying to handle crazy cases like that, just assume that a
+ " double-quote on a line by itself (following an assignment) means the
+ " user is closing the assignment, and de-dent.
+ if getline(a:lnum) =~ '^\s*"$'
+ return 0
+ endif
+
+ let prevstack = synstack(a:lnum - 1, 1)
+ if len(prevstack) == 0
+ return -1
+ endif
+
+ let prevname = synIDattr(prevstack[0], "name")
+
+ " Only indent if there was actually a continuation character on
+ " the previous line, to avoid misleading indentation.
+ let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name")
+ let prev_continued = prevlinelastchar == "bbContinue"
+
+ " Did the previous line introduce an assignment?
+ if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1
+ if prev_continued
+ return shiftwidth()
+ endif
+ endif
+
+ if !prev_continued
+ return 0
+ endif
+
+ " Autoindent can take it from here
+ return -1
+ endif
+
+ if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1
+ let ret = python#GetIndent(a:lnum, function('s:is_bb_python_func_def'))
+ " Should normally always be indented by at least one shiftwidth; but allow
+ " return of -1 (defer to autoindent) or -2 (force indent to 0)
+ if ret == 0
+ return shiftwidth()
+ elseif ret == -2
+ return 0
+ endif
+ return ret
+ endif
+
+ " TODO: GetShIndent doesn't detect tasks prepended with 'fakeroot'
+ " Need to submit a patch upstream to Vim to provide an extension point.
+ " Unlike the Python indenter, the Sh indenter is way too large to copy and
+ " modify here.
+ if name == "bbShFuncRegion"
+ return GetShIndent()
+ endif
+
+ " TODO:
+ " + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user
+ " types an obvious BB keyword like addhandler or addtask, or starts
+ " writing a shell task. Maybe too hard to implement...
+
+ return -1
+endfunction
diff --git a/runtime/autoload/ccomplete.vim b/runtime/autoload/ccomplete.vim
new file mode 100644
index 0000000..3bddba7
--- /dev/null
+++ b/runtime/autoload/ccomplete.vim
@@ -0,0 +1,693 @@
+vim9script noclear
+
+# Vim completion script
+# Language: C
+# Maintainer: Bram Moolenaar <Bram@vim.org>
+# Rewritten in Vim9 script by github user lacygoill
+# Last Change: 2022 Jan 31
+
+var prepended: string
+var grepCache: dict<list<dict<any>>>
+
+# This function is used for the 'omnifunc' option.
+export def Complete(findstart: bool, abase: string): any # {{{1
+ if findstart
+ # Locate the start of the item, including ".", "->" and "[...]".
+ var line: string = getline('.')
+ var start: number = charcol('.') - 1
+ var lastword: number = -1
+ while start > 0
+ if line[start - 1] =~ '\w'
+ --start
+ elseif line[start - 1] =~ '\.'
+ if lastword == -1
+ lastword = start
+ endif
+ --start
+ elseif start > 1 && line[start - 2] == '-'
+ && line[start - 1] == '>'
+ if lastword == -1
+ lastword = start
+ endif
+ start -= 2
+ elseif line[start - 1] == ']'
+ # Skip over [...].
+ var n: number = 0
+ --start
+ while start > 0
+ --start
+ if line[start] == '['
+ if n == 0
+ break
+ endif
+ --n
+ elseif line[start] == ']' # nested []
+ ++n
+ 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 prepended.
+ if lastword == -1
+ prepended = ''
+ return byteidx(line, start)
+ endif
+ prepended = line[start : lastword - 1]
+ return byteidx(line, lastword)
+ endif
+
+ # Return list of matches.
+
+ var base: string = prepended .. abase
+
+ # 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
+ 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 [...].
+ # "aa[...]" -> ['aa', '[...]'], "aa.bb[...]" -> ['aa', 'bb', '[...]'], etc.
+ var items: list<string>
+ var s: number = 0
+ var arrays: number = 0
+ while 1
+ var e: number = base->charidx(match(base, '\.\|->\|\[', s))
+ if e < 0
+ if s == 0 || base[s - 1] != ']'
+ items->add(base[s :])
+ endif
+ break
+ endif
+ if s == 0 || base[s - 1] != ']'
+ items->add(base[s : e - 1])
+ endif
+ if base[e] == '.'
+ # skip over '.'
+ s = e + 1
+ elseif base[e] == '-'
+ # skip over '->'
+ s = e + 2
+ else
+ # Skip over [...].
+ var n: number = 0
+ s = e
+ ++e
+ while e < strcharlen(base)
+ if base[e] == ']'
+ if n == 0
+ break
+ endif
+ --n
+ elseif base[e] == '[' # nested [...]
+ ++n
+ endif
+ ++e
+ endwhile
+ ++e
+ items->add(base[s : e - 1])
+ ++arrays
+ 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")
+ var res: list<dict<any>>
+ if items[0]->searchdecl(false, true) == 0
+ # Found, now figure out the type.
+ # TODO: join previous line if it makes sense
+ var line: string = getline('.')
+ var col: number = charcol('.')
+ if line[: col - 1]->stridx(';') >= 0
+ # Handle multiple declarations on the same line.
+ var col2: number = col - 1
+ while line[col2] != ';'
+ --col2
+ endwhile
+ line = line[col2 + 1 :]
+ col -= col2
+ endif
+ if line[: col - 1]->stridx(',') >= 0
+ # Handle multiple declarations on the same line in a function
+ # declaration.
+ var col2: number = col - 1
+ while line[col2] != ','
+ --col2
+ endwhile
+ if line[col2 + 1 : col - 1] =~ ' *[^ ][^ ]* *[^ ]'
+ line = line[col2 + 1 :]
+ col -= col2
+ endif
+ endif
+ if len(items) == 1
+ # Completing one word and it's a local variable: May add '[', '.' or
+ # '->'.
+ var match: string = items[0]
+ var kind: string = 'v'
+ if match(line, '\<' .. match .. '\s*\[') > 0
+ match ..= '['
+ else
+ res = line[: col - 1]->Nextitem([''], 0, true)
+ if len(res) > 0
+ # There are members, thus add "." or "->".
+ if match(line, '\*[ \t(]*' .. match .. '\>') > 0
+ match ..= '->'
+ else
+ match ..= '.'
+ endif
+ endif
+ endif
+ res = [{match: match, tagline: '', kind: kind, info: line}]
+ elseif len(items) == arrays + 1
+ # Completing one word and it's a local array variable: build tagline
+ # from declaration line
+ var match: string = items[0]
+ var kind: string = 'v'
+ var tagline: string = "\t/^" .. line .. '$/'
+ res = [{match: match, tagline: tagline, kind: kind, info: line}]
+ else
+ # Completing "var.", "var.something", etc.
+ res = line[: col - 1]->Nextitem(items[1 :], 0, true)
+ endif
+ endif
+
+ if len(items) == 1 || len(items) == arrays + 1
+ # Only one part, no "." or "->": complete from tags file.
+ var tags: list<dict<any>>
+ if len(items) == 1
+ tags = taglist('^' .. base)
+ else
+ tags = taglist('^' .. items[0] .. '$')
+ endif
+
+ tags
+ # Remove members, these can't appear without something in front.
+ ->filter((_, v: dict<any>): bool =>
+ v->has_key('kind') ? v.kind != 'm' : true)
+ # Remove static matches in other files.
+ ->filter((_, v: dict<any>): bool =>
+ !v->has_key('static')
+ || !v['static']
+ || bufnr('%') == bufnr(v['filename']))
+
+ res = res->extend(tags->map((_, v: dict<any>) => Tag2item(v)))
+ endif
+
+ if len(res) == 0
+ # Find the variable in the tags file(s)
+ var diclist: list<dict<any>> = taglist('^' .. items[0] .. '$')
+ # Remove members, these can't appear without something in front.
+ ->filter((_, v: dict<string>): bool =>
+ v->has_key('kind') ? v.kind != 'm' : true)
+
+ res = []
+ for i: number in len(diclist)->range()
+ # New ctags has the "typeref" field. Patched version has "typename".
+ if diclist[i]->has_key('typename')
+ res = res->extend(diclist[i]['typename']->StructMembers(items[1 :], true))
+ elseif diclist[i]->has_key('typeref')
+ res = res->extend(diclist[i]['typeref']->StructMembers(items[1 :], true))
+ 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'
+ var line: string = diclist[i]['cmd']
+ if line[: 1] == '/^'
+ var col: number = line->charidx(match(line, '\<' .. items[0] .. '\>'))
+ res = res->extend(line[2 : col - 1]->Nextitem(items[1 :], 0, true))
+ endif
+ endif
+ endfor
+ endif
+
+ if len(res) == 0 && items[0]->searchdecl(true) == 0
+ # Found, now figure out the type.
+ # TODO: join previous line if it makes sense
+ var line: string = getline('.')
+ var col: number = charcol('.')
+ res = line[: col - 1]->Nextitem(items[1 :], 0, true)
+ endif
+
+ # If the last item(s) are [...] they need to be added to the matches.
+ var last: number = len(items) - 1
+ var brackets: string = ''
+ while last >= 0
+ if items[last][0] != '['
+ break
+ endif
+ brackets = items[last] .. brackets
+ --last
+ endwhile
+
+ return res->map((_, v: dict<any>): dict<string> => Tagline2item(v, brackets))
+enddef
+
+def GetAddition( # {{{1
+ line: string,
+ match: string,
+ memarg: list<dict<any>>,
+ bracket: bool): string
+ # Guess if the item is an array.
+ if bracket && match(line, match .. '\s*\[') > 0
+ return '['
+ endif
+
+ # Check if the item has members.
+ if SearchMembers(memarg, [''], false)->len() > 0
+ # If there is a '*' before the name use "->".
+ if match(line, '\*[ \t(]*' .. match .. '\>') > 0
+ return '->'
+ else
+ return '.'
+ endif
+ endif
+ return ''
+enddef
+
+def Tag2item(val: dict<any>): dict<any> # {{{1
+# 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 GetAddition() uses.
+ var res: dict<any> = {match: val['name']}
+
+ res['extra'] = Tagcmd2extra(val['cmd'], val['name'], val['filename'])
+
+ var s: string = Dict2info(val)
+ if s != ''
+ res['info'] = s
+ endif
+
+ res['tagline'] = ''
+ if val->has_key('kind')
+ var kind: string = val['kind']
+ res['kind'] = kind
+ if kind == 'v'
+ res['tagline'] = "\t" .. val['cmd']
+ res['dict'] = val
+ elseif kind == 'f'
+ res['match'] = val['name'] .. '('
+ endif
+ endif
+
+ return res
+enddef
+
+def Dict2info(dict: dict<any>): string # {{{1
+# Use all the items in dictionary for the "info" entry.
+ var info: string = ''
+ for k: string in dict->keys()->sort()
+ info ..= k .. repeat(' ', 10 - strlen(k))
+ if k == 'cmd'
+ info ..= dict['cmd']
+ ->matchstr('/^\s*\zs.*\ze$/')
+ ->substitute('\\\(.\)', '\1', 'g')
+ else
+ var dictk: any = dict[k]
+ if typename(dictk) != 'string'
+ info ..= dictk->string()
+ else
+ info ..= dictk
+ endif
+ endif
+ info ..= "\n"
+ endfor
+ return info
+enddef
+
+def ParseTagline(line: string): dict<any> # {{{1
+# Parse a tag line and return a dictionary with items like taglist()
+ var l: list<string> = split(line, "\t")
+ var d: dict<any>
+ if len(l) >= 3
+ d['name'] = l[0]
+ d['filename'] = l[1]
+ d['cmd'] = l[2]
+ var n: number = 2
+ if l[2] =~ '^/'
+ # Find end of cmd, it may contain Tabs.
+ while n < len(l) && l[n] !~ '/;"$'
+ ++n
+ d['cmd'] ..= ' ' .. l[n]
+ endwhile
+ endif
+ for i: number in range(n + 1, len(l) - 1)
+ if l[i] == 'file:'
+ d['static'] = 1
+ elseif l[i] !~ ':'
+ d['kind'] = l[i]
+ else
+ d[l[i]->matchstr('[^:]*')] = l[i]->matchstr(':\zs.*')
+ endif
+ endfor
+ endif
+
+ return d
+enddef
+
+def Tagline2item(val: dict<any>, brackets: string): dict<string> # {{{1
+# 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.
+ var line: string = val['tagline']
+ var add: string = GetAddition(line, val['match'], [val], brackets == '')
+ var res: dict<string> = {word: val['match'] .. brackets .. add}
+
+ if val->has_key('info')
+ # Use info from Tag2item().
+ res['info'] = val['info']
+ else
+ # Parse the tag line and add each part to the "info" entry.
+ var s: string = ParseTagline(line)->Dict2info()
+ if s != ''
+ res['info'] = s
+ endif
+ endif
+
+ if val->has_key('kind')
+ res['kind'] = val['kind']
+ elseif add == '('
+ res['kind'] = 'f'
+ else
+ var s: string = line->matchstr('\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
+ if s != ''
+ res['kind'] = s
+ endif
+ endif
+
+ if val->has_key('extra')
+ res['menu'] = val['extra']
+ return res
+ endif
+
+ # Isolate the command after the tag and filename.
+ var s: string = line->matchstr('[^\t]*\t[^\t]*\t\zs\(/^.*$/\|[^\t]*\)\ze\(;"\t\|\t\|$\)')
+ if s != ''
+ res['menu'] = s->Tagcmd2extra(val['match'], line->matchstr('[^\t]*\t\zs[^\t]*\ze\t'))
+ endif
+ return res
+enddef
+
+def Tagcmd2extra( # {{{1
+ cmd: string,
+ name: string,
+ fname: string): string
+# Turn a command from a tag line to something that is useful in the menu
+ var x: string
+ if cmd =~ '^/^'
+ # The command is a search command, useful to see what it is.
+ x = cmd
+ ->matchstr('^/^\s*\zs.*\ze$/')
+ ->substitute('\<' .. name .. '\>', '@@', '')
+ ->substitute('\\\(.\)', '\1', 'g')
+ .. ' - ' .. fname
+ elseif cmd =~ '^\d*$'
+ # The command is a line number, the file name is more useful.
+ x = fname .. ' - ' .. cmd
+ else
+ # Not recognized, use command and file name.
+ x = cmd .. ' - ' .. fname
+ endif
+ return x
+enddef
+
+def Nextitem( # {{{1
+ lead: string,
+ items: list<string>,
+ depth: number,
+ all: bool): list<dict<string>>
+# 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.
+
+ # Use the text up to the variable name and split it in tokens.
+ var tokens: list<string> = split(lead, '\s\+\|\<')
+
+ # Try to recognize the type of the variable. This is rough guessing...
+ var res: list<dict<string>>
+ for tidx: number in len(tokens)->range()
+
+ # 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)
+ res = StructMembers(tokens[tidx] .. ':' .. tokens[tidx + 1], items, all)
+ break
+ endif
+
+ # TODO: add more reserved words
+ if ['int', 'short', 'char', 'float',
+ 'double', 'static', 'unsigned', 'extern']->index(tokens[tidx]) >= 0
+ continue
+ endif
+
+ # Use the tags file to find out if this is a typedef.
+ var diclist: list<dict<any>> = taglist('^' .. tokens[tidx] .. '$')
+ for tagidx: number in len(diclist)->range()
+ var item: dict<any> = diclist[tagidx]
+
+ # New ctags has the "typeref" field. Patched version has "typename".
+ if item->has_key('typeref')
+ res = res->extend(item['typeref']->StructMembers(items, all))
+ continue
+ endif
+ if item->has_key('typename')
+ res = res->extend(item['typename']->StructMembers(items, all))
+ continue
+ endif
+
+ # Only handle typedefs here.
+ if item['kind'] != 't'
+ continue
+ endif
+
+ # Skip matches local to another file.
+ if item->has_key('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.
+ var cmd: string = item['cmd']
+ var ei: number = cmd->charidx(matchend(cmd, 'typedef\s\+'))
+ if ei > 1
+ var cmdtokens: list<string> = cmd[ei :]->split('\s\+\|\<')
+ if len(cmdtokens) > 1
+ if cmdtokens[0] == 'struct'
+ || cmdtokens[0] == 'union'
+ || cmdtokens[0] == 'class'
+ var name: string = ''
+ # Use the first identifier after the "struct" or "union"
+ for ti: number in (len(cmdtokens) - 1)->range()
+ if cmdtokens[ti] =~ '^\w'
+ name = cmdtokens[ti]
+ break
+ endif
+ endfor
+ if name != ''
+ res = res->extend(StructMembers(cmdtokens[0] .. ':' .. name, items, all))
+ endif
+ elseif depth < 10
+ # Could be "typedef other_T some_T".
+ res = res->extend(cmdtokens[0]->Nextitem(items, depth + 1, all))
+ endif
+ endif
+ endif
+ endfor
+ if len(res) > 0
+ break
+ endif
+ endfor
+
+ return res
+enddef
+
+def StructMembers( # {{{1
+ atypename: string,
+ items: list<string>,
+ all: bool): list<dict<string>>
+
+# 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 true find all, otherwise just return 1 if there is any member.
+
+ # Todo: What about local structures?
+ var fnames: string = tagfiles()
+ ->map((_, v: string) => escape(v, ' \#%'))
+ ->join()
+ if fnames == ''
+ return []
+ endif
+
+ var typename: string = atypename
+ var qflist: list<dict<any>>
+ var cached: number = 0
+ var n: string
+ if !all
+ n = '1' # stop at first found match
+ if grepCache->has_key(typename)
+ qflist = grepCache[typename]
+ cached = 1
+ endif
+ else
+ n = ''
+ endif
+ if !cached
+ while 1
+ execute 'silent! keepjumps noautocmd '
+ .. n .. 'vimgrep ' .. '/\t' .. typename .. '\(\t\|$\)/j '
+ .. fnames
+
+ qflist = getqflist()
+ if len(qflist) > 0 || match(typename, '::') < 0
+ break
+ endif
+ # No match for "struct:context::name", remove "context::" and try again.
+ typename = typename->substitute(':[^:]*::', ':', '')
+ endwhile
+
+ if !all
+ # Store the result to be able to use it again later.
+ grepCache[typename] = qflist
+ endif
+ endif
+
+ # Skip over [...] items
+ var idx: number = 0
+ var target: string
+ while 1
+ if idx >= len(items)
+ target = '' # No further items, matching all members
+ break
+ endif
+ if items[idx][0] != '['
+ target = items[idx]
+ break
+ endif
+ ++idx
+ endwhile
+ # Put matching members in matches[].
+ var matches: list<dict<string>>
+ for l: dict<any> in qflist
+ var memb: string = l['text']->matchstr('[^\t]*')
+ if memb =~ '^' .. target
+ # Skip matches local to another file.
+ if match(l['text'], "\tfile:") < 0
+ || bufnr('%') == l['text']->matchstr('\t\zs[^\t]*')->bufnr()
+ var item: dict<string> = {match: memb, tagline: l['text']}
+
+ # Add the kind of item.
+ var s: string = l['text']->matchstr('\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
+ if s != ''
+ item['kind'] = s
+ if s == 'f'
+ item['match'] = memb .. '('
+ endif
+ endif
+
+ matches->add(item)
+ endif
+ endif
+ endfor
+
+ if len(matches) > 0
+ # Skip over next [...] items
+ ++idx
+ while 1
+ if idx >= len(items)
+ return matches # No further items, return the result.
+ endif
+ if items[idx][0] != '['
+ break
+ endif
+ ++idx
+ endwhile
+
+ # More items following. For each of the possible members find the
+ # matching following members.
+ return SearchMembers(matches, items[idx :], all)
+ endif
+
+ # Failed to find anything.
+ return []
+enddef
+
+def SearchMembers( # {{{1
+ matches: list<dict<any>>,
+ items: list<string>,
+ all: bool): list<dict<string>>
+
+# For matching members, find matches for following items.
+# When "all" is true find all, otherwise just return 1 if there is any member.
+ var res: list<dict<string>>
+ for i: number in len(matches)->range()
+ var typename: string = ''
+ var line: string
+ if matches[i]->has_key('dict')
+ if matches[i]['dict']->has_key('typename')
+ typename = matches[i]['dict']['typename']
+ elseif matches[i]['dict']->has_key('typeref')
+ typename = matches[i]['dict']['typeref']
+ endif
+ line = "\t" .. matches[i]['dict']['cmd']
+ else
+ line = matches[i]['tagline']
+ var eb: number = matchend(line, '\ttypename:')
+ var e: number = charidx(line, eb)
+ if e < 0
+ eb = matchend(line, '\ttyperef:')
+ e = charidx(line, eb)
+ endif
+ if e > 0
+ # Use typename field
+ typename = line->matchstr('[^\t]*', eb)
+ endif
+ endif
+
+ if typename != ''
+ res = res->extend(StructMembers(typename, items, all))
+ else
+ # Use the search command (the declaration itself).
+ var sb: number = line->match('\t\zs/^')
+ var s: number = charidx(line, sb)
+ if s > 0
+ var e: number = line
+ ->charidx(match(line, '\<' .. matches[i]['match'] .. '\>', sb))
+ if e > 0
+ res = res->extend(line[s : e - 1]->Nextitem(items, 0, all))
+ endif
+ endif
+ endif
+ if !all && len(res) > 0
+ break
+ endif
+ endfor
+ return res
+enddef
+#}}}1
+
+# vim: noet sw=2 sts=2
diff --git a/runtime/autoload/clojurecomplete.vim b/runtime/autoload/clojurecomplete.vim
new file mode 100644
index 0000000..02262a6
--- /dev/null
+++ b/runtime/autoload/clojurecomplete.vim
@@ -0,0 +1,23 @@
+" Vim completion script
+" Language: Clojure
+" Maintainer: Alex Vear <alex@vear.uk>
+" Former Maintainers: Sung Pae <self@sungpae.com>
+" URL: https://github.com/clojure-vim/clojure.vim
+" License: Vim (see :h license)
+" Last Change: 2022-03-24
+
+" -*- COMPLETION WORDS -*-
+" Generated from https://github.com/clojure-vim/clojure.vim/blob/fd280e33e84c88e97860930557dba3ff80b1a82d/clj/src/vim_clojure_static/generate.clj
+" Clojure version 1.11.0
+let s:words = ["&","*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","NaN?","PrintWriter-on","StackTraceElement->vec","Throwable->map","abs","accessor","aclone","add-classpath","add-tap","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","case*","cast","cat","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","deftype*","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-cause","ex-data","ex-info","ex-message","extend","extend-protocol","extend-type","extenders","extends?","false","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn*","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","infinite?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iteration","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let*","letfn","letfn*","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop*","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","new","newline","next","nfirst","nil","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","parse-boolean","parse-double","parse-long","parse-uuid","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","quote","rand","rand-int","rand-nth","random-sample","random-uuid","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read+string","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","reify*","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-tap","remove-watch","repeat","repeatedly","replace","replicate","require","requiring-resolve","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq-to-map-for-destructuring","seq?","seqable?","seque","sequence","sequential?","set","set!","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","tap>","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-keys","update-proxy","update-vals","uri?","use","uuid?","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"]
+
+" Simple word completion for special forms and public vars in clojure.core
+function! clojurecomplete#Complete(findstart, base)
+ if a:findstart
+ return searchpos('\<', 'bnW', line('.'))[1] - 1
+ else
+ return { 'words': filter(copy(s:words), 'v:val =~# "\\V\\^' . a:base . '"') }
+ endif
+endfunction
+
+" vim:sts=8:sw=8:ts=8:noet
diff --git a/runtime/autoload/context.vim b/runtime/autoload/context.vim
new file mode 100644
index 0000000..fc59309
--- /dev/null
+++ b/runtime/autoload/context.vim
@@ -0,0 +1,100 @@
+vim9script
+
+# Language: ConTeXt typesetting engine
+# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
+# Former Maintainers: Nikolai Weibull <now@bitwi.se>
+# Latest Revision: 2022 Sep 19
+
+# Typesetting {{{
+import autoload './typeset.vim'
+
+export def ConTeXtCmd(path: string): list<string>
+ var cmd = ['mtxrun', '--script', 'context', '--nonstopmode', '--autogenerate']
+ if !empty(get(g:, 'context_extra_options', ''))
+ cmd += g:context_extra_options
+ endif
+ cmd->add(path)
+ return cmd
+enddef
+
+export def Typeset(bufname: string, env = {}, Cmd = ConTeXtCmd): bool
+ return typeset.TypesetBuffer(bufname, Cmd, env, 'ConTeXt')
+enddef
+
+export def JobStatus()
+ typeset.JobStatus('ConTeXt')
+enddef
+
+export def StopJobs()
+ typeset.StopJobs('ConTeXt')
+enddef
+
+export def Log(bufname: string)
+ execute 'edit' typeset.LogPath(bufname)
+enddef
+# }}}
+
+# Completion {{{
+def BinarySearch(base: string, keywords: list<string>): list<string>
+ const pat = '^' .. base
+ const len = len(keywords)
+ var res = []
+ var lft = 0
+ var rgt = len
+
+ # Find the leftmost index matching base
+ while lft < rgt
+ var i = (lft + rgt) / 2
+ if keywords[i] < base
+ lft = i + 1
+ else
+ rgt = i
+ endif
+ endwhile
+
+ while lft < len && keywords[lft] =~ pat
+ add(res, keywords[lft])
+ lft += 1
+ endwhile
+
+ return res
+enddef
+
+var isMetaPostBlock = false
+
+var MP_KEYWORDS: list<string> = []
+var CTX_KEYWORDS: list<string> = []
+
+# Complete only MetaPost keywords in MetaPost blocks, and complete only
+# ConTeXt keywords otherwise.
+export def Complete(findstart: number, base: string): any
+ if findstart == 1
+ if len(synstack(line("."), 1)) > 0 && synIDattr(synstack(line("."), 1)[0], "name") ==# 'contextMPGraphic'
+ isMetaPostBlock = true
+ return match(getline('.'), '\S\+\%' .. col('.') .. 'c')
+ endif
+
+ # Complete only \commands starting with a backslash
+ isMetaPostBlock = false
+ var pos = match(getline('.'), '\\\zs\S\+\%' .. col('.') .. 'c')
+ return (pos == -1) ? -3 : pos
+ endif
+
+ if isMetaPostBlock
+ if empty(MP_KEYWORDS)
+ MP_KEYWORDS = sort(syntaxcomplete#OmniSyntaxList(['mf\w\+', 'mp\w\+']))
+ endif
+ return BinarySearch(base, MP_KEYWORDS)
+ endif
+
+ if empty(CTX_KEYWORDS)
+ CTX_KEYWORDS = sort(syntaxcomplete#OmniSyntaxList([
+ 'context\w\+', 'texAleph', 'texEtex', 'texLuatex', 'texOmega',
+ 'texPdftex', 'texTex', 'texXeTeX'
+ ]))
+ endif
+ return BinarySearch(base, CTX_KEYWORDS)
+enddef
+# }}}
+
+# vim: sw=2 fdm=marker
diff --git a/runtime/autoload/contextcomplete.vim b/runtime/autoload/contextcomplete.vim
new file mode 100644
index 0000000..5b93bb0
--- /dev/null
+++ b/runtime/autoload/contextcomplete.vim
@@ -0,0 +1,25 @@
+" Language: ConTeXt typesetting engine
+" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
+" Latest Revision: 2016 Oct 15
+
+let s:keepcpo= &cpo
+set cpo&vim
+
+" Complete keywords in MetaPost blocks
+function! contextcomplete#Complete(findstart, base)
+ if a:findstart == 1
+ if len(synstack(line('.'), 1)) > 0 &&
+ \ synIDattr(synstack(line('.'), 1)[0], "name") ==# 'contextMPGraphic'
+ return syntaxcomplete#Complete(a:findstart, a:base)
+ else
+ return -3
+ endif
+ else
+ return syntaxcomplete#Complete(a:findstart, a:base)
+ endif
+endfunction
+
+let &cpo = s:keepcpo
+unlet s:keepcpo
+
+" vim: sw=2 fdm=marker
diff --git a/runtime/autoload/csscomplete.vim b/runtime/autoload/csscomplete.vim
new file mode 100644
index 0000000..4b673ac
--- /dev/null
+++ b/runtime/autoload/csscomplete.vim
@@ -0,0 +1,742 @@
+" Vim completion script
+" Language: CSS
+" Based on MDN CSS Reference at 2016 Jan <https://developer.mozilla.org/en-US/docs/Web/CSS/Reference>
+" plus CSS Speech Module <http://www.w3.org/TR/css3-speech/>
+" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
+" Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl )
+" Last Change: 2021 Sep 21
+
+let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom")
+
+
+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 = getline('.')
+ let compl_begin = col('.') - 2
+ let b:after = line[compl_begin:]
+ let line = b:compl_context
+ unlet! b:compl_context
+ else
+ let line = a:base
+ let b:after = ''
+ 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*:[^:]\{-}$'))
+
+ let wide_keywords = ["initial", "inherit", "unset"]
+ let color_values = ["transparent", "rgb(", "rgba(", "hsl(", "hsla(", "#"]
+ let border_style_values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
+ let border_width_values = ["thin", "thick", "medium"]
+ let list_style_type_values = ["decimal", "decimal-leading-zero", "arabic-indic", "armenian", "upper-armenian", "lower-armenian", "bengali", "cambodian", "khmer", "cjk-decimal", "devanagari", "georgian", "gujarati", "gurmukhi", "hebrew", "kannada", "lao", "malayalam", "mongolian", "myanmar", "oriya", "persian", "lower-roman", "upper-roman", "tamil", "telugu", "thai", "tibetan", "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", "cjk-earthly-branch", "cjk-heavenly-stem", "lower-greek", "hiragana", "hiragana-iroha", "katakana", "katakana-iroha", "disc", "circle", "square", "disclosure-open", "disclosure-closed"]
+ let timing_functions = ["cubic-bezier(", "steps(", "linear", "ease", "ease-in", "ease-in-out", "ease-out", "step-start", "step-end"]
+
+ if prop == 'all'
+ let values = []
+ elseif prop == 'additive-symbols'
+ let values = []
+ elseif prop == 'align-content'
+ let values = ["flex-start", "flex-end", "center", "space-between", "space-around", "stretch"]
+ elseif prop == 'align-items'
+ let values = ["flex-start", "flex-end", "center", "baseline", "stretch"]
+ elseif prop == 'align-self'
+ let values = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"]
+ elseif prop == 'animation'
+ let values = timing_functions + ["normal", "reverse", "alternate", "alternate-reverse"] + ["none", "forwards", "backwards", "both"] + ["running", "paused"]
+ elseif prop == 'animation-delay'
+ let values = []
+ elseif prop == 'animation-direction'
+ let values = ["normal", "reverse", "alternate", "alternate-reverse"]
+ elseif prop == 'animation-duration'
+ let values = []
+ elseif prop == 'animation-fill-mode'
+ let values = ["none", "forwards", "backwards", "both"]
+ elseif prop == 'animation-iteration-count'
+ let values = []
+ elseif prop == 'animation-name'
+ let values = []
+ elseif prop == 'animation-play-state'
+ let values = ["running", "paused"]
+ elseif prop == 'animation-timing-function'
+ let values = timing_functions
+ elseif prop == 'background-attachment'
+ let values = ["scroll", "fixed"]
+ elseif prop == 'background-color'
+ let values = color_values
+ 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-size'
+ let values = ["auto", "contain", "cover"]
+ elseif prop == 'background'
+ let values = ["scroll", "fixed"] + color_values + ["url(", "none"] + ["top", "center", "bottom", "left", "right"] + ["repeat", "repeat-x", "repeat-y", "no-repeat"] + ["auto", "contain", "cover"]
+ elseif prop =~ 'border\%(-top\|-right\|-bottom\|-left\|-block-start\|-block-end\)\?$'
+ let vals = matchstr(line, '.*:\s*\zs.*')
+ if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
+ let values = border_width_values
+ elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
+ let values = border_style_values
+ elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
+ let values = color_values
+ else
+ return []
+ endif
+ elseif prop =~ 'border-\%(top\|right\|bottom\|left\|block-start\|block-end\)-color'
+ let values = color_values
+ elseif prop =~ 'border-\%(top\|right\|bottom\|left\|block-start\|block-end\)-style'
+ let values = border_style_values
+ elseif prop =~ 'border-\%(top\|right\|bottom\|left\|block-start\|block-end\)-width'
+ let values = border_width_values
+ elseif prop == 'border-color'
+ let values = color_values
+ elseif prop == 'border-style'
+ let values = border_style_values
+ elseif prop == 'border-width'
+ let values = border_width_values
+ elseif prop == 'bottom'
+ let values = ["auto"]
+ elseif prop == 'box-decoration-break'
+ let values = ["slice", "clone"]
+ elseif prop == 'box-shadow'
+ let values = ["inset"]
+ elseif prop == 'box-sizing'
+ let values = ["border-box", "content-box"]
+ elseif prop =~ 'break-\%(before\|after\)'
+ let values = ["auto", "always", "avoid", "left", "right", "page", "column", "region", "recto", "verso", "avoid-page", "avoid-column", "avoid-region"]
+ elseif prop == 'break-inside'
+ let values = ["auto", "avoid", "avoid-page", "avoid-column", "avoid-region"]
+ 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 == 'clip-path'
+ let values = ["fill-box", "stroke-box", "view-box", "none"]
+ elseif prop == 'color'
+ let values = color_values
+ elseif prop == 'columns'
+ let values = []
+ elseif prop == 'column-count'
+ let values = ['auto']
+ elseif prop == 'column-fill'
+ let values = ['auto', 'balance']
+ elseif prop == 'column-rule-color'
+ let values = color_values
+ elseif prop == 'column-rule-style'
+ let values = border_style_values
+ elseif prop == 'column-rule-width'
+ let values = border_width_values
+ elseif prop == 'column-rule'
+ let vals = matchstr(line, '.*:\s*\zs.*')
+ if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
+ let values = border_width_values
+ elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
+ let values = border_style_values
+ elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
+ let values = color_values
+ else
+ return []
+ endif
+ elseif prop == 'column-span'
+ let values = ["none", "all"]
+ elseif prop == 'column-width'
+ let values = ["auto"]
+ 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\|-before\)\=$'
+ let values = ["url("]
+ 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", "inline-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", "flex", "inline-flex", "grid", "inline-grid", "ruby", "ruby-base", "ruby-text", "ruby-base-container", "ruby-text-container", "contents"]
+ elseif prop == 'elevation'
+ let values = ["below", "level", "above", "higher", "lower"]
+ elseif prop == 'empty-cells'
+ let values = ["show", "hide"]
+ elseif prop == 'fallback'
+ let values = list_style_type_values
+ elseif prop == 'filter'
+ let values = ["blur(", "brightness(", "contrast(", "drop-shadow(", "grayscale(", "hue-rotate(", "invert(", "opacity(", "sepia(", "saturate("]
+ elseif prop == 'flex-basis'
+ let values = ["auto", "content"]
+ elseif prop == 'flex-flow'
+ let values = ["row", "row-reverse", "column", "column-reverse", "nowrap", "wrap", "wrap-reverse"]
+ elseif prop == 'flex-grow'
+ let values = []
+ elseif prop == 'flex-shrink'
+ let values = []
+ elseif prop == 'flex-wrap'
+ let values = ["nowrap", "wrap", "wrap-reverse"]
+ elseif prop == 'flex'
+ let values = ["nowrap", "wrap", "wrap-reverse"] + ["row", "row-reverse", "column", "column-reverse", "nowrap", "wrap", "wrap-reverse"] + ["auto", "content"]
+ elseif prop == 'float'
+ let values = ["left", "right", "none"]
+ elseif prop == 'font-family'
+ let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
+ elseif prop == 'font-feature-settings'
+ let values = ["normal", '"aalt"', '"abvf"', '"abvm"', '"abvs"', '"afrc"', '"akhn"', '"blwf"', '"blwm"', '"blws"', '"calt"', '"case"', '"ccmp"', '"cfar"', '"cjct"', '"clig"', '"cpct"', '"cpsp"', '"cswh"', '"curs"', '"cv', '"c2pc"', '"c2sc"', '"dist"', '"dlig"', '"dnom"', '"dtls"', '"expt"', '"falt"', '"fin2"', '"fin3"', '"fina"', '"flac"', '"frac"', '"fwid"', '"half"', '"haln"', '"halt"', '"hist"', '"hkna"', '"hlig"', '"hngl"', '"hojo"', '"hwid"', '"init"', '"isol"', '"ital"', '"jalt"', '"jp78"', '"jp83"', '"jp90"', '"jp04"', '"kern"', '"lfbd"', '"liga"', '"ljmo"', '"lnum"', '"locl"', '"ltra"', '"ltrm"', '"mark"', '"med2"', '"medi"', '"mgrk"', '"mkmk"', '"mset"', '"nalt"', '"nlck"', '"nukt"', '"numr"', '"onum"', '"opbd"', '"ordn"', '"ornm"', '"palt"', '"pcap"', '"pkna"', '"pnum"', '"pref"', '"pres"', '"pstf"', '"psts"', '"pwid"', '"qwid"', '"rand"', '"rclt"', '"rkrf"', '"rlig"', '"rphf"', '"rtbd"', '"rtla"', '"rtlm"', '"ruby"', '"salt"', '"sinf"', '"size"', '"smcp"', '"smpl"', '"ss01"', '"ss02"', '"ss03"', '"ss04"', '"ss05"', '"ss06"', '"ss07"', '"ss08"', '"ss09"', '"ss10"', '"ss11"', '"ss12"', '"ss13"', '"ss14"', '"ss15"', '"ss16"', '"ss17"', '"ss18"', '"ss19"', '"ss20"', '"ssty"', '"stch"', '"subs"', '"sups"', '"swsh"', '"titl"', '"tjmo"', '"tnam"', '"tnum"', '"trad"', '"twid"', '"unic"', '"valt"', '"vatu"', '"vert"', '"vhal"', '"vjmo"', '"vkna"', '"vkrn"', '"vpal"', '"vrt2"', '"zero"']
+ elseif prop == 'font-kerning'
+ let values = ["auto", "normal", "none"]
+ elseif prop == 'font-language-override'
+ let values = ["normal"]
+ elseif prop == 'font-size'
+ let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
+ elseif prop == 'font-size-adjust'
+ let values = []
+ elseif prop == 'font-stretch'
+ let values = ["normal", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"]
+ elseif prop == 'font-style'
+ let values = ["normal", "italic", "oblique"]
+ elseif prop == 'font-synthesis'
+ let values = ["none", "weight", "style"]
+ elseif prop == 'font-variant-alternates'
+ let values = ["normal", "historical-forms", "stylistic(", "styleset(", "character-variant(", "swash(", "ornaments(", "annotation("]
+ elseif prop == 'font-variant-caps'
+ let values = ["normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps"]
+ elseif prop == 'font-variant-asian'
+ let values = ["normal", "ruby", "jis78", "jis83", "jis90", "jis04", "simplified", "traditional"]
+ elseif prop == 'font-variant-ligatures'
+ let values = ["normal", "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual"]
+ elseif prop == 'font-variant-numeric'
+ let values = ["normal", "ordinal", "slashed-zero", "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", "stacked-fractions"]
+ elseif prop == 'font-variant-position'
+ let values = ["normal", "sub", "super"]
+ elseif prop == 'font-variant'
+ let values = ["normal", "historical-forms", "stylistic(", "styleset(", "character-variant(", "swash(", "ornaments(", "annotation("] + ["small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps"] + ["ruby", "jis78", "jis83", "jis90", "jis04", "simplified", "traditional"] + ["none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures", "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual"] + ["ordinal", "slashed-zero", "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions", "stacked-fractions"] + ["sub", "super"]
+ 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", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"]
+ elseif prop =~ '^\%(left\|right\)$'
+ let values = ["auto"]
+ elseif prop == 'image-rendering'
+ let values = ["auto", "crisp-edges", "pixelated"]
+ elseif prop == 'image-orientation'
+ let values = ["from-image", "flip"]
+ elseif prop == 'ime-mode'
+ let values = ["auto", "normal", "active", "inactive", "disabled"]
+ elseif prop == 'inline-size'
+ let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"]
+ elseif prop == 'isolation'
+ let values = ["auto", "isolate"]
+ elseif prop == 'justify-content'
+ let values = ["flex-start", "flex-end", "center", "space-between", "space-around"]
+ elseif prop == 'letter-spacing'
+ let values = ["normal"]
+ elseif prop == 'line-break'
+ let values = ["auto", "loose", "normal", "strict"]
+ 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 = list_style_type_values
+ elseif prop == 'list-style'
+ let values = list_style_type_values + ["inside", "outside"] + ["url(", "none"]
+ elseif prop == 'margin'
+ let values = ["auto"]
+ elseif prop =~ 'margin-\%(right\|left\|top\|bottom\|block-start\|block-end\|inline-start\|inline-end\)$'
+ let values = ["auto"]
+ elseif prop == 'marks'
+ let values = ["crop", "cross", "none"]
+ elseif prop == 'mask'
+ let values = ["url("]
+ elseif prop == 'mask-type'
+ let values = ["luminance", "alpha"]
+ elseif prop == '\%(max\|min\)-\%(block\|inline\)-size'
+ let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"]
+ elseif prop == '\%(max\|min\)-\%(height\|width\)'
+ let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"]
+ elseif prop == '\%(max\|min\)-zoom'
+ let values = ["auto"]
+ elseif prop == 'mix-blend-mode'
+ let values = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"]
+ elseif prop == 'opacity'
+ let values = []
+ elseif prop == 'orientation'
+ let values = ["auto", "portrait", "landscape"]
+ elseif prop == 'orphans'
+ let values = []
+ elseif prop == 'outline-offset'
+ let values = []
+ elseif prop == 'outline-color'
+ let values = color_values
+ 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 = color_values
+ 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-wrap'
+ let values = ["normal", "break-word"]
+ elseif prop =~ 'overflow\%(-x\|-y\)\='
+ let values = ["visible", "hidden", "scroll", "auto"]
+ elseif prop == 'pad'
+ let values = []
+ elseif prop == 'padding'
+ let values = []
+ elseif prop =~ 'padding-\%(top\|right\|bottom\|left\|inline-start\|inline-end\|block-start\|block-end\)$'
+ let values = []
+ elseif prop =~ 'page-break-\%(after\|before\)$'
+ let values = ["auto", "always", "avoid", "left", "right", "recto", "verso"]
+ elseif prop == 'page-break-inside'
+ let values = ["auto", "avoid"]
+ elseif prop =~ 'pause\%(-after\|-before\)\=$'
+ let values = ["none", "x-weak", "weak", "medium", "strong", "x-strong"]
+ elseif prop == 'perspective'
+ let values = ["none"]
+ elseif prop == 'perspective-origin'
+ let values = ["top", "bottom", "left", "center", " right"]
+ elseif prop == 'pointer-events'
+ let values = ["auto", "none", "visiblePainted", "visibleFill", "visibleStroke", "visible", "painted", "fill", "stroke", "all"]
+ elseif prop == 'position'
+ let values = ["static", "relative", "absolute", "fixed", "sticky"]
+ elseif prop == 'prefix'
+ let values = []
+ elseif prop == 'quotes'
+ let values = ["none"]
+ elseif prop == 'range'
+ let values = ["auto", "infinite"]
+ elseif prop == 'resize'
+ let values = ["none", "both", "horizontal", "vertical"]
+ elseif prop =~ 'rest\%(-after\|-before\)\=$'
+ let values = ["none", "x-weak", "weak", "medium", "strong", "x-strong"]
+ elseif prop == 'ruby-align'
+ let values = ["start", "center", "space-between", "space-around"]
+ elseif prop == 'ruby-merge'
+ let values = ["separate", "collapse", "auto"]
+ elseif prop == 'ruby-position'
+ let values = ["over", "under", "inter-character"]
+ elseif prop == 'scroll-behavior'
+ let values = ["auto", "smooth"]
+ elseif prop == 'scroll-snap-coordinate'
+ let values = ["none"]
+ elseif prop == 'scroll-snap-destination'
+ return []
+ elseif prop == 'scroll-snap-points-\%(x\|y\)$'
+ let values = ["none", "repeat("]
+ elseif prop == 'scroll-snap-type\%(-x\|-y\)\=$'
+ let values = ["none", "mandatory", "proximity"]
+ elseif prop == 'shape-image-threshold'
+ let values = []
+ elseif prop == 'shape-margin'
+ let values = []
+ elseif prop == 'shape-outside'
+ let values = ["margin-box", "border-box", "padding-box", "content-box", 'inset(', 'circle(', 'ellipse(', 'polygon(', 'url(']
+ elseif prop == 'speak'
+ let values = ["auto", "none", "normal"]
+ elseif prop == 'speak-as'
+ let values = ["auto", "normal", "spell-out", "digits"]
+ elseif prop == 'src'
+ let values = ["url("]
+ elseif prop == 'suffix'
+ let values = []
+ elseif prop == 'symbols'
+ let values = []
+ elseif prop == 'system'
+ let vals = matchstr(line, '.*:\s*\zs.*')
+ if vals =~ '^extends'
+ let values = list_style_type_values
+ else
+ let values = ["cyclic", "numeric", "alphabetic", "symbolic", "additive", "fixed", "extends"]
+ endif
+ elseif prop == 'table-layout'
+ let values = ["auto", "fixed"]
+ elseif prop == 'tab-size'
+ let values = []
+ elseif prop == 'text-align'
+ let values = ["start", "end", "left", "right", "center", "justify", "match-parent"]
+ elseif prop == 'text-align-last'
+ let values = ["auto", "start", "end", "left", "right", "center", "justify"]
+ elseif prop == 'text-combine-upright'
+ let values = ["none", "all", "digits"]
+ elseif prop == 'text-decoration-line'
+ let values = ["none", "underline", "overline", "line-through", "blink"]
+ elseif prop == 'text-decoration-color'
+ let values = color_values
+ elseif prop == 'text-decoration-style'
+ let values = ["solid", "double", "dotted", "dashed", "wavy"]
+ elseif prop == 'text-decoration'
+ let values = ["none", "underline", "overline", "line-through", "blink"] + ["solid", "double", "dotted", "dashed", "wavy"] + color_values
+ elseif prop == 'text-emphasis-color'
+ let values = color_values
+ elseif prop == 'text-emphasis-position'
+ let values = ["over", "under", "left", "right"]
+ elseif prop == 'text-emphasis-style'
+ let values = ["none", "filled", "open", "dot", "circle", "double-circle", "triangle", "sesame"]
+ elseif prop == 'text-emphasis'
+ let values = color_values + ["over", "under", "left", "right"] + ["none", "filled", "open", "dot", "circle", "double-circle", "triangle", "sesame"]
+ elseif prop == 'text-indent'
+ let values = ["hanging", "each-line"]
+ elseif prop == 'text-orientation'
+ let values = ["mixed", "upright", "sideways", "sideways-right", "use-glyph-orientation"]
+ elseif prop == 'text-overflow'
+ let values = ["clip", "ellipsis"]
+ elseif prop == 'text-rendering'
+ let values = ["auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision"]
+ elseif prop == 'text-shadow'
+ let values = color_values
+ elseif prop == 'text-transform'
+ let values = ["capitalize", "uppercase", "lowercase", "full-width", "none"]
+ elseif prop == 'text-underline-position'
+ let values = ["auto", "under", "left", "right"]
+ elseif prop == 'touch-action'
+ let values = ["auto", "none", "pan-x", "pan-y", "manipulation", "pan-left", "pan-right", "pan-top", "pan-down"]
+ elseif prop == 'transform'
+ let values = ["matrix(", "translate(", "translateX(", "translateY(", "scale(", "scaleX(", "scaleY(", "rotate(", "skew(", "skewX(", "skewY(", "matrix3d(", "translate3d(", "translateZ(", "scale3d(", "scaleZ(", "rotate3d(", "rotateX(", "rotateY(", "rotateZ(", "perspective("]
+ elseif prop == 'transform-box'
+ let values = ["border-box", "fill-box", "view-box"]
+ elseif prop == 'transform-origin'
+ let values = ["left", "center", "right", "top", "bottom"]
+ elseif prop == 'transform-style'
+ let values = ["flat", "preserve-3d"]
+ elseif prop == 'top'
+ let values = ["auto"]
+ elseif prop == 'transition-property'
+ let values = ["all", "none"] + s:values
+ elseif prop == 'transition-duration'
+ let values = []
+ elseif prop == 'transition-delay'
+ let values = []
+ elseif prop == 'transition-timing-function'
+ let values = timing_functions
+ elseif prop == 'transition'
+ let values = ["all", "none"] + s:values + timing_functions
+ elseif prop == 'unicode-bidi'
+ let values = ["normal", "embed", "isolate", "bidi-override", "isolate-override", "plaintext"]
+ elseif prop == 'unicode-range'
+ let values = ["U+"]
+ elseif prop == 'user-zoom'
+ let values = ["zoom", "fixed"]
+ 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-volume'
+ let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"]
+ elseif prop == 'voice-balance'
+ let values = ["left", "center", "right", "leftwards", "rightwards"]
+ elseif prop == 'voice-family'
+ let values = []
+ elseif prop == 'voice-rate'
+ let values = ["normal", "x-slow", "slow", "medium", "fast", "x-fast"]
+ elseif prop == 'voice-pitch'
+ let values = ["absolute", "x-low", "low", "medium", "high", "x-high"]
+ elseif prop == 'voice-range'
+ let values = ["absolute", "x-low", "low", "medium", "high", "x-high"]
+ elseif prop == 'voice-stress'
+ let values = ["normal", "strong", "moderate", "none", "reduced "]
+ elseif prop == 'voice-duration'
+ let values = ["auto"]
+ elseif prop == 'white-space'
+ let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"]
+ elseif prop == 'widows'
+ let values = []
+ elseif prop == 'will-change'
+ let values = ["auto", "scroll-position", "contents"] + s:values
+ elseif prop == 'word-break'
+ let values = ["normal", "break-all", "keep-all"]
+ elseif prop == 'word-spacing'
+ let values = ["normal"]
+ elseif prop == 'word-wrap'
+ let values = ["normal", "break-word"]
+ elseif prop == 'writing-mode'
+ let values = ["horizontal-tb", "vertical-rl", "vertical-lr", "sideways-rl", "sideways-lr"]
+ elseif prop == 'z-index'
+ let values = ["auto"]
+ elseif prop == 'zoom'
+ 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,address,area,article,aside,audio,b,base,bdi,bdo,bgsound,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,content,data,datalist,dd,del,details,dfn,dialog,div,dl,dt,element,em,embed,fieldset,figcaption,figure,font,footer,form,frame,frameset,head,header,hgroup,hr,html,i,iframe,image,img,input,ins,isindex,kbd,keygen,label,legend,li,link,main,map,mark,menu,menuitem,meta,meter,nav,nobr,noframes,noscript,object,ol,optgroup,option,output,p,param,picture,pre,progress,q,rp,rt,rtc,ruby,s,samp,script,section,select,shadow,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,title,tr,track,u,ul,var,video,wbr', ','.element.',') > -1
+ let values = ["active", "any", "checked", "default", "dir(", "disabled", "empty", "enabled", "first", "first-child", "first-of-type", "fullscreen", "focus", "hover", "indeterminate", "in-range", "invalid", "lang(", "last-child", "last-of-type", "left", "link", "not(", "nth-child(", "nth-last-child(", "nth-last-of-type(", "nth-of-type(", "only-child", "only-of-type", "optional", "out-of-range", "read-only", "read-write", "required", "right", "root", "scope", "target", "valid", "visited", "first-line", "first-letter", "before", "after", "selection", "backdrop"]
+ else
+ return []
+ endif
+ endif
+
+ let values = wide_keywords + values
+ " 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 entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
+
+ if entered_atruleafter =~ "([^)]*$"
+ let entered_atruleafter = matchstr(entered_atruleafter, '(\s*\zs[^)]*$')
+ let values = ["max-width", "min-width", "width", "max-height", "min-height", "height", "max-aspect-ration", "min-aspect-ration", "aspect-ratio", "orientation", "max-resolution", "min-resolution", "resolution", "scan", "grid", "update-frequency", "overflow-block", "overflow-inline", "max-color", "min-color", "color", "max-color-index", "min-color-index", "color-index", "monochrome", "inverted-colors", "pointer", "hover", "any-pointer", "any-hover", "light-level", "scripting"]
+ else
+ let values = ["screen", "print", "speech", "all", "not", "and", "("]
+ endif
+
+ elseif atrulename == 'supports'
+ let entered_atruleafter = matchstr(line, '.*@supports\s\+\zs.*$')
+
+ if entered_atruleafter =~ "([^)]*$"
+ let entered_atruleafter = matchstr(entered_atruleafter, '(\s*\zs.*$')
+ let values = s:values
+ else
+ let values = ["("]
+ endif
+
+ elseif atrulename == 'charset'
+ let entered_atruleafter = matchstr(line, '.*@charset\s\+\zs.*$')
+ let values = [
+ \ '"UTF-8";', '"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";', '"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";']
+
+ elseif atrulename == 'namespace'
+ let entered_atruleafter = matchstr(line, '.*@namespace\s\+\zs.*$')
+ let values = ["url("]
+
+ elseif atrulename == 'document'
+ let entered_atruleafter = matchstr(line, '.*@document\s\+\zs.*$')
+ let values = ["url(", "url-prefix(", "domain(", "regexp("]
+
+ 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
+ if entered_atruleafter =~? '^"' && m =~? '^"'
+ let m = m[1:]
+ endif
+ if b:after =~? '"' && stridx(m, '"') > -1
+ let m = m[0:stridx(m, '"')-1]
+ endif
+ call add(res, m)
+ elseif m =~? entered_atruleafter
+ if m =~? '^"'
+ let m = m[1:]
+ endif
+ call add(res2, m)
+ endif
+ endfor
+
+ return res + res2
+
+ endif
+
+ let values = ["charset", "page", "media", "import", "font-face", "namespace", "supports", "keyframes", "viewport", "document"]
+
+ 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
diff --git a/runtime/autoload/decada.vim b/runtime/autoload/decada.vim
new file mode 100644
index 0000000..fda2b76
--- /dev/null
+++ b/runtime/autoload/decada.vim
@@ -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 extension.
+ " 2: replace all double '_' or '-' with an dot (which denotes a separate)
+ " 3: remove a trailing '_' (which 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
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
new file mode 100644
index 0000000..bfc325d
--- /dev/null
+++ b/runtime/autoload/dist/ft.vim
@@ -0,0 +1,1108 @@
+vim9script
+
+# Vim functions for file type detection
+#
+# Maintainer: Bram Moolenaar <Bram@vim.org>
+# Last Change: 2022 Dec 14
+
+# These functions are moved here from runtime/filetype.vim to make startup
+# faster.
+
+export def Check_inp()
+ if getline(1) =~ '^\*'
+ setf abaqus
+ else
+ var n = 1
+ var nmax = line("$") > 500 ? 500 : line("$")
+ while n <= nmax
+ if getline(n) =~? "^header surface data"
+ setf trasys
+ break
+ endif
+ n += 1
+ endwhile
+ endif
+enddef
+
+# This function checks for the kind of assembly that is wanted by the user, or
+# can be detected from the first five lines of the file.
+export def FTasm()
+ # make sure b:asmsyntax exists
+ if !exists("b:asmsyntax")
+ b:asmsyntax = ""
+ endif
+
+ if b:asmsyntax == ""
+ FTasmsyntax()
+ endif
+
+ # if b:asmsyntax still isn't set, default to asmsyntax or GNU
+ if b:asmsyntax == ""
+ if exists("g:asmsyntax")
+ b:asmsyntax = g:asmsyntax
+ else
+ b:asmsyntax = "asm"
+ endif
+ endif
+
+ exe "setf " .. fnameescape(b:asmsyntax)
+enddef
+
+export def FTasmsyntax()
+ # see if the file contains any asmsyntax=foo overrides. If so, change
+ # b:asmsyntax appropriately
+ var head = " " .. getline(1) .. " " .. getline(2) .. " "
+ .. getline(3) .. " " .. getline(4) .. " " .. getline(5) .. " "
+ var match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s')
+ if match != ''
+ b:asmsyntax = match
+ elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library'))
+ b:asmsyntax = "vmasm"
+ endif
+enddef
+
+var ft_visual_basic_content = '\cVB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
+
+# See FTfrm() for Visual Basic form file detection
+export def FTbas()
+ if exists("g:filetype_bas")
+ exe "setf " .. g:filetype_bas
+ return
+ endif
+
+ # most frequent FreeBASIC-specific keywords in distro files
+ var fb_keywords = '\c^\s*\%(extern\|var\|enum\|private\|scope\|union\|byref\|operator\|constructor\|delete\|namespace\|public\|property\|with\|destructor\|using\)\>\%(\s*[:=(]\)\@!'
+ var fb_preproc = '\c^\s*\%(' ..
+ # preprocessor
+ '#\s*\a\+\|' ..
+ # compiler option
+ 'option\s\+\%(byval\|dynamic\|escape\|\%(no\)\=gosub\|nokeyword\|private\|static\)\>\|' ..
+ # metacommand
+ '\%(''\|rem\)\s*\$lang\>\|' ..
+ # default datatype
+ 'def\%(byte\|longint\|short\|ubyte\|uint\|ulongint\|ushort\)\>' ..
+ '\)'
+ var fb_comment = "^\\s*/'"
+
+ # OPTION EXPLICIT, without the leading underscore, is common to many dialects
+ var qb64_preproc = '\c^\s*\%($\a\+\|option\s\+\%(_explicit\|_\=explicitarray\)\>\)'
+
+ for lnum in range(1, min([line("$"), 100]))
+ var line = getline(lnum)
+ if line =~ ft_visual_basic_content
+ setf vb
+ return
+ elseif line =~ fb_preproc || line =~ fb_comment || line =~ fb_keywords
+ setf freebasic
+ return
+ elseif line =~ qb64_preproc
+ setf qb64
+ return
+ endif
+ endfor
+ setf basic
+enddef
+
+export def FTbtm()
+ if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm
+ setf dosbatch
+ else
+ setf btm
+ endif
+enddef
+
+export def BindzoneCheck(default = '')
+ if getline(1) .. getline(2) .. getline(3) .. getline(4)
+ =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA'
+ setf bindzone
+ elseif default != ''
+ exe 'setf ' .. default
+ endif
+enddef
+
+# Returns true if file content looks like RAPID
+def IsRapid(sChkExt: string = ""): bool
+ if sChkExt == "cfg"
+ return getline(1) =~? '\v^%(EIO|MMC|MOC|PROC|SIO|SYS):CFG'
+ endif
+ # called from FTmod, FTprg or FTsys
+ return getline(nextnonblank(1)) =~? '\v^\s*%(\%{3}|module\s+\k+\s*%(\(|$))'
+enddef
+
+export def FTcfg()
+ if exists("g:filetype_cfg")
+ exe "setf " .. g:filetype_cfg
+ elseif IsRapid("cfg")
+ setf rapid
+ else
+ setf cfg
+ endif
+enddef
+
+export def FTcls()
+ if exists("g:filetype_cls")
+ exe "setf " .. g:filetype_cls
+ return
+ endif
+
+ if getline(1) =~ '^\v%(\%|\\)'
+ setf tex
+ elseif getline(1)[0] == '#' && getline(1) =~ 'rexx'
+ setf rexx
+ elseif getline(1) == 'VERSION 1.0 CLASS'
+ setf vb
+ else
+ setf st
+ endif
+enddef
+
+export def FTlpc()
+ if exists("g:lpc_syntax_for_c")
+ var lnum = 1
+ while lnum <= 12
+ if getline(lnum) =~# '^\(//\|inherit\|private\|protected\|nosave\|string\|object\|mapping\|mixed\)'
+ setf lpc
+ return
+ endif
+ lnum += 1
+ endwhile
+ endif
+ setf c
+enddef
+
+export def FTheader()
+ if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
+ if exists("g:c_syntax_for_h")
+ setf objc
+ else
+ setf objcpp
+ endif
+ elseif exists("g:c_syntax_for_h")
+ setf c
+ elseif exists("g:ch_syntax_for_h")
+ setf ch
+ else
+ setf cpp
+ endif
+enddef
+
+# This function checks if one of the first ten lines start with a '@'. In
+# that case it is probably a change file.
+# If the first line starts with # or ! it's probably a ch file.
+# If a line has "main", "include", "//" or "/*" it's probably ch.
+# Otherwise CHILL is assumed.
+export def FTchange()
+ var lnum = 1
+ while lnum <= 10
+ if getline(lnum)[0] == '@'
+ setf change
+ return
+ endif
+ if lnum == 1 && (getline(1)[0] == '#' || getline(1)[0] == '!')
+ setf ch
+ return
+ endif
+ if getline(lnum) =~ "MODULE"
+ setf chill
+ return
+ endif
+ if getline(lnum) =~ 'main\s*(\|#\s*include\|//'
+ setf ch
+ return
+ endif
+ lnum += 1
+ endwhile
+ setf chill
+enddef
+
+export def FTent()
+ # This function checks for valid cl syntax in the first five lines.
+ # Look for either an opening comment, '#', or a block start, '{'.
+ # If not found, assume SGML.
+ var lnum = 1
+ while lnum < 6
+ var line = getline(lnum)
+ if line =~ '^\s*[#{]'
+ setf cl
+ return
+ elseif line !~ '^\s*$'
+ # Not a blank line, not a comment, and not a block start,
+ # so doesn't look like valid cl code.
+ break
+ endif
+ lnum += 1
+ endwhile
+ setf dtd
+enddef
+
+export def ExCheck()
+ var lines = getline(1, min([line("$"), 100]))
+ if exists('g:filetype_euphoria')
+ exe 'setf ' .. g:filetype_euphoria
+ elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1
+ setf euphoria3
+ else
+ setf elixir
+ endif
+enddef
+
+export def EuphoriaCheck()
+ if exists('g:filetype_euphoria')
+ exe 'setf ' .. g:filetype_euphoria
+ else
+ setf euphoria3
+ endif
+enddef
+
+export def DtraceCheck()
+ if did_filetype()
+ # Filetype was already detected
+ return
+ endif
+ var lines = getline(1, min([line("$"), 100]))
+ if match(lines, '^module\>\|^import\>') > -1
+ # D files often start with a module and/or import statement.
+ setf d
+ elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1
+ setf dtrace
+ else
+ setf d
+ endif
+enddef
+
+export def FTe()
+ if exists('g:filetype_euphoria')
+ exe 'setf ' .. g:filetype_euphoria
+ else
+ var n = 1
+ while n < 100 && n <= line("$")
+ if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
+ setf specman
+ return
+ endif
+ n += 1
+ endwhile
+ setf eiffel
+ endif
+enddef
+
+export def FTfrm()
+ if exists("g:filetype_frm")
+ exe "setf " .. g:filetype_frm
+ return
+ endif
+
+ var lines = getline(1, min([line("$"), 5]))
+
+ if match(lines, ft_visual_basic_content) > -1
+ setf vb
+ else
+ setf form
+ endif
+enddef
+
+# Distinguish between Forth and F#.
+# Provided by Doug Kearns.
+export def FTfs()
+ if exists("g:filetype_fs")
+ exe "setf " .. g:filetype_fs
+ else
+ var line = getline(nextnonblank(1))
+ # comments and colon definitions
+ if line =~ '^\s*\.\=( ' || line =~ '^\s*\\G\= ' || line =~ '^\\$'
+ \ || line =~ '^\s*: \S'
+ setf forth
+ else
+ setf fsharp
+ endif
+ endif
+enddef
+
+# Distinguish between HTML, XHTML and Django
+export def FThtml()
+ var n = 1
+ while n < 10 && n <= line("$")
+ if getline(n) =~ '\<DTD\s\+XHTML\s'
+ setf xhtml
+ return
+ endif
+ if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+'
+ setf htmldjango
+ return
+ endif
+ n += 1
+ endwhile
+ setf FALLBACK html
+enddef
+
+# Distinguish between standard IDL and MS-IDL
+export def FTidl()
+ var n = 1
+ while n < 50 && n <= line("$")
+ if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
+ setf msidl
+ return
+ endif
+ n += 1
+ endwhile
+ setf idl
+enddef
+
+# Distinguish between "default", Prolog and Cproto prototype file.
+export def ProtoCheck(default: string)
+ # Cproto files have a comment in the first line and a function prototype in
+ # the second line, it always ends in ";". Indent files may also have
+ # comments, thus we can't match comments to see the difference.
+ # IDL files can have a single ';' in the second line, require at least one
+ # chacter before the ';'.
+ if getline(2) =~ '.;$'
+ setf cpp
+ else
+ # recognize Prolog by specific text in the first non-empty line
+ # require a blank after the '%' because Perl uses "%list" and "%translate"
+ var l = getline(nextnonblank(1))
+ if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
+ setf prolog
+ else
+ exe 'setf ' .. default
+ endif
+ endif
+enddef
+
+export def FTm()
+ if exists("g:filetype_m")
+ exe "setf " .. g:filetype_m
+ return
+ endif
+
+ # excluding end(for|function|if|switch|while) common to Murphi
+ var octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|methods\|parfor\|properties\)\>'
+
+ var objc_preprocessor = '^\s*#\s*\%(import\|include\|define\|if\|ifn\=def\|undef\|line\|error\|pragma\)\>'
+
+ var n = 1
+ var saw_comment = 0 # Whether we've seen a multiline comment leader.
+ while n < 100
+ var line = getline(n)
+ if line =~ '^\s*/\*'
+ # /* ... */ is a comment in Objective C and Murphi, so we can't conclude
+ # it's either of them yet, but track this as a hint in case we don't see
+ # anything more definitive.
+ saw_comment = 1
+ endif
+ if line =~ '^\s*//' || line =~ '^\s*@import\>' || line =~ objc_preprocessor
+ setf objc
+ return
+ endif
+ if line =~ '^\s*\%(#\|%!\)' || line =~ '^\s*unwind_protect\>' ||
+ \ line =~ '\%(^\|;\)\s*' .. octave_block_terminators
+ setf octave
+ return
+ endif
+ # TODO: could be Matlab or Octave
+ if line =~ '^\s*%'
+ setf matlab
+ return
+ endif
+ if line =~ '^\s*(\*'
+ setf mma
+ return
+ endif
+ if line =~ '^\c\s*\(\(type\|var\)\>\|--\)'
+ setf murphi
+ return
+ endif
+ n += 1
+ endwhile
+
+ if saw_comment
+ # We didn't see anything definitive, but this looks like either Objective C
+ # or Murphi based on the comment leader. Assume the former as it is more
+ # common.
+ setf objc
+ else
+ # Default is Matlab
+ setf matlab
+ endif
+enddef
+
+export def FTmms()
+ var n = 1
+ while n < 20
+ var line = getline(n)
+ if line =~ '^\s*\(%\|//\)' || line =~ '^\*'
+ setf mmix
+ return
+ endif
+ if line =~ '^\s*#'
+ setf make
+ return
+ endif
+ n += 1
+ endwhile
+ setf mmix
+enddef
+
+# This function checks if one of the first five lines start with a dot. In
+# that case it is probably an nroff file: 'filetype' is set and 1 is returned.
+export def FTnroff(): number
+ if getline(1)[0] .. getline(2)[0] .. getline(3)[0]
+ .. getline(4)[0] .. getline(5)[0] =~ '\.'
+ setf nroff
+ return 1
+ endif
+ return 0
+enddef
+
+export def FTmm()
+ var n = 1
+ while n < 20
+ if getline(n) =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
+ setf objcpp
+ return
+ endif
+ n += 1
+ endwhile
+ setf nroff
+enddef
+
+# Returns true if file content looks like LambdaProlog module
+def IsLProlog(): bool
+ # skip apparent comments and blank lines, what looks like
+ # LambdaProlog comment may be RAPID header
+ var l: number = nextnonblank(1)
+ while l > 0 && l < line('$') && getline(l) =~ '^\s*%' # LambdaProlog comment
+ l = nextnonblank(l + 1)
+ endwhile
+ # this pattern must not catch a go.mod file
+ return getline(l) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
+enddef
+
+# Determine if *.mod is ABB RAPID, LambdaProlog, Modula-2, Modsim III or go.mod
+export def FTmod()
+ if exists("g:filetype_mod")
+ exe "setf " .. g:filetype_mod
+ elseif IsLProlog()
+ setf lprolog
+ elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
+ setf modula2
+ elseif IsRapid()
+ setf rapid
+ elseif expand("<afile>") =~ '\<go.mod$'
+ setf gomod
+ else
+ # Nothing recognized, assume modsim3
+ setf modsim3
+ endif
+enddef
+
+export def FTpl()
+ if exists("g:filetype_pl")
+ exe "setf " .. g:filetype_pl
+ else
+ # recognize Prolog by specific text in the first non-empty line
+ # require a blank after the '%' because Perl uses "%list" and "%translate"
+ var l = getline(nextnonblank(1))
+ if l =~ '\<prolog\>' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-'
+ setf prolog
+ else
+ setf perl
+ endif
+ endif
+enddef
+
+export def FTinc()
+ if exists("g:filetype_inc")
+ exe "setf " .. g:filetype_inc
+ else
+ var lines = getline(1) .. getline(2) .. getline(3)
+ if lines =~? "perlscript"
+ setf aspperl
+ elseif lines =~ "<%"
+ setf aspvbs
+ elseif lines =~ "<?"
+ setf php
+ # Pascal supports // comments but they're vary rarely used for file
+ # headers so assume POV-Ray
+ elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? ft_pascal_keywords
+ setf pascal
+ elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= '
+ setf bitbake
+ else
+ FTasmsyntax()
+ if exists("b:asmsyntax")
+ exe "setf " .. fnameescape(b:asmsyntax)
+ else
+ setf pov
+ endif
+ endif
+ endif
+enddef
+
+export def FTprogress_cweb()
+ if exists("g:filetype_w")
+ exe "setf " .. g:filetype_w
+ return
+ endif
+ if getline(1) =~ '&ANALYZE' || getline(3) =~ '&GLOBAL-DEFINE'
+ setf progress
+ else
+ setf cweb
+ endif
+enddef
+
+export def FTprogress_asm()
+ if exists("g:filetype_i")
+ exe "setf " .. g:filetype_i
+ return
+ endif
+ # This function checks for an assembly comment the first ten lines.
+ # If not found, assume Progress.
+ var lnum = 1
+ while lnum <= 10 && lnum < line('$')
+ var line = getline(lnum)
+ if line =~ '^\s*;' || line =~ '^\*'
+ FTasm()
+ return
+ elseif line !~ '^\s*$' || line =~ '^/\*'
+ # Not an empty line: Doesn't look like valid assembly code.
+ # Or it looks like a Progress /* comment
+ break
+ endif
+ lnum += 1
+ endwhile
+ setf progress
+enddef
+
+var ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
+var ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
+
+export def FTprogress_pascal()
+ if exists("g:filetype_p")
+ exe "setf " .. g:filetype_p
+ return
+ endif
+ # This function checks for valid Pascal syntax in the first ten lines.
+ # Look for either an opening comment or a program start.
+ # If not found, assume Progress.
+ var lnum = 1
+ while lnum <= 10 && lnum < line('$')
+ var line = getline(lnum)
+ if line =~ ft_pascal_comments || line =~? ft_pascal_keywords
+ setf pascal
+ return
+ elseif line !~ '^\s*$' || line =~ '^/\*'
+ # Not an empty line: Doesn't look like valid Pascal code.
+ # Or it looks like a Progress /* comment
+ break
+ endif
+ lnum += 1
+ endwhile
+ setf progress
+enddef
+
+export def FTpp()
+ if exists("g:filetype_pp")
+ exe "setf " .. g:filetype_pp
+ else
+ var line = getline(nextnonblank(1))
+ if line =~ ft_pascal_comments || line =~? ft_pascal_keywords
+ setf pascal
+ else
+ setf puppet
+ endif
+ endif
+enddef
+
+# Determine if *.prg is ABB RAPID. Can also be Clipper, FoxPro or eviews
+export def FTprg()
+ if exists("g:filetype_prg")
+ exe "setf " .. g:filetype_prg
+ elseif IsRapid()
+ setf rapid
+ else
+ # Nothing recognized, assume Clipper
+ setf clipper
+ endif
+enddef
+
+export def FTr()
+ var max = line("$") > 50 ? 50 : line("$")
+
+ for n in range(1, max)
+ # Rebol is easy to recognize, check for that first
+ if getline(n) =~? '\<REBOL\>'
+ setf rebol
+ return
+ endif
+ endfor
+
+ for n in range(1, max)
+ # R has # comments
+ if getline(n) =~ '^\s*#'
+ setf r
+ return
+ endif
+ # Rexx has /* comments */
+ if getline(n) =~ '^\s*/\*'
+ setf rexx
+ return
+ endif
+ endfor
+
+ # Nothing recognized, use user default or assume Rexx
+ if exists("g:filetype_r")
+ exe "setf " .. g:filetype_r
+ else
+ # Rexx used to be the default, but R appears to be much more popular.
+ setf r
+ endif
+enddef
+
+export def McSetf()
+ # Rely on the file to start with a comment.
+ # MS message text files use ';', Sendmail files use '#' or 'dnl'
+ for lnum in range(1, min([line("$"), 20]))
+ var line = getline(lnum)
+ if line =~ '^\s*\(#\|dnl\)'
+ setf m4 # Sendmail .mc file
+ return
+ elseif line =~ '^\s*;'
+ setf msmessages # MS Message text file
+ return
+ endif
+ endfor
+ setf m4 # Default: Sendmail .mc file
+enddef
+
+# Called from filetype.vim and scripts.vim.
+export def SetFileTypeSH(name: string)
+ if did_filetype()
+ # Filetype was already detected
+ return
+ endif
+ if expand("<amatch>") =~ g:ft_ignore_pat
+ return
+ endif
+ if name =~ '\<csh\>'
+ # Some .sh scripts contain #!/bin/csh.
+ SetFileTypeShell("csh")
+ return
+ elseif name =~ '\<tcsh\>'
+ # Some .sh scripts contain #!/bin/tcsh.
+ SetFileTypeShell("tcsh")
+ return
+ elseif name =~ '\<zsh\>'
+ # Some .sh scripts contain #!/bin/zsh.
+ SetFileTypeShell("zsh")
+ return
+ elseif name =~ '\<ksh\>'
+ b:is_kornshell = 1
+ if exists("b:is_bash")
+ unlet b:is_bash
+ endif
+ if exists("b:is_sh")
+ unlet b:is_sh
+ endif
+ elseif exists("g:bash_is_sh") || name =~ '\<bash\>' || name =~ '\<bash2\>'
+ b:is_bash = 1
+ if exists("b:is_kornshell")
+ unlet b:is_kornshell
+ endif
+ if exists("b:is_sh")
+ unlet b:is_sh
+ endif
+ elseif name =~ '\<sh\>' || name =~ '\<dash\>'
+ # Ubuntu links "sh" to "dash", thus it is expected to work the same way
+ b:is_sh = 1
+ if exists("b:is_kornshell")
+ unlet b:is_kornshell
+ endif
+ if exists("b:is_bash")
+ unlet b:is_bash
+ endif
+ endif
+ SetFileTypeShell("sh")
+enddef
+
+# For shell-like file types, check for an "exec" command hidden in a comment,
+# as used for Tcl.
+# Also called from scripts.vim, thus can't be local to this script.
+export def SetFileTypeShell(name: string)
+ if did_filetype()
+ # Filetype was already detected
+ return
+ endif
+ if expand("<amatch>") =~ g:ft_ignore_pat
+ return
+ endif
+ var l = 2
+ while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)'
+ # Skip empty and comment lines.
+ l += 1
+ endwhile
+ if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$'
+ # Found an "exec" line after a comment with continuation
+ var n = substitute(getline(l), '\s*exec\s\+\([^ ]*/\)\=', '', '')
+ if n =~ '\<tclsh\|\<wish'
+ setf tcl
+ return
+ endif
+ endif
+ exe "setf " .. name
+enddef
+
+export def CSH()
+ if did_filetype()
+ # Filetype was already detected
+ return
+ endif
+ if exists("g:filetype_csh")
+ SetFileTypeShell(g:filetype_csh)
+ elseif &shell =~ "tcsh"
+ SetFileTypeShell("tcsh")
+ else
+ SetFileTypeShell("csh")
+ endif
+enddef
+
+var ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
+export def FTRules()
+ var path = expand('<amatch>:p')
+ if path =~ '/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|\%(usr/\)\=lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
+ setf udevrules
+ return
+ endif
+ if path =~ '^/etc/ufw/'
+ setf conf # Better than hog
+ return
+ endif
+ if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d'
+ setf javascript
+ return
+ endif
+ var config_lines: list<string>
+ try
+ config_lines = readfile('/etc/udev/udev.conf')
+ catch /^Vim\%((\a\+)\)\=:E484/
+ setf hog
+ return
+ endtry
+ var dir = expand('<amatch>:p:h')
+ for line in config_lines
+ if line =~ ft_rules_udev_rules_pattern
+ var udev_rules = substitute(line, ft_rules_udev_rules_pattern, '\1', "")
+ if dir == udev_rules
+ setf udevrules
+ endif
+ break
+ endif
+ endfor
+ setf hog
+enddef
+
+export def SQL()
+ if exists("g:filetype_sql")
+ exe "setf " .. g:filetype_sql
+ else
+ setf sql
+ endif
+enddef
+
+# This function checks the first 25 lines of file extension "sc" to resolve
+# detection between scala and SuperCollider.
+# NOTE: We don't check for 'Class : Method', as this can easily be confused
+# with valid Scala like `val x : Int = 3`. So we instead only rely on
+# checks that can't be confused.
+export def FTsc()
+ for lnum in range(1, min([line("$"), 25]))
+ if getline(lnum) =~# 'var\s<\|classvar\s<\|\^this.*\||\w\+|\|+\s\w*\s{\|\*ar\s'
+ setf supercollider
+ return
+ endif
+ endfor
+ setf scala
+enddef
+
+# This function checks the first line of file extension "scd" to resolve
+# detection between scdoc and SuperCollider
+export def FTscd()
+ if getline(1) =~# '\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$'
+ setf scdoc
+ else
+ setf supercollider
+ endif
+enddef
+
+# If the file has an extension of 't' and is in a directory 't' or 'xt' then
+# it is almost certainly a Perl test file.
+# If the first line starts with '#' and contains 'perl' it's probably a Perl
+# file.
+# (Slow test) If a file contains a 'use' statement then it is almost certainly
+# a Perl file.
+export def FTperl(): number
+ var dirname = expand("%:p:h:t")
+ if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt')
+ setf perl
+ return 1
+ endif
+ if getline(1)[0] == '#' && getline(1) =~ 'perl'
+ setf perl
+ return 1
+ endif
+ var save_cursor = getpos('.')
+ call cursor(1, 1)
+ var has_use = search('^use\s\s*\k', 'c', 30) > 0
+ call setpos('.', save_cursor)
+ if has_use
+ setf perl
+ return 1
+ endif
+ return 0
+enddef
+
+# LambdaProlog and Standard ML signature files
+export def FTsig()
+ if exists("g:filetype_sig")
+ exe "setf " .. g:filetype_sig
+ return
+ endif
+
+ var lprolog_comment = '^\s*\%(/\*\|%\)'
+ var lprolog_keyword = '^\s*sig\s\+\a'
+ var sml_comment = '^\s*(\*'
+ var sml_keyword = '^\s*\%(signature\|structure\)\s\+\a'
+
+ var line = getline(nextnonblank(1))
+
+ if line =~ lprolog_comment || line =~# lprolog_keyword
+ setf lprolog
+ elseif line =~ sml_comment || line =~# sml_keyword
+ setf sml
+ endif
+enddef
+
+# This function checks the first 100 lines of files matching "*.sil" to
+# resolve detection between Swift Intermediate Language and SILE.
+export def FTsil()
+ for lnum in range(1, [line('$'), 100]->min())
+ var line: string = getline(lnum)
+ if line =~ '^\s*[\\%]'
+ setf sile
+ return
+ elseif line =~ '^\s*\S'
+ setf sil
+ return
+ endif
+ endfor
+ # no clue, default to "sil"
+ setf sil
+enddef
+
+export def FTsys()
+ if exists("g:filetype_sys")
+ exe "setf " .. g:filetype_sys
+ elseif IsRapid()
+ setf rapid
+ else
+ setf bat
+ endif
+enddef
+
+# Choose context, plaintex, or tex (LaTeX) based on these rules:
+# 1. Check the first line of the file for "%&<format>".
+# 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
+# 3. Default to "plain" or to g:tex_flavor, can be set in user's vimrc.
+export def FTtex()
+ var firstline = getline(1)
+ var format: string
+ if firstline =~ '^%&\s*\a\+'
+ format = tolower(matchstr(firstline, '\a\+'))
+ format = substitute(format, 'pdf', '', '')
+ if format == 'tex'
+ format = 'latex'
+ elseif format == 'plaintex'
+ format = 'plain'
+ endif
+ elseif expand('%') =~ 'tex/context/.*/.*.tex'
+ format = 'context'
+ else
+ # Default value, may be changed later:
+ format = exists("g:tex_flavor") ? g:tex_flavor : 'plain'
+ # Save position, go to the top of the file, find first non-comment line.
+ var save_cursor = getpos('.')
+ call cursor(1, 1)
+ var firstNC = search('^\s*[^[:space:]%]', 'c', 1000)
+ if firstNC > 0
+ # Check the next thousand lines for a LaTeX or ConTeXt keyword.
+ var lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>'
+ var cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>'
+ var kwline = search('^\s*\\\%(' .. lpat .. '\)\|^\s*\\\(' .. cpat .. '\)',
+ 'cnp', firstNC + 1000)
+ if kwline == 1 # lpat matched
+ format = 'latex'
+ elseif kwline == 2 # cpat matched
+ format = 'context'
+ endif # If neither matched, keep default set above.
+ # let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000)
+ # let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000)
+ # if cline > 0
+ # let format = 'context'
+ # endif
+ # if lline > 0 && (cline == 0 || cline > lline)
+ # let format = 'tex'
+ # endif
+ endif # firstNC
+ call setpos('.', save_cursor)
+ endif # firstline =~ '^%&\s*\a\+'
+
+ # Translation from formats to file types. TODO: add AMSTeX, RevTex, others?
+ if format == 'plain'
+ setf plaintex
+ elseif format == 'context'
+ setf context
+ else # probably LaTeX
+ setf tex
+ endif
+ return
+enddef
+
+export def FTxml()
+ var n = 1
+ while n < 100 && n <= line("$")
+ var line = getline(n)
+ # DocBook 4 or DocBook 5.
+ var is_docbook4 = line =~ '<!DOCTYPE.*DocBook'
+ var is_docbook5 = line =~ ' xmlns="http://docbook.org/ns/docbook"'
+ if is_docbook4 || is_docbook5
+ b:docbk_type = "xml"
+ if is_docbook5
+ b:docbk_ver = 5
+ else
+ b:docbk_ver = 4
+ endif
+ setf docbk
+ return
+ endif
+ if line =~ 'xmlns:xbl="http://www.mozilla.org/xbl"'
+ setf xbl
+ return
+ endif
+ n += 1
+ endwhile
+ setf xml
+enddef
+
+export def FTy()
+ var n = 1
+ while n < 100 && n <= line("$")
+ var line = getline(n)
+ if line =~ '^\s*%'
+ setf yacc
+ return
+ endif
+ if getline(n) =~ '^\s*\(#\|class\>\)' && getline(n) !~ '^\s*#\s*include'
+ setf racc
+ return
+ endif
+ n += 1
+ endwhile
+ setf yacc
+enddef
+
+export def Redif()
+ var lnum = 1
+ while lnum <= 5 && lnum < line('$')
+ if getline(lnum) =~ "^\ctemplate-type:"
+ setf redif
+ return
+ endif
+ lnum += 1
+ endwhile
+enddef
+
+# This function is called for all files under */debian/patches/*, make sure not
+# to non-dep3patch files, such as README and other text files.
+export def Dep3patch()
+ if expand('%:t') ==# 'series'
+ return
+ endif
+
+ for ln in getline(1, 100)
+ if ln =~# '^\%(Description\|Subject\|Origin\|Bug\|Forwarded\|Author\|From\|Reviewed-by\|Acked-by\|Last-Updated\|Applied-Upstream\):'
+ setf dep3patch
+ return
+ elseif ln =~# '^---'
+ # end of headers found. stop processing
+ return
+ endif
+ endfor
+enddef
+
+# This function checks the first 15 lines for appearance of 'FoamFile'
+# and then 'object' in a following line.
+# In that case, it's probably an OpenFOAM file
+export def FTfoam()
+ var ffile = 0
+ var lnum = 1
+ while lnum <= 15
+ if getline(lnum) =~# '^FoamFile'
+ ffile = 1
+ elseif ffile == 1 && getline(lnum) =~# '^\s*object'
+ setf foam
+ return
+ endif
+ lnum += 1
+ endwhile
+enddef
+
+# Determine if a *.tf file is TF mud client or terraform
+export def FTtf()
+ var numberOfLines = line('$')
+ for i in range(1, numberOfLines)
+ var currentLine = trim(getline(i))
+ var firstCharacter = currentLine[0]
+ if firstCharacter !=? ";" && firstCharacter !=? "/" && firstCharacter !=? ""
+ setf terraform
+ return
+ endif
+ endfor
+ setf tf
+enddef
+
+var ft_krl_header = '\&\w+'
+# Determine if a *.src file is Kuka Robot Language
+export def FTsrc()
+ var ft_krl_def_or_deffct = '%(global\s+)?def%(fct)?>'
+ if exists("g:filetype_src")
+ exe "setf " .. g:filetype_src
+ elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_def_or_deffct .. ')'
+ setf krl
+ endif
+enddef
+
+# Determine if a *.dat file is Kuka Robot Language
+export def FTdat()
+ var ft_krl_defdat = 'defdat>'
+ if exists("g:filetype_dat")
+ exe "setf " .. g:filetype_dat
+ elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_defdat .. ')'
+ setf krl
+ endif
+enddef
+
+export def FTlsl()
+ if exists("g:filetype_lsl")
+ exe "setf " .. g:filetype_lsl
+ endif
+
+ var line = getline(nextnonblank(1))
+ if line =~ '^\s*%' || line =~# ':\s*trait\s*$'
+ setf larch
+ else
+ setf lsl
+ endif
+enddef
+
+# Uncomment this line to check for compilation errors early
+# defcompile
diff --git a/runtime/autoload/dist/man.vim b/runtime/autoload/dist/man.vim
new file mode 100644
index 0000000..cd584aa
--- /dev/null
+++ b/runtime/autoload/dist/man.vim
@@ -0,0 +1,196 @@
+" Vim filetype plugin autoload file
+" Language: man
+" Maintainer: Jason Franklin <vim@justemail.net>
+" Maintainer: SungHyun Nam <goweol@gmail.com>
+" Autoload Split: Bram Moolenaar
+" Last Change: 2022 Jun 18
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+let s:man_tag_depth = 0
+
+let s:man_sect_arg = ""
+let s:man_find_arg = "-w"
+try
+ if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5"
+ let s:man_sect_arg = "-s"
+ let s:man_find_arg = "-l"
+ endif
+catch /E145:/
+ " Ignore the error in restricted mode
+endtry
+
+func dist#man#PreGetPage(cnt)
+ if a:cnt == 0
+ let old_isk = &iskeyword
+ if &ft == 'man'
+ setl iskeyword+=(,)
+ endif
+ let str = expand("<cword>")
+ let &l:iskeyword = old_isk
+ let page = substitute(str, '(*\(\k\+\).*', '\1', '')
+ let sect = substitute(str, '\(\k\+\)(\([^()]*\)).*', '\2', '')
+ if match(sect, '^[0-9 ]\+$') == -1
+ let sect = ""
+ endif
+ if sect == page
+ let sect = ""
+ endif
+ else
+ let sect = a:cnt
+ let page = expand("<cword>")
+ endif
+ call dist#man#GetPage('', sect, page)
+endfunc
+
+func s:GetCmdArg(sect, page)
+
+ if empty(a:sect)
+ return shellescape(a:page)
+ endif
+
+ return s:man_sect_arg . ' ' . shellescape(a:sect) . ' ' . shellescape(a:page)
+endfunc
+
+func s:FindPage(sect, page)
+ let l:cmd = printf('man %s %s', s:man_find_arg, s:GetCmdArg(a:sect, a:page))
+ call system(l:cmd)
+
+ if v:shell_error
+ return 0
+ endif
+
+ return 1
+endfunc
+
+func dist#man#GetPage(cmdmods, ...)
+ if a:0 >= 2
+ let sect = a:1
+ let page = a:2
+ elseif a:0 >= 1
+ let sect = ""
+ let page = a:1
+ else
+ return
+ endif
+
+ " To support: nmap K :Man <cword>
+ if page == '<cword>'
+ let page = expand('<cword>')
+ endif
+
+ if !exists('g:ft_man_no_sect_fallback') || (g:ft_man_no_sect_fallback == 0)
+ if sect != "" && s:FindPage(sect, page) == 0
+ let sect = ""
+ endif
+ endif
+ if s:FindPage(sect, page) == 0
+ let msg = 'man.vim: no manual entry for "' . page . '"'
+ if !empty(sect)
+ let msg .= ' in section ' . sect
+ endif
+ echomsg msg
+ return
+ endif
+ exec "let s:man_tag_buf_".s:man_tag_depth." = ".bufnr("%")
+ exec "let s:man_tag_lin_".s:man_tag_depth." = ".line(".")
+ exec "let s:man_tag_col_".s:man_tag_depth." = ".col(".")
+ let s:man_tag_depth = s:man_tag_depth + 1
+
+ let open_cmd = 'edit'
+
+ " Use an existing "man" window if it exists, otherwise open a new one.
+ if &filetype != "man"
+ let thiswin = winnr()
+ exe "norm! \<C-W>b"
+ if winnr() > 1
+ exe "norm! " . thiswin . "\<C-W>w"
+ while 1
+ if &filetype == "man"
+ break
+ endif
+ exe "norm! \<C-W>w"
+ if thiswin == winnr()
+ break
+ endif
+ endwhile
+ endif
+ if &filetype != "man"
+ if exists("g:ft_man_open_mode")
+ if g:ft_man_open_mode == 'vert'
+ let open_cmd = 'vsplit'
+ elseif g:ft_man_open_mode == 'tab'
+ let open_cmd = 'tabedit'
+ else
+ let open_cmd = 'split'
+ endif
+ else
+ let open_cmd = a:cmdmods . ' split'
+ endif
+ endif
+ endif
+
+ silent execute open_cmd . " $HOME/" . page . '.' . sect . '~'
+
+ " Avoid warning for editing the dummy file twice
+ setl buftype=nofile noswapfile
+
+ setl fdc=0 ma nofen nonu nornu
+ %delete _
+ let unsetwidth = 0
+ if empty($MANWIDTH)
+ let $MANWIDTH = winwidth(0)
+ let unsetwidth = 1
+ endif
+
+ " Ensure Vim is not recursively invoked (man-db does this) when doing ctrl-[
+ " on a man page reference by unsetting MANPAGER.
+ " Some versions of env(1) do not support the '-u' option, and in such case
+ " we set MANPAGER=cat.
+ if !exists('s:env_has_u')
+ call system('env -u x true')
+ let s:env_has_u = (v:shell_error == 0)
+ endif
+ let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
+ let env_cmd .= ' GROFF_NO_SGR=1'
+ let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page) . ' | col -b'
+ silent exec "r !" . man_cmd
+
+ if unsetwidth
+ let $MANWIDTH = ''
+ endif
+ " Remove blank lines from top and bottom.
+ while line('$') > 1 && getline(1) =~ '^\s*$'
+ 1delete _
+ endwhile
+ while line('$') > 1 && getline('$') =~ '^\s*$'
+ $delete _
+ endwhile
+ 1
+ setl ft=man nomod
+ setl bufhidden=hide
+ setl nobuflisted
+ setl noma
+endfunc
+
+func dist#man#PopPage()
+ if s:man_tag_depth > 0
+ let s:man_tag_depth = s:man_tag_depth - 1
+ exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth
+ exec "let s:man_tag_lin=s:man_tag_lin_".s:man_tag_depth
+ exec "let s:man_tag_col=s:man_tag_col_".s:man_tag_depth
+ exec s:man_tag_buf."b"
+ exec s:man_tag_lin
+ exec "norm! ".s:man_tag_col."|"
+ exec "unlet s:man_tag_buf_".s:man_tag_depth
+ exec "unlet s:man_tag_lin_".s:man_tag_depth
+ exec "unlet s:man_tag_col_".s:man_tag_depth
+ unlet s:man_tag_buf s:man_tag_lin s:man_tag_col
+ endif
+endfunc
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: set sw=2 ts=8 noet:
diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim
new file mode 100644
index 0000000..f86c428
--- /dev/null
+++ b/runtime/autoload/dist/script.vim
@@ -0,0 +1,434 @@
+vim9script
+
+# Vim function for detecting a filetype from the file contents.
+# Invoked from "scripts.vim" in 'runtimepath'
+#
+# Maintainer: Bram Moolenaar <Bram@vim.org>
+# Last Change: 2022 Nov 24
+
+export def DetectFiletype()
+ var line1 = getline(1)
+ if line1[0] == '#' && line1[1] == '!'
+ # File that starts with "#!".
+ DetectFromHashBang(line1)
+ else
+ # File does not start with "#!".
+ DetectFromText(line1)
+ endif
+enddef
+
+# Called for a script that has "#!" in the first line.
+def DetectFromHashBang(firstline: string)
+ var line1 = firstline
+
+ # Check for a line like "#!/usr/bin/env {options} bash". Turn it into
+ # "#!/usr/bin/bash" to make matching easier.
+ # Recognize only a few {options} that are commonly used.
+ if line1 =~ '^#!\s*\S*\<env\s'
+ line1 = substitute(line1, '\S\+=\S\+', '', 'g')
+ line1 = substitute(line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
+ line1 = substitute(line1, '\<env\s\+', '', '')
+ endif
+
+ # Get the program name.
+ # Only accept spaces in PC style paths: "#!c:/program files/perl [args]".
+ # If the word env is used, use the first word after the space:
+ # "#!/usr/bin/env perl [path/args]"
+ # If there is no path use the first word: "#!perl [path/args]".
+ # Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]".
+ var name: string
+ if line1 =~ '^#!\s*\a:[/\\]'
+ name = substitute(line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
+ elseif line1 =~ '^#!.*\<env\>'
+ name = substitute(line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
+ elseif line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
+ name = substitute(line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
+ else
+ name = substitute(line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
+ endif
+
+ # tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
+ # third line. Suggested by Steven Atkinson.
+ if getline(3) =~ '^exec wish'
+ name = 'wish'
+ endif
+
+ # Bourne-like shell scripts: bash bash2 dash ksh ksh93 sh
+ if name =~ '^\(bash\d*\|dash\|ksh\d*\|sh\)\>'
+ call dist#ft#SetFileTypeSH(line1)
+
+ # csh scripts
+ elseif name =~ '^csh\>'
+ if exists("g:filetype_csh")
+ call dist#ft#SetFileTypeShell(g:filetype_csh)
+ else
+ call dist#ft#SetFileTypeShell("csh")
+ endif
+
+ # tcsh scripts
+ elseif name =~ '^tcsh\>'
+ call dist#ft#SetFileTypeShell("tcsh")
+
+ # Z shell scripts
+ elseif name =~ '^zsh\>'
+ set ft=zsh
+
+ # TCL scripts
+ elseif name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
+ set ft=tcl
+
+ # Expect scripts
+ elseif name =~ '^expect\>'
+ set ft=expect
+
+ # Gnuplot scripts
+ elseif name =~ '^gnuplot\>'
+ set ft=gnuplot
+
+ # Makefiles
+ elseif name =~ 'make\>'
+ set ft=make
+
+ # Pike
+ elseif name =~ '^pike\%(\>\|[0-9]\)'
+ set ft=pike
+
+ # Lua
+ elseif name =~ 'lua'
+ set ft=lua
+
+ # Perl
+ elseif name =~ 'perl'
+ set ft=perl
+
+ # PHP
+ elseif name =~ 'php'
+ set ft=php
+
+ # Python
+ elseif name =~ 'python'
+ set ft=python
+
+ # Groovy
+ elseif name =~ '^groovy\>'
+ set ft=groovy
+
+ # Raku
+ elseif name =~ 'raku'
+ set ft=raku
+
+ # Ruby
+ elseif name =~ 'ruby'
+ set ft=ruby
+
+ # JavaScript
+ elseif name =~ 'node\(js\)\=\>\|js\>' || name =~ 'rhino\>'
+ set ft=javascript
+
+ # BC calculator
+ elseif name =~ '^bc\>'
+ set ft=bc
+
+ # sed
+ elseif name =~ 'sed\>'
+ set ft=sed
+
+ # OCaml-scripts
+ elseif name =~ 'ocaml'
+ set ft=ocaml
+
+ # Awk scripts; also finds "gawk"
+ elseif name =~ 'awk\>'
+ set ft=awk
+
+ # Website MetaLanguage
+ elseif name =~ 'wml'
+ set ft=wml
+
+ # Scheme scripts
+ elseif name =~ 'scheme'
+ set ft=scheme
+
+ # CFEngine scripts
+ elseif name =~ 'cfengine'
+ set ft=cfengine
+
+ # Erlang scripts
+ elseif name =~ 'escript'
+ set ft=erlang
+
+ # Haskell
+ elseif name =~ 'haskell'
+ set ft=haskell
+
+ # Scala
+ elseif name =~ 'scala\>'
+ set ft=scala
+
+ # Clojure
+ elseif name =~ 'clojure'
+ set ft=clojure
+
+ # Free Pascal
+ elseif name =~ 'instantfpc\>'
+ set ft=pascal
+
+ # Fennel
+ elseif name =~ 'fennel\>'
+ set ft=fennel
+
+ # MikroTik RouterOS script
+ elseif name =~ 'rsc\>'
+ set ft=routeros
+
+ # Fish shell
+ elseif name =~ 'fish\>'
+ set ft=fish
+
+ # Gforth
+ elseif name =~ 'gforth\>'
+ set ft=forth
+
+ # Icon
+ elseif name =~ 'icon\>'
+ set ft=icon
+
+ # Guile
+ elseif name =~ 'guile'
+ set ft=scheme
+
+ endif
+enddef
+
+
+# Called for a script that does not have "#!" in the first line.
+def DetectFromText(line1: string)
+ var line2 = getline(2)
+ var line3 = getline(3)
+ var line4 = getline(4)
+ var line5 = getline(5)
+
+ # Bourne-like shell scripts: sh ksh bash bash2
+ if line1 =~ '^:$'
+ call dist#ft#SetFileTypeSH(line1)
+
+ # Z shell scripts
+ elseif line1 =~ '^#compdef\>'
+ || line1 =~ '^#autoload\>'
+ || "\n" .. line1 .. "\n" .. line2 .. "\n" .. line3 ..
+ "\n" .. line4 .. "\n" .. line5
+ =~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
+ set ft=zsh
+
+ # ELM Mail files
+ elseif line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
+ set ft=mail
+
+ # Mason
+ elseif line1 =~ '^<[%&].*>'
+ set ft=mason
+
+ # Vim scripts (must have '" vim' as the first line to trigger this)
+ elseif line1 =~ '^" *[vV]im$'
+ set ft=vim
+
+ # libcxx and libstdc++ standard library headers like "iostream" do not have
+ # an extension, recognize the Emacs file mode.
+ elseif line1 =~? '-\*-.*C++.*-\*-'
+ set ft=cpp
+
+ # MOO
+ elseif line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
+ set ft=moo
+
+ # Diff file:
+ # - "diff" in first line (context diff)
+ # - "Only in " in first line
+ # - "--- " in first line and "+++ " in second line (unified diff).
+ # - "*** " in first line and "--- " in second line (context diff).
+ # - "# It was generated by makepatch " in the second line (makepatch diff).
+ # - "Index: <filename>" in the first line (CVS file)
+ # - "=== ", line of "=", "---", "+++ " (SVK diff)
+ # - "=== ", "--- ", "+++ " (bzr diff, common case)
+ # - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
+ # - "# HG changeset patch" in first line (Mercurial export format)
+ elseif line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
+ || (line1 =~ '^--- ' && line2 =~ '^+++ ')
+ || (line1 =~ '^\* looking for ' && line2 =~ '^\* comparing to ')
+ || (line1 =~ '^\*\*\* ' && line2 =~ '^--- ')
+ || (line1 =~ '^=== ' && ((line2 =~ '^=\{66\}' && line3 =~ '^--- ' && line4 =~ '^+++') || (line2 =~ '^--- ' && line3 =~ '^+++ ')))
+ || (line1 =~ '^=== \(removed\|added\|renamed\|modified\)')
+ set ft=diff
+
+ # PostScript Files (must have %!PS as the first line, like a2ps output)
+ elseif line1 =~ '^%![ \t]*PS'
+ set ft=postscr
+
+ # M4 scripts: Guess there is a line that starts with "dnl".
+ elseif line1 =~ '^\s*dnl\>'
+ || line2 =~ '^\s*dnl\>'
+ || line3 =~ '^\s*dnl\>'
+ || line4 =~ '^\s*dnl\>'
+ || line5 =~ '^\s*dnl\>'
+ set ft=m4
+
+ # AmigaDos scripts
+ elseif $TERM == "amiga" && (line1 =~ "^;" || line1 =~? '^\.bra')
+ set ft=amiga
+
+ # SiCAD scripts (must have procn or procd as the first line to trigger this)
+ elseif line1 =~? '^ *proc[nd] *$'
+ set ft=sicad
+
+ # Purify log files start with "**** Purify"
+ elseif line1 =~ '^\*\*\*\* Purify'
+ set ft=purifylog
+
+ # XML
+ elseif line1 =~ '<?\s*xml.*?>'
+ set ft=xml
+
+ # XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN")
+ elseif line1 =~ '\<DTD\s\+XHTML\s'
+ set ft=xhtml
+
+ # HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
+ # Avoid "doctype html", used by slim.
+ elseif line1 =~? '<!DOCTYPE\s\+html\>'
+ set ft=html
+
+ # PDF
+ elseif line1 =~ '^%PDF-'
+ set ft=pdf
+
+ # XXD output
+ elseif line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
+ set ft=xxd
+
+ # RCS/CVS log output
+ elseif line1 =~ '^RCS file:' || line2 =~ '^RCS file:'
+ set ft=rcslog
+
+ # CVS commit
+ elseif line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
+ set ft=cvs
+
+ # Prescribe
+ elseif line1 =~ '^!R!'
+ set ft=prescribe
+
+ # Send-pr
+ elseif line1 =~ '^SEND-PR:'
+ set ft=sendpr
+
+ # SNNS files
+ elseif line1 =~ '^SNNS network definition file'
+ set ft=snnsnet
+ elseif line1 =~ '^SNNS pattern definition file'
+ set ft=snnspat
+ elseif line1 =~ '^SNNS result file'
+ set ft=snnsres
+
+ # Virata
+ elseif line1 =~ '^%.\{-}[Vv]irata'
+ || line2 =~ '^%.\{-}[Vv]irata'
+ || line3 =~ '^%.\{-}[Vv]irata'
+ || line4 =~ '^%.\{-}[Vv]irata'
+ || line5 =~ '^%.\{-}[Vv]irata'
+ set ft=virata
+
+ # Strace
+ elseif line1 =~ '[0-9:.]* *execve(' || line1 =~ '^__libc_start_main'
+ set ft=strace
+
+ # VSE JCL
+ elseif line1 =~ '^\* $$ JOB\>' || line1 =~ '^// *JOB\>'
+ set ft=vsejcl
+
+ # TAK and SINDA
+ elseif line4 =~ 'K & K Associates' || line2 =~ 'TAK 2000'
+ set ft=takout
+ elseif line3 =~ 'S Y S T E M S I M P R O V E D '
+ set ft=sindaout
+ elseif getline(6) =~ 'Run Date: '
+ set ft=takcmp
+ elseif getline(9) =~ 'Node File 1'
+ set ft=sindacmp
+
+ # DNS zone files
+ elseif line1 .. line2 .. line3 .. line4 =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA'
+ set ft=bindzone
+
+ # BAAN
+ elseif line1 =~ '|\*\{1,80}' && line2 =~ 'VRC '
+ || line2 =~ '|\*\{1,80}' && line3 =~ 'VRC '
+ set ft=baan
+
+ # Valgrind
+ elseif line1 =~ '^==\d\+== valgrind' || line3 =~ '^==\d\+== Using valgrind'
+ set ft=valgrind
+
+ # Go docs
+ elseif line1 =~ '^PACKAGE DOCUMENTATION$'
+ set ft=godoc
+
+ # Renderman Interface Bytestream
+ elseif line1 =~ '^##RenderMan'
+ set ft=rib
+
+ # Scheme scripts
+ elseif line1 =~ 'exec\s\+\S*scheme' || line2 =~ 'exec\s\+\S*scheme'
+ set ft=scheme
+
+ # Git output
+ elseif line1 =~ '^\(commit\|tree\|object\) \x\{40,\}\>\|^tag \S\+$'
+ set ft=git
+
+ # Gprof (gnu profiler)
+ elseif line1 == 'Flat profile:'
+ && line2 == ''
+ && line3 =~ '^Each sample counts as .* seconds.$'
+ set ft=gprof
+
+ # Erlang terms
+ # (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
+ elseif line1 =~? '-\*-.*erlang.*-\*-'
+ set ft=erlang
+
+ # YAML
+ elseif line1 =~ '^%YAML'
+ set ft=yaml
+
+ # MikroTik RouterOS script
+ elseif line1 =~ '^#.*by RouterOS.*$'
+ set ft=routeros
+
+ # Sed scripts
+ # #ncomment is allowed but most likely a false positive so require a space
+ # before any trailing comment text
+ elseif line1 =~ '^#n\%($\|\s\)'
+ set ft=sed
+
+ else
+ var lnum = 1
+ while getline(lnum) =~ "^? " && lnum < line("$")
+ lnum += 1
+ endwhile
+ if getline(lnum) =~ '^Index:\s\+\f\+$'
+ # CVS diff
+ set ft=diff
+
+ # locale input files: Formal Definitions of Cultural Conventions
+ # filename must be like en_US, fr_FR@euro or en_US.UTF-8
+ elseif expand("%") =~ '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_'
+ lnum = 1
+ while lnum < 100 && lnum < line("$")
+ if getline(lnum) =~ '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$'
+ setf fdcc
+ break
+ endif
+ lnum += 1
+ endwhile
+ endif
+ endif
+enddef
diff --git a/runtime/autoload/dist/vimindent.vim b/runtime/autoload/dist/vimindent.vim
new file mode 100644
index 0000000..1306d1e
--- /dev/null
+++ b/runtime/autoload/dist/vimindent.vim
@@ -0,0 +1,1257 @@
+vim9script
+
+# Language: Vim script
+# Maintainer: github user lacygoill
+# Last Change: 2023 Feb 01
+
+# NOTE: Whenever you change the code, make sure the tests are still passing:
+#
+# $ cd runtime/indent/
+# $ make clean; make test || vimdiff testdir/vim.{ok,fail}
+
+# Config {{{1
+
+const TIMEOUT: number = get(g:, 'vim_indent', {})
+ ->get('searchpair_timeout', 100)
+
+def IndentMoreInBracketBlock(): number # {{{2
+ if get(g:, 'vim_indent', {})
+ ->get('more_in_bracket_block', false)
+ return shiftwidth()
+ else
+ return 0
+ endif
+enddef
+
+def IndentMoreLineContinuation(): number # {{{2
+ var n: any = get(g:, 'vim_indent', {})
+ # We inspect `g:vim_indent_cont` to stay backward compatible.
+ ->get('line_continuation', get(g:, 'vim_indent_cont', shiftwidth() * 3))
+
+ if n->typename() == 'string'
+ return n->eval()
+ else
+ return n
+ endif
+enddef
+# }}}2
+
+# Init {{{1
+var patterns: list<string>
+# Tokens {{{2
+# BAR_SEPARATION {{{3
+
+const BAR_SEPARATION: string = '[^|\\]\@1<=|'
+
+# OPENING_BRACKET {{{3
+
+const OPENING_BRACKET: string = '[[{(]'
+
+# CLOSING_BRACKET {{{3
+
+const CLOSING_BRACKET: string = '[]})]'
+
+# NON_BRACKET {{{3
+
+const NON_BRACKET: string = '[^[\]{}()]'
+
+# LIST_OR_DICT_CLOSING_BRACKET {{{3
+
+const LIST_OR_DICT_CLOSING_BRACKET: string = '[]}]'
+
+# LIST_OR_DICT_OPENING_BRACKET {{{3
+
+const LIST_OR_DICT_OPENING_BRACKET: string = '[[{]'
+
+# CHARACTER_UNDER_CURSOR {{{3
+
+const CHARACTER_UNDER_CURSOR: string = '\%.c.'
+
+# INLINE_COMMENT {{{3
+
+# TODO: It is not required for an inline comment to be surrounded by whitespace.
+# But it might help against false positives.
+# To be more reliable, we should inspect the syntax, and only require whitespace
+# before the `#` comment leader. But that might be too costly (because of
+# `synstack()`).
+const INLINE_COMMENT: string = '\s[#"]\%(\s\|[{}]\{3}\)'
+
+# INLINE_VIM9_COMMENT {{{3
+
+const INLINE_VIM9_COMMENT: string = '\s#'
+
+# COMMENT {{{3
+
+# TODO: Technically, `"\s` is wrong.
+#
+# First, whitespace is not required.
+# Second, in Vim9, a string might appear at the start of the line.
+# To be sure, we should also inspect the syntax.
+# We can't use `INLINE_COMMENT` here. {{{
+#
+# const COMMENT: string = $'^\s*{INLINE_COMMENT}'
+# ^------------^
+# ✘
+#
+# Because `INLINE_COMMENT` asserts the presence of a whitespace before the
+# comment leader. This assertion is not satisfied for a comment starting at the
+# start of the line.
+#}}}
+const COMMENT: string = '^\s*\%(#\|"\\\=\s\).*$'
+
+# DICT_KEY {{{3
+
+const DICT_KEY: string = '^\s*\%('
+ .. '\%(\w\|-\)\+'
+ .. '\|'
+ .. '"[^"]*"'
+ .. '\|'
+ .. "'[^']*'"
+ .. '\|'
+ .. '\[[^]]\+\]'
+ .. '\)'
+ .. ':\%(\s\|$\)'
+
+# NOT_A_DICT_KEY {{{3
+
+const NOT_A_DICT_KEY: string = ':\@!'
+
+# END_OF_COMMAND {{{3
+
+const END_OF_COMMAND: string = $'\s*\%($\|||\@!\|{INLINE_COMMENT}\)'
+
+# END_OF_LINE {{{3
+
+const END_OF_LINE: string = $'\s*\%($\|{INLINE_COMMENT}\)'
+
+# END_OF_VIM9_LINE {{{3
+
+const END_OF_VIM9_LINE: string = $'\s*\%($\|{INLINE_VIM9_COMMENT}\)'
+
+# OPERATOR {{{3
+
+const OPERATOR: string = '\%(^\|\s\)\%([-+*/%]\|\.\.\|||\|&&\|??\|?\|<<\|>>\|\%([=!]=\|[<>]=\=\|[=!]\~\|is\|isnot\)[?#]\=\)\%(\s\|$\)\@=\%(\s*[|<]\)\@!'
+ # assignment operators
+ .. '\|' .. '\s\%([-+*/%]\|\.\.\)\==\%(\s\|$\)\@='
+ # support `:` when used inside conditional operator `?:`
+ .. '\|' .. '\%(\s\|^\):\%(\s\|$\)'
+
+# HEREDOC_OPERATOR {{{3
+
+const HEREDOC_OPERATOR: string = '\s=<<\s\@=\%(\s\+\%(trim\|eval\)\)\{,2}'
+
+# PATTERN_DELIMITER {{{3
+
+# A better regex would be:
+#
+# [^-+*/%.:# \t[:alnum:]\"|]\@=.\|->\@!\%(=\s\)\@!\|[+*/%]\%(=\s\)\@!
+#
+# But sometimes, it can be too costly and cause `E363` to be given.
+const PATTERN_DELIMITER: string = '[-+*/%]\%(=\s\)\@!'
+# }}}2
+# Syntaxes {{{2
+# BLOCKS {{{3
+
+const BLOCKS: list<list<string>> = [
+ ['if', 'el\%[se]', 'elseif\=', 'en\%[dif]'],
+ ['for', 'endfor\='],
+ ['wh\%[ile]', 'endw\%[hile]'],
+ ['try', 'cat\%[ch]', 'fina\|finally\=', 'endt\%[ry]'],
+ ['def', 'enddef'],
+ ['fu\%[nction](\@!', 'endf\%[unction]'],
+ ['class', 'endclass'],
+ ['interface', 'endinterface'],
+ ['enum', 'endenum'],
+ ['aug\%[roup]\%(\s\+[eE][nN][dD]\)\@!\s\+\S\+', 'aug\%[roup]\s\+[eE][nN][dD]'],
+]
+
+# MODIFIERS {{{3
+
+# some keywords can be prefixed by modifiers (e.g. `def` can be prefixed by `export`)
+const MODIFIERS: dict<string> = {
+ def: ['export', 'static'],
+ class: ['export', 'abstract', 'export abstract'],
+ interface: ['export'],
+}
+# ...
+# class: ['export', 'abstract', 'export abstract'],
+# ...
+# →
+# ...
+# class: '\%(export\|abstract\|export\s\+abstract\)\s\+',
+# ...
+->map((_, mods: list<string>): string =>
+ '\%(' .. mods
+ ->join('\|')
+ ->substitute('\s\+', '\\s\\+', 'g')
+ .. '\)' .. '\s\+')
+
+# HIGHER_ORDER_COMMAND {{{3
+
+patterns =<< trim eval END
+ argdo\>!\=
+ bufdo\>!\=
+ cdo\>!\=
+ folddoc\%[losed]\>
+ foldd\%[oopen]\>
+ ldo\=\>!\=
+ tabdo\=\>
+ windo\>
+ au\%[tocmd]\>.*
+ com\%[mand]\>.*
+ g\%[lobal]!\={PATTERN_DELIMITER}.*
+ v\%[global]!\={PATTERN_DELIMITER}.*
+END
+
+const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\){NOT_A_DICT_KEY}'
+
+# START_MIDDLE_END {{{3
+
+# Let's derive this constant from `BLOCKS`:
+#
+# [['if', 'el\%[se]', 'elseif\=', 'en\%[dif]'],
+# ['for', 'endfor\='],
+# ...,
+# [...]]
+# →
+# {
+# 'for': ['for', '', 'endfor\='],
+# 'endfor': ['for', '', 'endfor\='],
+# 'if': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
+# 'else': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
+# 'elseif': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
+# 'endif': ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
+# ...
+# }
+var START_MIDDLE_END: dict<list<string>>
+
+def Unshorten(kwd: string): string
+ return BlockStartKeyword(kwd)
+enddef
+
+def BlockStartKeyword(line: string): string
+ var kwd: string = line->matchstr('\l\+')
+ return fullcommand(kwd, false)
+enddef
+
+{
+ for kwds: list<string> in BLOCKS
+ var [start: string, middle: string, end: string] = [kwds[0], '', kwds[-1]]
+ if MODIFIERS->has_key(start->Unshorten())
+ start = $'\%({MODIFIERS[start]}\)\={start}'
+ endif
+ if kwds->len() > 2
+ middle = kwds[1 : -2]->join('\|')
+ endif
+ for kwd: string in kwds
+ START_MIDDLE_END->extend({[kwd->Unshorten()]: [start, middle, end]})
+ endfor
+ endfor
+}
+
+START_MIDDLE_END = START_MIDDLE_END
+ ->map((_, kwds: list<string>) =>
+ kwds->map((_, kwd: string) => kwd == ''
+ ? ''
+ : $'\%(^\|{BAR_SEPARATION}\|\<sil\%[ent]\|{HIGHER_ORDER_COMMAND}\)\s*'
+ .. $'\<\%({kwd}\)\>\%(\s*{OPERATOR}\)\@!'))
+
+lockvar! START_MIDDLE_END
+
+# ENDS_BLOCK {{{3
+
+const ENDS_BLOCK: string = '^\s*\%('
+ .. BLOCKS
+ ->copy()
+ ->map((_, kwds: list<string>): string => kwds[-1])
+ ->join('\|')
+ .. '\|' .. CLOSING_BRACKET
+ .. $'\){END_OF_COMMAND}'
+
+# ENDS_BLOCK_OR_CLAUSE {{{3
+
+patterns = BLOCKS
+ ->copy()
+ ->map((_, kwds: list<string>) => kwds[1 :])
+ ->flattennew()
+ # `catch` and `elseif` need to be handled as special cases
+ ->filter((_, pat: string): bool => pat->Unshorten() !~ '^\%(catch\|elseif\)\>')
+
+const ENDS_BLOCK_OR_CLAUSE: string = '^\s*\%(' .. patterns->join('\|') .. $'\){END_OF_COMMAND}'
+ .. $'\|^\s*cat\%[ch]\%(\s\+\({PATTERN_DELIMITER}\).*\1\)\={END_OF_COMMAND}'
+ .. $'\|^\s*elseif\=\>\%({OPERATOR}\)\@!'
+
+# STARTS_NAMED_BLOCK {{{3
+
+patterns = []
+{
+ for kwds: list<string> in BLOCKS
+ for kwd: string in kwds[0 : -2]
+ if MODIFIERS->has_key(kwd->Unshorten())
+ patterns += [$'\%({MODIFIERS[kwd]}\)\={kwd}']
+ else
+ patterns += [kwd]
+ endif
+ endfor
+ endfor
+}
+
+const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>{NOT_A_DICT_KEY}'
+
+# STARTS_CURLY_BLOCK {{{3
+
+# TODO: `{` alone on a line is not necessarily the start of a block.
+# It could be a dictionary if the previous line ends with a binary/ternary
+# operator. This can cause an issue whenever we use `STARTS_CURLY_BLOCK` or
+# `LINE_CONTINUATION_AT_EOL`.
+const STARTS_CURLY_BLOCK: string = '\%('
+ .. '^\s*{'
+ .. '\|' .. '^.*\zs\s=>\s\+{'
+ .. '\|' .. $'^\%(\s*\|.*{BAR_SEPARATION}\s*\)\%(com\%[mand]\|au\%[tocmd]\).*\zs\s{{'
+ .. '\)' .. END_OF_COMMAND
+
+# STARTS_FUNCTION {{{3
+
+const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>{NOT_A_DICT_KEY}'
+
+# ENDS_FUNCTION {{{3
+
+const ENDS_FUNCTION: string = $'^\s*enddef\>{END_OF_COMMAND}'
+
+# ASSIGNS_HEREDOC {{{3
+
+const ASSIGNS_HEREDOC: string = $'^\%({COMMENT}\)\@!.*\%({HEREDOC_OPERATOR}\)\s\+\zs[A-Z]\+{END_OF_LINE}'
+
+# PLUS_MINUS_COMMAND {{{3
+
+# In legacy, the `:+` and `:-` commands are not required to be preceded by a colon.
+# As a result, when `+` or `-` is alone on a line, there is ambiguity.
+# It might be an operator or a command.
+# To not break the indentation in legacy scripts, we might need to consider such
+# lines as commands.
+const PLUS_MINUS_COMMAND: string = '^\s*[+-]\s*$'
+
+# TRICKY_COMMANDS {{{3
+
+# Some commands are tricky because they accept an argument which can be
+# conflated with an operator. Examples:
+#
+# argdelete *
+# cd -
+# normal! ==
+# nunmap <buffer> (
+#
+# TODO: Other commands might accept operators as argument. Handle them too.
+patterns =<< trim eval END
+ {'\'}<argd\%[elete]\s\+\*\s*$
+ \<[lt]\=cd!\=\s\+-\s*$
+ \<norm\%[al]!\=\s*\S\+$
+ \%(\<sil\%[ent]!\=\s\+\)\=\<[nvxsoilct]\=\%(nore\|un\)map!\=\s
+ {PLUS_MINUS_COMMAND}
+END
+
+const TRICKY_COMMANDS: string = patterns->join('\|')
+# }}}2
+# EOL {{{2
+# OPENING_BRACKET_AT_EOL {{{3
+
+const OPENING_BRACKET_AT_EOL: string = OPENING_BRACKET .. END_OF_VIM9_LINE
+
+# CLOSING_BRACKET_AT_EOL {{{3
+
+const CLOSING_BRACKET_AT_EOL: string = CLOSING_BRACKET .. END_OF_VIM9_LINE
+
+# COMMA_AT_EOL {{{3
+
+const COMMA_AT_EOL: string = $',{END_OF_VIM9_LINE}'
+
+# COMMA_OR_DICT_KEY_AT_EOL {{{3
+
+const COMMA_OR_DICT_KEY_AT_EOL: string = $'\%(,\|{DICT_KEY}\){END_OF_VIM9_LINE}'
+
+# LAMBDA_ARROW_AT_EOL {{{3
+
+const LAMBDA_ARROW_AT_EOL: string = $'\s=>{END_OF_VIM9_LINE}'
+
+# LINE_CONTINUATION_AT_EOL {{{3
+
+const LINE_CONTINUATION_AT_EOL: string = '\%('
+ .. ','
+ .. '\|' .. OPERATOR
+ .. '\|' .. '\s=>'
+ .. '\|' .. '[^=]\zs[[(]'
+ .. '\|' .. DICT_KEY
+ # `{` is ambiguous.
+ # It can be the start of a dictionary or a block.
+ # We only want to match the former.
+ .. '\|' .. $'^\%({STARTS_CURLY_BLOCK}\)\@!.*\zs{{'
+ .. '\)\s*\%(\s#.*\)\=$'
+# }}}2
+# SOL {{{2
+# BACKSLASH_AT_SOL {{{3
+
+const BACKSLASH_AT_SOL: string = '^\s*\%(\\\|[#"]\\ \)'
+
+# CLOSING_BRACKET_AT_SOL {{{3
+
+const CLOSING_BRACKET_AT_SOL: string = $'^\s*{CLOSING_BRACKET}'
+
+# LINE_CONTINUATION_AT_SOL {{{3
+
+const LINE_CONTINUATION_AT_SOL: string = '^\s*\%('
+ .. '\\'
+ .. '\|' .. '[#"]\\ '
+ .. '\|' .. OPERATOR
+ .. '\|' .. '->\s*\h'
+ .. '\|' .. '\.\h' # dict member
+ .. '\|' .. '|'
+ # TODO: `}` at the start of a line is not necessarily a line continuation.
+ # Could be the end of a block.
+ .. '\|' .. CLOSING_BRACKET
+ .. '\)'
+
+# RANGE_AT_SOL {{{3
+
+const RANGE_AT_SOL: string = '^\s*:\S'
+# }}}1
+# Interface {{{1
+export def Expr(lnum = v:lnum): number # {{{2
+ # line which is indented
+ var line_A: dict<any> = {text: getline(lnum), lnum: lnum}
+ # line above, on which we'll base the indent of line A
+ var line_B: dict<any>
+
+ if line_A->AtStartOf('HereDoc')
+ line_A->CacheHeredoc()
+ elseif line_A.lnum->IsInside('HereDoc')
+ return line_A.text->HereDocIndent()
+ elseif line_A.lnum->IsRightBelow('HereDoc')
+ var ind: number = b:vimindent.startindent
+ unlet! b:vimindent
+ return ind
+ endif
+
+ # Don't move this block after the function header one.
+ # Otherwise, we might clear the cache too early if the line following the
+ # header is a comment.
+ if line_A.text =~ COMMENT
+ return CommentIndent()
+ endif
+
+ line_B = PrevCodeLine(line_A.lnum)
+ if line_A.text =~ BACKSLASH_AT_SOL
+ if line_B.text =~ BACKSLASH_AT_SOL
+ return Indent(line_B.lnum)
+ else
+ return Indent(line_B.lnum) + IndentMoreLineContinuation()
+ endif
+ endif
+
+ if line_A->AtStartOf('FuncHeader')
+ && !IsInInterface()
+ line_A.lnum->CacheFuncHeader()
+ elseif line_A.lnum->IsInside('FuncHeader')
+ return b:vimindent.startindent + 2 * shiftwidth()
+ elseif line_A.lnum->IsRightBelow('FuncHeader')
+ var startindent: number = b:vimindent.startindent
+ unlet! b:vimindent
+ if line_A.text =~ ENDS_FUNCTION
+ return startindent
+ else
+ return startindent + shiftwidth()
+ endif
+ endif
+
+ var past_bracket_block: dict<any>
+ if exists('b:vimindent')
+ && b:vimindent->has_key('is_BracketBlock')
+ past_bracket_block = RemovePastBracketBlock(line_A)
+ endif
+ if line_A->AtStartOf('BracketBlock')
+ line_A->CacheBracketBlock()
+ endif
+ if line_A.lnum->IsInside('BracketBlock')
+ var is_in_curly_block: bool = IsInCurlyBlock()
+ for block: dict<any> in b:vimindent.block_stack
+ if line_A.lnum <= block.startlnum
+ continue
+ endif
+ if !block->has_key('startindent')
+ block.startindent = Indent(block.startlnum)
+ endif
+ if !is_in_curly_block
+ return BracketBlockIndent(line_A, block)
+ endif
+ endfor
+ endif
+ if line_A.text->ContinuesBelowBracketBlock(line_B, past_bracket_block)
+ && line_A.text !~ CLOSING_BRACKET_AT_SOL
+ return past_bracket_block.startindent
+ + (past_bracket_block.startline =~ STARTS_NAMED_BLOCK ? 2 * shiftwidth() : 0)
+ endif
+
+ # Problem: If we press `==` on the line right below the start of a multiline
+ # lambda (split after its arrow `=>`), the indent is not correct.
+ # Solution: Indent relative to the line above.
+ if line_B->EndsWithLambdaArrow()
+ return Indent(line_B.lnum) + shiftwidth() + IndentMoreInBracketBlock()
+ endif
+ # FIXME: Similar issue here:
+ #
+ # var x = []
+ # ->filter((_, _) =>
+ # true)
+ # ->items()
+ #
+ # Press `==` on last line.
+ # Expected: The `->items()` line is indented like `->filter(...)`.
+ # Actual: It's indented like `true)`.
+ # Is it worth fixing? `=ip` gives the correct indentation, because then the
+ # cache is used.
+
+ # Don't move this block before the heredoc one.{{{
+ #
+ # A heredoc might be assigned on the very first line.
+ # And if it is, we need to cache some info.
+ #}}}
+ # Don't move it before the function header and bracket block ones either.{{{
+ #
+ # You could, because these blocks of code deal with construct which can only
+ # appear in a Vim9 script. And in a Vim9 script, the first line is
+ # `vim9script`. Or maybe some legacy code/comment (see `:help vim9-mix`).
+ # But you can't find a Vim9 function header or Vim9 bracket block on the
+ # first line.
+ #
+ # Anyway, even if you could, don't. First, it would be inconsistent.
+ # Second, it could give unexpected results while we're trying to fix some
+ # failing test.
+ #}}}
+ if line_A.lnum == 1
+ return 0
+ endif
+
+ # Don't do that:
+ # if line_A.text !~ '\S'
+ # return -1
+ # endif
+ # It would prevent a line from being automatically indented when using the
+ # normal command `o`.
+ # TODO: Can we write a test for this?
+
+ if line_B.text =~ STARTS_CURLY_BLOCK
+ return Indent(line_B.lnum) + shiftwidth() + IndentMoreInBracketBlock()
+
+ elseif line_A.text =~ CLOSING_BRACKET_AT_SOL
+ var start: number = MatchingOpenBracket(line_A)
+ if start <= 0
+ return -1
+ endif
+ return Indent(start) + IndentMoreInBracketBlock()
+
+ elseif line_A.text =~ ENDS_BLOCK_OR_CLAUSE
+ && !line_B->EndsWithLineContinuation()
+ var kwd: string = BlockStartKeyword(line_A.text)
+ if !START_MIDDLE_END->has_key(kwd)
+ return -1
+ endif
+
+ # If the cursor is after the match for the end pattern, we won't find
+ # the start of the block. Let's make sure that doesn't happen.
+ cursor(line_A.lnum, 1)
+
+ var [start: string, middle: string, end: string] = START_MIDDLE_END[kwd]
+ var block_start: number = SearchPairStart(start, middle, end)
+ if block_start > 0
+ return Indent(block_start)
+ else
+ return -1
+ endif
+ endif
+
+ var base_ind: number
+ if line_A->IsFirstLineOfCommand(line_B)
+ line_A.isfirst = true
+ line_B = line_B->FirstLinePreviousCommand()
+ base_ind = Indent(line_B.lnum)
+
+ if line_B->EndsWithCurlyBlock()
+ && !line_A->IsInThisBlock(line_B.lnum)
+ return base_ind
+ endif
+
+ else
+ line_A.isfirst = false
+ base_ind = Indent(line_B.lnum)
+
+ var line_C: dict<any> = PrevCodeLine(line_B.lnum)
+ if !line_B->IsFirstLineOfCommand(line_C) || line_C.lnum <= 0
+ return base_ind
+ endif
+ endif
+
+ var ind: number = base_ind + Offset(line_A, line_B)
+ return [ind, 0]->max()
+enddef
+
+def g:GetVimIndent(): number # {{{2
+ # for backward compatibility
+ return Expr()
+enddef
+# }}}1
+# Core {{{1
+def Offset( # {{{2
+ # we indent this line ...
+ line_A: dict<any>,
+ # ... relatively to this line
+ line_B: dict<any>,
+ ): number
+
+ if line_B->AtStartOf('FuncHeader')
+ && IsInInterface()
+ return 0
+
+ # increase indentation inside a block
+ elseif line_B.text =~ STARTS_NAMED_BLOCK
+ || line_B->EndsWithCurlyBlock()
+ # But don't indent if the line starting the block also closes it.
+ if line_B->AlsoClosesBlock()
+ return 0
+ # Indent twice for a line continuation in the block header itself, so that
+ # we can easily distinguish the end of the block header from the start of
+ # the block body.
+ elseif (line_B->EndsWithLineContinuation()
+ && !line_A.isfirst)
+ || (line_A.text =~ LINE_CONTINUATION_AT_SOL
+ && line_A.text !~ PLUS_MINUS_COMMAND)
+ || line_A.text->Is_IN_KeywordForLoop(line_B.text)
+ return 2 * shiftwidth()
+ else
+ return shiftwidth()
+ endif
+
+ # increase indentation of a line if it's the continuation of a command which
+ # started on a previous line
+ elseif !line_A.isfirst
+ && (line_B->EndsWithLineContinuation()
+ || line_A.text =~ LINE_CONTINUATION_AT_SOL)
+ return shiftwidth()
+ endif
+
+ return 0
+enddef
+
+def HereDocIndent(line_A: string): number # {{{2
+ # at the end of a heredoc
+ if line_A =~ $'^\s*{b:vimindent.endmarker}$'
+ # `END` must be at the very start of the line if the heredoc is not trimmed
+ if !b:vimindent.is_trimmed
+ # We can't invalidate the cache just yet.
+ # The indent of `END` is meaningless; it's always 0. The next line
+ # will need to be indented relative to the start of the heredoc. It
+ # must know where it starts; it needs the cache.
+ return 0
+ else
+ var ind: number = b:vimindent.startindent
+ # invalidate the cache so that it's not used for the next heredoc
+ unlet! b:vimindent
+ return ind
+ endif
+ endif
+
+ # In a non-trimmed heredoc, all of leading whitespace is semantic.
+ # Leave it alone.
+ if !b:vimindent.is_trimmed
+ # But do save the indent of the assignment line.
+ if !b:vimindent->has_key('startindent')
+ b:vimindent.startindent = b:vimindent.startlnum->Indent()
+ endif
+ return -1
+ endif
+
+ # In a trimmed heredoc, *some* of the leading whitespace is semantic.
+ # We want to preserve it, so we can't just indent relative to the assignment
+ # line. That's because we're dealing with data, not with code.
+ # Instead, we need to compute by how much the indent of the assignment line
+ # was increased or decreased. Then, we need to apply that same change to
+ # every line inside the body.
+ var offset: number
+ if !b:vimindent->has_key('offset')
+ var old_startindent: number = b:vimindent.startindent
+ var new_startindent: number = b:vimindent.startlnum->Indent()
+ offset = new_startindent - old_startindent
+
+ # If all the non-empty lines in the body have a higher indentation relative
+ # to the assignment, there is no need to indent them more.
+ # But if at least one of them does have the same indentation level (or a
+ # lower one), then we want to indent it further (and the whole block with it).
+ # This way, we can clearly distinguish the heredoc block from the rest of
+ # the code.
+ var end: number = search($'^\s*{b:vimindent.endmarker}$', 'nW')
+ var should_indent_more: bool = range(v:lnum, end - 1)
+ ->indexof((_, lnum: number): bool => Indent(lnum) <= old_startindent && getline(lnum) != '') >= 0
+ if should_indent_more
+ offset += shiftwidth()
+ endif
+
+ b:vimindent.offset = offset
+ b:vimindent.startindent = new_startindent
+ endif
+
+ return [0, Indent(v:lnum) + b:vimindent.offset]->max()
+enddef
+
+def CommentIndent(): number # {{{2
+ var line_B: dict<any>
+ line_B.lnum = prevnonblank(v:lnum - 1)
+ line_B.text = getline(line_B.lnum)
+ if line_B.text =~ COMMENT
+ return Indent(line_B.lnum)
+ endif
+
+ var next: number = NextCodeLine()
+ if next == 0
+ return 0
+ endif
+ var vimindent_save: dict<any> = get(b:, 'vimindent', {})->deepcopy()
+ var ind: number = next->Expr()
+ # The previous `Expr()` might have set or deleted `b:vimindent`.
+ # This could cause issues (e.g. when indenting 2 commented lines above a
+ # heredoc). Let's make sure the state of the variable is not altered.
+ if vimindent_save->empty()
+ unlet! b:vimindent
+ else
+ b:vimindent = vimindent_save
+ endif
+ if getline(next) =~ ENDS_BLOCK
+ return ind + shiftwidth()
+ else
+ return ind
+ endif
+enddef
+
+def BracketBlockIndent(line_A: dict<any>, block: dict<any>): number # {{{2
+ var ind: number = block.startindent
+
+ if line_A.text =~ CLOSING_BRACKET_AT_SOL
+ if b:vimindent.is_on_named_block_line
+ ind += 2 * shiftwidth()
+ endif
+ return ind + IndentMoreInBracketBlock()
+ endif
+
+ var startline: dict<any> = {
+ text: block.startline,
+ lnum: block.startlnum
+ }
+ if startline->EndsWithComma()
+ || startline->EndsWithLambdaArrow()
+ || (startline->EndsWithOpeningBracket()
+ # TODO: Is that reliable?
+ && block.startline !~
+ $'^\s*{NON_BRACKET}\+{LIST_OR_DICT_CLOSING_BRACKET},\s\+{LIST_OR_DICT_OPENING_BRACKET}')
+ ind += shiftwidth() + IndentMoreInBracketBlock()
+ endif
+
+ if b:vimindent.is_on_named_block_line
+ ind += shiftwidth()
+ endif
+
+ if block.is_dict
+ && line_A.text !~ DICT_KEY
+ ind += shiftwidth()
+ endif
+
+ return ind
+enddef
+
+def CacheHeredoc(line_A: dict<any>) # {{{2
+ var endmarker: string = line_A.text->matchstr(ASSIGNS_HEREDOC)
+ var endlnum: number = search($'^\s*{endmarker}$', 'nW')
+ var is_trimmed: bool = line_A.text =~ $'.*\s\%(trim\%(\s\+eval\)\=\)\s\+[A-Z]\+{END_OF_LINE}'
+ b:vimindent = {
+ is_HereDoc: true,
+ startlnum: line_A.lnum,
+ endlnum: endlnum,
+ endmarker: endmarker,
+ is_trimmed: is_trimmed,
+ }
+ if is_trimmed
+ b:vimindent.startindent = Indent(line_A.lnum)
+ endif
+ RegisterCacheInvalidation()
+enddef
+
+def CacheFuncHeader(startlnum: number) # {{{2
+ var pos: list<number> = getcurpos()
+ cursor(startlnum, 1)
+ if search('(', 'W', startlnum) <= 0
+ return
+ endif
+ var endlnum: number = SearchPair('(', '', ')', 'nW')
+ setpos('.', pos)
+ if endlnum == startlnum
+ return
+ endif
+
+ b:vimindent = {
+ is_FuncHeader: true,
+ startindent: startlnum->Indent(),
+ endlnum: endlnum,
+ }
+ RegisterCacheInvalidation()
+enddef
+
+def CacheBracketBlock(line_A: dict<any>) # {{{2
+ var pos: list<number> = getcurpos()
+ var opening: string = line_A.text->matchstr(CHARACTER_UNDER_CURSOR)
+ var closing: string = {'[': ']', '{': '}', '(': ')'}[opening]
+ var endlnum: number = SearchPair(opening, '', closing, 'nW')
+ setpos('.', pos)
+ if endlnum <= line_A.lnum
+ return
+ endif
+
+ if !exists('b:vimindent')
+ b:vimindent = {
+ is_BracketBlock: true,
+ is_on_named_block_line: line_A.text =~ STARTS_NAMED_BLOCK,
+ block_stack: [],
+ }
+ endif
+
+ var is_dict: bool
+ var is_curly_block: bool
+ if opening == '{'
+ if line_A.text =~ STARTS_CURLY_BLOCK
+ [is_dict, is_curly_block] = [false, true]
+ else
+ [is_dict, is_curly_block] = [true, false]
+ endif
+ endif
+ b:vimindent.block_stack->insert({
+ is_dict: is_dict,
+ is_curly_block: is_curly_block,
+ startline: line_A.text,
+ startlnum: line_A.lnum,
+ endlnum: endlnum,
+ })
+
+ RegisterCacheInvalidation()
+enddef
+
+def RegisterCacheInvalidation() # {{{2
+ # invalidate the cache so that it's not used for the next `=` normal command
+ autocmd_add([{
+ cmd: 'unlet! b:vimindent',
+ event: 'ModeChanged',
+ group: '__VimIndent__',
+ once: true,
+ pattern: '*:n',
+ replace: true,
+ }])
+enddef
+
+def RemovePastBracketBlock(line_A: dict<any>): dict<any> # {{{2
+ var stack: list<dict<any>> = b:vimindent.block_stack
+
+ var removed: dict<any>
+ if line_A.lnum > stack[0].endlnum
+ removed = stack[0]
+ endif
+
+ stack->filter((_, block: dict<any>): bool => line_A.lnum <= block.endlnum)
+ if stack->empty()
+ unlet! b:vimindent
+ endif
+ return removed
+enddef
+# }}}1
+# Util {{{1
+# Get {{{2
+def Indent(lnum: number): number # {{{3
+ if lnum <= 0
+ # Don't return `-1`. It could cause `Expr()` to return a non-multiple of `'shiftwidth'`.{{{
+ #
+ # It would be OK if we were always returning `Indent()` directly. But
+ # we don't. Most of the time, we include it in some computation
+ # like `Indent(...) + shiftwidth()`. If `'shiftwidth'` is `4`, and
+ # `Indent()` returns `-1`, `Expr()` will end up returning `3`.
+ #}}}
+ return 0
+ endif
+ return indent(lnum)
+enddef
+
+def MatchingOpenBracket(line: dict<any>): number # {{{3
+ var end: string = line.text->matchstr(CLOSING_BRACKET)
+ var start: string = {']': '[', '}': '{', ')': '('}[end]
+ cursor(line.lnum, 1)
+ return SearchPairStart(start, '', end)
+enddef
+
+def FirstLinePreviousCommand(line: dict<any>): dict<any> # {{{3
+ var line_B: dict<any> = line
+
+ while line_B.lnum > 1
+ var code_line_above: dict<any> = PrevCodeLine(line_B.lnum)
+
+ if line_B.text =~ CLOSING_BRACKET_AT_SOL
+ var n: number = MatchingOpenBracket(line_B)
+
+ if n <= 0
+ break
+ endif
+
+ line_B.lnum = n
+ line_B.text = getline(line_B.lnum)
+ continue
+
+ elseif line_B->IsFirstLineOfCommand(code_line_above)
+ break
+ endif
+
+ line_B = code_line_above
+ endwhile
+
+ return line_B
+enddef
+
+def PrevCodeLine(lnum: number): dict<any> # {{{3
+ var line: string = getline(lnum)
+ if line =~ '^\s*[A-Z]\+$'
+ var endmarker: string = line->matchstr('[A-Z]\+')
+ var pos: list<number> = getcurpos()
+ cursor(lnum, 1)
+ var n: number = search(ASSIGNS_HEREDOC, 'bnW')
+ setpos('.', pos)
+ if n > 0
+ line = getline(n)
+ if line =~ $'{HEREDOC_OPERATOR}\s\+{endmarker}'
+ return {lnum: n, text: line}
+ endif
+ endif
+ endif
+
+ var n: number = prevnonblank(lnum - 1)
+ line = getline(n)
+ while line =~ COMMENT && n > 1
+ n = prevnonblank(n - 1)
+ line = getline(n)
+ endwhile
+ # If we get back to the first line, we return 1 no matter what; even if it's a
+ # commented line. That should not cause an issue though. We just want to
+ # avoid a commented line above which there is a line of code which is more
+ # relevant. There is nothing above the first line.
+ return {lnum: n, text: line}
+enddef
+
+def NextCodeLine(): number # {{{3
+ var last: number = line('$')
+ if v:lnum == last
+ return 0
+ endif
+
+ var lnum: number = v:lnum + 1
+ while lnum <= last
+ var line: string = getline(lnum)
+ if line != '' && line !~ COMMENT
+ return lnum
+ endif
+ ++lnum
+ endwhile
+ return 0
+enddef
+
+def SearchPair( # {{{3
+ start: string,
+ middle: string,
+ end: string,
+ flags: string,
+ stopline = 0,
+ ): number
+
+ var s: string = start
+ var e: string = end
+ if start == '[' || start == ']'
+ s = s->escape('[]')
+ endif
+ if end == '[' || end == ']'
+ e = e->escape('[]')
+ endif
+ return searchpair('\C' .. s, (middle == '' ? '' : '\C' .. middle), '\C' .. e,
+ flags, (): bool => InCommentOrString(), stopline, TIMEOUT)
+enddef
+
+def SearchPairStart( # {{{3
+ start: string,
+ middle: string,
+ end: string,
+ ): number
+ return SearchPair(start, middle, end, 'bnW')
+enddef
+
+def SearchPairEnd( # {{{3
+ start: string,
+ middle: string,
+ end: string,
+ stopline = 0,
+ ): number
+ return SearchPair(start, middle, end, 'nW', stopline)
+enddef
+# }}}2
+# Test {{{2
+def AtStartOf(line_A: dict<any>, syntax: string): bool # {{{3
+ if syntax == 'BracketBlock'
+ return AtStartOfBracketBlock(line_A)
+ endif
+
+ var pat: string = {
+ HereDoc: ASSIGNS_HEREDOC,
+ FuncHeader: STARTS_FUNCTION
+ }[syntax]
+ return line_A.text =~ pat
+ && (!exists('b:vimindent') || !b:vimindent->has_key('is_HereDoc'))
+enddef
+
+def AtStartOfBracketBlock(line_A: dict<any>): bool # {{{3
+ # We ignore bracket blocks while we're indenting a function header
+ # because it makes the logic simpler. It might mean that we don't
+ # indent correctly a multiline bracket block inside a function header,
+ # but that's a corner case for which it doesn't seem worth making the
+ # code more complex.
+ if exists('b:vimindent')
+ && !b:vimindent->has_key('is_BracketBlock')
+ return false
+ endif
+
+ var pos: list<number> = getcurpos()
+ cursor(line_A.lnum, [line_A.lnum, '$']->col())
+
+ if SearchPair(OPENING_BRACKET, '', CLOSING_BRACKET, 'bcW', line_A.lnum) <= 0
+ setpos('.', pos)
+ return false
+ endif
+ # Don't restore the cursor position.
+ # It needs to be on a bracket for `CacheBracketBlock()` to work as intended.
+
+ return line_A->EndsWithOpeningBracket()
+ || line_A->EndsWithCommaOrDictKey()
+ || line_A->EndsWithLambdaArrow()
+enddef
+
+def ContinuesBelowBracketBlock( # {{{3
+ line_A: string,
+ line_B: dict<any>,
+ block: dict<any>
+ ): bool
+
+ return !block->empty()
+ && (line_A =~ LINE_CONTINUATION_AT_SOL
+ || line_B->EndsWithLineContinuation())
+enddef
+
+def IsInside(lnum: number, syntax: string): bool # {{{3
+ if !exists('b:vimindent')
+ || !b:vimindent->has_key($'is_{syntax}')
+ return false
+ endif
+
+ if syntax == 'BracketBlock'
+ if !b:vimindent->has_key('block_stack')
+ || b:vimindent.block_stack->empty()
+ return false
+ endif
+ return lnum <= b:vimindent.block_stack[0].endlnum
+ endif
+
+ return lnum <= b:vimindent.endlnum
+enddef
+
+def IsRightBelow(lnum: number, syntax: string): bool # {{{3
+ return exists('b:vimindent')
+ && b:vimindent->has_key($'is_{syntax}')
+ && lnum > b:vimindent.endlnum
+enddef
+
+def IsInCurlyBlock(): bool # {{{3
+ return b:vimindent.block_stack
+ ->indexof((_, block: dict<any>): bool => block.is_curly_block) >= 0
+enddef
+
+def IsInThisBlock(line_A: dict<any>, lnum: number): bool # {{{3
+ var pos: list<number> = getcurpos()
+ cursor(lnum, [lnum, '$']->col())
+ var end: number = SearchPairEnd('{', '', '}')
+ setpos('.', pos)
+
+ return line_A.lnum <= end
+enddef
+
+def IsInInterface(): bool # {{{3
+ return SearchPair('interface', '', 'endinterface', 'nW') > 0
+enddef
+
+def IsFirstLineOfCommand(line_1: dict<any>, line_2: dict<any>): bool # {{{3
+ if line_1.text->Is_IN_KeywordForLoop(line_2.text)
+ return false
+ endif
+
+ if line_1.text =~ RANGE_AT_SOL
+ || line_1.text =~ PLUS_MINUS_COMMAND
+ return true
+ endif
+
+ if line_2.text =~ DICT_KEY
+ && !line_1->IsInThisBlock(line_2.lnum)
+ return true
+ endif
+
+ var line_1_is_good: bool = line_1.text !~ COMMENT
+ && line_1.text !~ DICT_KEY
+ && line_1.text !~ LINE_CONTINUATION_AT_SOL
+
+ var line_2_is_good: bool = !line_2->EndsWithLineContinuation()
+
+ return line_1_is_good && line_2_is_good
+enddef
+
+def Is_IN_KeywordForLoop(line_1: string, line_2: string): bool # {{{3
+ return line_2 =~ '^\s*for\s'
+ && line_1 =~ '^\s*in\s'
+enddef
+
+def InCommentOrString(): bool # {{{3
+ return synstack('.', col('.'))
+ ->indexof((_, id: number): bool => synIDattr(id, 'name') =~ '\ccomment\|string\|heredoc') >= 0
+enddef
+
+def AlsoClosesBlock(line_B: dict<any>): bool # {{{3
+ # We know that `line_B` opens a block.
+ # Let's see if it also closes that block.
+ var kwd: string = BlockStartKeyword(line_B.text)
+ if !START_MIDDLE_END->has_key(kwd)
+ return false
+ endif
+
+ var [start: string, middle: string, end: string] = START_MIDDLE_END[kwd]
+ var pos: list<number> = getcurpos()
+ cursor(line_B.lnum, 1)
+ var block_end: number = SearchPairEnd(start, middle, end, line_B.lnum)
+ setpos('.', pos)
+
+ return block_end > 0
+enddef
+
+def EndsWithComma(line: dict<any>): bool # {{{3
+ return NonCommentedMatch(line, COMMA_AT_EOL)
+enddef
+
+def EndsWithCommaOrDictKey(line_A: dict<any>): bool # {{{3
+ return NonCommentedMatch(line_A, COMMA_OR_DICT_KEY_AT_EOL)
+enddef
+
+def EndsWithCurlyBlock(line_B: dict<any>): bool # {{{3
+ return NonCommentedMatch(line_B, STARTS_CURLY_BLOCK)
+enddef
+
+def EndsWithLambdaArrow(line_A: dict<any>): bool # {{{3
+ return NonCommentedMatch(line_A, LAMBDA_ARROW_AT_EOL)
+enddef
+
+def EndsWithLineContinuation(line_B: dict<any>): bool # {{{3
+ return NonCommentedMatch(line_B, LINE_CONTINUATION_AT_EOL)
+enddef
+
+def EndsWithOpeningBracket(line: dict<any>): bool # {{{3
+ return NonCommentedMatch(line, OPENING_BRACKET_AT_EOL)
+enddef
+
+def EndsWithClosingBracket(line: dict<any>): bool # {{{3
+ return NonCommentedMatch(line, CLOSING_BRACKET_AT_EOL)
+enddef
+
+def NonCommentedMatch(line: dict<any>, pat: string): bool # {{{3
+ # Could happen if there is no code above us, and we're not on the 1st line.
+ # In that case, `PrevCodeLine()` returns `{lnum: 0, line: ''}`.
+ if line.lnum == 0
+ return false
+ endif
+
+ # Technically, that's wrong. A line might start with a range and end with a
+ # line continuation symbol. But it's unlikely. And it's useful to assume the
+ # opposite because it prevents us from conflating a mark with an operator or
+ # the start of a list:
+ #
+ # not a comparison operator
+ # v
+ # :'< mark <
+ # :'< mark [
+ # ^
+ # not the start of a list
+ if line.text =~ RANGE_AT_SOL
+ return false
+ endif
+
+ # that's not an arithmetic operator
+ # v
+ # catch /pattern /
+ #
+ # When `/` is used as a pattern delimiter, it's always present twice.
+ # And usually, the first occurrence is in the middle of a sequence of
+ # non-whitespace characters. If we can find such a `/`, we assume that the
+ # trailing `/` is not an operator.
+ # Warning: Here, don't use a too complex pattern.{{{
+ #
+ # In particular, avoid backreferences.
+ # For example, this would be too costly:
+ #
+ # if line.text =~ $'\%(\S*\({PATTERN_DELIMITER}\)\S\+\|\S\+\({PATTERN_DELIMITER}\)\S*\)'
+ # .. $'\s\+\1{END_OF_COMMAND}'
+ #
+ # Sometimes, it could even give `E363`.
+ #}}}
+ var delim: string = line.text
+ ->matchstr($'\s\+\zs{PATTERN_DELIMITER}\ze{END_OF_COMMAND}')
+ if !delim->empty()
+ delim = $'\V{delim}\m'
+ if line.text =~ $'\%(\S*{delim}\S\+\|\S\+{delim}\S*\)\s\+{delim}{END_OF_COMMAND}'
+ return false
+ endif
+ endif
+ # TODO: We might still miss some corner cases:{{{
+ #
+ # conflated with arithmetic division
+ # v
+ # substitute/pat / rep /
+ # echo
+ # ^--^
+ # ✘
+ #
+ # A better way to handle all these corner cases, would be to inspect the top
+ # of the syntax stack:
+ #
+ # :echo synID('.', col('.'), v:false)->synIDattr('name')
+ #
+ # Unfortunately, the legacy syntax plugin is not accurate enough.
+ # For example, it doesn't highlight a slash as an operator.
+ # }}}
+
+ # `%` at the end of a line is tricky.
+ # It might be the modulo operator or the current file (e.g. `edit %`).
+ # Let's assume it's the latter.
+ if line.text =~ $'%{END_OF_COMMAND}'
+ return false
+ endif
+
+ if line.text =~ TRICKY_COMMANDS
+ return false
+ endif
+
+ var pos: list<number> = getcurpos()
+ cursor(line.lnum, 1)
+ var match_lnum: number = search(pat, 'cnW', line.lnum, TIMEOUT, (): bool => InCommentOrString())
+ setpos('.', pos)
+ return match_lnum > 0
+enddef
+# }}}1
+# vim:sw=4
diff --git a/runtime/autoload/freebasic.vim b/runtime/autoload/freebasic.vim
new file mode 100644
index 0000000..6c94cd3
--- /dev/null
+++ b/runtime/autoload/freebasic.vim
@@ -0,0 +1,40 @@
+" Vim filetype plugin file
+" Language: FreeBASIC
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2022 June 24
+
+" Dialects can be one of fb, qb, fblite, or deprecated
+" Precedence is forcelang > #lang > lang
+function! freebasic#GetDialect() abort
+ if exists("g:freebasic_forcelang")
+ return g:freebasic_forcelang
+ endif
+
+ if exists("g:freebasic_lang")
+ let dialect = g:freebasic_lang
+ else
+ let dialect = "fb"
+ endif
+
+ " override with #lang directive or metacommand
+
+ let pat = '\c^\s*\%(#\s*lang\s\+\|''\s*$lang\s*:\s*\)"\([^"]*\)"'
+
+ let save_cursor = getcurpos()
+ call cursor(1, 1)
+ let lnum = search(pat, 'cn')
+ call setpos('.', save_cursor)
+
+ if lnum
+ let word = matchlist(getline(lnum), pat)[1]
+ if word =~? '\<\%(fb\|deprecated\|fblite\|qb\)\>'
+ let dialect = word
+ else
+ echomsg "freebasic#GetDialect: Invalid lang, found '" .. word .. "' at line " .. lnum .. " " .. getline(lnum)
+ endif
+ endif
+
+ return dialect
+endfunction
+
+" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:
diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim
new file mode 100644
index 0000000..1b14fe1
--- /dev/null
+++ b/runtime/autoload/getscript.vim
@@ -0,0 +1,667 @@
+" ---------------------------------------------------------------------
+" getscript.vim
+" Author: Charles E. Campbell
+" Date: Jan 21, 2014
+" Version: 36
+" 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= "v36"
+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 GetLatestVimScripts 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/available")
+ 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 it's 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 identifier : 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
diff --git a/runtime/autoload/gnat.vim b/runtime/autoload/gnat.vim
new file mode 100644
index 0000000..0def672
--- /dev/null
+++ b/runtime/autoload/gnat.vim
@@ -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
diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim
new file mode 100644
index 0000000..e4adec0
--- /dev/null
+++ b/runtime/autoload/gzip.vim
@@ -0,0 +1,220 @@
+" Vim autoload file for editing compressed files.
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last Change: 2016 Sep 28
+
+" 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
+ " set 'write'
+ let write_save = &write
+ set write
+ " 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
+ " Store the OK flag, so that we can use it when writing.
+ let b:uncompressOk = ok
+
+ " Restore saved option values.
+ let &pm = pm_save
+ let &cpo = cpo_save
+ let &l:ma = ma_save
+ let &write = write_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)
+ if exists('b:uncompressOk') && !b:uncompressOk
+ echomsg "Not compressing file because uncompress failed; reset b:uncompressOk to compress anyway"
+ " don't do anything if the cmd is not supported
+ elseif 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 :
diff --git a/runtime/autoload/haskellcomplete.vim b/runtime/autoload/haskellcomplete.vim
new file mode 100644
index 0000000..759ff87
--- /dev/null
+++ b/runtime/autoload/haskellcomplete.vim
@@ -0,0 +1,3385 @@
+" Vim completion script
+" Language: Haskell
+" Maintainer: Daniel Campoverde <alx@sillybytes.net>
+" URL: https://github.com/alx741/haskellcomplete.vim
+" Last Change: 2019 May 14
+
+" Usage: setlocal omnifunc=haskellcomplete#Complete
+
+
+" Language extensions from:
+" https://hackage.haskell.org/package/Cabal-2.2.0.1/docs/Language-Haskell-Extension.html
+"
+" GHC options from:
+" https://downloads.haskell.org/~ghc/7.0.4/docs/html/users_guide/flag-reference.html
+" https://downloads.haskell.org/~ghc/8.4.3/docs/html/users_guide/flags.html
+
+
+
+" Available completions
+let b:completingLangExtension = 0
+let b:completingOptionsGHC = 0
+let b:completingModule = 0
+
+function! haskellcomplete#Complete(findstart, base)
+ if a:findstart
+ let l:line = getline('.')
+ let l:start = col('.') - 1
+
+ if l:line =~ '^\s*{-#\s*LANGUAGE.*'
+ while l:start >= 0 && l:line[l:start - 1] !~ '[, ]'
+ let l:start -= 1
+ endwhile
+ let b:completingLangExtension = 1
+ return l:start
+
+ elseif l:line =~ '^\s*{-#\s*OPTIONS_GHC.*'
+ while l:start >= 0 && l:line[l:start - 1] !~ '[, ]'
+ let l:start -= 1
+ endwhile
+ let b:completingOptionsGHC = 1
+ return l:start
+
+ elseif l:line =~ '^\s*import\s*.*'
+ while l:start >= 0 && l:line[l:start - 1] !~ ' '
+ let l:start -= 1
+ endwhile
+ let b:completingModule = 1
+ return l:start
+
+ endif
+
+ return start
+ endif
+
+ if b:completingLangExtension
+ if a:base ==? ""
+ " Return all possible Lang extensions
+ return s:langExtensions
+ else
+ let l:matches = []
+ for extension in s:langExtensions
+ if extension =~? '^' . a:base
+ call add(l:matches, extension)
+ endif
+ endfor
+ let b:completingLangExtension = 0
+ return l:matches
+ endif
+
+
+ elseif b:completingOptionsGHC
+ if a:base ==? ""
+ " Return all possible GHC options
+ return s:optionsGHC
+ else
+ let l:matches = []
+ for flag in s:optionsGHC
+ if flag =~? '^' . a:base
+ call add(l:matches, flag)
+ endif
+ endfor
+ let b:completingOptionsGHC = 0
+ return l:matches
+ endif
+
+
+ elseif b:completingModule
+ if a:base ==? ""
+ " Return all possible modules
+ return s:commonModules
+ else
+ let l:matches = []
+ for module in s:commonModules
+ if module =~? '^' . a:base
+ call add(l:matches, module)
+ endif
+ endfor
+ let b:completingModule = 0
+ return l:matches
+ endif
+
+ endif
+
+ return -1
+endfunction
+
+let s:langExtensions =
+ \ [ "OverlappingInstances"
+ \ , "UndecidableInstances"
+ \ , "IncoherentInstances"
+ \ , "DoRec"
+ \ , "RecursiveDo"
+ \ , "ParallelListComp"
+ \ , "MultiParamTypeClasses"
+ \ , "MonomorphismRestriction"
+ \ , "FunctionalDependencies"
+ \ , "Rank2Types"
+ \ , "RankNTypes"
+ \ , "PolymorphicComponents"
+ \ , "ExistentialQuantification"
+ \ , "ScopedTypeVariables"
+ \ , "PatternSignatures"
+ \ , "ImplicitParams"
+ \ , "FlexibleContexts"
+ \ , "FlexibleInstances"
+ \ , "EmptyDataDecls"
+ \ , "CPP"
+ \ , "KindSignatures"
+ \ , "BangPatterns"
+ \ , "TypeSynonymInstances"
+ \ , "TemplateHaskell"
+ \ , "ForeignFunctionInterface"
+ \ , "Arrows"
+ \ , "Generics"
+ \ , "ImplicitPrelude"
+ \ , "NamedFieldPuns"
+ \ , "PatternGuards"
+ \ , "GeneralizedNewtypeDeriving"
+ \ , "ExtensibleRecords"
+ \ , "RestrictedTypeSynonyms"
+ \ , "HereDocuments"
+ \ , "MagicHash"
+ \ , "TypeFamilies"
+ \ , "StandaloneDeriving"
+ \ , "UnicodeSyntax"
+ \ , "UnliftedFFITypes"
+ \ , "InterruptibleFFI"
+ \ , "CApiFFI"
+ \ , "LiberalTypeSynonyms"
+ \ , "TypeOperators"
+ \ , "RecordWildCards"
+ \ , "RecordPuns"
+ \ , "DisambiguateRecordFields"
+ \ , "TraditionalRecordSyntax"
+ \ , "OverloadedStrings"
+ \ , "GADTs"
+ \ , "GADTSyntax"
+ \ , "MonoPatBinds"
+ \ , "RelaxedPolyRec"
+ \ , "ExtendedDefaultRules"
+ \ , "UnboxedTuples"
+ \ , "DeriveDataTypeable"
+ \ , "DeriveGeneric"
+ \ , "DefaultSignatures"
+ \ , "InstanceSigs"
+ \ , "ConstrainedClassMethods"
+ \ , "PackageImports"
+ \ , "ImpredicativeTypes"
+ \ , "NewQualifiedOperators"
+ \ , "PostfixOperators"
+ \ , "QuasiQuotes"
+ \ , "TransformListComp"
+ \ , "MonadComprehensions"
+ \ , "ViewPatterns"
+ \ , "XmlSyntax"
+ \ , "RegularPatterns"
+ \ , "TupleSections"
+ \ , "GHCForeignImportPrim"
+ \ , "NPlusKPatterns"
+ \ , "DoAndIfThenElse"
+ \ , "MultiWayIf"
+ \ , "LambdaCase"
+ \ , "RebindableSyntax"
+ \ , "ExplicitForAll"
+ \ , "DatatypeContexts"
+ \ , "MonoLocalBinds"
+ \ , "DeriveFunctor"
+ \ , "DeriveTraversable"
+ \ , "DeriveFoldable"
+ \ , "NondecreasingIndentation"
+ \ , "SafeImports"
+ \ , "Safe"
+ \ , "Trustworthy"
+ \ , "Unsafe"
+ \ , "ConstraintKinds"
+ \ , "PolyKinds"
+ \ , "DataKinds"
+ \ , "ParallelArrays"
+ \ , "RoleAnnotations"
+ \ , "OverloadedLists"
+ \ , "EmptyCase"
+ \ , "AutoDeriveTypeable"
+ \ , "NegativeLiterals"
+ \ , "BinaryLiterals"
+ \ , "NumDecimals"
+ \ , "NullaryTypeClasses"
+ \ , "ExplicitNamespaces"
+ \ , "AllowAmbiguousTypes"
+ \ , "JavaScriptFFI"
+ \ , "PatternSynonyms"
+ \ , "PartialTypeSignatures"
+ \ , "NamedWildCards"
+ \ , "DeriveAnyClass"
+ \ , "DeriveLift"
+ \ , "StaticPointers"
+ \ , "StrictData"
+ \ , "Strict"
+ \ , "ApplicativeDo"
+ \ , "DuplicateRecordFields"
+ \ , "TypeApplications"
+ \ , "TypeInType"
+ \ , "UndecidableSuperClasses"
+ \ , "MonadFailDesugaring"
+ \ , "TemplateHaskellQuotes"
+ \ , "OverloadedLabels"
+ \ , "TypeFamilyDependencies"
+ \ , "DerivingStrategies"
+ \ , "UnboxedSums"
+ \ , "HexFloatLiterals"
+ \ ]
+
+let s:optionsGHC =
+ \ [ "-n"
+ \ , "-v"
+ \ , "-vn"
+ \ , "-c"
+ \ , "-hcsuf"
+ \ , "-hidir"
+ \ , "-hisuf"
+ \ , "-o"
+ \ , "-odir"
+ \ , "-ohi"
+ \ , "-osuf"
+ \ , "-stubdir"
+ \ , "-outputdir"
+ \ , "-keep-hc-file"
+ \ , "-keep-llvm-file"
+ \ , "-keep-s-file"
+ \ , "-keep-raw-s-file"
+ \ , "-keep-tmp-files"
+ \ , "-tmpdir"
+ \ , "-ddump-hi"
+ \ , "-ddump-hi-diffs"
+ \ , "-ddump-minimal-imports"
+ \ , "-fforce-recomp"
+ \ , "-fno-force-recomp"
+ \ , "-fbreak-on-exception"
+ \ , "-fno-break-on-exception"
+ \ , "-fbreak-on-error"
+ \ , "-fno-break-on-error"
+ \ , "-fprint-evld-with-show"
+ \ , "-fno-print-evld-with-show"
+ \ , "-fprint-bind-result"
+ \ , "-fno-print-bind-result"
+ \ , "-fno-print-bind-contents"
+ \ , "-fno-implicit-import-qualified"
+ \ , "-package-name"
+ \ , "-no-auto-link-packages"
+ \ , "-fglasgow-exts"
+ \ , "-fno-glasgow-exts"
+ \ , "-XOverlappingInstances"
+ \ , "-XNoOverlappingInstances"
+ \ , "-XIncoherentInstances"
+ \ , "-XNoIncoherentInstances"
+ \ , "-XUndecidableInstances"
+ \ , "-XNoUndecidableInstances"
+ \ , "-fcontext-stack=Nn"
+ \ , "-XArrows"
+ \ , "-XNoArrows"
+ \ , "-XDisambiguateRecordFields"
+ \ , "-XNoDisambiguateRecordFields"
+ \ , "-XForeignFunctionInterface"
+ \ , "-XNoForeignFunctionInterface"
+ \ , "-XGenerics"
+ \ , "-XNoGenerics"
+ \ , "-XImplicitParams"
+ \ , "-XNoImplicitParams"
+ \ , "-firrefutable-tuples"
+ \ , "-fno-irrefutable-tuples"
+ \ , "-XNoImplicitPrelude"
+ \ , "-XImplicitPrelude"
+ \ , "-XRebindableSyntax"
+ \ , "-XNoRebindableSyntax"
+ \ , "-XNoMonomorphismRestriction"
+ \ , "-XMonomorphismRrestriction"
+ \ , "-XNoNPlusKPatterns"
+ \ , "-XNPlusKPatterns"
+ \ , "-XNoMonoPatBinds"
+ \ , "-XMonoPatBinds"
+ \ , "-XRelaxedPolyRec"
+ \ , "-XNoRelaxedPolyRec"
+ \ , "-XExtendedDefaultRules"
+ \ , "-XNoExtendedDefaultRules"
+ \ , "-XOverloadedStrings"
+ \ , "-XNoOverloadedStrings"
+ \ , "-XGADTs"
+ \ , "-XNoGADTs"
+ \ , "-XTypeFamilies"
+ \ , "-XNoTypeFamilies"
+ \ , "-XScopedTypeVariables"
+ \ , "-XNoScopedTypeVariables"
+ \ , "-XMonoLocalBinds"
+ \ , "-XNoMonoLocalBinds"
+ \ , "-XTemplateHaskell"
+ \ , "-XNoTemplateHaskell"
+ \ , "-XQuasiQuotes"
+ \ , "-XNoQuasiQuotes"
+ \ , "-XBangPatterns"
+ \ , "-XNoBangPatterns"
+ \ , "-XCPP"
+ \ , "-XNoCPP"
+ \ , "-XPatternGuards"
+ \ , "-XNoPatternGuards"
+ \ , "-XViewPatterns"
+ \ , "-XNoViewPatterns"
+ \ , "-XUnicodeSyntax"
+ \ , "-XNoUnicodeSyntax"
+ \ , "-XMagicHash"
+ \ , "-XNoMagicHash"
+ \ , "-XNewQualifiedOperators"
+ \ , "-XNoNewQualifiedOperators"
+ \ , "-XExplicitForALl"
+ \ , "-XNoExplicitForAll"
+ \ , "-XPolymorphicComponents"
+ \ , "-XNoPolymorphicComponents"
+ \ , "-XRank2Types"
+ \ , "-XNoRank2Types"
+ \ , "-XRankNTypes"
+ \ , "-XNoRankNTypes"
+ \ , "-XImpredicativeTypes"
+ \ , "-XNoImpredicativeTypes"
+ \ , "-XExistentialQuantification"
+ \ , "-XNoExistentialQuantification"
+ \ , "-XKindSignatures"
+ \ , "-XNoKindSignatures"
+ \ , "-XEmptyDataDecls"
+ \ , "-XNoEmptyDataDecls"
+ \ , "-XParallelListComp"
+ \ , "-XNoParallelListComp"
+ \ , "-XTransformListComp"
+ \ , "-XNoTransformListComp"
+ \ , "-XUnliftedFFITypes"
+ \ , "-XNoUnliftedFFITypes"
+ \ , "-XLiberalTypeSynonyms"
+ \ , "-XNoLiberalTypeSynonyms"
+ \ , "-XTypeOperators"
+ \ , "-XNoTypeOperators"
+ \ , "-XDoRec"
+ \ , "-XNoDoRec"
+ \ , "-XRecursiveDo"
+ \ , "-XNoRecursiveDo"
+ \ , "-XPArr"
+ \ , "-XNoPArr"
+ \ , "-XRecordWildCards"
+ \ , "-XNoRecordWildCards"
+ \ , "-XNamedFieldPuns"
+ \ , "-XNoNamedFieldPuns"
+ \ , "-XDisambiguateRecordFields"
+ \ , "-XNoDisambiguateRecordFields"
+ \ , "-XUnboxedTuples"
+ \ , "-XNoUnboxedTuples"
+ \ , "-XStandaloneDeriving"
+ \ , "-XNoStandaloneDeriving"
+ \ , "-XDeriveDataTypeable"
+ \ , "-XNoDeriveDataTypeable"
+ \ , "-XGeneralizedNewtypeDeriving"
+ \ , "-XNoGeneralizedNewtypeDeriving"
+ \ , "-XTypeSynonymInstances"
+ \ , "-XNoTypeSynonymInstances"
+ \ , "-XFlexibleContexts"
+ \ , "-XNoFlexibleContexts"
+ \ , "-XFlexibleInstances"
+ \ , "-XNoFlexibleInstances"
+ \ , "-XConstrainedClassMethods"
+ \ , "-XNoConstrainedClassMethods"
+ \ , "-XMultiParamTypeClasses"
+ \ , "-XNoMultiParamTypeClasses"
+ \ , "-XFunctionalDependencies"
+ \ , "-XNoFunctionalDependencies"
+ \ , "-XPackageImports"
+ \ , "-XNoPackageImports"
+ \ , "-W"
+ \ , "-w"
+ \ , "-w"
+ \ , "-Wall"
+ \ , "-w"
+ \ , "-Werror"
+ \ , "-Wwarn"
+ \ , "-Wwarn"
+ \ , "-Werror"
+ \ , "-fwarn-unrecognised-pragmas"
+ \ , "-fno-warn-unrecognised-pragmas"
+ \ , "-fwarn-warnings-deprecations"
+ \ , "-fno-warn-warnings-deprecations"
+ \ , "-fwarn-deprecated-flags"
+ \ , "-fno-warn-deprecated-flags"
+ \ , "-fwarn-duplicate-exports"
+ \ , "-fno-warn-duplicate-exports"
+ \ , "-fwarn-hi-shadowing"
+ \ , "-fno-warn-hi-shadowing"
+ \ , "-fwarn-implicit-prelude"
+ \ , "-fno-warn-implicit-prelude"
+ \ , "-fwarn-incomplete-patterns"
+ \ , "-fno-warn-incomplete-patterns"
+ \ , "-fwarn-incomplete-record-updates"
+ \ , "-fno-warn-incomplete-record-updates"
+ \ , "-fwarn-lazy-unlifted-bindings"
+ \ , "-fno-warn-lazy-unlifted-bindings"
+ \ , "-fwarn-missing-fields"
+ \ , "-fno-warn-missing-fields"
+ \ , "-fwarn-missing-import-lists"
+ \ , "-fnowarn-missing-import-lists"
+ \ , "-fwarn-missing-methods"
+ \ , "-fno-warn-missing-methods"
+ \ , "-fwarn-missing-signatures"
+ \ , "-fno-warn-missing-signatures"
+ \ , "-fwarn-name-shadowing"
+ \ , "-fno-warn-name-shadowing"
+ \ , "-fwarn-orphans"
+ \ , "-fno-warn-orphans"
+ \ , "-fwarn-overlapping-patterns"
+ \ , "-fno-warn-overlapping-patterns"
+ \ , "-fwarn-tabs"
+ \ , "-fno-warn-tabs"
+ \ , "-fwarn-type-defaults"
+ \ , "-fno-warn-type-defaults"
+ \ , "-fwarn-monomorphism-restriction"
+ \ , "-fno-warn-monomorphism-restriction"
+ \ , "-fwarn-unused-binds"
+ \ , "-fno-warn-unused-binds"
+ \ , "-fwarn-unused-imports"
+ \ , "-fno-warn-unused-imports"
+ \ , "-fwarn-unused-matches"
+ \ , "-fno-warn-unused-matches"
+ \ , "-fwarn-unused-do-bind"
+ \ , "-fno-warn-unused-do-bind"
+ \ , "-fwarn-wrong-do-bind"
+ \ , "-fno-warn-wrong-do-bind"
+ \ , "-O"
+ \ , "-O0"
+ \ , "-On"
+ \ , "-O0"
+ \ , "-fcase-merge"
+ \ , "-fno-case-merge"
+ \ , "-fmethod-sharing"
+ \ , "-fno-method-sharing"
+ \ , "-fdo-eta-reduction"
+ \ , "-fno-do-eta-reduction"
+ \ , "-fdo-lambda-eta-expansion"
+ \ , "-fno-do-lambda-eta-expansion"
+ \ , "-fexcess-precision"
+ \ , "-fno-excess-precision"
+ \ , "-fignore-asserts"
+ \ , "-fno-ignore-asserts"
+ \ , "-fignore-interface-pragmas"
+ \ , "-fno-ignore-interface-pragmas"
+ \ , "-fomit-interface-pragmas"
+ \ , "-fno-omit-interface-pragmas"
+ \ , "-fsimplifier-phases"
+ \ , "-fmax-simplifier-iterations"
+ \ , "-fcse"
+ \ , "-fno-cse"
+ \ , "-fspecialise"
+ \ , "-fno-specialise"
+ \ , "-ffull-laziness"
+ \ , "-fno-full-laziness"
+ \ , "-ffloat-in"
+ \ , "-fno-float-in"
+ \ , "-fenable-rewrite-rules"
+ \ , "-fno-enable-rewrite-rules"
+ \ , "-fstrictness"
+ \ , "-fno-strictness"
+ \ , "-fstrictness=before=n"
+ \ , "-fspec-constr"
+ \ , "-fno-spec-constr"
+ \ , "-fliberate-case"
+ \ , "-fno-liberate-case"
+ \ , "-fstatic-argument-transformation"
+ \ , "-fno-static-argument-transformation"
+ \ , "-funbox-strict-fields"
+ \ , "-fno-unbox-strict-fields"
+ \ , "-feager-blackholing"
+ \ , "-auto"
+ \ , "-no-auto"
+ \ , "-auto-all"
+ \ , "-no-auto-all"
+ \ , "-caf-all"
+ \ , "-no-caf-all"
+ \ , "-hpcdir"
+ \ , "-F"
+ \ , "-cpp"
+ \ , "-Dsymbol[=value]"
+ \ , "-Usymbol"
+ \ , "-Usymbol"
+ \ , "-Idir"
+ \ , "-fasm"
+ \ , "-fvia-C"
+ \ , "-fvia-C"
+ \ , "-fasm"
+ \ , "-fllvm"
+ \ , "-fasm"
+ \ , "-fno-code"
+ \ , "-fbyte-code"
+ \ , "-fobject-code"
+ \ , "-shared"
+ \ , "-dynamic"
+ \ , "-framework"
+ \ , "-framework-path"
+ \ , "-llib"
+ \ , "-Ldir"
+ \ , "-main-is"
+ \ , "--mk-dll"
+ \ , "-no-hs-main"
+ \ , "-rtsopts,"
+ \ , "-with-rtsopts=opts"
+ \ , "-no-link"
+ \ , "-split-objs"
+ \ , "-fno-gen-manifest"
+ \ , "-fno-embed-manifest"
+ \ , "-fno-shared-implib"
+ \ , "-dylib-install-name"
+ \ , "-pgmL"
+ \ , "-pgmP"
+ \ , "-pgmc"
+ \ , "-pgmm"
+ \ , "-pgms"
+ \ , "-pgma"
+ \ , "-pgml"
+ \ , "-pgmdll"
+ \ , "-pgmF"
+ \ , "-pgmwindres"
+ \ , "-optL"
+ \ , "-optP"
+ \ , "-optF"
+ \ , "-optc"
+ \ , "-optlo"
+ \ , "-optlc"
+ \ , "-optm"
+ \ , "-opta"
+ \ , "-optl"
+ \ , "-optdll"
+ \ , "-optwindres"
+ \ , "-msse2"
+ \ , "-monly-[432]-regs"
+ \ , "-fext-core"
+ \ , "-dcore-lint"
+ \ , "-ddump-asm"
+ \ , "-ddump-bcos"
+ \ , "-ddump-cmm"
+ \ , "-ddump-cpranal"
+ \ , "-ddump-cse"
+ \ , "-ddump-deriv"
+ \ , "-ddump-ds"
+ \ , "-ddump-flatC"
+ \ , "-ddump-foreign"
+ \ , "-ddump-hpc"
+ \ , "-ddump-inlinings"
+ \ , "-ddump-llvm"
+ \ , "-ddump-occur-anal"
+ \ , "-ddump-opt-cmm"
+ \ , "-ddump-parsed"
+ \ , "-ddump-prep"
+ \ , "-ddump-rn"
+ \ , "-ddump-rules"
+ \ , "-ddump-simpl"
+ \ , "-ddump-simpl-phases"
+ \ , "-ddump-simpl-iterations"
+ \ , "-ddump-spec"
+ \ , "-ddump-splices"
+ \ , "-ddump-stg"
+ \ , "-ddump-stranal"
+ \ , "-ddump-tc"
+ \ , "-ddump-types"
+ \ , "-ddump-worker-wrapper"
+ \ , "-ddump-if-trace"
+ \ , "-ddump-tc-trace"
+ \ , "-ddump-rn-trace"
+ \ , "-ddump-rn-stats"
+ \ , "-ddump-simpl-stats"
+ \ , "-dsource-stats"
+ \ , "-dcmm-lint"
+ \ , "-dstg-lint"
+ \ , "-dstg-stats"
+ \ , "-dverbose-core2core"
+ \ , "-dverbose-stg2stg"
+ \ , "-dshow-passes"
+ \ , "-dfaststring-stats"
+ \ , "-fno-asm-mangling"
+ \ , "-fno-ghci-sandbox"
+ \ , "-fdiagnostics-color="
+ \ , "-fdiagnostics-show-caret"
+ \ , "-fno-diagnostics-show-caret"
+ \ , "-ferror-spans"
+ \ , "-fhide-source-paths"
+ \ , "-fprint-equality-relations"
+ \ , "-fno-print-equality-relations"
+ \ , "-fprint-expanded-synonyms"
+ \ , "-fno-print-expanded-synonyms"
+ \ , "-fprint-explicit-coercions"
+ \ , "-fno-print-explicit-coercions"
+ \ , "-fprint-explicit-foralls"
+ \ , "-fno-print-explicit-foralls"
+ \ , "-fprint-explicit-kinds"
+ \ , "-fno-print-explicit-kinds"
+ \ , "-fprint-explicit-runtime-rep"
+ \ , "-fno-print-explicit-runtime-reps"
+ \ , "-fprint-explicit-runtime-reps"
+ \ , "-fno-print-explicit-runtime-reps"
+ \ , "-fprint-potential-instances"
+ \ , "-fno-print-potential-instances"
+ \ , "-fprint-typechecker-elaboration"
+ \ , "-fno-print-typechecker-elaboration"
+ \ , "-fprint-unicode-syntax"
+ \ , "-fno-print-unicode-syntax"
+ \ , "-fshow-hole-constraints"
+ \ , "-Rghc-timing"
+ \ , "-v"
+ \ , "-v"
+ \ , "-F"
+ \ , "-x"
+ \ , "--exclude-module="
+ \ , "-ddump-mod-cycles"
+ \ , "-dep-makefile"
+ \ , "-dep-suffix"
+ \ , "-dumpdir"
+ \ , "-hcsuf"
+ \ , "-hidir"
+ \ , "-hisuf"
+ \ , "-include-pkg-deps"
+ \ , "-o"
+ \ , "-odir"
+ \ , "-ohi"
+ \ , "-osuf"
+ \ , "-outputdir"
+ \ , "-stubdir"
+ \ , "-keep-hc-file,"
+ \ , "-keep-hi-files"
+ \ , "-no-keep-hi-files"
+ \ , "-keep-llvm-file,"
+ \ , "-keep-o-files"
+ \ , "-no-keep-o-files"
+ \ , "-keep-s-file,"
+ \ , "-keep-tmp-files"
+ \ , "-tmpdir"
+ \ , "-i"
+ \ , "-i[:]*"
+ \ , "-ddump-hi"
+ \ , "-ddump-hi-diffs"
+ \ , "-ddump-minimal-imports"
+ \ , "-fforce-recomp"
+ \ , "-fno-force-recomp"
+ \ , "-fignore-hpc-changes"
+ \ , "-fno-ignore-hpc-changes"
+ \ , "-fignore-optim-changes"
+ \ , "-fno-ignore-optim-changes"
+ \ , "-fbreak-on-error"
+ \ , "-fno-break-on-error"
+ \ , "-fbreak-on-exception"
+ \ , "-fno-break-on-exception"
+ \ , "-fghci-hist-size="
+ \ , "-flocal-ghci-history"
+ \ , "-fno-local-ghci-history"
+ \ , "-fprint-bind-result"
+ \ , "-fno-print-bind-result"
+ \ , "-fshow-loaded-modules"
+ \ , "-ghci-script"
+ \ , "-ignore-dot-ghci"
+ \ , "-interactive-print"
+ \ , "-clear-package-db"
+ \ , "-distrust"
+ \ , "-distrust-all-packages"
+ \ , "-fpackage-trust"
+ \ , "-global-package-db"
+ \ , "-hide-all-packages"
+ \ , "-hide-package"
+ \ , "-ignore-package"
+ \ , "-no-auto-link-packages"
+ \ , "-no-global-package-db"
+ \ , "-no-user-package-db"
+ \ , "-package"
+ \ , "-package-db"
+ \ , "-package-env"
+ \ , "-package-id"
+ \ , "-this-unit-id"
+ \ , "-trust"
+ \ , "-user-package-db"
+ \ , "-fdefer-out-of-scope-variables"
+ \ , "-fno-defer-out-of-scope-variables"
+ \ , "-fdefer-type-errors"
+ \ , "-fno-defer-type-errors"
+ \ , "-fdefer-typed-holes"
+ \ , "-fno-defer-typed-holes"
+ \ , "-fhelpful-errors"
+ \ , "-fno-helpful-errors"
+ \ , "-fmax-pmcheck-iterations="
+ \ , "-fshow-warning-groups"
+ \ , "-fno-show-warning-groups"
+ \ , "-W"
+ \ , "-w"
+ \ , "-w"
+ \ , "-Wall"
+ \ , "-w"
+ \ , "-Wall-missed-specialisations"
+ \ , "-Wno-all-missed-specialisations"
+ \ , "-Wamp"
+ \ , "-Wno-amp"
+ \ , "-Wcompat"
+ \ , "-Wno-compat"
+ \ , "-Wcpp-undef"
+ \ , "-Wdeferred-out-of-scope-variables"
+ \ , "-Wno-deferred-out-of-scope-variables"
+ \ , "-Wdeferred-type-errors"
+ \ , "-Wno-deferred-type-errors"
+ \ , "-Wdeprecated-flags"
+ \ , "-Wno-deprecated-flags"
+ \ , "-Wdeprecations"
+ \ , "-Wno-deprecations"
+ \ , "-Wdodgy-exports"
+ \ , "-Wno-dodgy-exports"
+ \ , "-Wdodgy-foreign-imports"
+ \ , "-Wno-dodgy-foreign-import"
+ \ , "-Wdodgy-imports"
+ \ , "-Wno-dodgy-imports"
+ \ , "-Wduplicate-constraints"
+ \ , "-Wno-duplicate-constraints"
+ \ , "-Wduplicate-exports"
+ \ , "-Wno-duplicate-exports"
+ \ , "-Wempty-enumerations"
+ \ , "-Wno-empty-enumerations"
+ \ , "-Werror"
+ \ , "-Wwarn"
+ \ , "-Weverything"
+ \ , "-Whi-shadowing"
+ \ , "-Wno-hi-shadowing"
+ \ , "-Widentities"
+ \ , "-Wno-identities"
+ \ , "-Wimplicit-prelude"
+ \ , "-Wno-implicit-prelude"
+ \ , "-Wincomplete-patterns"
+ \ , "-Wno-incomplete-patterns"
+ \ , "-Wincomplete-record-updates"
+ \ , "-Wno-incomplete-record-updates"
+ \ , "-Wincomplete-uni-patterns"
+ \ , "-Wno-incomplete-uni-patterns"
+ \ , "-Winline-rule-shadowing"
+ \ , "-Wno-inline-rule-shadowing"
+ \ , "-Wmissed-specialisations"
+ \ , "-Wno-missed-specialisations"
+ \ , "-Wmissing-export-lists"
+ \ , "-fnowarn-missing-export-lists"
+ \ , "-Wmissing-exported-signatures"
+ \ , "-Wno-missing-exported-signatures"
+ \ , "-Wmissing-exported-sigs"
+ \ , "-Wno-missing-exported-sigs"
+ \ , "-Wmissing-fields"
+ \ , "-Wno-missing-fields"
+ \ , "-Wmissing-home-modules"
+ \ , "-Wno-missing-home-modules"
+ \ , "-Wmissing-import-lists"
+ \ , "-fnowarn-missing-import-lists"
+ \ , "-Wmissing-local-signatures"
+ \ , "-Wno-missing-local-signatures"
+ \ , "-Wmissing-local-sigs"
+ \ , "-Wno-missing-local-sigs"
+ \ , "-Wmissing-methods"
+ \ , "-Wno-missing-methods"
+ \ , "-Wmissing-monadfail-instances"
+ \ , "-Wno-missing-monadfail-instances"
+ \ , "-Wmissing-pattern-synonym-signatures"
+ \ , "-Wno-missing-pattern-synonym-signatures"
+ \ , "-Wmissing-signatures"
+ \ , "-Wno-missing-signatures"
+ \ , "-Wmonomorphism-restriction"
+ \ , "-Wno-monomorphism-restriction"
+ \ , "-Wname-shadowing"
+ \ , "-Wno-name-shadowing"
+ \ , "-Wno-compat"
+ \ , "-Wcompat"
+ \ , "-Wnoncanonical-monad-instances"
+ \ , "-Wno-noncanonical-monad-instances"
+ \ , "-Wnoncanonical-monadfail-instances"
+ \ , "-Wno-noncanonical-monadfail-instances"
+ \ , "-Wnoncanonical-monoid-instances"
+ \ , "-Wno-noncanonical-monoid-instances"
+ \ , "-Worphans"
+ \ , "-Wno-orphans"
+ \ , "-Woverflowed-literals"
+ \ , "-Wno-overflowed-literals"
+ \ , "-Woverlapping-patterns"
+ \ , "-Wno-overlapping-patterns"
+ \ , "-Wpartial-fields"
+ \ , "-Wno-partial-fields"
+ \ , "-Wpartial-type-signatures"
+ \ , "-Wno-partial-type-signatures"
+ \ , "-Wredundant-constraints"
+ \ , "-Wno-redundant-constraints"
+ \ , "-Wsafe"
+ \ , "-Wno-safe"
+ \ , "-Wsemigroup"
+ \ , "-Wno-semigroup"
+ \ , "-Wsimplifiable-class-constraints"
+ \ , "-Wno-overlapping-patterns"
+ \ , "-Wtabs"
+ \ , "-Wno-tabs"
+ \ , "-Wtrustworthy-safe"
+ \ , "-Wno-safe"
+ \ , "-Wtype-defaults"
+ \ , "-Wno-type-defaults"
+ \ , "-Wtyped-holes"
+ \ , "-Wno-typed-holes"
+ \ , "-Wunbanged-strict-patterns"
+ \ , "-Wno-unbanged-strict-patterns"
+ \ , "-Wunrecognised-pragmas"
+ \ , "-Wno-unrecognised-pragmas"
+ \ , "-Wunrecognised-warning-flags"
+ \ , "-Wno-unrecognised-warning-flags"
+ \ , "-Wunsafe"
+ \ , "-Wno-unsafe"
+ \ , "-Wunsupported-calling-conventions"
+ \ , "-Wno-unsupported-calling-conventions"
+ \ , "-Wunsupported-llvm-version"
+ \ , "-Wno-monomorphism-restriction"
+ \ , "-Wunticked-promoted-constructors"
+ \ , "-Wno-unticked-promoted-constructors"
+ \ , "-Wunused-binds"
+ \ , "-Wno-unused-binds"
+ \ , "-Wunused-do-bind"
+ \ , "-Wno-unused-do-bind"
+ \ , "-Wunused-foralls"
+ \ , "-Wno-unused-foralls"
+ \ , "-Wunused-imports"
+ \ , "-Wno-unused-imports"
+ \ , "-Wunused-local-binds"
+ \ , "-Wno-unused-local-binds"
+ \ , "-Wunused-matches"
+ \ , "-Wno-unused-matches"
+ \ , "-Wunused-pattern-binds"
+ \ , "-Wno-unused-pattern-binds"
+ \ , "-Wunused-top-binds"
+ \ , "-Wno-unused-top-binds"
+ \ , "-Wunused-type-patterns"
+ \ , "-Wno-unused-type-patterns"
+ \ , "-Wwarn"
+ \ , "-Werror"
+ \ , "-Wwarnings-deprecations"
+ \ , "-Wno-warnings-deprecations"
+ \ , "-Wwrong-do-bind"
+ \ , "-Wno-wrong-do-bind"
+ \ , "-O,"
+ \ , "-O0"
+ \ , "-O0"
+ \ , "-O2"
+ \ , "-O0"
+ \ , "-Odph"
+ \ , "-fcall-arity"
+ \ , "-fno-call-arity"
+ \ , "-fcase-folding"
+ \ , "-fno-case-folding"
+ \ , "-fcase-merge"
+ \ , "-fno-case-merge"
+ \ , "-fcmm-elim-common-blocks"
+ \ , "-fno-cmm-elim-common-blocks"
+ \ , "-fcmm-sink"
+ \ , "-fno-cmm-sink"
+ \ , "-fcpr-anal"
+ \ , "-fno-cpr-anal"
+ \ , "-fcross-module-specialise"
+ \ , "-fno-cross-module-specialise"
+ \ , "-fcse"
+ \ , "-fno-cse"
+ \ , "-fdicts-cheap"
+ \ , "-fno-dicts-cheap"
+ \ , "-fdicts-strict"
+ \ , "-fno-dicts-strict"
+ \ , "-fdmd-tx-dict-sel"
+ \ , "-fno-dmd-tx-dict-sel"
+ \ , "-fdo-eta-reduction"
+ \ , "-fno-do-eta-reduction"
+ \ , "-fdo-lambda-eta-expansion"
+ \ , "-fno-do-lambda-eta-expansion"
+ \ , "-feager-blackholing"
+ \ , "-fenable-rewrite-rules"
+ \ , "-fno-enable-rewrite-rules"
+ \ , "-fexcess-precision"
+ \ , "-fno-excess-precision"
+ \ , "-fexitification"
+ \ , "-fno-exitification"
+ \ , "-fexpose-all-unfoldings"
+ \ , "-fno-expose-all-unfoldings"
+ \ , "-ffloat-in"
+ \ , "-fno-float-in"
+ \ , "-ffull-laziness"
+ \ , "-fno-full-laziness"
+ \ , "-ffun-to-thunk"
+ \ , "-fno-fun-to-thunk"
+ \ , "-fignore-asserts"
+ \ , "-fno-ignore-asserts"
+ \ , "-fignore-interface-pragmas"
+ \ , "-fno-ignore-interface-pragmas"
+ \ , "-flate-dmd-anal"
+ \ , "-fno-late-dmd-anal"
+ \ , "-fliberate-case"
+ \ , "-fno-liberate-case"
+ \ , "-fliberate-case-threshold="
+ \ , "-fno-liberate-case-threshold"
+ \ , "-fllvm-pass-vectors-in-regs"
+ \ , "-fno-llvm-pass-vectors-in-regs"
+ \ , "-floopification"
+ \ , "-fno-loopification"
+ \ , "-fmax-inline-alloc-size="
+ \ , "-fmax-inline-memcpy-insns="
+ \ , "-fmax-inline-memset-insns="
+ \ , "-fmax-relevant-binds="
+ \ , "-fno-max-relevant-bindings"
+ \ , "-fmax-simplifier-iterations="
+ \ , "-fmax-uncovered-patterns="
+ \ , "-fmax-valid-substitutions="
+ \ , "-fno-max-valid-substitutions"
+ \ , "-fmax-worker-args="
+ \ , "-fno-opt-coercion"
+ \ , "-fno-pre-inlining"
+ \ , "-fno-state-hack"
+ \ , "-fomit-interface-pragmas"
+ \ , "-fno-omit-interface-pragmas"
+ \ , "-fomit-yields"
+ \ , "-fno-omit-yields"
+ \ , "-foptimal-applicative-do"
+ \ , "-fno-optimal-applicative-do"
+ \ , "-fpedantic-bottoms"
+ \ , "-fno-pedantic-bottoms"
+ \ , "-fregs-graph"
+ \ , "-fno-regs-graph"
+ \ , "-fregs-iterative"
+ \ , "-fno-regs-iterative"
+ \ , "-fsimpl-tick-factor="
+ \ , "-fsimplifier-phases="
+ \ , "-fsolve-constant-dicts"
+ \ , "-fno-solve-constant-dicts"
+ \ , "-fspec-constr"
+ \ , "-fno-spec-constr"
+ \ , "-fspec-constr-count="
+ \ , "-fno-spec-constr-count"
+ \ , "-fspec-constr-keen"
+ \ , "-fno-spec-constr-keen"
+ \ , "-fspec-constr-threshold="
+ \ , "-fno-spec-constr-threshold"
+ \ , "-fspecialise"
+ \ , "-fno-specialise"
+ \ , "-fspecialise-aggressively"
+ \ , "-fno-specialise-aggressively"
+ \ , "-fstatic-argument-transformation"
+ \ , "-fno-static-argument-transformation"
+ \ , "-fstg-cse"
+ \ , "-fno-stg-cse"
+ \ , "-fstrictness"
+ \ , "-fno-strictness"
+ \ , "-fstrictness-before="
+ \ , "-funbox-small-strict-fields"
+ \ , "-fno-unbox-small-strict-fields"
+ \ , "-funbox-strict-fields"
+ \ , "-fno-unbox-strict-fields"
+ \ , "-funfolding-creation-threshold="
+ \ , "-funfolding-dict-discount="
+ \ , "-funfolding-fun-discount="
+ \ , "-funfolding-keeness-factor="
+ \ , "-funfolding-use-threshold="
+ \ , "-fvectorisation-avoidance"
+ \ , "-fno-vectorisation-avoidance"
+ \ , "-fvectorise"
+ \ , "-fno-vectorise"
+ \ , "-fno-prof-auto"
+ \ , "-fprof-auto"
+ \ , "-fno-prof-cafs"
+ \ , "-fprof-cafs"
+ \ , "-fno-prof-count-entries"
+ \ , "-fprof-count-entries"
+ \ , "-fprof-auto"
+ \ , "-fno-prof-auto"
+ \ , "-fprof-auto-calls"
+ \ , "-fno-prof-auto-calls"
+ \ , "-fprof-auto-exported"
+ \ , "-fno-prof-auto"
+ \ , "-fprof-auto-top"
+ \ , "-fno-prof-auto"
+ \ , "-fprof-cafs"
+ \ , "-fno-prof-cafs"
+ \ , "-prof"
+ \ , "-ticky"
+ \ , "-fhpc"
+ \ , "-cpp"
+ \ , "-D[=]"
+ \ , "-U"
+ \ , "-I"
+ \ , "-U"
+ \ , "-dynamic"
+ \ , "-too"
+ \ , "-fasm"
+ \ , "-fllvm"
+ \ , "-fbyte-code"
+ \ , "-fllvm"
+ \ , "-fasm"
+ \ , "-fno-code"
+ \ , "-fobject-code"
+ \ , "-fPIC"
+ \ , "-fPIE"
+ \ , "-fwrite-interface"
+ \ , "-debug"
+ \ , "-dylib-install-name"
+ \ , "-dynamic"
+ \ , "-dynload"
+ \ , "-eventlog"
+ \ , "-fno-embed-manifest"
+ \ , "-fno-gen-manifest"
+ \ , "-fno-shared-implib"
+ \ , "-framework"
+ \ , "-framework-path"
+ \ , "-fwhole-archive-hs-libs"
+ \ , "-L"
+ \ , "-l"
+ \ , "-main-is"
+ \ , "-no-hs-main"
+ \ , "-no-rtsopts-suggestions"
+ \ , "-package"
+ \ , "-pie"
+ \ , "-rdynamic"
+ \ , "-rtsopts[=]"
+ \ , "-shared"
+ \ , "-split-objs"
+ \ , "-split-sections"
+ \ , "-static"
+ \ , "-staticlib"
+ \ , "-threaded"
+ \ , "-with-rtsopts="
+ \ , "-fplugin-opt=:"
+ \ , "-fplugin="
+ \ , "-hide-all-plugin-packages"
+ \ , "-plugin-package"
+ \ , "-plugin-package-id"
+ \ , "-pgma"
+ \ , "-pgmc"
+ \ , "-pgmdll"
+ \ , "-pgmF"
+ \ , "-pgmi"
+ \ , "-pgmL"
+ \ , "-pgml"
+ \ , "-pgmlc"
+ \ , "-pgmlibtool"
+ \ , "-pgmlo"
+ \ , "-pgmP"
+ \ , "-pgms"
+ \ , "-pgmwindres"
+ \ , "-opta"
+ \ , "-optc"
+ \ , "-optdll"
+ \ , "-optF"
+ \ , "-opti"
+ \ , "-optL"
+ \ , "-optl"
+ \ , "-optlc"
+ \ , "-optlo"
+ \ , "-optP"
+ \ , "-optwindres"
+ \ , "-msse2"
+ \ , "-msse4.2"
+ \ , "-dcmm-lint"
+ \ , "-dcore-lint"
+ \ , "-ddump-asm"
+ \ , "-ddump-asm-expanded"
+ \ , "-ddump-asm-liveness"
+ \ , "-ddump-asm-native"
+ \ , "-ddump-asm-regalloc"
+ \ , "-ddump-asm-regalloc-stages"
+ \ , "-ddump-asm-stats"
+ \ , "-ddump-bcos"
+ \ , "-ddump-cmm"
+ \ , "-ddump-cmm-caf"
+ \ , "-ddump-cmm-cbe"
+ \ , "-ddump-cmm-cfg"
+ \ , "-ddump-cmm-cps"
+ \ , "-ddump-cmm-from-stg"
+ \ , "-ddump-cmm-info"
+ \ , "-ddump-cmm-proc"
+ \ , "-ddump-cmm-procmap"
+ \ , "-ddump-cmm-raw"
+ \ , "-ddump-cmm-sink"
+ \ , "-ddump-cmm-sp"
+ \ , "-ddump-cmm-split"
+ \ , "-ddump-cmm-switch"
+ \ , "-ddump-cmm-verbose"
+ \ , "-ddump-core-stats"
+ \ , "-ddump-cse"
+ \ , "-ddump-deriv"
+ \ , "-ddump-ds"
+ \ , "-ddump-ec-trace"
+ \ , "-ddump-foreign"
+ \ , "-ddump-if-trace"
+ \ , "-ddump-inlinings"
+ \ , "-ddump-json"
+ \ , "-ddump-llvm"
+ \ , "-ddump-occur-anal"
+ \ , "-ddump-opt-cmm"
+ \ , "-ddump-parsed"
+ \ , "-ddump-parsed-ast"
+ \ , "-ddump-prep"
+ \ , "-ddump-rn"
+ \ , "-ddump-rn-ast"
+ \ , "-ddump-rn-stats"
+ \ , "-ddump-rn-trace"
+ \ , "-ddump-rule-firings"
+ \ , "-ddump-rule-rewrites"
+ \ , "-ddump-rules"
+ \ , "-ddump-simpl"
+ \ , "-ddump-simpl-iterations"
+ \ , "-ddump-simpl-stats"
+ \ , "-ddump-spec"
+ \ , "-ddump-splices"
+ \ , "-ddump-stg"
+ \ , "-ddump-str-signatures"
+ \ , "-ddump-stranal"
+ \ , "-ddump-tc"
+ \ , "-ddump-tc-ast"
+ \ , "-ddump-tc-trace"
+ \ , "-ddump-timings"
+ \ , "-ddump-to-file"
+ \ , "-ddump-types"
+ \ , "-ddump-vect"
+ \ , "-ddump-vt-trace"
+ \ , "-ddump-worker-wrapper"
+ \ , "-dfaststring-stats"
+ \ , "-dinitial-unique="
+ \ , "-dno-debug-output"
+ \ , "-ddebug-output"
+ \ , "-dppr-case-as-let"
+ \ , "-dppr-cols="
+ \ , "-dppr-debug"
+ \ , "-dppr-user-length"
+ \ , "-dshow-passes"
+ \ , "-dstg-lint"
+ \ , "-dsuppress-all"
+ \ , "-dsuppress-coercions"
+ \ , "-dsuppress-idinfo"
+ \ , "-dsuppress-module-prefixes"
+ \ , "-dsuppress-stg-free-vars"
+ \ , "-dsuppress-ticks"
+ \ , "-dsuppress-type-applications"
+ \ , "-dsuppress-type-signatures"
+ \ , "-dsuppress-unfoldings"
+ \ , "-dsuppress-uniques"
+ \ , "-dsuppress-var-kinds"
+ \ , "-dth-dec-file="
+ \ , "-dunique-increment="
+ \ , "-dverbose-core2core"
+ \ , "-dverbose-stg2stg"
+ \ , "-falignment-sanitisation"
+ \ , "-fcatch-bottoms"
+ \ , "-fllvm-fill-undef-with-garbage"
+ \ , "-g,"
+ \ , "-fexternal-interpreter"
+ \ , "-fglasgow-exts"
+ \ , "-fno-glasgow-exts"
+ \ , "-ghcversion-file"
+ \ , "-H"
+ \ , "-j[]"
+ \ ]
+
+let s:commonModules =
+ \ [ "Distribution.Backpack"
+ \ , "Distribution.Backpack.ComponentsGraph"
+ \ , "Distribution.Backpack.Configure"
+ \ , "Distribution.Backpack.ConfiguredComponent"
+ \ , "Distribution.Backpack.DescribeUnitId"
+ \ , "Distribution.Backpack.FullUnitId"
+ \ , "Distribution.Backpack.LinkedComponent"
+ \ , "Distribution.Backpack.ModSubst"
+ \ , "Distribution.Backpack.ModuleShape"
+ \ , "Distribution.Backpack.PreModuleShape"
+ \ , "Distribution.CabalSpecVersion"
+ \ , "Distribution.Compat.Binary"
+ \ , "Distribution.Compat.CharParsing"
+ \ , "Distribution.Compat.CreatePipe"
+ \ , "Distribution.Compat.DList"
+ \ , "Distribution.Compat.Directory"
+ \ , "Distribution.Compat.Environment"
+ \ , "Distribution.Compat.Exception"
+ \ , "Distribution.Compat.Graph"
+ \ , "Distribution.Compat.Internal.TempFile"
+ \ , "Distribution.Compat.Lens"
+ \ , "Distribution.Compat.Map.Strict"
+ \ , "Distribution.Compat.Newtype"
+ \ , "Distribution.Compat.Parsing"
+ \ , "Distribution.Compat.Prelude.Internal"
+ \ , "Distribution.Compat.ReadP"
+ \ , "Distribution.Compat.Semigroup"
+ \ , "Distribution.Compat.Stack"
+ \ , "Distribution.Compat.Time"
+ \ , "Distribution.Compiler"
+ \ , "Distribution.FieldGrammar"
+ \ , "Distribution.FieldGrammar.Class"
+ \ , "Distribution.FieldGrammar.FieldDescrs"
+ \ , "Distribution.FieldGrammar.Parsec"
+ \ , "Distribution.FieldGrammar.Pretty"
+ \ , "Distribution.InstalledPackageInfo"
+ \ , "Distribution.License"
+ \ , "Distribution.Make"
+ \ , "Distribution.ModuleName"
+ \ , "Distribution.Package"
+ \ , "Distribution.PackageDescription"
+ \ , "Distribution.PackageDescription.Check"
+ \ , "Distribution.PackageDescription.Configuration"
+ \ , "Distribution.PackageDescription.FieldGrammar"
+ \ , "Distribution.PackageDescription.Parsec"
+ \ , "Distribution.PackageDescription.PrettyPrint"
+ \ , "Distribution.PackageDescription.Quirks"
+ \ , "Distribution.PackageDescription.Utils"
+ \ , "Distribution.ParseUtils"
+ \ , "Distribution.Parsec.Class"
+ \ , "Distribution.Parsec.Common"
+ \ , "Distribution.Parsec.ConfVar"
+ \ , "Distribution.Parsec.Field"
+ \ , "Distribution.Parsec.FieldLineStream"
+ \ , "Distribution.Parsec.Lexer"
+ \ , "Distribution.Parsec.LexerMonad"
+ \ , "Distribution.Parsec.Newtypes"
+ \ , "Distribution.Parsec.ParseResult"
+ \ , "Distribution.Parsec.Parser"
+ \ , "Distribution.Pretty"
+ \ , "Distribution.PrettyUtils"
+ \ , "Distribution.ReadE"
+ \ , "Distribution.SPDX"
+ \ , "Distribution.SPDX.License"
+ \ , "Distribution.SPDX.LicenseExceptionId"
+ \ , "Distribution.SPDX.LicenseExpression"
+ \ , "Distribution.SPDX.LicenseId"
+ \ , "Distribution.SPDX.LicenseReference"
+ \ , "Distribution.Simple"
+ \ , "Distribution.Simple.Bench"
+ \ , "Distribution.Simple.Build"
+ \ , "Distribution.Simple.Build.Macros"
+ \ , "Distribution.Simple.Build.PathsModule"
+ \ , "Distribution.Simple.BuildPaths"
+ \ , "Distribution.Simple.BuildTarget"
+ \ , "Distribution.Simple.BuildToolDepends"
+ \ , "Distribution.Simple.CCompiler"
+ \ , "Distribution.Simple.Command"
+ \ , "Distribution.Simple.Compiler"
+ \ , "Distribution.Simple.Configure"
+ \ , "Distribution.Simple.Doctest"
+ \ , "Distribution.Simple.GHC"
+ \ , "Distribution.Simple.GHCJS"
+ \ , "Distribution.Simple.Haddock"
+ \ , "Distribution.Simple.HaskellSuite"
+ \ , "Distribution.Simple.Hpc"
+ \ , "Distribution.Simple.Install"
+ \ , "Distribution.Simple.InstallDirs"
+ \ , "Distribution.Simple.JHC"
+ \ , "Distribution.Simple.LHC"
+ \ , "Distribution.Simple.LocalBuildInfo"
+ \ , "Distribution.Simple.PackageIndex"
+ \ , "Distribution.Simple.PreProcess"
+ \ , "Distribution.Simple.PreProcess.Unlit"
+ \ , "Distribution.Simple.Program"
+ \ , "Distribution.Simple.Program.Ar"
+ \ , "Distribution.Simple.Program.Builtin"
+ \ , "Distribution.Simple.Program.Db"
+ \ , "Distribution.Simple.Program.Find"
+ \ , "Distribution.Simple.Program.GHC"
+ \ , "Distribution.Simple.Program.HcPkg"
+ \ , "Distribution.Simple.Program.Hpc"
+ \ , "Distribution.Simple.Program.Internal"
+ \ , "Distribution.Simple.Program.Ld"
+ \ , "Distribution.Simple.Program.ResponseFile"
+ \ , "Distribution.Simple.Program.Run"
+ \ , "Distribution.Simple.Program.Script"
+ \ , "Distribution.Simple.Program.Strip"
+ \ , "Distribution.Simple.Program.Types"
+ \ , "Distribution.Simple.Register"
+ \ , "Distribution.Simple.Setup"
+ \ , "Distribution.Simple.SrcDist"
+ \ , "Distribution.Simple.Test"
+ \ , "Distribution.Simple.Test.ExeV10"
+ \ , "Distribution.Simple.Test.LibV09"
+ \ , "Distribution.Simple.Test.Log"
+ \ , "Distribution.Simple.UHC"
+ \ , "Distribution.Simple.UserHooks"
+ \ , "Distribution.Simple.Utils"
+ \ , "Distribution.System"
+ \ , "Distribution.TestSuite"
+ \ , "Distribution.Text"
+ \ , "Distribution.Types.AbiDependency"
+ \ , "Distribution.Types.AbiHash"
+ \ , "Distribution.Types.AnnotatedId"
+ \ , "Distribution.Types.Benchmark"
+ \ , "Distribution.Types.Benchmark.Lens"
+ \ , "Distribution.Types.BenchmarkInterface"
+ \ , "Distribution.Types.BenchmarkType"
+ \ , "Distribution.Types.BuildInfo"
+ \ , "Distribution.Types.BuildInfo.Lens"
+ \ , "Distribution.Types.BuildType"
+ \ , "Distribution.Types.Component"
+ \ , "Distribution.Types.ComponentId"
+ \ , "Distribution.Types.ComponentInclude"
+ \ , "Distribution.Types.ComponentLocalBuildInfo"
+ \ , "Distribution.Types.ComponentName"
+ \ , "Distribution.Types.ComponentRequestedSpec"
+ \ , "Distribution.Types.CondTree"
+ \ , "Distribution.Types.Condition"
+ \ , "Distribution.Types.Dependency"
+ \ , "Distribution.Types.DependencyMap"
+ \ , "Distribution.Types.ExeDependency"
+ \ , "Distribution.Types.Executable"
+ \ , "Distribution.Types.Executable.Lens"
+ \ , "Distribution.Types.ExecutableScope"
+ \ , "Distribution.Types.ExposedModule"
+ \ , "Distribution.Types.ForeignLib"
+ \ , "Distribution.Types.ForeignLib.Lens"
+ \ , "Distribution.Types.ForeignLibOption"
+ \ , "Distribution.Types.ForeignLibType"
+ \ , "Distribution.Types.GenericPackageDescription"
+ \ , "Distribution.Types.GenericPackageDescription.Lens"
+ \ , "Distribution.Types.HookedBuildInfo"
+ \ , "Distribution.Types.IncludeRenaming"
+ \ , "Distribution.Types.InstalledPackageInfo"
+ \ , "Distribution.Types.InstalledPackageInfo.FieldGrammar"
+ \ , "Distribution.Types.InstalledPackageInfo.Lens"
+ \ , "Distribution.Types.LegacyExeDependency"
+ \ , "Distribution.Types.Lens"
+ \ , "Distribution.Types.Library"
+ \ , "Distribution.Types.Library.Lens"
+ \ , "Distribution.Types.LocalBuildInfo"
+ \ , "Distribution.Types.Mixin"
+ \ , "Distribution.Types.Module"
+ \ , "Distribution.Types.ModuleReexport"
+ \ , "Distribution.Types.ModuleRenaming"
+ \ , "Distribution.Types.MungedPackageId"
+ \ , "Distribution.Types.MungedPackageName"
+ \ , "Distribution.Types.PackageDescription"
+ \ , "Distribution.Types.PackageDescription.Lens"
+ \ , "Distribution.Types.PackageId"
+ \ , "Distribution.Types.PackageId.Lens"
+ \ , "Distribution.Types.PackageName"
+ \ , "Distribution.Types.PkgconfigDependency"
+ \ , "Distribution.Types.PkgconfigName"
+ \ , "Distribution.Types.SetupBuildInfo"
+ \ , "Distribution.Types.SetupBuildInfo.Lens"
+ \ , "Distribution.Types.SourceRepo"
+ \ , "Distribution.Types.SourceRepo.Lens"
+ \ , "Distribution.Types.TargetInfo"
+ \ , "Distribution.Types.TestSuite"
+ \ , "Distribution.Types.TestSuite.Lens"
+ \ , "Distribution.Types.TestSuiteInterface"
+ \ , "Distribution.Types.TestType"
+ \ , "Distribution.Types.UnitId"
+ \ , "Distribution.Types.UnqualComponentName"
+ \ , "Distribution.Types.Version"
+ \ , "Distribution.Types.VersionInterval"
+ \ , "Distribution.Types.VersionRange"
+ \ , "Distribution.Utils.Generic"
+ \ , "Distribution.Utils.IOData"
+ \ , "Distribution.Utils.LogProgress"
+ \ , "Distribution.Utils.MapAccum"
+ \ , "Distribution.Utils.NubList"
+ \ , "Distribution.Utils.Progress"
+ \ , "Distribution.Utils.ShortText"
+ \ , "Distribution.Verbosity"
+ \ , "Distribution.Version"
+ \ , "Language.Haskell.Extension"
+ \ , "Graphics.GLU"
+ \ , "Graphics.GLU.Callbacks"
+ \ , "Graphics.GLU.Functions"
+ \ , "Graphics.GLU.Tokens"
+ \ , "Graphics.GLU.Types"
+ \ , "Graphics.UI.GLUT"
+ \ , "Graphics.UI.GLUT.Begin"
+ \ , "Graphics.UI.GLUT.Callbacks"
+ \ , "Graphics.UI.GLUT.Callbacks.Global"
+ \ , "Graphics.UI.GLUT.Callbacks.Window"
+ \ , "Graphics.UI.GLUT.Colormap"
+ \ , "Graphics.UI.GLUT.Debugging"
+ \ , "Graphics.UI.GLUT.DeviceControl"
+ \ , "Graphics.UI.GLUT.Fonts"
+ \ , "Graphics.UI.GLUT.GameMode"
+ \ , "Graphics.UI.GLUT.Initialization"
+ \ , "Graphics.UI.GLUT.Menu"
+ \ , "Graphics.UI.GLUT.Objects"
+ \ , "Graphics.UI.GLUT.Overlay"
+ \ , "Graphics.UI.GLUT.State"
+ \ , "Graphics.UI.GLUT.Window"
+ \ , "Network.Browser"
+ \ , "Network.BufferType"
+ \ , "Network.HTTP"
+ \ , "Network.HTTP.Auth"
+ \ , "Network.HTTP.Base"
+ \ , "Network.HTTP.Cookie"
+ \ , "Network.HTTP.HandleStream"
+ \ , "Network.HTTP.Headers"
+ \ , "Network.HTTP.Proxy"
+ \ , "Network.HTTP.Stream"
+ \ , "Network.Stream"
+ \ , "Network.StreamDebugger"
+ \ , "Network.StreamSocket"
+ \ , "Network.TCP"
+ \ , "Test.HUnit"
+ \ , "Test.HUnit.Base"
+ \ , "Test.HUnit.Lang"
+ \ , "Test.HUnit.Terminal"
+ \ , "Test.HUnit.Text"
+ \ , "Data.ObjectName"
+ \ , "Graphics.Rendering.OpenGL"
+ \ , "Graphics.Rendering.OpenGL.GL"
+ \ , "Graphics.Rendering.OpenGL.GL.Antialiasing"
+ \ , "Graphics.Rendering.OpenGL.GL.BeginEnd"
+ \ , "Graphics.Rendering.OpenGL.GL.Bitmaps"
+ \ , "Graphics.Rendering.OpenGL.GL.BufferObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.Clipping"
+ \ , "Graphics.Rendering.OpenGL.GL.ColorSum"
+ \ , "Graphics.Rendering.OpenGL.GL.Colors"
+ \ , "Graphics.Rendering.OpenGL.GL.ConditionalRendering"
+ \ , "Graphics.Rendering.OpenGL.GL.CoordTrans"
+ \ , "Graphics.Rendering.OpenGL.GL.DebugOutput"
+ \ , "Graphics.Rendering.OpenGL.GL.DisplayLists"
+ \ , "Graphics.Rendering.OpenGL.GL.Evaluators"
+ \ , "Graphics.Rendering.OpenGL.GL.Feedback"
+ \ , "Graphics.Rendering.OpenGL.GL.FlushFinish"
+ \ , "Graphics.Rendering.OpenGL.GL.Fog"
+ \ , "Graphics.Rendering.OpenGL.GL.Framebuffer"
+ \ , "Graphics.Rendering.OpenGL.GL.FramebufferObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.FramebufferObjects.Attachments"
+ \ , "Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.FramebufferObjects.Queries"
+ \ , "Graphics.Rendering.OpenGL.GL.FramebufferObjects.RenderbufferObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.Hints"
+ \ , "Graphics.Rendering.OpenGL.GL.LineSegments"
+ \ , "Graphics.Rendering.OpenGL.GL.PerFragment"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.ColorTable"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.Histogram"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.Minmax"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelStorage"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelTransfer"
+ \ , "Graphics.Rendering.OpenGL.GL.PixelRectangles.Rasterization"
+ \ , "Graphics.Rendering.OpenGL.GL.PixellikeObject"
+ \ , "Graphics.Rendering.OpenGL.GL.Points"
+ \ , "Graphics.Rendering.OpenGL.GL.Polygons"
+ \ , "Graphics.Rendering.OpenGL.GL.PrimitiveMode"
+ \ , "Graphics.Rendering.OpenGL.GL.QueryObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.RasterPos"
+ \ , "Graphics.Rendering.OpenGL.GL.ReadCopyPixels"
+ \ , "Graphics.Rendering.OpenGL.GL.Rectangles"
+ \ , "Graphics.Rendering.OpenGL.GL.SavingState"
+ \ , "Graphics.Rendering.OpenGL.GL.Selection"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders.Attribs"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders.Limits"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders.ProgramBinaries"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders.ProgramObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders.ShaderBinaries"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders.ShaderObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.Shaders.Uniform"
+ \ , "Graphics.Rendering.OpenGL.GL.StringQueries"
+ \ , "Graphics.Rendering.OpenGL.GL.SyncObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.Tensor"
+ \ , "Graphics.Rendering.OpenGL.GL.Texturing"
+ \ , "Graphics.Rendering.OpenGL.GL.Texturing.Application"
+ \ , "Graphics.Rendering.OpenGL.GL.Texturing.Environments"
+ \ , "Graphics.Rendering.OpenGL.GL.Texturing.Objects"
+ \ , "Graphics.Rendering.OpenGL.GL.Texturing.Parameters"
+ \ , "Graphics.Rendering.OpenGL.GL.Texturing.Queries"
+ \ , "Graphics.Rendering.OpenGL.GL.Texturing.Specification"
+ \ , "Graphics.Rendering.OpenGL.GL.TransformFeedback"
+ \ , "Graphics.Rendering.OpenGL.GL.VertexArrayObjects"
+ \ , "Graphics.Rendering.OpenGL.GL.VertexArrays"
+ \ , "Graphics.Rendering.OpenGL.GL.VertexSpec"
+ \ , "Graphics.Rendering.OpenGL.GLU"
+ \ , "Graphics.Rendering.OpenGL.GLU.Errors"
+ \ , "Graphics.Rendering.OpenGL.GLU.Initialization"
+ \ , "Graphics.Rendering.OpenGL.GLU.Matrix"
+ \ , "Graphics.Rendering.OpenGL.GLU.Mipmapping"
+ \ , "Graphics.Rendering.OpenGL.GLU.NURBS"
+ \ , "Graphics.Rendering.OpenGL.GLU.Quadrics"
+ \ , "Graphics.Rendering.OpenGL.GLU.Tessellation"
+ \ , "Graphics.GL"
+ \ , "Graphics.GL.AMD"
+ \ , "Graphics.GL.AMD.BlendMinmaxFactor"
+ \ , "Graphics.GL.AMD.DebugOutput"
+ \ , "Graphics.GL.AMD.DepthClampSeparate"
+ \ , "Graphics.GL.AMD.DrawBuffersBlend"
+ \ , "Graphics.GL.AMD.FramebufferMultisampleAdvanced"
+ \ , "Graphics.GL.AMD.FramebufferSamplePositions"
+ \ , "Graphics.GL.AMD.GPUShaderHalfFloat"
+ \ , "Graphics.GL.AMD.GPUShaderInt64"
+ \ , "Graphics.GL.AMD.InterleavedElements"
+ \ , "Graphics.GL.AMD.MultiDrawIndirect"
+ \ , "Graphics.GL.AMD.NameGenDelete"
+ \ , "Graphics.GL.AMD.OcclusionQueryEvent"
+ \ , "Graphics.GL.AMD.PerformanceMonitor"
+ \ , "Graphics.GL.AMD.PinnedMemory"
+ \ , "Graphics.GL.AMD.QueryBufferObject"
+ \ , "Graphics.GL.AMD.SamplePositions"
+ \ , "Graphics.GL.AMD.SeamlessCubemapPerTexture"
+ \ , "Graphics.GL.AMD.SparseTexture"
+ \ , "Graphics.GL.AMD.StencilOperationExtended"
+ \ , "Graphics.GL.AMD.TransformFeedback4"
+ \ , "Graphics.GL.AMD.VertexShaderTessellator"
+ \ , "Graphics.GL.APPLE"
+ \ , "Graphics.GL.APPLE.AuxDepthStencil"
+ \ , "Graphics.GL.APPLE.ClientStorage"
+ \ , "Graphics.GL.APPLE.ElementArray"
+ \ , "Graphics.GL.APPLE.Fence"
+ \ , "Graphics.GL.APPLE.FloatPixels"
+ \ , "Graphics.GL.APPLE.FlushBufferRange"
+ \ , "Graphics.GL.APPLE.ObjectPurgeable"
+ \ , "Graphics.GL.APPLE.RGB422"
+ \ , "Graphics.GL.APPLE.RowBytes"
+ \ , "Graphics.GL.APPLE.SpecularVector"
+ \ , "Graphics.GL.APPLE.TextureRange"
+ \ , "Graphics.GL.APPLE.TransformHint"
+ \ , "Graphics.GL.APPLE.VertexArrayObject"
+ \ , "Graphics.GL.APPLE.VertexArrayRange"
+ \ , "Graphics.GL.APPLE.VertexProgramEvaluators"
+ \ , "Graphics.GL.APPLE.YCbCr422"
+ \ , "Graphics.GL.ARB"
+ \ , "Graphics.GL.ARB.BaseInstance"
+ \ , "Graphics.GL.ARB.BindlessTexture"
+ \ , "Graphics.GL.ARB.BlendFuncExtended"
+ \ , "Graphics.GL.ARB.BufferStorage"
+ \ , "Graphics.GL.ARB.CLEvent"
+ \ , "Graphics.GL.ARB.ClearBufferObject"
+ \ , "Graphics.GL.ARB.ClearTexture"
+ \ , "Graphics.GL.ARB.ClipControl"
+ \ , "Graphics.GL.ARB.ColorBufferFloat"
+ \ , "Graphics.GL.ARB.CompressedTexturePixelStorage"
+ \ , "Graphics.GL.ARB.ComputeShader"
+ \ , "Graphics.GL.ARB.ComputeVariableGroupSize"
+ \ , "Graphics.GL.ARB.ConditionalRenderInverted"
+ \ , "Graphics.GL.ARB.CopyBuffer"
+ \ , "Graphics.GL.ARB.CopyImage"
+ \ , "Graphics.GL.ARB.CullDistance"
+ \ , "Graphics.GL.ARB.DebugOutput"
+ \ , "Graphics.GL.ARB.DepthBufferFloat"
+ \ , "Graphics.GL.ARB.DepthClamp"
+ \ , "Graphics.GL.ARB.DepthTexture"
+ \ , "Graphics.GL.ARB.DirectStateAccess"
+ \ , "Graphics.GL.ARB.DrawBuffers"
+ \ , "Graphics.GL.ARB.DrawBuffersBlend"
+ \ , "Graphics.GL.ARB.DrawElementsBaseVertex"
+ \ , "Graphics.GL.ARB.DrawIndirect"
+ \ , "Graphics.GL.ARB.DrawInstanced"
+ \ , "Graphics.GL.ARB.ES2Compatibility"
+ \ , "Graphics.GL.ARB.ES31Compatibility"
+ \ , "Graphics.GL.ARB.ES32Compatibility"
+ \ , "Graphics.GL.ARB.ES3Compatibility"
+ \ , "Graphics.GL.ARB.EnhancedLayouts"
+ \ , "Graphics.GL.ARB.ExplicitUniformLocation"
+ \ , "Graphics.GL.ARB.FragmentProgram"
+ \ , "Graphics.GL.ARB.FragmentShader"
+ \ , "Graphics.GL.ARB.FramebufferNoAttachments"
+ \ , "Graphics.GL.ARB.FramebufferObjectCompatibility"
+ \ , "Graphics.GL.ARB.FramebufferObjectCore"
+ \ , "Graphics.GL.ARB.FramebufferSRGB"
+ \ , "Graphics.GL.ARB.GPUShader5"
+ \ , "Graphics.GL.ARB.GPUShaderFP64"
+ \ , "Graphics.GL.ARB.GPUShaderInt64"
+ \ , "Graphics.GL.ARB.GeometryShader4"
+ \ , "Graphics.GL.ARB.GetProgramBinary"
+ \ , "Graphics.GL.ARB.GetTextureSubImage"
+ \ , "Graphics.GL.ARB.GlSpirv"
+ \ , "Graphics.GL.ARB.HalfFloatPixel"
+ \ , "Graphics.GL.ARB.HalfFloatVertex"
+ \ , "Graphics.GL.ARB.ImagingCompatibility"
+ \ , "Graphics.GL.ARB.ImagingCore"
+ \ , "Graphics.GL.ARB.IndirectParameters"
+ \ , "Graphics.GL.ARB.InstancedArrays"
+ \ , "Graphics.GL.ARB.InternalformatQuery"
+ \ , "Graphics.GL.ARB.InternalformatQuery2"
+ \ , "Graphics.GL.ARB.InvalidateSubdata"
+ \ , "Graphics.GL.ARB.MapBufferAlignment"
+ \ , "Graphics.GL.ARB.MapBufferRange"
+ \ , "Graphics.GL.ARB.MatrixPalette"
+ \ , "Graphics.GL.ARB.MultiBind"
+ \ , "Graphics.GL.ARB.MultiDrawIndirect"
+ \ , "Graphics.GL.ARB.Multisample"
+ \ , "Graphics.GL.ARB.Multitexture"
+ \ , "Graphics.GL.ARB.OcclusionQuery"
+ \ , "Graphics.GL.ARB.OcclusionQuery2"
+ \ , "Graphics.GL.ARB.ParallelShaderCompile"
+ \ , "Graphics.GL.ARB.PipelineStatisticsQuery"
+ \ , "Graphics.GL.ARB.PixelBufferObject"
+ \ , "Graphics.GL.ARB.PointParameters"
+ \ , "Graphics.GL.ARB.PointSprite"
+ \ , "Graphics.GL.ARB.PolygonOffsetClamp"
+ \ , "Graphics.GL.ARB.ProgramInterfaceQuery"
+ \ , "Graphics.GL.ARB.ProvokingVertex"
+ \ , "Graphics.GL.ARB.QueryBufferObject"
+ \ , "Graphics.GL.ARB.RobustnessCompatibility"
+ \ , "Graphics.GL.ARB.RobustnessCore"
+ \ , "Graphics.GL.ARB.SampleLocations"
+ \ , "Graphics.GL.ARB.SampleShading"
+ \ , "Graphics.GL.ARB.SamplerObjects"
+ \ , "Graphics.GL.ARB.SeamlessCubeMap"
+ \ , "Graphics.GL.ARB.SeamlessCubemapPerTexture"
+ \ , "Graphics.GL.ARB.SeparateShaderObjects"
+ \ , "Graphics.GL.ARB.ShaderAtomicCounters"
+ \ , "Graphics.GL.ARB.ShaderImageLoadStore"
+ \ , "Graphics.GL.ARB.ShaderObjects"
+ \ , "Graphics.GL.ARB.ShaderStorageBufferObject"
+ \ , "Graphics.GL.ARB.ShaderSubroutine"
+ \ , "Graphics.GL.ARB.ShadingLanguage100"
+ \ , "Graphics.GL.ARB.ShadingLanguageInclude"
+ \ , "Graphics.GL.ARB.Shadow"
+ \ , "Graphics.GL.ARB.ShadowAmbient"
+ \ , "Graphics.GL.ARB.SparseBuffer"
+ \ , "Graphics.GL.ARB.SparseTexture"
+ \ , "Graphics.GL.ARB.SpirvExtensions"
+ \ , "Graphics.GL.ARB.StencilTexturing"
+ \ , "Graphics.GL.ARB.Sync"
+ \ , "Graphics.GL.ARB.TessellationShader"
+ \ , "Graphics.GL.ARB.TextureBarrier"
+ \ , "Graphics.GL.ARB.TextureBorderClamp"
+ \ , "Graphics.GL.ARB.TextureBufferObject"
+ \ , "Graphics.GL.ARB.TextureBufferObjectRGB32"
+ \ , "Graphics.GL.ARB.TextureBufferRange"
+ \ , "Graphics.GL.ARB.TextureCompression"
+ \ , "Graphics.GL.ARB.TextureCompressionBPTC"
+ \ , "Graphics.GL.ARB.TextureCompressionRGTC"
+ \ , "Graphics.GL.ARB.TextureCubeMap"
+ \ , "Graphics.GL.ARB.TextureCubeMapArray"
+ \ , "Graphics.GL.ARB.TextureEnvCombine"
+ \ , "Graphics.GL.ARB.TextureEnvDot3"
+ \ , "Graphics.GL.ARB.TextureFilterAnisotropic"
+ \ , "Graphics.GL.ARB.TextureFilterMinmax"
+ \ , "Graphics.GL.ARB.TextureFloat"
+ \ , "Graphics.GL.ARB.TextureGather"
+ \ , "Graphics.GL.ARB.TextureMirrorClampToEdge"
+ \ , "Graphics.GL.ARB.TextureMirroredRepeat"
+ \ , "Graphics.GL.ARB.TextureMultisample"
+ \ , "Graphics.GL.ARB.TextureRG"
+ \ , "Graphics.GL.ARB.TextureRGB10A2UI"
+ \ , "Graphics.GL.ARB.TextureRectangle"
+ \ , "Graphics.GL.ARB.TextureStencil8"
+ \ , "Graphics.GL.ARB.TextureStorage"
+ \ , "Graphics.GL.ARB.TextureStorageMultisample"
+ \ , "Graphics.GL.ARB.TextureSwizzle"
+ \ , "Graphics.GL.ARB.TextureView"
+ \ , "Graphics.GL.ARB.TimerQuery"
+ \ , "Graphics.GL.ARB.TransformFeedback2"
+ \ , "Graphics.GL.ARB.TransformFeedback3"
+ \ , "Graphics.GL.ARB.TransformFeedbackInstanced"
+ \ , "Graphics.GL.ARB.TransformFeedbackOverflowQuery"
+ \ , "Graphics.GL.ARB.TransposeMatrix"
+ \ , "Graphics.GL.ARB.UniformBufferObject"
+ \ , "Graphics.GL.ARB.VertexArrayBGRA"
+ \ , "Graphics.GL.ARB.VertexArrayObject"
+ \ , "Graphics.GL.ARB.VertexAttrib64Bit"
+ \ , "Graphics.GL.ARB.VertexAttribBinding"
+ \ , "Graphics.GL.ARB.VertexBlend"
+ \ , "Graphics.GL.ARB.VertexBufferObject"
+ \ , "Graphics.GL.ARB.VertexProgram"
+ \ , "Graphics.GL.ARB.VertexShader"
+ \ , "Graphics.GL.ARB.VertexType10f11f11fRev"
+ \ , "Graphics.GL.ARB.VertexType2101010RevCompatibility"
+ \ , "Graphics.GL.ARB.VertexType2101010RevCore"
+ \ , "Graphics.GL.ARB.ViewportArray"
+ \ , "Graphics.GL.ARB.WindowPos"
+ \ , "Graphics.GL.ATI"
+ \ , "Graphics.GL.ATI.DrawBuffers"
+ \ , "Graphics.GL.ATI.ElementArray"
+ \ , "Graphics.GL.ATI.EnvmapBumpmap"
+ \ , "Graphics.GL.ATI.FragmentShader"
+ \ , "Graphics.GL.ATI.MapObjectBuffer"
+ \ , "Graphics.GL.ATI.Meminfo"
+ \ , "Graphics.GL.ATI.PNTriangles"
+ \ , "Graphics.GL.ATI.PixelFormatFloat"
+ \ , "Graphics.GL.ATI.SeparateStencil"
+ \ , "Graphics.GL.ATI.TextFragmentShader"
+ \ , "Graphics.GL.ATI.TextureEnvCombine3"
+ \ , "Graphics.GL.ATI.TextureFloat"
+ \ , "Graphics.GL.ATI.TextureMirrorOnce"
+ \ , "Graphics.GL.ATI.VertexArrayObject"
+ \ , "Graphics.GL.ATI.VertexAttribArrayObject"
+ \ , "Graphics.GL.ATI.VertexStreams"
+ \ , "Graphics.GL.Compatibility30"
+ \ , "Graphics.GL.Compatibility31"
+ \ , "Graphics.GL.Compatibility32"
+ \ , "Graphics.GL.Compatibility33"
+ \ , "Graphics.GL.Compatibility40"
+ \ , "Graphics.GL.Compatibility41"
+ \ , "Graphics.GL.Compatibility42"
+ \ , "Graphics.GL.Compatibility43"
+ \ , "Graphics.GL.Compatibility44"
+ \ , "Graphics.GL.Compatibility45"
+ \ , "Graphics.GL.Compatibility46"
+ \ , "Graphics.GL.Core30"
+ \ , "Graphics.GL.Core31"
+ \ , "Graphics.GL.Core32"
+ \ , "Graphics.GL.Core33"
+ \ , "Graphics.GL.Core40"
+ \ , "Graphics.GL.Core41"
+ \ , "Graphics.GL.Core42"
+ \ , "Graphics.GL.Core43"
+ \ , "Graphics.GL.Core44"
+ \ , "Graphics.GL.Core45"
+ \ , "Graphics.GL.Core46"
+ \ , "Graphics.GL.EXT"
+ \ , "Graphics.GL.EXT.ABGR"
+ \ , "Graphics.GL.EXT.BGRA"
+ \ , "Graphics.GL.EXT.BindableUniform"
+ \ , "Graphics.GL.EXT.BlendColor"
+ \ , "Graphics.GL.EXT.BlendEquationSeparate"
+ \ , "Graphics.GL.EXT.BlendFuncSeparate"
+ \ , "Graphics.GL.EXT.BlendMinmax"
+ \ , "Graphics.GL.EXT.BlendSubtract"
+ \ , "Graphics.GL.EXT.CMYKA"
+ \ , "Graphics.GL.EXT.ClipVolumeHint"
+ \ , "Graphics.GL.EXT.ColorSubtable"
+ \ , "Graphics.GL.EXT.CompiledVertexArray"
+ \ , "Graphics.GL.EXT.Convolution"
+ \ , "Graphics.GL.EXT.CoordinateFrame"
+ \ , "Graphics.GL.EXT.CopyTexture"
+ \ , "Graphics.GL.EXT.CullVertex"
+ \ , "Graphics.GL.EXT.DebugLabel"
+ \ , "Graphics.GL.EXT.DebugMarker"
+ \ , "Graphics.GL.EXT.DepthBoundsTest"
+ \ , "Graphics.GL.EXT.DirectStateAccess"
+ \ , "Graphics.GL.EXT.DrawBuffers2"
+ \ , "Graphics.GL.EXT.DrawInstanced"
+ \ , "Graphics.GL.EXT.DrawRangeElements"
+ \ , "Graphics.GL.EXT.EglImageStorage"
+ \ , "Graphics.GL.EXT.ExternalBuffer"
+ \ , "Graphics.GL.EXT.FogCoord"
+ \ , "Graphics.GL.EXT.FourTwoTwoPixels"
+ \ , "Graphics.GL.EXT.FramebufferBlit"
+ \ , "Graphics.GL.EXT.FramebufferMultisample"
+ \ , "Graphics.GL.EXT.FramebufferMultisampleBlitScaled"
+ \ , "Graphics.GL.EXT.FramebufferObject"
+ \ , "Graphics.GL.EXT.FramebufferSRGB"
+ \ , "Graphics.GL.EXT.GPUProgramParameters"
+ \ , "Graphics.GL.EXT.GPUShader4"
+ \ , "Graphics.GL.EXT.GeometryShader4"
+ \ , "Graphics.GL.EXT.Histogram"
+ \ , "Graphics.GL.EXT.IndexArrayFormats"
+ \ , "Graphics.GL.EXT.IndexFunc"
+ \ , "Graphics.GL.EXT.IndexMaterial"
+ \ , "Graphics.GL.EXT.LightTexture"
+ \ , "Graphics.GL.EXT.MemoryObject"
+ \ , "Graphics.GL.EXT.MemoryObjectFd"
+ \ , "Graphics.GL.EXT.MemoryObjectWin32"
+ \ , "Graphics.GL.EXT.MultiDrawArrays"
+ \ , "Graphics.GL.EXT.Multisample"
+ \ , "Graphics.GL.EXT.PackedDepthStencil"
+ \ , "Graphics.GL.EXT.PackedFloat"
+ \ , "Graphics.GL.EXT.PackedPixels"
+ \ , "Graphics.GL.EXT.PalettedTexture"
+ \ , "Graphics.GL.EXT.PixelBufferObject"
+ \ , "Graphics.GL.EXT.PixelTransform"
+ \ , "Graphics.GL.EXT.PointParameters"
+ \ , "Graphics.GL.EXT.PolygonOffset"
+ \ , "Graphics.GL.EXT.PolygonOffsetClamp"
+ \ , "Graphics.GL.EXT.ProvokingVertex"
+ \ , "Graphics.GL.EXT.RasterMultisample"
+ \ , "Graphics.GL.EXT.RescaleNormal"
+ \ , "Graphics.GL.EXT.SecondaryColor"
+ \ , "Graphics.GL.EXT.Semaphore"
+ \ , "Graphics.GL.EXT.SemaphoreFd"
+ \ , "Graphics.GL.EXT.SemaphoreWin32"
+ \ , "Graphics.GL.EXT.SeparateShaderObjects"
+ \ , "Graphics.GL.EXT.SeparateSpecularColor"
+ \ , "Graphics.GL.EXT.ShaderFramebufferFetch"
+ \ , "Graphics.GL.EXT.ShaderFramebufferFetchNonCoherent"
+ \ , "Graphics.GL.EXT.ShaderImageLoadStore"
+ \ , "Graphics.GL.EXT.SharedTexturePalette"
+ \ , "Graphics.GL.EXT.StencilClearTag"
+ \ , "Graphics.GL.EXT.StencilTwoSide"
+ \ , "Graphics.GL.EXT.StencilWrap"
+ \ , "Graphics.GL.EXT.Subtexture"
+ \ , "Graphics.GL.EXT.Texture"
+ \ , "Graphics.GL.EXT.Texture3D"
+ \ , "Graphics.GL.EXT.TextureArray"
+ \ , "Graphics.GL.EXT.TextureBufferObject"
+ \ , "Graphics.GL.EXT.TextureCompressionLATC"
+ \ , "Graphics.GL.EXT.TextureCompressionRGTC"
+ \ , "Graphics.GL.EXT.TextureCompressionS3TC"
+ \ , "Graphics.GL.EXT.TextureCubeMap"
+ \ , "Graphics.GL.EXT.TextureEnvCombine"
+ \ , "Graphics.GL.EXT.TextureEnvDot3"
+ \ , "Graphics.GL.EXT.TextureFilterAnisotropic"
+ \ , "Graphics.GL.EXT.TextureFilterMinmax"
+ \ , "Graphics.GL.EXT.TextureInteger"
+ \ , "Graphics.GL.EXT.TextureLODBias"
+ \ , "Graphics.GL.EXT.TextureMirrorClamp"
+ \ , "Graphics.GL.EXT.TextureObject"
+ \ , "Graphics.GL.EXT.TexturePerturbNormal"
+ \ , "Graphics.GL.EXT.TextureSNorm"
+ \ , "Graphics.GL.EXT.TextureSRGB"
+ \ , "Graphics.GL.EXT.TextureSRGBDecode"
+ \ , "Graphics.GL.EXT.TextureSharedExponent"
+ \ , "Graphics.GL.EXT.TextureSwizzle"
+ \ , "Graphics.GL.EXT.TimerQuery"
+ \ , "Graphics.GL.EXT.TransformFeedback"
+ \ , "Graphics.GL.EXT.VertexArray"
+ \ , "Graphics.GL.EXT.VertexArrayBGRA"
+ \ , "Graphics.GL.EXT.VertexAttrib64Bit"
+ \ , "Graphics.GL.EXT.VertexShader"
+ \ , "Graphics.GL.EXT.VertexWeighting"
+ \ , "Graphics.GL.EXT.Win32KeyedMutex"
+ \ , "Graphics.GL.EXT.WindowRectangles"
+ \ , "Graphics.GL.EXT.X11SyncObject"
+ \ , "Graphics.GL.Functions"
+ \ , "Graphics.GL.GREMEDY"
+ \ , "Graphics.GL.GREMEDY.FrameTerminator"
+ \ , "Graphics.GL.GREMEDY.StringMarker"
+ \ , "Graphics.GL.GetProcAddress"
+ \ , "Graphics.GL.Groups"
+ \ , "Graphics.GL.HP"
+ \ , "Graphics.GL.HP.ConvolutionBorderModes"
+ \ , "Graphics.GL.HP.ImageTransform"
+ \ , "Graphics.GL.HP.OcclusionTest"
+ \ , "Graphics.GL.HP.TextureLighting"
+ \ , "Graphics.GL.IBM"
+ \ , "Graphics.GL.IBM.CullVertex"
+ \ , "Graphics.GL.IBM.MultimodeDrawArrays"
+ \ , "Graphics.GL.IBM.RasterposClip"
+ \ , "Graphics.GL.IBM.StaticData"
+ \ , "Graphics.GL.IBM.TextureMirroredRepeat"
+ \ , "Graphics.GL.IBM.VertexArrayLists"
+ \ , "Graphics.GL.INGR"
+ \ , "Graphics.GL.INGR.BlendFuncSeparate"
+ \ , "Graphics.GL.INGR.ColorClamp"
+ \ , "Graphics.GL.INGR.InterlaceRead"
+ \ , "Graphics.GL.INTEL"
+ \ , "Graphics.GL.INTEL.BlackholeRender"
+ \ , "Graphics.GL.INTEL.ConservativeRasterization"
+ \ , "Graphics.GL.INTEL.FramebufferCmaa"
+ \ , "Graphics.GL.INTEL.MapTexture"
+ \ , "Graphics.GL.INTEL.ParallelArrays"
+ \ , "Graphics.GL.INTEL.PerformanceQuery"
+ \ , "Graphics.GL.KHR"
+ \ , "Graphics.GL.KHR.BlendEquationAdvanced"
+ \ , "Graphics.GL.KHR.BlendEquationAdvancedCoherent"
+ \ , "Graphics.GL.KHR.ContextFlushControl"
+ \ , "Graphics.GL.KHR.DebugCompatibility"
+ \ , "Graphics.GL.KHR.DebugCore"
+ \ , "Graphics.GL.KHR.NoError"
+ \ , "Graphics.GL.KHR.ParallelShaderCompile"
+ \ , "Graphics.GL.KHR.Robustness"
+ \ , "Graphics.GL.KHR.TextureCompressionASTCHDR"
+ \ , "Graphics.GL.KHR.TextureCompressionASTCLDR"
+ \ , "Graphics.GL.MESA"
+ \ , "Graphics.GL.MESA.PackInvert"
+ \ , "Graphics.GL.MESA.ProgramBinaryFormats"
+ \ , "Graphics.GL.MESA.ResizeBuffers"
+ \ , "Graphics.GL.MESA.TileRasterOrder"
+ \ , "Graphics.GL.MESA.WindowPos"
+ \ , "Graphics.GL.MESA.YCbCrTexture"
+ \ , "Graphics.GL.MESAX"
+ \ , "Graphics.GL.MESAX.TextureStack"
+ \ , "Graphics.GL.NV"
+ \ , "Graphics.GL.NV.AlphaToCoverageDitherControl"
+ \ , "Graphics.GL.NV.BindlessMultiDrawIndirect"
+ \ , "Graphics.GL.NV.BindlessMultiDrawIndirectCount"
+ \ , "Graphics.GL.NV.BindlessTexture"
+ \ , "Graphics.GL.NV.BlendEquationAdvanced"
+ \ , "Graphics.GL.NV.BlendEquationAdvancedCoherent"
+ \ , "Graphics.GL.NV.BlendMinmaxFactor"
+ \ , "Graphics.GL.NV.ClipSpaceWScaling"
+ \ , "Graphics.GL.NV.CommandList"
+ \ , "Graphics.GL.NV.ComputeProgram5"
+ \ , "Graphics.GL.NV.ConditionalRender"
+ \ , "Graphics.GL.NV.ConservativeRaster"
+ \ , "Graphics.GL.NV.ConservativeRasterDilate"
+ \ , "Graphics.GL.NV.ConservativeRasterPreSnap"
+ \ , "Graphics.GL.NV.ConservativeRasterPreSnapTriangles"
+ \ , "Graphics.GL.NV.CopyDepthToColor"
+ \ , "Graphics.GL.NV.CopyImage"
+ \ , "Graphics.GL.NV.DeepTexture3D"
+ \ , "Graphics.GL.NV.DepthBufferFloat"
+ \ , "Graphics.GL.NV.DepthClamp"
+ \ , "Graphics.GL.NV.DrawTexture"
+ \ , "Graphics.GL.NV.DrawVulkanImage"
+ \ , "Graphics.GL.NV.Evaluators"
+ \ , "Graphics.GL.NV.ExplicitMultisample"
+ \ , "Graphics.GL.NV.Fence"
+ \ , "Graphics.GL.NV.FillRectangle"
+ \ , "Graphics.GL.NV.FloatBuffer"
+ \ , "Graphics.GL.NV.FogDistance"
+ \ , "Graphics.GL.NV.FragmentCoverageToColor"
+ \ , "Graphics.GL.NV.FragmentProgram"
+ \ , "Graphics.GL.NV.FragmentProgram2"
+ \ , "Graphics.GL.NV.FramebufferMixedSamples"
+ \ , "Graphics.GL.NV.FramebufferMultisampleCoverage"
+ \ , "Graphics.GL.NV.GPUMulticast"
+ \ , "Graphics.GL.NV.GPUProgram4"
+ \ , "Graphics.GL.NV.GPUProgram5"
+ \ , "Graphics.GL.NV.GPUShader5"
+ \ , "Graphics.GL.NV.GeometryProgram4"
+ \ , "Graphics.GL.NV.HalfFloat"
+ \ , "Graphics.GL.NV.InternalformatSampleQuery"
+ \ , "Graphics.GL.NV.LightMaxExponent"
+ \ , "Graphics.GL.NV.MultisampleCoverage"
+ \ , "Graphics.GL.NV.MultisampleFilterHint"
+ \ , "Graphics.GL.NV.OcclusionQuery"
+ \ , "Graphics.GL.NV.PackedDepthStencil"
+ \ , "Graphics.GL.NV.ParameterBufferObject"
+ \ , "Graphics.GL.NV.PathRenderingCompatibility"
+ \ , "Graphics.GL.NV.PathRenderingCore"
+ \ , "Graphics.GL.NV.PathRenderingSharedEdge"
+ \ , "Graphics.GL.NV.PixelDataRange"
+ \ , "Graphics.GL.NV.PointSprite"
+ \ , "Graphics.GL.NV.PresentVideo"
+ \ , "Graphics.GL.NV.PrimitiveRestart"
+ \ , "Graphics.GL.NV.QueryResource"
+ \ , "Graphics.GL.NV.QueryResourceTag"
+ \ , "Graphics.GL.NV.RegisterCombiners"
+ \ , "Graphics.GL.NV.RegisterCombiners2"
+ \ , "Graphics.GL.NV.RobustnessVideoMemoryPurge"
+ \ , "Graphics.GL.NV.SampleLocations"
+ \ , "Graphics.GL.NV.ShaderBufferLoad"
+ \ , "Graphics.GL.NV.ShaderBufferStore"
+ \ , "Graphics.GL.NV.ShaderThreadGroup"
+ \ , "Graphics.GL.NV.TessellationProgram5"
+ \ , "Graphics.GL.NV.TexgenEmboss"
+ \ , "Graphics.GL.NV.TexgenReflection"
+ \ , "Graphics.GL.NV.TextureBarrier"
+ \ , "Graphics.GL.NV.TextureEnvCombine4"
+ \ , "Graphics.GL.NV.TextureExpandNormal"
+ \ , "Graphics.GL.NV.TextureMultisample"
+ \ , "Graphics.GL.NV.TextureRectangle"
+ \ , "Graphics.GL.NV.TextureShader"
+ \ , "Graphics.GL.NV.TextureShader2"
+ \ , "Graphics.GL.NV.TextureShader3"
+ \ , "Graphics.GL.NV.TransformFeedback"
+ \ , "Graphics.GL.NV.TransformFeedback2"
+ \ , "Graphics.GL.NV.UniformBufferUnifiedMemory"
+ \ , "Graphics.GL.NV.VDPAUInterop"
+ \ , "Graphics.GL.NV.VertexArrayRange"
+ \ , "Graphics.GL.NV.VertexArrayRange2"
+ \ , "Graphics.GL.NV.VertexAttribInteger64Bit"
+ \ , "Graphics.GL.NV.VertexBufferUnifiedMemory"
+ \ , "Graphics.GL.NV.VertexProgram"
+ \ , "Graphics.GL.NV.VertexProgram2Option"
+ \ , "Graphics.GL.NV.VertexProgram3"
+ \ , "Graphics.GL.NV.VertexProgram4"
+ \ , "Graphics.GL.NV.VideoCapture"
+ \ , "Graphics.GL.NV.ViewportSwizzle"
+ \ , "Graphics.GL.NVX"
+ \ , "Graphics.GL.NVX.ConditionalRender"
+ \ , "Graphics.GL.NVX.GPUMemoryInfo"
+ \ , "Graphics.GL.NVX.LinkedGPUMulticast"
+ \ , "Graphics.GL.OES"
+ \ , "Graphics.GL.OES.ByteCoordinates"
+ \ , "Graphics.GL.OES.CompressedPalettedTexture"
+ \ , "Graphics.GL.OES.FixedPoint"
+ \ , "Graphics.GL.OES.QueryMatrix"
+ \ , "Graphics.GL.OES.ReadFormat"
+ \ , "Graphics.GL.OES.SinglePrecision"
+ \ , "Graphics.GL.OML"
+ \ , "Graphics.GL.OML.Interlace"
+ \ , "Graphics.GL.OML.Resample"
+ \ , "Graphics.GL.OML.Subsample"
+ \ , "Graphics.GL.OVR"
+ \ , "Graphics.GL.OVR.Multiview"
+ \ , "Graphics.GL.PGI"
+ \ , "Graphics.GL.PGI.MiscHints"
+ \ , "Graphics.GL.PGI.VertexHints"
+ \ , "Graphics.GL.REND"
+ \ , "Graphics.GL.REND.ScreenCoordinates"
+ \ , "Graphics.GL.S3"
+ \ , "Graphics.GL.S3.S3TC"
+ \ , "Graphics.GL.SGI"
+ \ , "Graphics.GL.SGI.ColorMatrix"
+ \ , "Graphics.GL.SGI.ColorTable"
+ \ , "Graphics.GL.SGI.TextureColorTable"
+ \ , "Graphics.GL.SGIS"
+ \ , "Graphics.GL.SGIS.DetailTexture"
+ \ , "Graphics.GL.SGIS.FogFunction"
+ \ , "Graphics.GL.SGIS.GenerateMipmap"
+ \ , "Graphics.GL.SGIS.Multisample"
+ \ , "Graphics.GL.SGIS.PixelTexture"
+ \ , "Graphics.GL.SGIS.PointLineTexgen"
+ \ , "Graphics.GL.SGIS.PointParameters"
+ \ , "Graphics.GL.SGIS.SharpenTexture"
+ \ , "Graphics.GL.SGIS.Texture4D"
+ \ , "Graphics.GL.SGIS.TextureBorderClamp"
+ \ , "Graphics.GL.SGIS.TextureColorMask"
+ \ , "Graphics.GL.SGIS.TextureEdgeClamp"
+ \ , "Graphics.GL.SGIS.TextureFilter4"
+ \ , "Graphics.GL.SGIS.TextureLOD"
+ \ , "Graphics.GL.SGIS.TextureSelect"
+ \ , "Graphics.GL.SGIX"
+ \ , "Graphics.GL.SGIX.Async"
+ \ , "Graphics.GL.SGIX.AsyncHistogram"
+ \ , "Graphics.GL.SGIX.AsyncPixel"
+ \ , "Graphics.GL.SGIX.BlendAlphaMinmax"
+ \ , "Graphics.GL.SGIX.CalligraphicFragment"
+ \ , "Graphics.GL.SGIX.Clipmap"
+ \ , "Graphics.GL.SGIX.ConvolutionAccuracy"
+ \ , "Graphics.GL.SGIX.DepthTexture"
+ \ , "Graphics.GL.SGIX.FlushRaster"
+ \ , "Graphics.GL.SGIX.FogOffset"
+ \ , "Graphics.GL.SGIX.FragmentLighting"
+ \ , "Graphics.GL.SGIX.Framezoom"
+ \ , "Graphics.GL.SGIX.IglooInterface"
+ \ , "Graphics.GL.SGIX.Instruments"
+ \ , "Graphics.GL.SGIX.Interlace"
+ \ , "Graphics.GL.SGIX.IrInstrument1"
+ \ , "Graphics.GL.SGIX.ListPriority"
+ \ , "Graphics.GL.SGIX.PixelTexture"
+ \ , "Graphics.GL.SGIX.PixelTiles"
+ \ , "Graphics.GL.SGIX.PolynomialFFD"
+ \ , "Graphics.GL.SGIX.ReferencePlane"
+ \ , "Graphics.GL.SGIX.Resample"
+ \ , "Graphics.GL.SGIX.ScalebiasHint"
+ \ , "Graphics.GL.SGIX.Shadow"
+ \ , "Graphics.GL.SGIX.ShadowAmbient"
+ \ , "Graphics.GL.SGIX.Sprite"
+ \ , "Graphics.GL.SGIX.Subsample"
+ \ , "Graphics.GL.SGIX.TagSampleBuffer"
+ \ , "Graphics.GL.SGIX.TextureAddEnv"
+ \ , "Graphics.GL.SGIX.TextureCoordinateClamp"
+ \ , "Graphics.GL.SGIX.TextureLODBias"
+ \ , "Graphics.GL.SGIX.TextureMultiBuffer"
+ \ , "Graphics.GL.SGIX.TextureScaleBias"
+ \ , "Graphics.GL.SGIX.VertexPreclip"
+ \ , "Graphics.GL.SGIX.YCrCb"
+ \ , "Graphics.GL.SGIX.YCrCbA"
+ \ , "Graphics.GL.SUN"
+ \ , "Graphics.GL.SUN.ConvolutionBorderModes"
+ \ , "Graphics.GL.SUN.GlobalAlpha"
+ \ , "Graphics.GL.SUN.MeshArray"
+ \ , "Graphics.GL.SUN.SliceAccum"
+ \ , "Graphics.GL.SUN.TriangleList"
+ \ , "Graphics.GL.SUN.Vertex"
+ \ , "Graphics.GL.SUNX"
+ \ , "Graphics.GL.SUNX.ConstantData"
+ \ , "Graphics.GL.ThreeDFX"
+ \ , "Graphics.GL.ThreeDFX.Multisample"
+ \ , "Graphics.GL.ThreeDFX.Tbuffer"
+ \ , "Graphics.GL.ThreeDFX.TextureCompressionFXT1"
+ \ , "Graphics.GL.Tokens"
+ \ , "Graphics.GL.Types"
+ \ , "Graphics.GL.Version10"
+ \ , "Graphics.GL.Version11"
+ \ , "Graphics.GL.Version12"
+ \ , "Graphics.GL.Version13"
+ \ , "Graphics.GL.Version14"
+ \ , "Graphics.GL.Version15"
+ \ , "Graphics.GL.Version20"
+ \ , "Graphics.GL.Version21"
+ \ , "Graphics.GL.WIN"
+ \ , "Graphics.GL.WIN.PhongShading"
+ \ , "Graphics.GL.WIN.SpecularFog"
+ \ , "Test.QuickCheck"
+ \ , "Test.QuickCheck.All"
+ \ , "Test.QuickCheck.Arbitrary"
+ \ , "Test.QuickCheck.Exception"
+ \ , "Test.QuickCheck.Function"
+ \ , "Test.QuickCheck.Gen"
+ \ , "Test.QuickCheck.Gen.Unsafe"
+ \ , "Test.QuickCheck.Modifiers"
+ \ , "Test.QuickCheck.Monadic"
+ \ , "Test.QuickCheck.Poly"
+ \ , "Test.QuickCheck.Property"
+ \ , "Test.QuickCheck.Random"
+ \ , "Test.QuickCheck.State"
+ \ , "Test.QuickCheck.Test"
+ \ , "Test.QuickCheck.Text"
+ \ , "Data.StateVar"
+ \ , "Graphics.Win32"
+ \ , "Graphics.Win32.Control"
+ \ , "Graphics.Win32.Dialogue"
+ \ , "Graphics.Win32.GDI"
+ \ , "Graphics.Win32.GDI.AlphaBlend"
+ \ , "Graphics.Win32.GDI.Bitmap"
+ \ , "Graphics.Win32.GDI.Brush"
+ \ , "Graphics.Win32.GDI.Clip"
+ \ , "Graphics.Win32.GDI.Font"
+ \ , "Graphics.Win32.GDI.Graphics2D"
+ \ , "Graphics.Win32.GDI.HDC"
+ \ , "Graphics.Win32.GDI.Palette"
+ \ , "Graphics.Win32.GDI.Path"
+ \ , "Graphics.Win32.GDI.Pen"
+ \ , "Graphics.Win32.GDI.Region"
+ \ , "Graphics.Win32.GDI.Types"
+ \ , "Graphics.Win32.Icon"
+ \ , "Graphics.Win32.Key"
+ \ , "Graphics.Win32.LayeredWindow"
+ \ , "Graphics.Win32.Menu"
+ \ , "Graphics.Win32.Message"
+ \ , "Graphics.Win32.Misc"
+ \ , "Graphics.Win32.Resource"
+ \ , "Graphics.Win32.Window"
+ \ , "Graphics.Win32.Window.AnimateWindow"
+ \ , "Graphics.Win32.Window.ForegroundWindow"
+ \ , "Graphics.Win32.Window.HotKey"
+ \ , "Graphics.Win32.Window.IMM"
+ \ , "Graphics.Win32.Window.PostMessage"
+ \ , "Media.Win32"
+ \ , "System.Win32"
+ \ , "System.Win32.Automation"
+ \ , "System.Win32.Automation.Input"
+ \ , "System.Win32.Automation.Input.Key"
+ \ , "System.Win32.Automation.Input.Mouse"
+ \ , "System.Win32.Console"
+ \ , "System.Win32.Console.CtrlHandler"
+ \ , "System.Win32.Console.HWND"
+ \ , "System.Win32.Console.Title"
+ \ , "System.Win32.DLL"
+ \ , "System.Win32.DebugApi"
+ \ , "System.Win32.Encoding"
+ \ , "System.Win32.Exception.Unsupported"
+ \ , "System.Win32.File"
+ \ , "System.Win32.FileMapping"
+ \ , "System.Win32.HardLink"
+ \ , "System.Win32.Info"
+ \ , "System.Win32.Info.Computer"
+ \ , "System.Win32.Info.Version"
+ \ , "System.Win32.Mem"
+ \ , "System.Win32.MinTTY"
+ \ , "System.Win32.NLS"
+ \ , "System.Win32.Path"
+ \ , "System.Win32.Process"
+ \ , "System.Win32.Registry"
+ \ , "System.Win32.Security"
+ \ , "System.Win32.Shell"
+ \ , "System.Win32.SimpleMAPI"
+ \ , "System.Win32.String"
+ \ , "System.Win32.SymbolicLink"
+ \ , "System.Win32.Thread"
+ \ , "System.Win32.Time"
+ \ , "System.Win32.Types"
+ \ , "System.Win32.Utils"
+ \ , "System.Win32.Word"
+ \ , "Data.Array"
+ \ , "Data.Array.Base"
+ \ , "Data.Array.IArray"
+ \ , "Data.Array.IO"
+ \ , "Data.Array.IO.Internals"
+ \ , "Data.Array.IO.Safe"
+ \ , "Data.Array.MArray"
+ \ , "Data.Array.MArray.Safe"
+ \ , "Data.Array.ST"
+ \ , "Data.Array.ST.Safe"
+ \ , "Data.Array.Storable"
+ \ , "Data.Array.Storable.Internals"
+ \ , "Data.Array.Storable.Safe"
+ \ , "Data.Array.Unboxed"
+ \ , "Data.Array.Unsafe"
+ \ , "Control.Concurrent.Async"
+ \ , "Data.Attoparsec"
+ \ , "Data.Attoparsec.ByteString"
+ \ , "Data.Attoparsec.ByteString.Char8"
+ \ , "Data.Attoparsec.ByteString.Lazy"
+ \ , "Data.Attoparsec.Char8"
+ \ , "Data.Attoparsec.Combinator"
+ \ , "Data.Attoparsec.Internal"
+ \ , "Data.Attoparsec.Internal.Types"
+ \ , "Data.Attoparsec.Lazy"
+ \ , "Data.Attoparsec.Number"
+ \ , "Data.Attoparsec.Text"
+ \ , "Data.Attoparsec.Text.Lazy"
+ \ , "Data.Attoparsec.Types"
+ \ , "Data.Attoparsec.Zepto"
+ \ , "Control.Applicative"
+ \ , "Control.Arrow"
+ \ , "Control.Category"
+ \ , "Control.Concurrent"
+ \ , "Control.Concurrent.Chan"
+ \ , "Control.Concurrent.MVar"
+ \ , "Control.Concurrent.QSem"
+ \ , "Control.Concurrent.QSemN"
+ \ , "Control.Exception"
+ \ , "Control.Exception.Base"
+ \ , "Control.Monad"
+ \ , "Control.Monad.Fail"
+ \ , "Control.Monad.Fix"
+ \ , "Control.Monad.IO.Class"
+ \ , "Control.Monad.Instances"
+ \ , "Control.Monad.ST"
+ \ , "Control.Monad.ST.Lazy"
+ \ , "Control.Monad.ST.Lazy.Safe"
+ \ , "Control.Monad.ST.Lazy.Unsafe"
+ \ , "Control.Monad.ST.Safe"
+ \ , "Control.Monad.ST.Strict"
+ \ , "Control.Monad.ST.Unsafe"
+ \ , "Control.Monad.Zip"
+ \ , "Data.Bifoldable"
+ \ , "Data.Bifunctor"
+ \ , "Data.Bitraversable"
+ \ , "Data.Bits"
+ \ , "Data.Bool"
+ \ , "Data.Char"
+ \ , "Data.Coerce"
+ \ , "Data.Complex"
+ \ , "Data.Data"
+ \ , "Data.Dynamic"
+ \ , "Data.Either"
+ \ , "Data.Eq"
+ \ , "Data.Fixed"
+ \ , "Data.Foldable"
+ \ , "Data.Function"
+ \ , "Data.Functor"
+ \ , "Data.Functor.Classes"
+ \ , "Data.Functor.Compose"
+ \ , "Data.Functor.Const"
+ \ , "Data.Functor.Identity"
+ \ , "Data.Functor.Product"
+ \ , "Data.Functor.Sum"
+ \ , "Data.IORef"
+ \ , "Data.Int"
+ \ , "Data.Ix"
+ \ , "Data.Kind"
+ \ , "Data.List"
+ \ , "Data.List.NonEmpty"
+ \ , "Data.Maybe"
+ \ , "Data.Monoid"
+ \ , "Data.Ord"
+ \ , "Data.Proxy"
+ \ , "Data.Ratio"
+ \ , "Data.STRef"
+ \ , "Data.STRef.Lazy"
+ \ , "Data.STRef.Strict"
+ \ , "Data.Semigroup"
+ \ , "Data.String"
+ \ , "Data.Traversable"
+ \ , "Data.Tuple"
+ \ , "Data.Type.Bool"
+ \ , "Data.Type.Coercion"
+ \ , "Data.Type.Equality"
+ \ , "Data.Typeable"
+ \ , "Data.Unique"
+ \ , "Data.Version"
+ \ , "Data.Void"
+ \ , "Data.Word"
+ \ , "Debug.Trace"
+ \ , "Foreign"
+ \ , "Foreign.C"
+ \ , "Foreign.C.Error"
+ \ , "Foreign.C.String"
+ \ , "Foreign.C.Types"
+ \ , "Foreign.Concurrent"
+ \ , "Foreign.ForeignPtr"
+ \ , "Foreign.ForeignPtr.Safe"
+ \ , "Foreign.ForeignPtr.Unsafe"
+ \ , "Foreign.Marshal"
+ \ , "Foreign.Marshal.Alloc"
+ \ , "Foreign.Marshal.Array"
+ \ , "Foreign.Marshal.Error"
+ \ , "Foreign.Marshal.Pool"
+ \ , "Foreign.Marshal.Safe"
+ \ , "Foreign.Marshal.Unsafe"
+ \ , "Foreign.Marshal.Utils"
+ \ , "Foreign.Ptr"
+ \ , "Foreign.Safe"
+ \ , "Foreign.StablePtr"
+ \ , "Foreign.Storable"
+ \ , "GHC.Arr"
+ \ , "GHC.Base"
+ \ , "GHC.ByteOrder"
+ \ , "GHC.Char"
+ \ , "GHC.Clock"
+ \ , "GHC.Conc"
+ \ , "GHC.Conc.IO"
+ \ , "GHC.Conc.Signal"
+ \ , "GHC.Conc.Sync"
+ \ , "GHC.ConsoleHandler"
+ \ , "GHC.Constants"
+ \ , "GHC.Desugar"
+ \ , "GHC.Enum"
+ \ , "GHC.Environment"
+ \ , "GHC.Err"
+ \ , "GHC.Event"
+ \ , "GHC.Exception"
+ \ , "GHC.ExecutionStack"
+ \ , "GHC.ExecutionStack.Internal"
+ \ , "GHC.Exts"
+ \ , "GHC.Fingerprint"
+ \ , "GHC.Fingerprint.Type"
+ \ , "GHC.Float"
+ \ , "GHC.Float.ConversionUtils"
+ \ , "GHC.Float.RealFracMethods"
+ \ , "GHC.Foreign"
+ \ , "GHC.ForeignPtr"
+ \ , "GHC.GHCi"
+ \ , "GHC.Generics"
+ \ , "GHC.IO"
+ \ , "GHC.IO.Buffer"
+ \ , "GHC.IO.BufferedIO"
+ \ , "GHC.IO.Device"
+ \ , "GHC.IO.Encoding"
+ \ , "GHC.IO.Encoding.CodePage"
+ \ , "GHC.IO.Encoding.Failure"
+ \ , "GHC.IO.Encoding.Iconv"
+ \ , "GHC.IO.Encoding.Latin1"
+ \ , "GHC.IO.Encoding.Types"
+ \ , "GHC.IO.Encoding.UTF16"
+ \ , "GHC.IO.Encoding.UTF32"
+ \ , "GHC.IO.Encoding.UTF8"
+ \ , "GHC.IO.Exception"
+ \ , "GHC.IO.FD"
+ \ , "GHC.IO.Handle"
+ \ , "GHC.IO.Handle.FD"
+ \ , "GHC.IO.Handle.Internals"
+ \ , "GHC.IO.Handle.Lock"
+ \ , "GHC.IO.Handle.Text"
+ \ , "GHC.IO.Handle.Types"
+ \ , "GHC.IO.IOMode"
+ \ , "GHC.IO.Unsafe"
+ \ , "GHC.IOArray"
+ \ , "GHC.IORef"
+ \ , "GHC.Int"
+ \ , "GHC.List"
+ \ , "GHC.MVar"
+ \ , "GHC.Natural"
+ \ , "GHC.Num"
+ \ , "GHC.OldList"
+ \ , "GHC.OverloadedLabels"
+ \ , "GHC.PArr"
+ \ , "GHC.Pack"
+ \ , "GHC.Profiling"
+ \ , "GHC.Ptr"
+ \ , "GHC.RTS.Flags"
+ \ , "GHC.Read"
+ \ , "GHC.Real"
+ \ , "GHC.Records"
+ \ , "GHC.ST"
+ \ , "GHC.STRef"
+ \ , "GHC.Show"
+ \ , "GHC.Stable"
+ \ , "GHC.Stack"
+ \ , "GHC.Stack.CCS"
+ \ , "GHC.Stack.Types"
+ \ , "GHC.StaticPtr"
+ \ , "GHC.Stats"
+ \ , "GHC.Storable"
+ \ , "GHC.TopHandler"
+ \ , "GHC.TypeLits"
+ \ , "GHC.TypeNats"
+ \ , "GHC.Unicode"
+ \ , "GHC.Weak"
+ \ , "GHC.Word"
+ \ , "Numeric"
+ \ , "Numeric.Natural"
+ \ , "Prelude"
+ \ , "System.CPUTime"
+ \ , "System.Console.GetOpt"
+ \ , "System.Environment"
+ \ , "System.Environment.Blank"
+ \ , "System.Exit"
+ \ , "System.IO"
+ \ , "System.IO.Error"
+ \ , "System.IO.Unsafe"
+ \ , "System.Info"
+ \ , "System.Mem"
+ \ , "System.Mem.StableName"
+ \ , "System.Mem.Weak"
+ \ , "System.Posix.Internals"
+ \ , "System.Posix.Types"
+ \ , "System.Timeout"
+ \ , "Text.ParserCombinators.ReadP"
+ \ , "Text.ParserCombinators.ReadPrec"
+ \ , "Text.Printf"
+ \ , "Text.Read"
+ \ , "Text.Read.Lex"
+ \ , "Text.Show"
+ \ , "Text.Show.Functions"
+ \ , "Type.Reflection"
+ \ , "Type.Reflection.Unsafe"
+ \ , "Unsafe.Coerce"
+ \ , "Data.ByteString"
+ \ , "Data.ByteString.Builder"
+ \ , "Data.ByteString.Builder.Extra"
+ \ , "Data.ByteString.Builder.Internal"
+ \ , "Data.ByteString.Builder.Prim"
+ \ , "Data.ByteString.Builder.Prim.Internal"
+ \ , "Data.ByteString.Char8"
+ \ , "Data.ByteString.Internal"
+ \ , "Data.ByteString.Lazy"
+ \ , "Data.ByteString.Lazy.Builder"
+ \ , "Data.ByteString.Lazy.Builder.ASCII"
+ \ , "Data.ByteString.Lazy.Builder.Extras"
+ \ , "Data.ByteString.Lazy.Char8"
+ \ , "Data.ByteString.Lazy.Internal"
+ \ , "Data.ByteString.Short"
+ \ , "Data.ByteString.Short.Internal"
+ \ , "Data.ByteString.Unsafe"
+ \ , "Data.CallStack"
+ \ , "Data.CaseInsensitive"
+ \ , "Data.CaseInsensitive.Unsafe"
+ \ , "Network.CGI"
+ \ , "Network.CGI.Compat"
+ \ , "Network.CGI.Cookie"
+ \ , "Network.CGI.Monad"
+ \ , "Network.CGI.Protocol"
+ \ , "Data.Graph"
+ \ , "Data.IntMap"
+ \ , "Data.IntMap.Internal"
+ \ , "Data.IntMap.Internal.Debug"
+ \ , "Data.IntMap.Lazy"
+ \ , "Data.IntMap.Merge.Lazy"
+ \ , "Data.IntMap.Merge.Strict"
+ \ , "Data.IntMap.Strict"
+ \ , "Data.IntSet"
+ \ , "Data.IntSet.Internal"
+ \ , "Data.Map"
+ \ , "Data.Map.Internal"
+ \ , "Data.Map.Internal.Debug"
+ \ , "Data.Map.Lazy"
+ \ , "Data.Map.Lazy.Merge"
+ \ , "Data.Map.Merge.Lazy"
+ \ , "Data.Map.Merge.Strict"
+ \ , "Data.Map.Strict"
+ \ , "Data.Map.Strict.Internal"
+ \ , "Data.Map.Strict.Merge"
+ \ , "Data.Sequence"
+ \ , "Data.Sequence.Internal"
+ \ , "Data.Sequence.Internal.Sorting"
+ \ , "Data.Set"
+ \ , "Data.Set.Internal"
+ \ , "Data.Tree"
+ \ , "Utils.Containers.Internal.BitQueue"
+ \ , "Utils.Containers.Internal.BitUtil"
+ \ , "Utils.Containers.Internal.StrictPair"
+ \ , "Control.DeepSeq"
+ \ , "System.Directory"
+ \ , "System.Directory.Internal"
+ \ , "System.Directory.Internal.Prelude"
+ \ , "Control.Monad.Catch"
+ \ , "Control.Monad.Catch.Pure"
+ \ , "Control.Exception.Extensible"
+ \ , "Data.Graph.Inductive"
+ \ , "Data.Graph.Inductive.Basic"
+ \ , "Data.Graph.Inductive.Example"
+ \ , "Data.Graph.Inductive.Graph"
+ \ , "Data.Graph.Inductive.Internal.Heap"
+ \ , "Data.Graph.Inductive.Internal.Queue"
+ \ , "Data.Graph.Inductive.Internal.RootPath"
+ \ , "Data.Graph.Inductive.Internal.Thread"
+ \ , "Data.Graph.Inductive.Monad"
+ \ , "Data.Graph.Inductive.Monad.IOArray"
+ \ , "Data.Graph.Inductive.Monad.STArray"
+ \ , "Data.Graph.Inductive.NodeMap"
+ \ , "Data.Graph.Inductive.PatriciaTree"
+ \ , "Data.Graph.Inductive.Query"
+ \ , "Data.Graph.Inductive.Query.ArtPoint"
+ \ , "Data.Graph.Inductive.Query.BCC"
+ \ , "Data.Graph.Inductive.Query.BFS"
+ \ , "Data.Graph.Inductive.Query.DFS"
+ \ , "Data.Graph.Inductive.Query.Dominators"
+ \ , "Data.Graph.Inductive.Query.GVD"
+ \ , "Data.Graph.Inductive.Query.Indep"
+ \ , "Data.Graph.Inductive.Query.MST"
+ \ , "Data.Graph.Inductive.Query.MaxFlow"
+ \ , "Data.Graph.Inductive.Query.MaxFlow2"
+ \ , "Data.Graph.Inductive.Query.Monad"
+ \ , "Data.Graph.Inductive.Query.SP"
+ \ , "Data.Graph.Inductive.Query.TransClos"
+ \ , "Data.Graph.Inductive.Tree"
+ \ , "System.FilePath"
+ \ , "System.FilePath.Posix"
+ \ , "System.FilePath.Windows"
+ \ , "Numeric.Fixed"
+ \ , "Annotations"
+ \ , "ApiAnnotation"
+ \ , "Ar"
+ \ , "AsmCodeGen"
+ \ , "AsmUtils"
+ \ , "Avail"
+ \ , "Bag"
+ \ , "BasicTypes"
+ \ , "BinFingerprint"
+ \ , "BinIface"
+ \ , "Binary"
+ \ , "Bitmap"
+ \ , "BkpSyn"
+ \ , "BlockId"
+ \ , "BooleanFormula"
+ \ , "BufWrite"
+ \ , "BuildTyCl"
+ \ , "ByteCodeAsm"
+ \ , "ByteCodeGen"
+ \ , "ByteCodeInstr"
+ \ , "ByteCodeItbls"
+ \ , "ByteCodeLink"
+ \ , "ByteCodeTypes"
+ \ , "CLabel"
+ \ , "CPrim"
+ \ , "CSE"
+ \ , "CallArity"
+ \ , "CgUtils"
+ \ , "Check"
+ \ , "Class"
+ \ , "CmdLineParser"
+ \ , "Cmm"
+ \ , "CmmBuildInfoTables"
+ \ , "CmmCallConv"
+ \ , "CmmCommonBlockElim"
+ \ , "CmmContFlowOpt"
+ \ , "CmmExpr"
+ \ , "CmmImplementSwitchPlans"
+ \ , "CmmInfo"
+ \ , "CmmLayoutStack"
+ \ , "CmmLex"
+ \ , "CmmLint"
+ \ , "CmmLive"
+ \ , "CmmMachOp"
+ \ , "CmmMonad"
+ \ , "CmmNode"
+ \ , "CmmOpt"
+ \ , "CmmParse"
+ \ , "CmmPipeline"
+ \ , "CmmProcPoint"
+ \ , "CmmSink"
+ \ , "CmmSwitch"
+ \ , "CmmType"
+ \ , "CmmUtils"
+ \ , "CoAxiom"
+ \ , "CodeGen.Platform"
+ \ , "CodeGen.Platform.ARM"
+ \ , "CodeGen.Platform.ARM64"
+ \ , "CodeGen.Platform.NoRegs"
+ \ , "CodeGen.Platform.PPC"
+ \ , "CodeGen.Platform.PPC_Darwin"
+ \ , "CodeGen.Platform.SPARC"
+ \ , "CodeGen.Platform.X86"
+ \ , "CodeGen.Platform.X86_64"
+ \ , "CodeOutput"
+ \ , "Coercion"
+ \ , "ConLike"
+ \ , "Config"
+ \ , "Constants"
+ \ , "Convert"
+ \ , "CoreArity"
+ \ , "CoreFVs"
+ \ , "CoreLint"
+ \ , "CoreMonad"
+ \ , "CoreOpt"
+ \ , "CorePrep"
+ \ , "CoreSeq"
+ \ , "CoreStats"
+ \ , "CoreSubst"
+ \ , "CoreSyn"
+ \ , "CoreTidy"
+ \ , "CoreToStg"
+ \ , "CoreUnfold"
+ \ , "CoreUtils"
+ \ , "CostCentre"
+ \ , "Coverage"
+ \ , "Ctype"
+ \ , "DataCon"
+ \ , "Debug"
+ \ , "Debugger"
+ \ , "DebuggerUtils"
+ \ , "Demand"
+ \ , "Desugar"
+ \ , "Digraph"
+ \ , "DmdAnal"
+ \ , "DriverBkp"
+ \ , "DriverMkDepend"
+ \ , "DriverPhases"
+ \ , "DriverPipeline"
+ \ , "DsArrows"
+ \ , "DsBinds"
+ \ , "DsCCall"
+ \ , "DsExpr"
+ \ , "DsForeign"
+ \ , "DsGRHSs"
+ \ , "DsListComp"
+ \ , "DsMeta"
+ \ , "DsMonad"
+ \ , "DsUsage"
+ \ , "DsUtils"
+ \ , "Dwarf"
+ \ , "Dwarf.Constants"
+ \ , "Dwarf.Types"
+ \ , "DynFlags"
+ \ , "DynamicLoading"
+ \ , "Elf"
+ \ , "Encoding"
+ \ , "EnumSet"
+ \ , "ErrUtils"
+ \ , "Exception"
+ \ , "Exitify"
+ \ , "FV"
+ \ , "FamInst"
+ \ , "FamInstEnv"
+ \ , "FastFunctions"
+ \ , "FastMutInt"
+ \ , "FastString"
+ \ , "FastStringEnv"
+ \ , "FieldLabel"
+ \ , "FileCleanup"
+ \ , "Finder"
+ \ , "Fingerprint"
+ \ , "FiniteMap"
+ \ , "FlagChecker"
+ \ , "FloatIn"
+ \ , "FloatOut"
+ \ , "ForeignCall"
+ \ , "Format"
+ \ , "FunDeps"
+ \ , "GHC"
+ \ , "GHCi"
+ \ , "GhcMake"
+ \ , "GhcMonad"
+ \ , "GhcPlugins"
+ \ , "GraphBase"
+ \ , "GraphColor"
+ \ , "GraphOps"
+ \ , "GraphPpr"
+ \ , "HaddockUtils"
+ \ , "HeaderInfo"
+ \ , "Hooks"
+ \ , "Hoopl.Block"
+ \ , "Hoopl.Collections"
+ \ , "Hoopl.Dataflow"
+ \ , "Hoopl.Graph"
+ \ , "Hoopl.Label"
+ \ , "Hoopl.Unique"
+ \ , "HsBinds"
+ \ , "HsDecls"
+ \ , "HsDoc"
+ \ , "HsDumpAst"
+ \ , "HsExpr"
+ \ , "HsExtension"
+ \ , "HsImpExp"
+ \ , "HsLit"
+ \ , "HsPat"
+ \ , "HsSyn"
+ \ , "HsTypes"
+ \ , "HsUtils"
+ \ , "HscMain"
+ \ , "HscStats"
+ \ , "HscTypes"
+ \ , "IOEnv"
+ \ , "Id"
+ \ , "IdInfo"
+ \ , "IfaceEnv"
+ \ , "IfaceSyn"
+ \ , "IfaceType"
+ \ , "Inst"
+ \ , "InstEnv"
+ \ , "Instruction"
+ \ , "InteractiveEval"
+ \ , "InteractiveEvalTypes"
+ \ , "Json"
+ \ , "Kind"
+ \ , "KnownUniques"
+ \ , "Lexeme"
+ \ , "Lexer"
+ \ , "LiberateCase"
+ \ , "Linker"
+ \ , "ListSetOps"
+ \ , "ListT"
+ \ , "Literal"
+ \ , "Llvm"
+ \ , "Llvm.AbsSyn"
+ \ , "Llvm.MetaData"
+ \ , "Llvm.PpLlvm"
+ \ , "Llvm.Types"
+ \ , "LlvmCodeGen"
+ \ , "LlvmCodeGen.Base"
+ \ , "LlvmCodeGen.CodeGen"
+ \ , "LlvmCodeGen.Data"
+ \ , "LlvmCodeGen.Ppr"
+ \ , "LlvmCodeGen.Regs"
+ \ , "LlvmMangler"
+ \ , "LoadIface"
+ \ , "Match"
+ \ , "MatchCon"
+ \ , "MatchLit"
+ \ , "Maybes"
+ \ , "MkCore"
+ \ , "MkGraph"
+ \ , "MkId"
+ \ , "MkIface"
+ \ , "Module"
+ \ , "MonadUtils"
+ \ , "NCGMonad"
+ \ , "Name"
+ \ , "NameCache"
+ \ , "NameEnv"
+ \ , "NameSet"
+ \ , "NameShape"
+ \ , "OccName"
+ \ , "OccurAnal"
+ \ , "OptCoercion"
+ \ , "OrdList"
+ \ , "Outputable"
+ \ , "PIC"
+ \ , "PPC.CodeGen"
+ \ , "PPC.Cond"
+ \ , "PPC.Instr"
+ \ , "PPC.Ppr"
+ \ , "PPC.RegInfo"
+ \ , "PPC.Regs"
+ \ , "PackageConfig"
+ \ , "Packages"
+ \ , "Pair"
+ \ , "Panic"
+ \ , "Parser"
+ \ , "PatSyn"
+ \ , "PipelineMonad"
+ \ , "PlaceHolder"
+ \ , "Platform"
+ \ , "PlatformConstants"
+ \ , "Plugins"
+ \ , "PmExpr"
+ \ , "PprBase"
+ \ , "PprC"
+ \ , "PprCmm"
+ \ , "PprCmmDecl"
+ \ , "PprCmmExpr"
+ \ , "PprColour"
+ \ , "PprCore"
+ \ , "PprTyThing"
+ \ , "PrelInfo"
+ \ , "PrelNames"
+ \ , "PrelRules"
+ \ , "Pretty"
+ \ , "PrimOp"
+ \ , "ProfInit"
+ \ , "RdrHsSyn"
+ \ , "RdrName"
+ \ , "Reg"
+ \ , "RegAlloc.Graph.ArchBase"
+ \ , "RegAlloc.Graph.ArchX86"
+ \ , "RegAlloc.Graph.Coalesce"
+ \ , "RegAlloc.Graph.Main"
+ \ , "RegAlloc.Graph.Spill"
+ \ , "RegAlloc.Graph.SpillClean"
+ \ , "RegAlloc.Graph.SpillCost"
+ \ , "RegAlloc.Graph.Stats"
+ \ , "RegAlloc.Graph.TrivColorable"
+ \ , "RegAlloc.Linear.Base"
+ \ , "RegAlloc.Linear.FreeRegs"
+ \ , "RegAlloc.Linear.JoinToTargets"
+ \ , "RegAlloc.Linear.Main"
+ \ , "RegAlloc.Linear.PPC.FreeRegs"
+ \ , "RegAlloc.Linear.SPARC.FreeRegs"
+ \ , "RegAlloc.Linear.StackMap"
+ \ , "RegAlloc.Linear.State"
+ \ , "RegAlloc.Linear.Stats"
+ \ , "RegAlloc.Linear.X86.FreeRegs"
+ \ , "RegAlloc.Linear.X86_64.FreeRegs"
+ \ , "RegAlloc.Liveness"
+ \ , "RegClass"
+ \ , "RepType"
+ \ , "RnBinds"
+ \ , "RnEnv"
+ \ , "RnExpr"
+ \ , "RnFixity"
+ \ , "RnHsDoc"
+ \ , "RnModIface"
+ \ , "RnNames"
+ \ , "RnPat"
+ \ , "RnSource"
+ \ , "RnSplice"
+ \ , "RnTypes"
+ \ , "RnUnbound"
+ \ , "RnUtils"
+ \ , "RtClosureInspect"
+ \ , "Rules"
+ \ , "SAT"
+ \ , "SMRep"
+ \ , "SPARC.AddrMode"
+ \ , "SPARC.Base"
+ \ , "SPARC.CodeGen"
+ \ , "SPARC.CodeGen.Amode"
+ \ , "SPARC.CodeGen.Base"
+ \ , "SPARC.CodeGen.CondCode"
+ \ , "SPARC.CodeGen.Expand"
+ \ , "SPARC.CodeGen.Gen32"
+ \ , "SPARC.CodeGen.Gen64"
+ \ , "SPARC.CodeGen.Sanity"
+ \ , "SPARC.Cond"
+ \ , "SPARC.Imm"
+ \ , "SPARC.Instr"
+ \ , "SPARC.Ppr"
+ \ , "SPARC.Regs"
+ \ , "SPARC.ShortcutJump"
+ \ , "SPARC.Stack"
+ \ , "SetLevels"
+ \ , "SimplCore"
+ \ , "SimplEnv"
+ \ , "SimplMonad"
+ \ , "SimplStg"
+ \ , "SimplUtils"
+ \ , "Simplify"
+ \ , "SpecConstr"
+ \ , "Specialise"
+ \ , "SrcLoc"
+ \ , "State"
+ \ , "StaticPtrTable"
+ \ , "StgCmm"
+ \ , "StgCmmArgRep"
+ \ , "StgCmmBind"
+ \ , "StgCmmClosure"
+ \ , "StgCmmCon"
+ \ , "StgCmmEnv"
+ \ , "StgCmmExpr"
+ \ , "StgCmmExtCode"
+ \ , "StgCmmForeign"
+ \ , "StgCmmHeap"
+ \ , "StgCmmHpc"
+ \ , "StgCmmLayout"
+ \ , "StgCmmMonad"
+ \ , "StgCmmPrim"
+ \ , "StgCmmProf"
+ \ , "StgCmmTicky"
+ \ , "StgCmmUtils"
+ \ , "StgCse"
+ \ , "StgLint"
+ \ , "StgStats"
+ \ , "StgSyn"
+ \ , "Stream"
+ \ , "StringBuffer"
+ \ , "SysTools"
+ \ , "SysTools.BaseDir"
+ \ , "SysTools.ExtraObj"
+ \ , "SysTools.Info"
+ \ , "SysTools.Process"
+ \ , "SysTools.Tasks"
+ \ , "SysTools.Terminal"
+ \ , "THNames"
+ \ , "TargetReg"
+ \ , "TcAnnotations"
+ \ , "TcArrows"
+ \ , "TcBackpack"
+ \ , "TcBinds"
+ \ , "TcCanonical"
+ \ , "TcClassDcl"
+ \ , "TcDefaults"
+ \ , "TcDeriv"
+ \ , "TcDerivInfer"
+ \ , "TcDerivUtils"
+ \ , "TcEnv"
+ \ , "TcErrors"
+ \ , "TcEvidence"
+ \ , "TcExpr"
+ \ , "TcFlatten"
+ \ , "TcForeign"
+ \ , "TcGenDeriv"
+ \ , "TcGenFunctor"
+ \ , "TcGenGenerics"
+ \ , "TcHsSyn"
+ \ , "TcHsType"
+ \ , "TcIface"
+ \ , "TcInstDcls"
+ \ , "TcInteract"
+ \ , "TcMType"
+ \ , "TcMatches"
+ \ , "TcPat"
+ \ , "TcPatSyn"
+ \ , "TcPluginM"
+ \ , "TcRnDriver"
+ \ , "TcRnExports"
+ \ , "TcRnMonad"
+ \ , "TcRnTypes"
+ \ , "TcRules"
+ \ , "TcSMonad"
+ \ , "TcSigs"
+ \ , "TcSimplify"
+ \ , "TcSplice"
+ \ , "TcTyClsDecls"
+ \ , "TcTyDecls"
+ \ , "TcType"
+ \ , "TcTypeNats"
+ \ , "TcTypeable"
+ \ , "TcUnify"
+ \ , "TcValidity"
+ \ , "TidyPgm"
+ \ , "TmOracle"
+ \ , "ToIface"
+ \ , "TrieMap"
+ \ , "TyCoRep"
+ \ , "TyCon"
+ \ , "Type"
+ \ , "TysPrim"
+ \ , "TysWiredIn"
+ \ , "UnVarGraph"
+ \ , "UnariseStg"
+ \ , "Unify"
+ \ , "UniqDFM"
+ \ , "UniqDSet"
+ \ , "UniqFM"
+ \ , "UniqMap"
+ \ , "UniqSet"
+ \ , "UniqSupply"
+ \ , "Unique"
+ \ , "Util"
+ \ , "Var"
+ \ , "VarEnv"
+ \ , "VarSet"
+ \ , "Vectorise"
+ \ , "Vectorise.Builtins"
+ \ , "Vectorise.Builtins.Base"
+ \ , "Vectorise.Builtins.Initialise"
+ \ , "Vectorise.Convert"
+ \ , "Vectorise.Env"
+ \ , "Vectorise.Exp"
+ \ , "Vectorise.Generic.Description"
+ \ , "Vectorise.Generic.PADict"
+ \ , "Vectorise.Generic.PAMethods"
+ \ , "Vectorise.Generic.PData"
+ \ , "Vectorise.Monad"
+ \ , "Vectorise.Monad.Base"
+ \ , "Vectorise.Monad.Global"
+ \ , "Vectorise.Monad.InstEnv"
+ \ , "Vectorise.Monad.Local"
+ \ , "Vectorise.Monad.Naming"
+ \ , "Vectorise.Type.Classify"
+ \ , "Vectorise.Type.Env"
+ \ , "Vectorise.Type.TyConDecl"
+ \ , "Vectorise.Type.Type"
+ \ , "Vectorise.Utils"
+ \ , "Vectorise.Utils.Base"
+ \ , "Vectorise.Utils.Closure"
+ \ , "Vectorise.Utils.Hoisting"
+ \ , "Vectorise.Utils.PADict"
+ \ , "Vectorise.Utils.Poly"
+ \ , "Vectorise.Var"
+ \ , "Vectorise.Vect"
+ \ , "WorkWrap"
+ \ , "WwLib"
+ \ , "X86.CodeGen"
+ \ , "X86.Cond"
+ \ , "X86.Instr"
+ \ , "X86.Ppr"
+ \ , "X86.RegInfo"
+ \ , "X86.Regs"
+ \ , "Numeric.Half"
+ \ , "Data.Hashable"
+ \ , "Data.Hashable.Lifted"
+ \ , "Language.Haskell.Lexer"
+ \ , "Language.Haskell.ParseMonad"
+ \ , "Language.Haskell.ParseUtils"
+ \ , "Language.Haskell.Parser"
+ \ , "Language.Haskell.Pretty"
+ \ , "Language.Haskell.Syntax"
+ \ , "Control.Monad"
+ \ , "Data.Array"
+ \ , "Data.Bits"
+ \ , "Data.Char"
+ \ , "Data.Complex"
+ \ , "Data.Int"
+ \ , "Data.Ix"
+ \ , "Data.List"
+ \ , "Data.Maybe"
+ \ , "Data.Ratio"
+ \ , "Data.Word"
+ \ , "Foreign"
+ \ , "Foreign.C"
+ \ , "Foreign.C.Error"
+ \ , "Foreign.C.String"
+ \ , "Foreign.C.Types"
+ \ , "Foreign.ForeignPtr"
+ \ , "Foreign.Marshal"
+ \ , "Foreign.Marshal.Alloc"
+ \ , "Foreign.Marshal.Array"
+ \ , "Foreign.Marshal.Error"
+ \ , "Foreign.Marshal.Utils"
+ \ , "Foreign.Ptr"
+ \ , "Foreign.StablePtr"
+ \ , "Foreign.Storable"
+ \ , "Numeric"
+ \ , "Prelude"
+ \ , "System.Environment"
+ \ , "System.Exit"
+ \ , "System.IO"
+ \ , "System.IO.Error"
+ \ , "Array"
+ \ , "Bits"
+ \ , "CError"
+ \ , "CForeign"
+ \ , "CPUTime"
+ \ , "CString"
+ \ , "CTypes"
+ \ , "Char"
+ \ , "Complex"
+ \ , "Directory"
+ \ , "ForeignPtr"
+ \ , "IO"
+ \ , "Int"
+ \ , "Ix"
+ \ , "List"
+ \ , "Locale"
+ \ , "MarshalAlloc"
+ \ , "MarshalArray"
+ \ , "MarshalError"
+ \ , "MarshalUtils"
+ \ , "Maybe"
+ \ , "Monad"
+ \ , "Numeric"
+ \ , "Prelude"
+ \ , "Ptr"
+ \ , "Random"
+ \ , "Ratio"
+ \ , "StablePtr"
+ \ , "Storable"
+ \ , "System"
+ \ , "Time"
+ \ , "Word"
+ \ , "Trace.Hpc.Mix"
+ \ , "Trace.Hpc.Reflect"
+ \ , "Trace.Hpc.Tix"
+ \ , "Trace.Hpc.Util"
+ \ , "Text.Html"
+ \ , "Text.Html.BlockTable"
+ \ , "GHC.Integer.Logarithms.Compat"
+ \ , "Math.NumberTheory.Logarithms"
+ \ , "Math.NumberTheory.Powers.Integer"
+ \ , "Math.NumberTheory.Powers.Natural"
+ \ , "Control.Monad.Cont"
+ \ , "Control.Monad.Cont.Class"
+ \ , "Control.Monad.Error"
+ \ , "Control.Monad.Error.Class"
+ \ , "Control.Monad.Except"
+ \ , "Control.Monad.Identity"
+ \ , "Control.Monad.List"
+ \ , "Control.Monad.RWS"
+ \ , "Control.Monad.RWS.Class"
+ \ , "Control.Monad.RWS.Lazy"
+ \ , "Control.Monad.RWS.Strict"
+ \ , "Control.Monad.Reader"
+ \ , "Control.Monad.Reader.Class"
+ \ , "Control.Monad.State"
+ \ , "Control.Monad.State.Class"
+ \ , "Control.Monad.State.Lazy"
+ \ , "Control.Monad.State.Strict"
+ \ , "Control.Monad.Trans"
+ \ , "Control.Monad.Writer"
+ \ , "Control.Monad.Writer.Class"
+ \ , "Control.Monad.Writer.Lazy"
+ \ , "Control.Monad.Writer.Strict"
+ \ , "Network.Multipart"
+ \ , "Network.Multipart.Header"
+ \ , "Network"
+ \ , "Network.BSD"
+ \ , "Network.Socket"
+ \ , "Network.Socket.ByteString"
+ \ , "Network.Socket.ByteString.Lazy"
+ \ , "Network.Socket.Internal"
+ \ , "Network.URI"
+ \ , "System.Locale"
+ \ , "System.Time"
+ \ , "Control.Parallel"
+ \ , "Control.Parallel.Strategies"
+ \ , "Control.Seq"
+ \ , "Text.Parsec"
+ \ , "Text.Parsec.ByteString"
+ \ , "Text.Parsec.ByteString.Lazy"
+ \ , "Text.Parsec.Char"
+ \ , "Text.Parsec.Combinator"
+ \ , "Text.Parsec.Error"
+ \ , "Text.Parsec.Expr"
+ \ , "Text.Parsec.Language"
+ \ , "Text.Parsec.Perm"
+ \ , "Text.Parsec.Pos"
+ \ , "Text.Parsec.Prim"
+ \ , "Text.Parsec.String"
+ \ , "Text.Parsec.Text"
+ \ , "Text.Parsec.Text.Lazy"
+ \ , "Text.Parsec.Token"
+ \ , "Text.ParserCombinators.Parsec"
+ \ , "Text.ParserCombinators.Parsec.Char"
+ \ , "Text.ParserCombinators.Parsec.Combinator"
+ \ , "Text.ParserCombinators.Parsec.Error"
+ \ , "Text.ParserCombinators.Parsec.Expr"
+ \ , "Text.ParserCombinators.Parsec.Language"
+ \ , "Text.ParserCombinators.Parsec.Perm"
+ \ , "Text.ParserCombinators.Parsec.Pos"
+ \ , "Text.ParserCombinators.Parsec.Prim"
+ \ , "Text.ParserCombinators.Parsec.Token"
+ \ , "Text.PrettyPrint"
+ \ , "Text.PrettyPrint.Annotated"
+ \ , "Text.PrettyPrint.Annotated.HughesPJ"
+ \ , "Text.PrettyPrint.Annotated.HughesPJClass"
+ \ , "Text.PrettyPrint.HughesPJ"
+ \ , "Text.PrettyPrint.HughesPJClass"
+ \ , "Control.Monad.Primitive"
+ \ , "Data.Primitive"
+ \ , "Data.Primitive.Addr"
+ \ , "Data.Primitive.Array"
+ \ , "Data.Primitive.ByteArray"
+ \ , "Data.Primitive.MVar"
+ \ , "Data.Primitive.MachDeps"
+ \ , "Data.Primitive.MutVar"
+ \ , "Data.Primitive.PrimArray"
+ \ , "Data.Primitive.Ptr"
+ \ , "Data.Primitive.SmallArray"
+ \ , "Data.Primitive.Types"
+ \ , "Data.Primitive.UnliftedArray"
+ \ , "System.Cmd"
+ \ , "System.Process"
+ \ , "System.Process.Internals"
+ \ , "System.Random"
+ \ , "Text.Regex.Base"
+ \ , "Text.Regex.Base.Context"
+ \ , "Text.Regex.Base.Impl"
+ \ , "Text.Regex.Base.RegexLike"
+ \ , "Text.Regex"
+ \ , "Text.Regex.Posix"
+ \ , "Text.Regex.Posix.ByteString"
+ \ , "Text.Regex.Posix.ByteString.Lazy"
+ \ , "Text.Regex.Posix.Sequence"
+ \ , "Text.Regex.Posix.String"
+ \ , "Text.Regex.Posix.Wrap"
+ \ , "Data.ByteString.Builder.Scientific"
+ \ , "Data.Scientific"
+ \ , "Data.Text.Lazy.Builder.Scientific"
+ \ , "Data.List.Split"
+ \ , "Data.List.Split.Internals"
+ \ , "Control.Concurrent.STM"
+ \ , "Control.Concurrent.STM.TArray"
+ \ , "Control.Concurrent.STM.TBQueue"
+ \ , "Control.Concurrent.STM.TChan"
+ \ , "Control.Concurrent.STM.TMVar"
+ \ , "Control.Concurrent.STM.TQueue"
+ \ , "Control.Concurrent.STM.TSem"
+ \ , "Control.Concurrent.STM.TVar"
+ \ , "Control.Monad.STM"
+ \ , "Data.Generics"
+ \ , "Data.Generics.Aliases"
+ \ , "Data.Generics.Basics"
+ \ , "Data.Generics.Builders"
+ \ , "Data.Generics.Instances"
+ \ , "Data.Generics.Schemes"
+ \ , "Data.Generics.Text"
+ \ , "Data.Generics.Twins"
+ \ , "Generics.SYB"
+ \ , "Generics.SYB.Aliases"
+ \ , "Generics.SYB.Basics"
+ \ , "Generics.SYB.Builders"
+ \ , "Generics.SYB.Instances"
+ \ , "Generics.SYB.Schemes"
+ \ , "Generics.SYB.Text"
+ \ , "Generics.SYB.Twins"
+ \ , "Language.Haskell.TH"
+ \ , "Language.Haskell.TH.LanguageExtensions"
+ \ , "Language.Haskell.TH.Lib"
+ \ , "Language.Haskell.TH.Lib.Internal"
+ \ , "Language.Haskell.TH.Ppr"
+ \ , "Language.Haskell.TH.PprLib"
+ \ , "Language.Haskell.TH.Quote"
+ \ , "Language.Haskell.TH.Syntax"
+ \ , "Data.Text"
+ \ , "Data.Text.Array"
+ \ , "Data.Text.Encoding"
+ \ , "Data.Text.Encoding.Error"
+ \ , "Data.Text.Foreign"
+ \ , "Data.Text.IO"
+ \ , "Data.Text.Internal"
+ \ , "Data.Text.Internal.Builder"
+ \ , "Data.Text.Internal.Builder.Functions"
+ \ , "Data.Text.Internal.Builder.Int.Digits"
+ \ , "Data.Text.Internal.Builder.RealFloat.Functions"
+ \ , "Data.Text.Internal.Encoding.Fusion"
+ \ , "Data.Text.Internal.Encoding.Fusion.Common"
+ \ , "Data.Text.Internal.Encoding.Utf16"
+ \ , "Data.Text.Internal.Encoding.Utf32"
+ \ , "Data.Text.Internal.Encoding.Utf8"
+ \ , "Data.Text.Internal.Functions"
+ \ , "Data.Text.Internal.Fusion"
+ \ , "Data.Text.Internal.Fusion.CaseMapping"
+ \ , "Data.Text.Internal.Fusion.Common"
+ \ , "Data.Text.Internal.Fusion.Size"
+ \ , "Data.Text.Internal.Fusion.Types"
+ \ , "Data.Text.Internal.IO"
+ \ , "Data.Text.Internal.Lazy"
+ \ , "Data.Text.Internal.Lazy.Encoding.Fusion"
+ \ , "Data.Text.Internal.Lazy.Fusion"
+ \ , "Data.Text.Internal.Lazy.Search"
+ \ , "Data.Text.Internal.Private"
+ \ , "Data.Text.Internal.Read"
+ \ , "Data.Text.Internal.Search"
+ \ , "Data.Text.Internal.Unsafe"
+ \ , "Data.Text.Internal.Unsafe.Char"
+ \ , "Data.Text.Internal.Unsafe.Shift"
+ \ , "Data.Text.Lazy"
+ \ , "Data.Text.Lazy.Builder"
+ \ , "Data.Text.Lazy.Builder.Int"
+ \ , "Data.Text.Lazy.Builder.RealFloat"
+ \ , "Data.Text.Lazy.Encoding"
+ \ , "Data.Text.Lazy.IO"
+ \ , "Data.Text.Lazy.Internal"
+ \ , "Data.Text.Lazy.Read"
+ \ , "Data.Text.Read"
+ \ , "Data.Text.Unsafe"
+ \ , "System.Random.TF"
+ \ , "System.Random.TF.Gen"
+ \ , "System.Random.TF.Init"
+ \ , "System.Random.TF.Instances"
+ \ , "Data.Time"
+ \ , "Data.Time.Calendar"
+ \ , "Data.Time.Calendar.Easter"
+ \ , "Data.Time.Calendar.Julian"
+ \ , "Data.Time.Calendar.MonthDay"
+ \ , "Data.Time.Calendar.OrdinalDate"
+ \ , "Data.Time.Calendar.WeekDate"
+ \ , "Data.Time.Clock"
+ \ , "Data.Time.Clock.POSIX"
+ \ , "Data.Time.Clock.System"
+ \ , "Data.Time.Clock.TAI"
+ \ , "Data.Time.Format"
+ \ , "Data.Time.LocalTime"
+ \ , "Control.Applicative.Backwards"
+ \ , "Control.Applicative.Lift"
+ \ , "Control.Monad.Signatures"
+ \ , "Control.Monad.Trans.Accum"
+ \ , "Control.Monad.Trans.Class"
+ \ , "Control.Monad.Trans.Cont"
+ \ , "Control.Monad.Trans.Error"
+ \ , "Control.Monad.Trans.Except"
+ \ , "Control.Monad.Trans.Identity"
+ \ , "Control.Monad.Trans.List"
+ \ , "Control.Monad.Trans.Maybe"
+ \ , "Control.Monad.Trans.RWS"
+ \ , "Control.Monad.Trans.RWS.Lazy"
+ \ , "Control.Monad.Trans.RWS.Strict"
+ \ , "Control.Monad.Trans.Reader"
+ \ , "Control.Monad.Trans.Select"
+ \ , "Control.Monad.Trans.State"
+ \ , "Control.Monad.Trans.State.Lazy"
+ \ , "Control.Monad.Trans.State.Strict"
+ \ , "Control.Monad.Trans.Writer"
+ \ , "Control.Monad.Trans.Writer.Lazy"
+ \ , "Control.Monad.Trans.Writer.Strict"
+ \ , "Data.Functor.Constant"
+ \ , "Data.Functor.Reverse"
+ \ , "Control.Monad.Trans.Instances"
+ \ , "Data.Functor.Classes.Generic"
+ \ , "Data.Functor.Classes.Generic.Internal"
+ \ , "System.Posix"
+ \ , "System.Posix.ByteString"
+ \ , "System.Posix.ByteString.FilePath"
+ \ , "System.Posix.Directory"
+ \ , "System.Posix.Directory.ByteString"
+ \ , "System.Posix.DynamicLinker"
+ \ , "System.Posix.DynamicLinker.ByteString"
+ \ , "System.Posix.DynamicLinker.Module"
+ \ , "System.Posix.DynamicLinker.Module.ByteString"
+ \ , "System.Posix.DynamicLinker.Prim"
+ \ , "System.Posix.Env"
+ \ , "System.Posix.Env.ByteString"
+ \ , "System.Posix.Error"
+ \ , "System.Posix.Fcntl"
+ \ , "System.Posix.Files"
+ \ , "System.Posix.Files.ByteString"
+ \ , "System.Posix.IO"
+ \ , "System.Posix.IO.ByteString"
+ \ , "System.Posix.Process"
+ \ , "System.Posix.Process.ByteString"
+ \ , "System.Posix.Process.Internals"
+ \ , "System.Posix.Resource"
+ \ , "System.Posix.Semaphore"
+ \ , "System.Posix.SharedMem"
+ \ , "System.Posix.Signals"
+ \ , "System.Posix.Signals.Exts"
+ \ , "System.Posix.Temp"
+ \ , "System.Posix.Temp.ByteString"
+ \ , "System.Posix.Terminal"
+ \ , "System.Posix.Terminal.ByteString"
+ \ , "System.Posix.Time"
+ \ , "System.Posix.Unistd"
+ \ , "System.Posix.User"
+ \ , "Data.HashMap.Lazy"
+ \ , "Data.HashMap.Strict"
+ \ , "Data.HashSet"
+ \ , "Data.Vector"
+ \ , "Data.Vector.Fusion.Bundle"
+ \ , "Data.Vector.Fusion.Bundle.Monadic"
+ \ , "Data.Vector.Fusion.Bundle.Size"
+ \ , "Data.Vector.Fusion.Stream.Monadic"
+ \ , "Data.Vector.Fusion.Util"
+ \ , "Data.Vector.Generic"
+ \ , "Data.Vector.Generic.Base"
+ \ , "Data.Vector.Generic.Mutable"
+ \ , "Data.Vector.Generic.Mutable.Base"
+ \ , "Data.Vector.Generic.New"
+ \ , "Data.Vector.Internal.Check"
+ \ , "Data.Vector.Mutable"
+ \ , "Data.Vector.Primitive"
+ \ , "Data.Vector.Primitive.Mutable"
+ \ , "Data.Vector.Storable"
+ \ , "Data.Vector.Storable.Internal"
+ \ , "Data.Vector.Storable.Mutable"
+ \ , "Data.Vector.Unboxed"
+ \ , "Data.Vector.Unboxed.Base"
+ \ , "Data.Vector.Unboxed.Mutable"
+ \ , "Text.XHtml"
+ \ , "Text.XHtml.Debug"
+ \ , "Text.XHtml.Frameset"
+ \ , "Text.XHtml.Strict"
+ \ , "Text.XHtml.Table"
+ \ , "Text.XHtml.Transitional"
+ \ , "Codec.Compression.GZip"
+ \ , "Codec.Compression.Zlib"
+ \ , "Codec.Compression.Zlib.Internal"
+ \ , "Codec.Compression.Zlib.Raw"
+ \ , "Web.Spock"
+ \ , "Web.Spock.Config"
+ \ , "Web.Spock.Internal.SessionManager"
+ \ , "Web.Spock.Internal.SessionVault"
+ \ , "Web.Spock.SessionActions"
+ \ , "Web.Spock.Api"
+ \ , "Web.Spock.Auth"
+ \ , "Web.Spock.Action"
+ \ , "Web.Spock.Core"
+ \ , "Web.Spock.Internal.Cookies"
+ \ , "Web.Spock.Internal.Util"
+ \ , "Web.Spock.Routing"
+ \ , "Web.Spock.Digestive"
+ \ , "Database.Esqueleto"
+ \ , "Database.Esqueleto.Internal.Language"
+ \ , "Database.Esqueleto.Internal.Sql"
+ \ , "Database.Esqueleto.PostgreSQL"
+ \ , "Database.Persist"
+ \ , "Database.Persist.Class"
+ \ , "Database.Persist.Quasi"
+ \ , "Database.Persist.Sql"
+ \ , "Database.Persist.Sql.Types.Internal"
+ \ , "Database.Persist.Sql.Util"
+ \ , "Database.Persist.Types"
+ \ , "Database.Persist.MySQL"
+ \ , "Database.Persist.Postgresql"
+ \ , "Database.Persist.Postgresql.JSON"
+ \ , "Database.Persist.Redis"
+ \ , "Database.Persist.Sqlite"
+ \ , "Database.Sqlite"
+ \ , "Servant.API"
+ \ , "Servant.API.Alternative"
+ \ , "Servant.API.BasicAuth"
+ \ , "Servant.API.Capture"
+ \ , "Servant.API.ContentTypes"
+ \ , "Servant.API.Description"
+ \ , "Servant.API.Empty"
+ \ , "Servant.API.Experimental.Auth"
+ \ , "Servant.API.Generic"
+ \ , "Servant.API.Header"
+ \ , "Servant.API.HttpVersion"
+ \ , "Servant.API.Internal.Test.ComprehensiveAPI"
+ \ , "Servant.API.IsSecure"
+ \ , "Servant.API.Modifiers"
+ \ , "Servant.API.QueryParam"
+ \ , "Servant.API.Raw"
+ \ , "Servant.API.RemoteHost"
+ \ , "Servant.API.ReqBody"
+ \ , "Servant.API.ResponseHeaders"
+ \ , "Servant.API.Stream"
+ \ , "Servant.API.Sub"
+ \ , "Servant.API.TypeLevel"
+ \ , "Servant.API.Vault"
+ \ , "Servant.API.Verbs"
+ \ , "Servant.API.WithNamedContext"
+ \ , "Servant.Links"
+ \ , "Servant.Utils.Enter"
+ \ , "Servant.Utils.Links"
+ \ , "Servant.Auth"
+ \ , "Servant.Client"
+ \ , "Servant.Client.Internal.HttpClient"
+ \ , "Servant"
+ \ , "Servant.Server"
+ \ , "Servant.Server.Experimental.Auth"
+ \ , "Servant.Server.Generic"
+ \ , "Servant.Server.Internal"
+ \ , "Servant.Server.Internal.BasicAuth"
+ \ , "Servant.Server.Internal.Context"
+ \ , "Servant.Server.Internal.Handler"
+ \ , "Servant.Server.Internal.Router"
+ \ , "Servant.Server.Internal.RoutingApplication"
+ \ , "Servant.Server.Internal.ServantErr"
+ \ , "Servant.Server.StaticFiles"
+ \ , "Servant.Utils.StaticFiles"
+ \ ]
diff --git a/runtime/autoload/htmlcomplete.vim b/runtime/autoload/htmlcomplete.vim
new file mode 100644
index 0000000..267889d
--- /dev/null
+++ b/runtime/autoload/htmlcomplete.vim
@@ -0,0 +1,809 @@
+" Vim completion script
+" Language: HTML and XHTML
+" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
+" Last Change: 2019 Sep 27
+
+" Distinguish between HTML versions.
+" To use with other HTML versions add another "elseif" condition to match
+" proper DOCTYPE.
+function! htmlcomplete#DetectOmniFlavor()
+ if &filetype == 'xhtml'
+ let b:html_omni_flavor = 'xhtml10s'
+ else
+ let b:html_omni_flavor = 'html401t'
+ endif
+ let i = 1
+ let line = ""
+ while i < 10 && i < line("$")
+ let line = getline(i)
+ if line =~ '<!DOCTYPE.*\<DTD '
+ break
+ endif
+ let i += 1
+ endwhile
+ if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
+ if line =~ ' HTML 3\.2'
+ let b:html_omni_flavor = 'html32'
+ elseif line =~ ' XHTML 1\.1'
+ let b:html_omni_flavor = 'xhtml11'
+ else " two-step detection with strict/frameset/transitional
+ if line =~ ' XHTML 1\.0'
+ let b:html_omni_flavor = 'xhtml10'
+ elseif line =~ ' HTML 4\.01'
+ let b:html_omni_flavor = 'html401'
+ elseif line =~ ' HTML 4.0\>'
+ let b:html_omni_flavor = 'html40'
+ endif
+ if line =~ '\<Transitional\>'
+ let b:html_omni_flavor .= 't'
+ elseif line =~ '\<Frameset\>'
+ let b:html_omni_flavor .= 'f'
+ else
+ let b:html_omni_flavor .= 's'
+ endif
+ endif
+ endif
+endfunction
+
+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
+
+ 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 =~ '^\s*$'
+ " empty or whitespace line
+ 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 =~ '^[A-Z]*$'
+ 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\zs.*')
+ " Possible situations where any prediction would be difficult:
+ " 1. Events attributes
+ if context =~ '\s'
+ " Sort out style, class, and on* cases
+ if context =~? "\\(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
+ let classlines = []
+ 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
+ endif
+ " We gathered classes definitions from all external files
+ let classes += classlines
+ 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 match 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 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]
+ 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
+ " }}}
+ " 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 has_key(b:html_omni, tag)
+ let attrs = keys(b:html_omni[tag][1])
+ else
+ return []
+ 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
+ if has_key(b:html_omni, 'vimxmlattrinfo')
+ 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]
+ else
+ let m_menu = ''
+ let m_info = ''
+ endif
+ 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
+ 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 = "base meta link hr br param img area input col"
+ 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
+ " }}}
+ " 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 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">'
+ \ ]
+ endif
+
+ for m in sort(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'
+ let abbr = 'DOCTYPE '.matchstr(item, 'DTD \zsX\?HTML .\{-}\ze\/\/')
+ 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#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
+ 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:
diff --git a/runtime/autoload/javascriptcomplete.vim b/runtime/autoload/javascriptcomplete.vim
new file mode 100644
index 0000000..29b6b16
--- /dev/null
+++ b/runtime/autoload/javascriptcomplete.vim
@@ -0,0 +1,647 @@
+" Vim completion script
+" Language: Java Script
+" Maintainer: Jay Sitter (jay@jaysitter.com)
+" URL: https://github.com/jsit/javascriptcomplete.vim/
+" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
+" Last Change: 2020 Jul 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', 'body', 'characterSet', 'doctype',
+ \ 'documentElement', 'documentURI', 'embeds', 'fonts', 'forms',
+ \ 'head', 'hidden', 'images', 'implementation', 'lastStyleSheetSet',
+ \ 'links', 'plugins', 'preferredStyleSheetSet', 'scripts',
+ \ 'scrollingElement', 'selectedStyleSheetSet', 'styleSheetSets',
+ \ 'timeline', 'visibilityState', 'cookie', 'defaultView',
+ \ 'designMode', 'dir', 'domain', 'lastModified', 'location',
+ \ 'readyState', 'referrer', 'title', 'URL', 'activeElement',
+ \ 'fullscreenElement', 'styleSheets']
+ let documeth = ['adoptNode', 'close', 'createAttribute',
+ \ 'createAttributeNS', 'createCDATASection', 'createComment',
+ \ 'createDocumentFragment', 'createElement', 'createElementNS',
+ \ 'createEvent', 'createExpression', 'createNSResolver',
+ \ 'createNodeIterator', 'createProcessingInstruction', 'createRange',
+ \ 'createTextNode', 'createTouchList', 'createTreeWalker',
+ \ 'enableStyleSheetsForSet', 'evaluate', 'focus', 'getElementById',
+ \ 'getElementById', 'getElementsByClassName', 'getElementsByName',
+ \ 'getElementsByTagName', 'getElementsByTagNameNS',
+ \ 'hasStorageAccess', 'importNode', 'onClick', 'onDblClick',
+ \ 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'onMouseDown',
+ \ 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp',
+ \ 'onResize', 'open', 'querySelector', 'querySelectorAll',
+ \ 'requestStorageAccess', 'write', 'writeln']
+
+ 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', 'addEventListener', 'cloneNode',
+ \ 'dispatchEvent', 'getAttribute', 'getAttributeNode',
+ \ 'getElementsByTagName', 'hasChildNodes', 'insertBefore',
+ \ 'normalize', 'removeAttribute', 'removeAttributeNode',
+ \ 'removeChild', 'removeEventListener', '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:
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
new file mode 100644
index 0000000..29310aa
--- /dev/null
+++ b/runtime/autoload/netrw.vim
@@ -0,0 +1,12741 @@
+" netrw.vim: Handles file transfer and remote directory listing across
+" AUTOLOAD SECTION
+" Date: Aug 16, 2021
+" Version: 171
+" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
+" Copyright: Copyright (C) 2016 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,
+" netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided
+" *as is* and come 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.
+"
+" Note: the code here was started in 1999 under a much earlier version of vim. The directory browsing
+" code was written using vim v6, which did not have Lists (Lists were first offered with vim-v7).
+"
+"redraw!|call DechoSep()|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"
+" But be doers of the Word, and not only hearers, deluding your own selves {{{1
+" (James 1:22 RSV)
+" =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+" Load Once: {{{1
+if &cp || exists("g:loaded_netrw")
+ finish
+endif
+
+" Check that vim has patches that netrw requires.
+" Patches needed for v7.4: 1557, and 213.
+" (netrw will benefit from vim's having patch#656, too)
+let s:needspatches=[1557,213]
+if exists("s:needspatches")
+ for ptch in s:needspatches
+ if v:version < 704 || (v:version == 704 && !has("patch".ptch))
+ if !exists("s:needpatch{ptch}")
+ unsilent echomsg "***sorry*** this version of netrw requires vim v7.4 with patch#".ptch
+ endif
+ let s:needpatch{ptch}= 1
+ finish
+ endif
+ endfor
+endif
+
+let g:loaded_netrw = "v171"
+if !exists("s:NOTE")
+ let s:NOTE = 0
+ let s:WARNING = 1
+ let s:ERROR = 2
+endif
+
+let s:keepcpo= &cpo
+setl cpo&vim
+"DechoFuncName 1
+"DechoRemOn
+"call Decho("doing autoload/netrw.vim version ".g:loaded_netrw,'~'.expand("<slnum>"))
+
+" ======================
+" Netrw Variables: {{{1
+" ======================
+
+" ---------------------------------------------------------------------
+" netrw#ErrorMsg: {{{2
+" 0=note = s:NOTE
+" 1=warning = s:WARNING
+" 2=error = s:ERROR
+" Usage: netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,"some message",error-number)
+" netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,["message1","message2",...],error-number)
+" (this function can optionally take a list of messages)
+" Dec 2, 2019 : max errnum currently is 106
+fun! netrw#ErrorMsg(level,msg,errnum)
+" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
+
+ if a:level < g:netrw_errorlvl
+" call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g:netrw_errorlvl=".g:netrw_errorlvl)
+ return
+ endif
+
+ if a:level == 1
+ let level= "**warning** (netrw) "
+ elseif a:level == 2
+ let level= "**error** (netrw) "
+ else
+ let level= "**note** (netrw) "
+ endif
+" call Decho("level=".level,'~'.expand("<slnum>"))
+
+ if g:netrw_use_errorwindow == 2 && (v:version > 802 || (v:version == 802 && has("patch486")))
+ " use popup window
+ if type(a:msg) == 3
+ let msg = [level]+a:msg
+ else
+ let msg= level.a:msg
+ endif
+ let s:popuperr_id = popup_atcursor(msg,{})
+ let s:popuperr_text= ""
+ elseif g:netrw_use_errorwindow
+ " (default) netrw creates a one-line window to show error/warning
+ " messages (reliably displayed)
+
+ " record current window number
+ let s:winBeforeErr= winnr()
+" call Decho("s:winBeforeErr=".s:winBeforeErr,'~'.expand("<slnum>"))
+
+ " getting messages out reliably is just plain difficult!
+ " This attempt splits the current window, creating a one line window.
+ if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0
+" call Decho("write to NetrwMessage buffer",'~'.expand("<slnum>"))
+ exe bufwinnr("NetrwMessage")."wincmd w"
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+ setl ma noro
+ if type(a:msg) == 3
+ for msg in a:msg
+ NetrwKeepj call setline(line("$")+1,level.msg)
+ endfor
+ else
+ NetrwKeepj call setline(line("$")+1,level.a:msg)
+ endif
+ NetrwKeepj $
+ else
+" call Decho("create a NetrwMessage buffer window",'~'.expand("<slnum>"))
+ bo 1split
+ sil! call s:NetrwEnew()
+ sil! NetrwKeepj call s:NetrwOptionsSafe(1)
+ setl bt=nofile
+ NetrwKeepj file NetrwMessage
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+ setl ma noro
+ if type(a:msg) == 3
+ for msg in a:msg
+ NetrwKeepj call setline(line("$")+1,level.msg)
+ endfor
+ else
+ NetrwKeepj call setline(line("$"),level.a:msg)
+ endif
+ NetrwKeepj $
+ endif
+" call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr(),'~'.expand("<slnum>"))
+ if &fo !~ '[ta]'
+ syn clear
+ syn match netrwMesgNote "^\*\*note\*\*"
+ syn match netrwMesgWarning "^\*\*warning\*\*"
+ syn match netrwMesgError "^\*\*error\*\*"
+ hi link netrwMesgWarning WarningMsg
+ hi link netrwMesgError Error
+ endif
+" call Decho("setl noma ro bh=wipe",'~'.expand("<slnum>"))
+ setl ro nomod noma bh=wipe
+
+ else
+ " (optional) netrw will show messages using echomsg. Even if the
+ " message doesn't appear, at least it'll be recallable via :messages
+" redraw!
+ if a:level == s:WARNING
+ echohl WarningMsg
+ elseif a:level == s:ERROR
+ echohl Error
+ endif
+
+ if type(a:msg) == 3
+ for msg in a:msg
+ unsilent echomsg level.msg
+ endfor
+ else
+ unsilent echomsg level.a:msg
+ endif
+
+" call Decho("echomsg ***netrw*** ".a:msg,'~'.expand("<slnum>"))
+ echohl None
+ endif
+
+" call Dret("netrw#ErrorMsg")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwInit: initializes variables if they haven't been defined {{{2
+" Loosely, varname = value.
+fun s:NetrwInit(varname,value)
+" call Decho("varname<".a:varname."> value=".a:value,'~'.expand("<slnum>"))
+ if !exists(a:varname)
+ if type(a:value) == 0
+ exe "let ".a:varname."=".a:value
+ elseif type(a:value) == 1 && a:value =~ '^[{[]'
+ exe "let ".a:varname."=".a:value
+ elseif type(a:value) == 1
+ exe "let ".a:varname."="."'".a:value."'"
+ else
+ exe "let ".a:varname."=".a:value
+ endif
+ endif
+endfun
+
+" ---------------------------------------------------------------------
+" Netrw Constants: {{{2
+call s:NetrwInit("g:netrw_dirhistcnt",0)
+if !exists("s:LONGLIST")
+ call s:NetrwInit("s:THINLIST",0)
+ call s:NetrwInit("s:LONGLIST",1)
+ call s:NetrwInit("s:WIDELIST",2)
+ call s:NetrwInit("s:TREELIST",3)
+ call s:NetrwInit("s:MAXLIST" ,4)
+endif
+
+" ---------------------------------------------------------------------
+" Default option values: {{{2
+let g:netrw_localcopycmdopt = ""
+let g:netrw_localcopydircmdopt = ""
+let g:netrw_localmkdiropt = ""
+let g:netrw_localmovecmdopt = ""
+let g:netrw_localrmdiropt = ""
+
+" ---------------------------------------------------------------------
+" Default values for netrw's global protocol variables {{{2
+if (v:version > 802 || (v:version == 802 && has("patch486"))) && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on") && has("mouse")
+ call s:NetrwInit("g:netrw_use_errorwindow",2)
+else
+ call s:NetrwInit("g:netrw_use_errorwindow",1)
+endif
+
+if !exists("g:netrw_dav_cmd")
+ if executable("cadaver")
+ let g:netrw_dav_cmd = "cadaver"
+ elseif executable("curl")
+ let g:netrw_dav_cmd = "curl"
+ else
+ let g:netrw_dav_cmd = ""
+ endif
+endif
+if !exists("g:netrw_fetch_cmd")
+ if executable("fetch")
+ let g:netrw_fetch_cmd = "fetch -o"
+ else
+ let g:netrw_fetch_cmd = ""
+ endif
+endif
+if !exists("g:netrw_file_cmd")
+ if executable("elinks")
+ call s:NetrwInit("g:netrw_file_cmd","elinks")
+ elseif executable("links")
+ call s:NetrwInit("g:netrw_file_cmd","links")
+ endif
+endif
+if !exists("g:netrw_ftp_cmd")
+ let g:netrw_ftp_cmd = "ftp"
+endif
+let s:netrw_ftp_cmd= g:netrw_ftp_cmd
+if !exists("g:netrw_ftp_options")
+ let g:netrw_ftp_options= "-i -n"
+endif
+if !exists("g:netrw_http_cmd")
+ if executable("wget")
+ let g:netrw_http_cmd = "wget"
+ call s:NetrwInit("g:netrw_http_xcmd","-q -O")
+ elseif executable("curl")
+ let g:netrw_http_cmd = "curl"
+ call s:NetrwInit("g:netrw_http_xcmd","-L -o")
+ elseif executable("elinks")
+ let g:netrw_http_cmd = "elinks"
+ call s:NetrwInit("g:netrw_http_xcmd","-source >")
+ elseif executable("fetch")
+ let g:netrw_http_cmd = "fetch"
+ call s:NetrwInit("g:netrw_http_xcmd","-o")
+ elseif executable("links")
+ let g:netrw_http_cmd = "links"
+ call s:NetrwInit("g:netrw_http_xcmd","-http.extra-header ".shellescape("Accept-Encoding: identity", 1)." -source >")
+ else
+ let g:netrw_http_cmd = ""
+ endif
+endif
+call s:NetrwInit("g:netrw_http_put_cmd","curl -T")
+call s:NetrwInit("g:netrw_keepj","keepj")
+call s:NetrwInit("g:netrw_rcp_cmd" , "rcp")
+call s:NetrwInit("g:netrw_rsync_cmd", "rsync")
+call s:NetrwInit("g:netrw_rsync_sep", "/")
+if !exists("g:netrw_scp_cmd")
+ if executable("scp")
+ call s:NetrwInit("g:netrw_scp_cmd" , "scp -q")
+ elseif executable("pscp")
+ if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable('c:\private.ppk')
+ call s:NetrwInit("g:netrw_scp_cmd", 'pscp -i c:\private.ppk')
+ else
+ call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q')
+ endif
+ else
+ call s:NetrwInit("g:netrw_scp_cmd" , "scp -q")
+ endif
+endif
+
+call s:NetrwInit("g:netrw_sftp_cmd" , "sftp")
+call s:NetrwInit("g:netrw_ssh_cmd" , "ssh")
+
+if (has("win32") || has("win95") || has("win64") || has("win16"))
+ \ && exists("g:netrw_use_nt_rcp")
+ \ && g:netrw_use_nt_rcp
+ \ && executable( $SystemRoot .'/system32/rcp.exe')
+ let s:netrw_has_nt_rcp = 1
+ let s:netrw_rcpmode = '-b'
+else
+ let s:netrw_has_nt_rcp = 0
+ let s:netrw_rcpmode = ''
+endif
+
+" ---------------------------------------------------------------------
+" Default values for netrw's global variables {{{2
+" Cygwin Detection ------- {{{3
+if !exists("g:netrw_cygwin")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ if has("win32unix") && &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
+ let g:netrw_cygwin= 1
+ else
+ let g:netrw_cygwin= 0
+ endif
+ else
+ let g:netrw_cygwin= 0
+ endif
+endif
+" Default values - a-c ---------- {{{3
+call s:NetrwInit("g:netrw_alto" , &sb)
+call s:NetrwInit("g:netrw_altv" , &spr)
+call s:NetrwInit("g:netrw_banner" , 1)
+call s:NetrwInit("g:netrw_browse_split", 0)
+call s:NetrwInit("g:netrw_bufsettings" , "noma nomod nonu nobl nowrap ro nornu")
+call s:NetrwInit("g:netrw_chgwin" , -1)
+call s:NetrwInit("g:netrw_clipboard" , 1)
+call s:NetrwInit("g:netrw_compress" , "gzip")
+call s:NetrwInit("g:netrw_ctags" , "ctags")
+if exists("g:netrw_cursorline") && !exists("g:netrw_cursor")
+ call netrw#ErrorMsg(s:NOTE,'g:netrw_cursorline is deprecated; use g:netrw_cursor instead',77)
+ let g:netrw_cursor= g:netrw_cursorline
+endif
+call s:NetrwInit("g:netrw_cursor" , 2)
+let s:netrw_usercul = &cursorline
+let s:netrw_usercuc = &cursorcolumn
+"call Decho("(netrw) COMBAK: cuc=".&l:cuc." cul=".&l:cul." initialization of s:netrw_cu[cl]")
+call s:NetrwInit("g:netrw_cygdrive","/cygdrive")
+" Default values - d-g ---------- {{{3
+call s:NetrwInit("s:didstarstar",0)
+call s:NetrwInit("g:netrw_dirhistcnt" , 0)
+call s:NetrwInit("g:netrw_decompress" , '{ ".gz" : "gunzip", ".bz2" : "bunzip2", ".zip" : "unzip", ".tar" : "tar -xf", ".xz" : "unxz" }')
+call s:NetrwInit("g:netrw_dirhistmax" , 10)
+call s:NetrwInit("g:netrw_errorlvl" , s:NOTE)
+call s:NetrwInit("g:netrw_fastbrowse" , 1)
+call s:NetrwInit("g:netrw_ftp_browse_reject", '^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$')
+if !exists("g:netrw_ftp_list_cmd")
+ if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
+ let g:netrw_ftp_list_cmd = "ls -lF"
+ let g:netrw_ftp_timelist_cmd = "ls -tlF"
+ let g:netrw_ftp_sizelist_cmd = "ls -slF"
+ else
+ let g:netrw_ftp_list_cmd = "dir"
+ let g:netrw_ftp_timelist_cmd = "dir"
+ let g:netrw_ftp_sizelist_cmd = "dir"
+ endif
+endif
+call s:NetrwInit("g:netrw_ftpmode",'binary')
+" Default values - h-lh ---------- {{{3
+call s:NetrwInit("g:netrw_hide",1)
+if !exists("g:netrw_ignorenetrc")
+ if &shell =~ '\c\<\%(cmd\|4nt\)\.exe$'
+ let g:netrw_ignorenetrc= 1
+ else
+ let g:netrw_ignorenetrc= 0
+ endif
+endif
+call s:NetrwInit("g:netrw_keepdir",1)
+if !exists("g:netrw_list_cmd")
+ if g:netrw_scp_cmd =~ '^pscp' && executable("pscp")
+ if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable("c:\\private.ppk")
+ " provide a pscp-based listing command
+ let g:netrw_scp_cmd ="pscp -i C:\\private.ppk"
+ endif
+ if exists("g:netrw_list_cmd_options")
+ let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME: ".g:netrw_list_cmd_options
+ else
+ let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME:"
+ endif
+ elseif executable(g:netrw_ssh_cmd)
+ " provide a scp-based default listing command
+ if exists("g:netrw_list_cmd_options")
+ let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa ".g:netrw_list_cmd_options
+ else
+ let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa"
+ endif
+ else
+" call Decho(g:netrw_ssh_cmd." is not executable",'~'.expand("<slnum>"))
+ let g:netrw_list_cmd= ""
+ endif
+endif
+call s:NetrwInit("g:netrw_list_hide","")
+" Default values - lh-lz ---------- {{{3
+if exists("g:netrw_local_copycmd")
+ let g:netrw_localcopycmd= g:netrw_local_copycmd
+ call netrw#ErrorMsg(s:NOTE,"g:netrw_local_copycmd is deprecated in favor of g:netrw_localcopycmd",84)
+endif
+if !exists("g:netrw_localcmdshell")
+ let g:netrw_localcmdshell= ""
+endif
+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 = expand("$COMSPEC")
+ let g:netrw_localcopycmdopt= " /c copy"
+ endif
+ elseif has("unix") || has("macunix")
+ let g:netrw_localcopycmd= "cp"
+ else
+ let g:netrw_localcopycmd= ""
+ endif
+endif
+if !exists("g:netrw_localcopydircmd")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ if g:netrw_cygwin
+ let g:netrw_localcopydircmd = "cp"
+ let g:netrw_localcopydircmdopt= " -R"
+ else
+ let g:netrw_localcopydircmd = expand("$COMSPEC")
+ let g:netrw_localcopydircmdopt= " /c xcopy /e /c /h /i /k"
+ endif
+ elseif has("unix")
+ let g:netrw_localcopydircmd = "cp"
+ let g:netrw_localcopydircmdopt= " -R"
+ elseif has("macunix")
+ let g:netrw_localcopydircmd = "cp"
+ let g:netrw_localcopydircmdopt= " -R"
+ else
+ let g:netrw_localcopydircmd= ""
+ endif
+endif
+if exists("g:netrw_local_mkdir")
+ let g:netrw_localmkdir= g:netrw_local_mkdir
+ call netrw#ErrorMsg(s:NOTE,"g:netrw_local_mkdir is deprecated in favor of g:netrw_localmkdir",87)
+endif
+if has("win32") || has("win95") || has("win64") || has("win16")
+ if g:netrw_cygwin
+ call s:NetrwInit("g:netrw_localmkdir","mkdir")
+ else
+ let g:netrw_localmkdir = expand("$COMSPEC")
+ let g:netrw_localmkdiropt= " /c mkdir"
+ endif
+else
+ call s:NetrwInit("g:netrw_localmkdir","mkdir")
+endif
+call s:NetrwInit("g:netrw_remote_mkdir","mkdir")
+if exists("g:netrw_local_movecmd")
+ let g:netrw_localmovecmd= g:netrw_local_movecmd
+ call netrw#ErrorMsg(s:NOTE,"g:netrw_local_movecmd is deprecated in favor of g:netrw_localmovecmd",88)
+endif
+if !exists("g:netrw_localmovecmd")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ if g:netrw_cygwin
+ let g:netrw_localmovecmd= "mv"
+ else
+ let g:netrw_localmovecmd = expand("$COMSPEC")
+ let g:netrw_localmovecmdopt= " /c move"
+ endif
+ elseif has("unix") || has("macunix")
+ let g:netrw_localmovecmd= "mv"
+ else
+ let g:netrw_localmovecmd= ""
+ endif
+endif
+" following serves as an example for how to insert a version&patch specific test
+"if v:version < 704 || (v:version == 704 && !has("patch1107"))
+"endif
+call s:NetrwInit("g:netrw_liststyle" , s:THINLIST)
+" sanity checks
+if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST
+ let g:netrw_liststyle= s:THINLIST
+endif
+if g:netrw_liststyle == s:LONGLIST && g:netrw_scp_cmd !~ '^pscp'
+ let g:netrw_list_cmd= g:netrw_list_cmd." -l"
+endif
+" Default values - m-r ---------- {{{3
+call s:NetrwInit("g:netrw_markfileesc" , '*./[\~')
+call s:NetrwInit("g:netrw_maxfilenamelen", 32)
+call s:NetrwInit("g:netrw_menu" , 1)
+call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir")
+call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh]'))
+call s:NetrwInit("g:netrw_retmap" , 0)
+if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)
+ call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME")
+elseif has("win32") || has("win95") || has("win64") || has("win16")
+ call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM")
+else
+ call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME")
+endif
+call s:NetrwInit("g:netrw_preview" , 0)
+call s:NetrwInit("g:netrw_scpport" , "-P")
+call s:NetrwInit("g:netrw_servername" , "NETRWSERVER")
+call s:NetrwInit("g:netrw_sshport" , "-p")
+call s:NetrwInit("g:netrw_rename_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mv")
+call s:NetrwInit("g:netrw_rm_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm")
+call s:NetrwInit("g:netrw_rmdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rmdir")
+call s:NetrwInit("g:netrw_rmf_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME rm -f ")
+" Default values - q-s ---------- {{{3
+call s:NetrwInit("g:netrw_quickhelp",0)
+let s:QuickHelp= ["-:go up dir D:delete R:rename s:sort-by x:special",
+ \ "(create new) %:file d:directory",
+ \ "(windows split&open) o:horz v:vert p:preview",
+ \ "i:style qf:file info O:obtain r:reverse",
+ \ "(marks) mf:mark file mt:set target mm:move mc:copy",
+ \ "(bookmarks) mb:make mB:delete qb:list gb:go to",
+ \ "(history) qb:list u:go up U:go down",
+ \ "(targets) mt:target Tb:use bookmark Th:use history"]
+" g:netrw_sepchr: picking a character that doesn't appear in filenames that can be used to separate priority from filename
+call s:NetrwInit("g:netrw_sepchr" , (&enc == "euc-jp")? "\<Char-0x01>" : "\<Char-0xff>")
+if !exists("g:netrw_keepj") || g:netrw_keepj == "keepj"
+ call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil keepj " : "keepj ")
+else
+ call s:NetrwInit("s:netrw_silentxfer" , (exists("g:netrw_silent") && g:netrw_silent != 0)? "sil " : " ")
+endif
+call s:NetrwInit("g:netrw_sort_by" , "name") " alternatives: date , size
+call s:NetrwInit("g:netrw_sort_options" , "")
+call s:NetrwInit("g:netrw_sort_direction", "normal") " alternative: reverse (z y x ...)
+if !exists("g:netrw_sort_sequence")
+ if has("unix")
+ let g:netrw_sort_sequence= '[\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$'
+ else
+ let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$'
+ endif
+endif
+call s:NetrwInit("g:netrw_special_syntax" , 0)
+call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$')
+call s:NetrwInit("g:netrw_suppress_gx_mesg", 1)
+call s:NetrwInit("g:netrw_use_noswf" , 1)
+call s:NetrwInit("g:netrw_sizestyle" ,"b")
+" Default values - t-w ---------- {{{3
+call s:NetrwInit("g:netrw_timefmt","%c")
+if !exists("g:netrw_xstrlen")
+ if exists("g:Align_xstrlen")
+ let g:netrw_xstrlen= g:Align_xstrlen
+ elseif exists("g:drawit_xstrlen")
+ let g:netrw_xstrlen= g:drawit_xstrlen
+ elseif &enc == "latin1" || !has("multi_byte")
+ let g:netrw_xstrlen= 0
+ else
+ let g:netrw_xstrlen= 1
+ endif
+endif
+call s:NetrwInit("g:NetrwTopLvlMenu","Netrw.")
+call s:NetrwInit("g:netrw_win95ftp",1)
+call s:NetrwInit("g:netrw_winsize",50)
+call s:NetrwInit("g:netrw_wiw",1)
+if g:netrw_winsize > 100|let g:netrw_winsize= 100|endif
+" ---------------------------------------------------------------------
+" Default values for netrw's script variables: {{{2
+call s:NetrwInit("g:netrw_fname_escape",' ?&;%')
+if has("win32") || has("win95") || has("win64") || has("win16")
+ call s:NetrwInit("g:netrw_glob_escape",'*?`{[]$')
+else
+ call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\')
+endif
+call s:NetrwInit("g:netrw_menu_escape",'.&? \')
+call s:NetrwInit("g:netrw_tmpfile_escape",' &;')
+call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\<C-V>\"")
+if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
+ let s:treedepthstring= "│ "
+else
+ let s:treedepthstring= "| "
+endif
+call s:NetrwInit("s:netrw_posn",'{}')
+
+" BufEnter event ignored by decho when following variable is true
+" Has a side effect that doau BufReadPost doesn't work, so
+" files read by network transfer aren't appropriately highlighted.
+"let g:decho_bufenter = 1 "Decho
+
+" ======================
+" Netrw Initialization: {{{1
+" ======================
+if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on")
+" call Decho("installed beval events",'~'.expand("<slnum>"))
+ let &l:bexpr = "netrw#BalloonHelp()"
+" call Decho("&l:bexpr<".&l:bexpr."> buf#".bufnr())
+ au FileType netrw setl beval
+ au WinLeave * if &ft == "netrw" && exists("s:initbeval")|let &beval= s:initbeval|endif
+ au VimEnter * let s:initbeval= &beval
+"else " Decho
+" if v:version < 700 | call Decho("did not install beval events: v:version=".v:version." < 700","~".expand("<slnum>")) | endif
+" if !has("balloon_eval") | call Decho("did not install beval events: does not have balloon_eval","~".expand("<slnum>")) | endif
+" if exists("s:initbeval") | call Decho("did not install beval events: s:initbeval exists","~".expand("<slnum>")) | endif
+" if exists("g:netrw_nobeval") | call Decho("did not install beval events: g:netrw_nobeval exists","~".expand("<slnum>")) | endif
+" if !has("syntax") | call Decho("did not install beval events: does not have syntax highlighting","~".expand("<slnum>")) | endif
+" if exists("g:syntax_on") | call Decho("did not install beval events: g:syntax_on exists","~".expand("<slnum>")) | endif
+endif
+au WinEnter * if &ft == "netrw"|call s:NetrwInsureWinVars()|endif
+
+if g:netrw_keepj =~# "keepj"
+ com! -nargs=* NetrwKeepj keepj <args>
+else
+ let g:netrw_keepj= ""
+ com! -nargs=* NetrwKeepj <args>
+endif
+
+" ==============================
+" Netrw Utility Functions: {{{1
+" ==============================
+
+" ---------------------------------------------------------------------
+" netrw#BalloonHelp: {{{2
+if v:version >= 700 && has("balloon_eval") && has("syntax") && exists("g:syntax_on") && !exists("g:netrw_nobeval")
+" call Decho("loading netrw#BalloonHelp()",'~'.expand("<slnum>"))
+ fun! netrw#BalloonHelp()
+ if &ft != "netrw"
+ return ""
+ endif
+ if exists("s:popuperr_id") && popup_getpos(s:popuperr_id) != {}
+ " popup error window is still showing
+ " s:pouperr_id and s:popuperr_text are set up in netrw#ErrorMsg()
+ if exists("s:popuperr_text") && s:popuperr_text != "" && v:beval_text != s:popuperr_text
+ " text under mouse hasn't changed; only close window when it changes
+ call popup_close(s:popuperr_id)
+ unlet s:popuperr_text
+ else
+ let s:popuperr_text= v:beval_text
+ endif
+ let mesg= ""
+ elseif !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval)
+ let mesg= ""
+ elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing"
+ let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file"
+ elseif getline(v:beval_lnum) =~ '^"\s*/'
+ let mesg = "<cr>: edit/enter o: edit/enter in horiz window t: edit/enter in new tab v:edit/enter in vert window"
+ elseif v:beval_text == "Sorted" || v:beval_text == "by"
+ let mesg = 's: sort by name, time, file size, extension r: reverse sorting order mt: mark target'
+ elseif v:beval_text == "Sort" || v:beval_text == "sequence"
+ let mesg = "S: edit sorting sequence"
+ elseif v:beval_text == "Hiding" || v:beval_text == "Showing"
+ let mesg = "a: hiding-showing-all ctrl-h: editing hiding list mh: hide/show by suffix"
+ elseif v:beval_text == "Quick" || v:beval_text == "Help"
+ let mesg = "Help: press <F1>"
+ elseif v:beval_text == "Copy/Move" || v:beval_text == "Tgt"
+ let mesg = "mt: mark target mc: copy marked file to target mm: move marked file to target"
+ else
+ let mesg= ""
+ endif
+ return mesg
+ endfun
+"else " Decho
+" if v:version < 700 |call Decho("did not load netrw#BalloonHelp(): vim version ".v:version." < 700 -","~".expand("<slnum>"))|endif
+" if !has("balloon_eval") |call Decho("did not load netrw#BalloonHelp(): does not have balloon eval","~".expand("<slnum>")) |endif
+" if !has("syntax") |call Decho("did not load netrw#BalloonHelp(): syntax disabled","~".expand("<slnum>")) |endif
+" if !exists("g:syntax_on") |call Decho("did not load netrw#BalloonHelp(): g:syntax_on n/a","~".expand("<slnum>")) |endif
+" if exists("g:netrw_nobeval") |call Decho("did not load netrw#BalloonHelp(): g:netrw_nobeval exists","~".expand("<slnum>")) |endif
+endif
+
+" ------------------------------------------------------------------------
+" netrw#Explore: launch the local browser in the directory of the current file {{{2
+" indx: == -1: Nexplore
+" == -2: Pexplore
+" == +: this is overloaded:
+" * If Nexplore/Pexplore is in use, then this refers to the
+" indx'th item in the w:netrw_explore_list[] of items which
+" matched the */pattern **/pattern *//pattern **//pattern
+" * If Hexplore or Vexplore, then this will override
+" g:netrw_winsize to specify the qty of rows or columns the
+" newly split window should have.
+" dosplit==0: the window will be split iff the current file has been modified and hidden not set
+" dosplit==1: the window will be split before running the local browser
+" style == 0: Explore style == 1: Explore!
+" == 2: Hexplore style == 3: Hexplore!
+" == 4: Vexplore style == 5: Vexplore!
+" == 6: Texplore
+fun! netrw#Explore(indx,dosplit,style,...)
+" call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified." modifiable=".&modifiable." a:0=".a:0." win#".winnr()." buf#".bufnr("%")." ft=".&ft)
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)",'~'.expand("<slnum>"))
+ endif
+
+ " record current file for Rexplore's benefit
+ if &ft != "netrw"
+ let w:netrw_rexfile= expand("%:p")
+ endif
+
+ " record current directory
+ let curdir = simplify(b:netrw_curdir)
+ let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e')
+ if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16"))
+ let curdir= substitute(curdir,'\','/','g')
+ endif
+" call Decho("curdir<".curdir."> curfiledir<".curfiledir.">",'~'.expand("<slnum>"))
+
+ " using completion, directories with spaces in their names (thanks, Bill Gates, for a truly dumb idea)
+ " will end up with backslashes here. Solution: strip off backslashes that precede white space and
+ " try Explore again.
+ if a:0 > 0
+" call Decho('considering retry: a:1<'.a:1.'>: '.
+ \ ((a:1 =~ "\\\s")? 'has backslash whitespace' : 'does not have backslash whitespace').', '.
+ \ ((filereadable(s:NetrwFile(a:1)))? 'is readable' : 'is not readable').', '.
+ \ ((isdirectory(s:NetrwFile(a:1))))? 'is a directory' : 'is not a directory',
+ \ '~'.expand("<slnum>"))
+ if a:1 =~ "\\\s" && !filereadable(s:NetrwFile(a:1)) && !isdirectory(s:NetrwFile(a:1))
+" call Decho("re-trying Explore with <".substitute(a:1,'\\\(\s\)','\1','g').">",'~'.expand("<slnum>"))
+ call netrw#Explore(a:indx,a:dosplit,a:style,substitute(a:1,'\\\(\s\)','\1','g'))
+" call Dret("netrw#Explore : returning from retry")
+ return
+" else " Decho
+" call Decho("retry not needed",'~'.expand("<slnum>"))
+ endif
+ endif
+
+ " save registers
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(netrw#Explore) save @* and @+",'~'.expand("<slnum>"))
+ sil! let keepregstar = @*
+ sil! let keepregplus = @+
+ endif
+ sil! let keepregslash= @/
+
+ " if dosplit
+ " -or- file has been modified AND file not hidden when abandoned
+ " -or- Texplore used
+ if a:dosplit || (&modified && &hidden == 0 && &bufhidden != "hide") || a:style == 6
+" call Decho("case dosplit=".a:dosplit." modified=".&modified." a:style=".a:style.": dosplit or file has been modified",'~'.expand("<slnum>"))
+ call s:SaveWinVars()
+ let winsz= g:netrw_winsize
+ if a:indx > 0
+ let winsz= a:indx
+ endif
+
+ if a:style == 0 " Explore, Sexplore
+" call Decho("style=0: Explore or Sexplore",'~'.expand("<slnum>"))
+ let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
+ if winsz == 0|let winsz= ""|endif
+ exe "noswapfile ".winsz."wincmd s"
+" call Decho("exe noswapfile ".winsz."wincmd s",'~'.expand("<slnum>"))
+
+ elseif a:style == 1 "Explore!, Sexplore!
+" call Decho("style=1: Explore! or Sexplore!",'~'.expand("<slnum>"))
+ let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
+ if winsz == 0|let winsz= ""|endif
+ exe "keepalt noswapfile ".winsz."wincmd v"
+" call Decho("exe keepalt noswapfile ".winsz."wincmd v",'~'.expand("<slnum>"))
+
+ elseif a:style == 2 " Hexplore
+" call Decho("style=2: Hexplore",'~'.expand("<slnum>"))
+ let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
+ if winsz == 0|let winsz= ""|endif
+ exe "keepalt noswapfile bel ".winsz."wincmd s"
+" call Decho("exe keepalt noswapfile bel ".winsz."wincmd s",'~'.expand("<slnum>"))
+
+ elseif a:style == 3 " Hexplore!
+" call Decho("style=3: Hexplore!",'~'.expand("<slnum>"))
+ let winsz= (winsz > 0)? (winsz*winheight(0))/100 : -winsz
+ if winsz == 0|let winsz= ""|endif
+ exe "keepalt noswapfile abo ".winsz."wincmd s"
+" call Decho("exe keepalt noswapfile abo ".winsz."wincmd s",'~'.expand("<slnum>"))
+
+ elseif a:style == 4 " Vexplore
+" call Decho("style=4: Vexplore",'~'.expand("<slnum>"))
+ let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
+ if winsz == 0|let winsz= ""|endif
+ exe "keepalt noswapfile lefta ".winsz."wincmd v"
+" call Decho("exe keepalt noswapfile lefta ".winsz."wincmd v",'~'.expand("<slnum>"))
+
+ elseif a:style == 5 " Vexplore!
+" call Decho("style=5: Vexplore!",'~'.expand("<slnum>"))
+ let winsz= (winsz > 0)? (winsz*winwidth(0))/100 : -winsz
+ if winsz == 0|let winsz= ""|endif
+ exe "keepalt noswapfile rightb ".winsz."wincmd v"
+" call Decho("exe keepalt noswapfile rightb ".winsz."wincmd v",'~'.expand("<slnum>"))
+
+ elseif a:style == 6 " Texplore
+ call s:SaveBufVars()
+" call Decho("style = 6: Texplore",'~'.expand("<slnum>"))
+ exe "keepalt tabnew ".fnameescape(curdir)
+" call Decho("exe keepalt tabnew ".fnameescape(curdir),'~'.expand("<slnum>"))
+ call s:RestoreBufVars()
+ endif
+ call s:RestoreWinVars()
+" else " Decho
+" call Decho("case a:dosplit=".a:dosplit." AND modified=".&modified." AND a:style=".a:style." is not 6",'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj norm! 0
+
+ if a:0 > 0
+" call Decho("case [a:0=".a:0."] > 0: a:1<".a:1.">",'~'.expand("<slnum>"))
+ if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin))
+" call Decho("..case a:1<".a:1.">: starts with ~ and unix or cygwin",'~'.expand("<slnum>"))
+ let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),''))
+" call Decho("..using dirname<".dirname."> (case: ~ && unix||cygwin)",'~'.expand("<slnum>"))
+ elseif a:1 == '.'
+" call Decho("..case a:1<".a:1.">: matches .",'~'.expand("<slnum>"))
+ let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd())
+ if dirname !~ '/$'
+ let dirname= dirname."/"
+ endif
+" call Decho("..using dirname<".dirname."> (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")",'~'.expand("<slnum>"))
+ elseif a:1 =~ '\$'
+" call Decho("..case a:1<".a:1.">: matches ending $",'~'.expand("<slnum>"))
+ let dirname= simplify(expand(a:1))
+" call Decho("..using user-specified dirname<".dirname."> with $env-var",'~'.expand("<slnum>"))
+ elseif a:1 !~ '^\*\{1,2}/' && a:1 !~ '^\a\{3,}://'
+" call Decho("..case a:1<".a:1.">: other, not pattern or filepattern",'~'.expand("<slnum>"))
+ let dirname= simplify(a:1)
+" call Decho("..using user-specified dirname<".dirname.">",'~'.expand("<slnum>"))
+ else
+" call Decho("..case a:1: pattern or filepattern",'~'.expand("<slnum>"))
+ let dirname= a:1
+ endif
+ else
+ " clear explore
+" call Decho("case a:0=".a:0.": clearing Explore list",'~'.expand("<slnum>"))
+ call s:NetrwClearExplore()
+" call Dret("netrw#Explore : cleared list")
+ return
+ endif
+
+" call Decho("dirname<".dirname.">",'~'.expand("<slnum>"))
+ if dirname =~ '\.\./\=$'
+ let dirname= simplify(fnamemodify(dirname,':p:h'))
+ elseif dirname =~ '\.\.' || dirname == '.'
+ let dirname= simplify(fnamemodify(dirname,':p'))
+ endif
+" call Decho("dirname<".dirname."> (after simplify)",'~'.expand("<slnum>"))
+
+ if dirname =~ '^\*//'
+ " starpat=1: Explore *//pattern (current directory only search for files containing pattern)
+" call Decho("case starpat=1: Explore *//pattern",'~'.expand("<slnum>"))
+ let pattern= substitute(dirname,'^\*//\(.*\)$','\1','')
+ let starpat= 1
+" call Decho("..Explore *//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">",'~'.expand("<slnum>"))
+ if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+
+ elseif dirname =~ '^\*\*//'
+ " starpat=2: Explore **//pattern (recursive descent search for files containing pattern)
+" call Decho("case starpat=2: Explore **//pattern",'~'.expand("<slnum>"))
+ let pattern= substitute(dirname,'^\*\*//','','')
+ let starpat= 2
+" call Decho("..Explore **//pat: (starpat=".starpat.") dirname<".dirname."> -> pattern<".pattern.">",'~'.expand("<slnum>"))
+
+ elseif dirname =~ '/\*\*/'
+ " handle .../**/.../filepat
+" call Decho("case starpat=4: Explore .../**/.../filepat",'~'.expand("<slnum>"))
+ let prefixdir= substitute(dirname,'^\(.\{-}\)\*\*.*$','\1','')
+ if prefixdir =~ '^/' || (prefixdir =~ '^\a:/' && (has("win32") || has("win95") || has("win64") || has("win16")))
+ let b:netrw_curdir = prefixdir
+ else
+ let b:netrw_curdir= getcwd().'/'.prefixdir
+ endif
+ let dirname= substitute(dirname,'^.\{-}\(\*\*/.*\)$','\1','')
+ let starpat= 4
+" call Decho("..pwd<".getcwd()."> dirname<".dirname.">",'~'.expand("<slnum>"))
+" call Decho("..case Explore ../**/../filepat (starpat=".starpat.")",'~'.expand("<slnum>"))
+
+ elseif dirname =~ '^\*/'
+ " case starpat=3: Explore */filepat (search in current directory for filenames matching filepat)
+ let starpat= 3
+" call Decho("case starpat=3: Explore */filepat (starpat=".starpat.")",'~'.expand("<slnum>"))
+
+ elseif dirname=~ '^\*\*/'
+ " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat)
+ let starpat= 4
+" call Decho("case starpat=4: Explore **/filepat (starpat=".starpat.")",'~'.expand("<slnum>"))
+
+ else
+ let starpat= 0
+" call Decho("case starpat=0: default",'~'.expand("<slnum>"))
+ endif
+
+ if starpat == 0 && a:indx >= 0
+ " [Explore Hexplore Vexplore Sexplore] [dirname]
+" call Decho("case starpat==0 && a:indx=".a:indx.": dirname<".dirname.">, handles Explore Hexplore Vexplore Sexplore",'~'.expand("<slnum>"))
+ if dirname == ""
+ let dirname= curfiledir
+" call Decho("..empty dirname, using current file's directory<".dirname.">",'~'.expand("<slnum>"))
+ endif
+ if dirname =~# '^scp://' || dirname =~ '^ftp://'
+ call netrw#Nread(2,dirname)
+ else
+ if dirname == ""
+ let dirname= getcwd()
+ elseif (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin
+ " Windows : check for a drive specifier, or else for a remote share name ('\\Foo' or '//Foo',
+ " depending on whether backslashes have been converted to forward slashes by earlier code).
+ if dirname !~ '^[a-zA-Z]:' && dirname !~ '^\\\\\w\+' && dirname !~ '^//\w\+'
+ let dirname= b:netrw_curdir."/".dirname
+ endif
+ elseif dirname !~ '^/'
+ let dirname= b:netrw_curdir."/".dirname
+ endif
+" call Decho("..calling LocalBrowseCheck(dirname<".dirname.">)",'~'.expand("<slnum>"))
+ call netrw#LocalBrowseCheck(dirname)
+" call Decho(" modified=".&modified." modifiable=".&modifiable." readonly=".&readonly,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+ endif
+ if exists("w:netrw_bannercnt")
+ " done to handle P08-Ingelrest. :Explore will _Always_ go to the line just after the banner.
+ " If one wants to return the same place in the netrw window, use :Rex instead.
+ exe w:netrw_bannercnt
+ endif
+
+" call Decho("curdir<".curdir.">",'~'.expand("<slnum>"))
+ " ---------------------------------------------------------------------
+ " Jan 24, 2013: not sure why the following was present. See P08-Ingelrest
+" if has("win32") || has("win95") || has("win64") || has("win16")
+" NetrwKeepj call search('\<'.substitute(curdir,'^.*[/\\]','','e').'\>','cW')
+" else
+" NetrwKeepj call search('\<'.substitute(curdir,'^.*/','','e').'\>','cW')
+" endif
+ " ---------------------------------------------------------------------
+
+ " starpat=1: Explore *//pattern (current directory only search for files containing pattern)
+ " starpat=2: Explore **//pattern (recursive descent search for files containing pattern)
+ " starpat=3: Explore */filepat (search in current directory for filenames matching filepat)
+ " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat)
+ elseif a:indx <= 0
+ " Nexplore, Pexplore, Explore: handle starpat
+" call Decho("case a:indx<=0: Nexplore, Pexplore, <s-down>, <s-up> starpat=".starpat." a:indx=".a:indx,'~'.expand("<slnum>"))
+ if !mapcheck("<s-up>","n") && !mapcheck("<s-down>","n") && exists("b:netrw_curdir")
+" call Decho("..set up <s-up> and <s-down> maps",'~'.expand("<slnum>"))
+ let s:didstarstar= 1
+ nnoremap <buffer> <silent> <s-up> :Pexplore<cr>
+ nnoremap <buffer> <silent> <s-down> :Nexplore<cr>
+ endif
+
+ if has("path_extra")
+" call Decho("..starpat=".starpat.": has +path_extra",'~'.expand("<slnum>"))
+ if !exists("w:netrw_explore_indx")
+ let w:netrw_explore_indx= 0
+ endif
+
+ let indx = a:indx
+" call Decho("..starpat=".starpat.": set indx= [a:indx=".indx."]",'~'.expand("<slnum>"))
+
+ if indx == -1
+ " Nexplore
+" call Decho("..case Nexplore with starpat=".starpat.": (indx=".indx.")",'~'.expand("<slnum>"))
+ if !exists("w:netrw_explore_list") " sanity check
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Nexplore or <s-down> improperly; see help for netrw-starstar",40)
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
+ if @* != keepregstar | sil! let @* = keepregstar | endif
+ if @+ != keepregplus | sil! let @+ = keepregplus | endif
+ endif
+ sil! let @/ = keepregslash
+" call Dret("netrw#Explore")
+ return
+ endif
+ let indx= w:netrw_explore_indx
+ if indx < 0 | let indx= 0 | endif
+ if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
+ let curfile= w:netrw_explore_list[indx]
+" call Decho("....indx=".indx." curfile<".curfile.">",'~'.expand("<slnum>"))
+ while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx]
+ let indx= indx + 1
+" call Decho("....indx=".indx." (Nexplore while loop)",'~'.expand("<slnum>"))
+ endwhile
+ if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
+" call Decho("....Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx,'~'.expand("<slnum>"))
+
+ elseif indx == -2
+ " Pexplore
+" call Decho("case Pexplore with starpat=".starpat.": (indx=".indx.")",'~'.expand("<slnum>"))
+ if !exists("w:netrw_explore_list") " sanity check
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"using Pexplore or <s-up> improperly; see help for netrw-starstar",41)
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
+ if @* != keepregstar | sil! let @* = keepregstar | endif
+ if @+ != keepregplus | sil! let @+ = keepregplus | endif
+ endif
+ sil! let @/ = keepregslash
+" call Dret("netrw#Explore")
+ return
+ endif
+ let indx= w:netrw_explore_indx
+ if indx < 0 | let indx= 0 | endif
+ if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif
+ let curfile= w:netrw_explore_list[indx]
+" call Decho("....indx=".indx." curfile<".curfile.">",'~'.expand("<slnum>"))
+ while indx >= 0 && curfile == w:netrw_explore_list[indx]
+ let indx= indx - 1
+" call Decho("....indx=".indx." (Pexplore while loop)",'~'.expand("<slnum>"))
+ endwhile
+ if indx < 0 | let indx= 0 | endif
+" call Decho("....Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx,'~'.expand("<slnum>"))
+
+ else
+ " Explore -- initialize
+ " build list of files to Explore with Nexplore/Pexplore
+" call Decho("..starpat=".starpat.": case Explore: initialize (indx=".indx.")",'~'.expand("<slnum>"))
+ NetrwKeepj keepalt call s:NetrwClearExplore()
+ let w:netrw_explore_indx= 0
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+ endif
+" call Decho("....starpat=".starpat.": b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("<slnum>"))
+
+ " switch on starpat to build the w:netrw_explore_list of files
+ if starpat == 1
+ " starpat=1: Explore *//pattern (current directory only search for files containing pattern)
+" call Decho("..case starpat=".starpat.": build *//pattern list (curdir-only srch for files containing pattern) &hls=".&hls,'~'.expand("<slnum>"))
+" call Decho("....pattern<".pattern.">",'~'.expand("<slnum>"))
+ try
+ exe "NetrwKeepj noautocmd vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*"
+ catch /^Vim\%((\a\+)\)\=:E480/
+ keepalt call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pattern.">",76)
+" call Dret("netrw#Explore : unable to find pattern<".pattern.">")
+ return
+ endtry
+ let w:netrw_explore_list = s:NetrwExploreListUniq(map(getqflist(),'bufname(v:val.bufnr)'))
+ if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+
+ elseif starpat == 2
+ " starpat=2: Explore **//pattern (recursive descent search for files containing pattern)
+" call Decho("..case starpat=".starpat.": build **//pattern list (recursive descent files containing pattern)",'~'.expand("<slnum>"))
+" call Decho("....pattern<".pattern.">",'~'.expand("<slnum>"))
+ try
+ exe "sil NetrwKeepj noautocmd keepalt vimgrep /".pattern."/gj "."**/*"
+ catch /^Vim\%((\a\+)\)\=:E480/
+ keepalt call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45)
+ if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
+ if @* != keepregstar | sil! let @* = keepregstar | endif
+ if @+ != keepregplus | sil! let @+ = keepregplus | endif
+ endif
+ sil! let @/ = keepregslash
+" call Dret("netrw#Explore : no files matched pattern")
+ return
+ endtry
+ let s:netrw_curdir = b:netrw_curdir
+ let w:netrw_explore_list = getqflist()
+ let w:netrw_explore_list = s:NetrwExploreListUniq(map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)'))
+ if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif
+
+ elseif starpat == 3
+ " starpat=3: Explore */filepat (search in current directory for filenames matching filepat)
+" call Decho("..case starpat=".starpat.": build */filepat list (curdir-only srch filenames matching filepat) &hls=".&hls,'~'.expand("<slnum>"))
+ let filepat= substitute(dirname,'^\*/','','')
+ let filepat= substitute(filepat,'^[%#<]','\\&','')
+" call Decho("....b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("<slnum>"))
+" call Decho("....filepat<".filepat.">",'~'.expand("<slnum>"))
+ let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".filepat),'\n'))
+ if &hls | let keepregslash= s:ExplorePatHls(filepat) | endif
+
+ elseif starpat == 4
+ " starpat=4: Explore **/filepat (recursive descent search for filenames matching filepat)
+" call Decho("..case starpat=".starpat.": build **/filepat list (recursive descent srch filenames matching filepat) &hls=".&hls,'~'.expand("<slnum>"))
+ let w:netrw_explore_list= s:NetrwExploreListUniq(split(expand(b:netrw_curdir."/".dirname),'\n'))
+ if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif
+ endif " switch on starpat to build w:netrw_explore_list
+
+ let w:netrw_explore_listlen = len(w:netrw_explore_list)
+" call Decho("....w:netrw_explore_list<".string(w:netrw_explore_list).">",'~'.expand("<slnum>"))
+" call Decho("....w:netrw_explore_listlen=".w:netrw_explore_listlen,'~'.expand("<slnum>"))
+
+ if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/')
+ keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no files matched",42)
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
+ if @* != keepregstar | sil! let @* = keepregstar | endif
+ if @+ != keepregplus | sil! let @+ = keepregplus | endif
+ endif
+ sil! let @/ = keepregslash
+" call Dret("netrw#Explore : no files matched")
+ return
+ endif
+ endif " if indx ... endif
+
+ " NetrwStatusLine support - for exploring support
+ let w:netrw_explore_indx= indx
+" call Decho("....w:netrw_explore_list<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen,'~'.expand("<slnum>"))
+
+ " wrap the indx around, but issue a note
+ if indx >= w:netrw_explore_listlen || indx < 0
+" call Decho("....wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")",'~'.expand("<slnum>"))
+ let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0
+ let w:netrw_explore_indx= indx
+ keepalt NetrwKeepj call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43)
+ endif
+
+ exe "let dirfile= w:netrw_explore_list[".indx."]"
+" call Decho("....dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">",'~'.expand("<slnum>"))
+ let newdir= substitute(dirfile,'/[^/]*$','','e')
+" call Decho("....newdir<".newdir.">",'~'.expand("<slnum>"))
+
+" call Decho("....calling LocalBrowseCheck(newdir<".newdir.">)",'~'.expand("<slnum>"))
+ call netrw#LocalBrowseCheck(newdir)
+ if !exists("w:netrw_liststyle")
+ let w:netrw_liststyle= g:netrw_liststyle
+ endif
+ if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST
+ keepalt NetrwKeepj call search('^'.substitute(dirfile,"^.*/","","").'\>',"W")
+ else
+ keepalt NetrwKeepj call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w")
+ endif
+ let w:netrw_explore_mtchcnt = indx + 1
+ let w:netrw_explore_bufnr = bufnr("%")
+ let w:netrw_explore_line = line(".")
+ keepalt NetrwKeepj call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}')
+" call Decho("....explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line,'~'.expand("<slnum>"))
+
+ else
+" call Decho("..your vim does not have +path_extra",'~'.expand("<slnum>"))
+ if !exists("g:netrw_quiet")
+ keepalt NetrwKeepj call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44)
+ endif
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
+ if @* != keepregstar | sil! let @* = keepregstar | endif
+ if @+ != keepregplus | sil! let @+ = keepregplus | endif
+ endif
+ sil! let @/ = keepregslash
+" call Dret("netrw#Explore : missing +path_extra")
+ return
+ endif
+
+ else
+" call Decho("..default case: Explore newdir<".dirname.">",'~'.expand("<slnum>"))
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/'
+ sil! unlet w:netrw_treedict
+ sil! unlet w:netrw_treetop
+ endif
+ let newdir= dirname
+ if !exists("b:netrw_curdir")
+ NetrwKeepj call netrw#LocalBrowseCheck(getcwd())
+ else
+ NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,newdir))
+ endif
+ endif
+
+ " visual display of **/ **// */ Exploration files
+" call Decho("w:netrw_explore_indx=".(exists("w:netrw_explore_indx")? w:netrw_explore_indx : "doesn't exist"),'~'.expand("<slnum>"))
+" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "n/a").">",'~'.expand("<slnum>"))
+ if exists("w:netrw_explore_indx") && exists("b:netrw_curdir")
+" call Decho("s:explore_prvdir<".(exists("s:explore_prvdir")? s:explore_prvdir : "-doesn't exist-"),'~'.expand("<slnum>"))
+ if !exists("s:explore_prvdir") || s:explore_prvdir != b:netrw_curdir
+ " only update match list when current directory isn't the same as before
+" call Decho("only update match list when current directory not the same as before",'~'.expand("<slnum>"))
+ let s:explore_prvdir = b:netrw_curdir
+ let s:explore_match = ""
+ let dirlen = strlen(b:netrw_curdir)
+ if b:netrw_curdir !~ '/$'
+ let dirlen= dirlen + 1
+ endif
+ let prvfname= ""
+ for fname in w:netrw_explore_list
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+ if fname =~ '^'.b:netrw_curdir
+ if s:explore_match == ""
+ let s:explore_match= '\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>'
+ else
+ let s:explore_match= s:explore_match.'\|\<'.escape(strpart(fname,dirlen),g:netrw_markfileesc).'\>'
+ endif
+ elseif fname !~ '^/' && fname != prvfname
+ if s:explore_match == ""
+ let s:explore_match= '\<'.escape(fname,g:netrw_markfileesc).'\>'
+ else
+ let s:explore_match= s:explore_match.'\|\<'.escape(fname,g:netrw_markfileesc).'\>'
+ endif
+ endif
+ let prvfname= fname
+ endfor
+" call Decho("explore_match<".s:explore_match.">",'~'.expand("<slnum>"))
+ if has("syntax") && exists("g:syntax_on") && g:syntax_on
+ exe "2match netrwMarkFile /".s:explore_match."/"
+ endif
+ endif
+ echo "<s-up>==Pexplore <s-down>==Nexplore"
+ else
+ 2match none
+ if exists("s:explore_match") | unlet s:explore_match | endif
+ if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif
+ echo " "
+" call Decho("cleared explore match list",'~'.expand("<slnum>"))
+ endif
+
+ " since Explore may be used to initialize netrw's browser,
+ " there's no danger of a late FocusGained event on initialization.
+ " Consequently, set s:netrw_events to 2.
+ let s:netrw_events= 2
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(netrw#Explore) restore @* and @+",'~'.expand("<slnum>"))
+ if @* != keepregstar | sil! let @* = keepregstar | endif
+ if @+ != keepregplus | sil! let @+ = keepregplus | endif
+ endif
+ sil! let @/ = keepregslash
+" call Dret("netrw#Explore : @/<".@/.">")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Lexplore: toggle Explorer window, keeping it on the left of the current tab {{{2
+fun! netrw#Lexplore(count,rightside,...)
+" call Dfunc("netrw#Lexplore(count=".a:count." rightside=".a:rightside.",...) a:0=".a:0." ft=".&ft)
+ let curwin= winnr()
+
+ if a:0 > 0 && a:1 != ""
+ " if a netrw window is already on the left-side of the tab
+ " and a directory has been specified, explore with that
+ " directory.
+" call Decho("case has input argument(s) (a:1<".a:1.">)")
+ let a1 = expand(a:1)
+" call Decho("a:1<".a:1."> curwin#".curwin,'~'.expand("<slnum>"))
+ exe "1wincmd w"
+ if &ft == "netrw"
+" call Decho("exe Explore ".fnameescape(a:1),'~'.expand("<slnum>"))
+ exe "Explore ".fnameescape(a1)
+ exe curwin."wincmd w"
+ if exists("t:netrw_lexposn")
+" call Decho("forgetting t:netrw_lexposn",'~'.expand("<slnum>"))
+ unlet t:netrw_lexposn
+ endif
+" call Dret("netrw#Lexplore")
+ return
+ endif
+ exe curwin."wincmd w"
+ else
+ let a1= ""
+" call Decho("no input arguments")
+ endif
+
+ if exists("t:netrw_lexbufnr")
+ " check if t:netrw_lexbufnr refers to a netrw window
+ let lexwinnr = bufwinnr(t:netrw_lexbufnr)
+" call Decho("lexwinnr= bufwinnr(t:netrw_lexbufnr#".t:netrw_lexbufnr.")=".lexwinnr)
+ else
+ let lexwinnr= 0
+" call Decho("t:netrw_lexbufnr doesn't exist")
+ endif
+" call Decho("lexwinnr=".lexwinnr,'~'.expand("<slnum>"))
+
+ if lexwinnr > 0
+ " close down netrw explorer window
+" call Decho("t:netrw_lexbufnr#".t:netrw_lexbufnr.": close down netrw window",'~'.expand("<slnum>"))
+ exe lexwinnr."wincmd w"
+ let g:netrw_winsize = -winwidth(0)
+ let t:netrw_lexposn = winsaveview()
+" call Decho("saving posn to t:netrw_lexposn<".string(t:netrw_lexposn).">",'~'.expand("<slnum>"))
+" call Decho("saving t:netrw_lexposn",'~'.expand("<slnum>"))
+ close
+ if lexwinnr < curwin
+ let curwin= curwin - 1
+ endif
+ if lexwinnr != curwin
+ exe curwin."wincmd w"
+ endif
+ unlet t:netrw_lexbufnr
+" call Decho("unlet t:netrw_lexbufnr")
+
+ else
+ " open netrw explorer window
+" call Decho("t:netrw_lexbufnr<n/a>: open netrw explorer window",'~'.expand("<slnum>"))
+ exe "1wincmd w"
+ let keep_altv = g:netrw_altv
+ let g:netrw_altv = 0
+ if a:count != 0
+ let netrw_winsize = g:netrw_winsize
+ let g:netrw_winsize = a:count
+ endif
+ let curfile= expand("%")
+" call Decho("curfile<".curfile.">",'~'.expand("<slnum>"))
+ exe (a:rightside? "botright" : "topleft")." vertical ".((g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize) . " new"
+" call Decho("new buf#".bufnr("%")." win#".winnr())
+ if a:0 > 0 && a1 != ""
+" call Decho("case 1: Explore ".a1,'~'.expand("<slnum>"))
+ call netrw#Explore(0,0,0,a1)
+ exe "Explore ".fnameescape(a1)
+ elseif curfile =~ '^\a\{3,}://'
+" call Decho("case 2: Explore ".substitute(curfile,'[^/\\]*$','',''),'~'.expand("<slnum>"))
+ call netrw#Explore(0,0,0,substitute(curfile,'[^/\\]*$','',''))
+ else
+" call Decho("case 3: Explore .",'~'.expand("<slnum>"))
+ call netrw#Explore(0,0,0,".")
+ endif
+ if a:count != 0
+ let g:netrw_winsize = netrw_winsize
+ endif
+ setlocal winfixwidth
+ let g:netrw_altv = keep_altv
+ let t:netrw_lexbufnr = bufnr("%")
+ " done to prevent build-up of hidden buffers due to quitting and re-invocation of :Lexplore.
+ " Since the intended use of :Lexplore is to have an always-present explorer window, the extra
+ " effort to mis-use :Lex is warranted.
+ set bh=wipe
+" call Decho("let t:netrw_lexbufnr=".t:netrw_lexbufnr)
+" call Decho("t:netrw_lexposn".(exists("t:netrw_lexposn")? string(t:netrw_lexposn) : " n/a"))
+ if exists("t:netrw_lexposn")
+" call Decho("restoring to t:netrw_lexposn",'~'.expand("<slnum>"))
+" call Decho("restoring posn to t:netrw_lexposn<".string(t:netrw_lexposn).">",'~'.expand("<slnum>"))
+ call winrestview(t:netrw_lexposn)
+ unlet t:netrw_lexposn
+ endif
+ endif
+
+ " set up default window for editing via <cr>
+ if exists("g:netrw_chgwin") && g:netrw_chgwin == -1
+ if a:rightside
+ let g:netrw_chgwin= 1
+ else
+ let g:netrw_chgwin= 2
+ endif
+" call Decho("let g:netrw_chgwin=".g:netrw_chgwin)
+ endif
+
+" call Dret("netrw#Lexplore")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Clean: remove netrw {{{2
+" supports :NetrwClean -- remove netrw from first directory on runtimepath
+" :NetrwClean! -- remove netrw from all directories on runtimepath
+fun! netrw#Clean(sys)
+" call Dfunc("netrw#Clean(sys=".a:sys.")")
+
+ if a:sys
+ let choice= confirm("Remove personal and system copies of netrw?","&Yes\n&No")
+ else
+ let choice= confirm("Remove personal copy of netrw?","&Yes\n&No")
+ endif
+" call Decho("choice=".choice,'~'.expand("<slnum>"))
+ let diddel= 0
+ let diddir= ""
+
+ if choice == 1
+ for dir in split(&rtp,',')
+ if filereadable(dir."/plugin/netrwPlugin.vim")
+" call Decho("removing netrw-related files from ".dir,'~'.expand("<slnum>"))
+ if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif
+ if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif
+ if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif
+ if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif
+ if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif
+ if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif
+ let diddir= dir
+ let diddel= diddel + 1
+ if !a:sys|break|endif
+ endif
+ endfor
+ endif
+
+ echohl WarningMsg
+ if diddel == 0
+ echomsg "netrw is either not installed or not removable"
+ elseif diddel == 1
+ echomsg "removed one copy of netrw from <".diddir.">"
+ else
+ echomsg "removed ".diddel." copies of netrw"
+ endif
+ echohl None
+
+" call Dret("netrw#Clean")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#MakeTgt: make a target out of the directory name provided {{{2
+fun! netrw#MakeTgt(dname)
+" call Dfunc("netrw#MakeTgt(dname<".a:dname.">)")
+ " simplify the target (eg. /abc/def/../ghi -> /abc/ghi)
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let s:netrwmftgt_islocal= (a:dname !~ '^\a\{3,}://')
+" call Decho("s:netrwmftgt_islocal=".s:netrwmftgt_islocal,'~'.expand("<slnum>"))
+ if s:netrwmftgt_islocal
+ let netrwmftgt= simplify(a:dname)
+ else
+ let netrwmftgt= a:dname
+ endif
+ if exists("s:netrwmftgt") && netrwmftgt == s:netrwmftgt
+ " re-selected target, so just clear it
+ unlet s:netrwmftgt s:netrwmftgt_islocal
+ else
+ let s:netrwmftgt= netrwmftgt
+ endif
+ if g:netrw_fastbrowse <= 1
+ call s:NetrwRefresh((b:netrw_curdir !~ '\a\{3,}://'),b:netrw_curdir)
+ endif
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))"
+ call winrestview(svpos)
+" call Dret("netrw#MakeTgt")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Obtain: {{{2
+" netrw#Obtain(islocal,fname[,tgtdirectory])
+" islocal=0 obtain from remote source
+" =1 obtain from local source
+" fname : a filename or a list of filenames
+" tgtdir : optional place where files are to go (not present, uses getcwd())
+fun! netrw#Obtain(islocal,fname,...)
+" call Dfunc("netrw#Obtain(islocal=".a:islocal." fname<".((type(a:fname) == 1)? a:fname : string(a:fname)).">) a:0=".a:0)
+ " NetrwStatusLine support - for obtaining support
+
+ if type(a:fname) == 1
+ let fnamelist= [ a:fname ]
+ elseif type(a:fname) == 3
+ let fnamelist= a:fname
+ else
+ call netrw#ErrorMsg(s:ERROR,"attempting to use NetrwObtain on something not a filename or a list",62)
+" call Dret("netrw#Obtain")
+ return
+ endif
+" call Decho("fnamelist<".string(fnamelist).">",'~'.expand("<slnum>"))
+ if a:0 > 0
+ let tgtdir= a:1
+ else
+ let tgtdir= getcwd()
+ endif
+" call Decho("tgtdir<".tgtdir.">",'~'.expand("<slnum>"))
+
+ if exists("b:netrw_islocal") && b:netrw_islocal
+ " obtain a file from local b:netrw_curdir to (local) tgtdir
+" call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir,'~'.expand("<slnum>"))
+ if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir
+ let topath= s:ComposePath(tgtdir,"")
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+ " transfer files one at time
+" call Decho("transfer files one at a time",'~'.expand("<slnum>"))
+ for fname in fnamelist
+" call Decho("system(".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath).")",'~'.expand("<slnum>"))
+ call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".s:ShellEscape(fname)." ".s:ShellEscape(topath))
+ if v:shell_error != 0
+ call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80)
+" call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".s:ShellEscape(fname)." ".s:ShellEscape(topath))
+ return
+ endif
+ endfor
+ else
+ " transfer files with one command
+" call Decho("transfer files with one command",'~'.expand("<slnum>"))
+ let filelist= join(map(deepcopy(fnamelist),"s:ShellEscape(v:val)"))
+" call Decho("system(".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath).")",'~'.expand("<slnum>"))
+ call system(g:netrw_localcopycmd.g:netrw_localcopycmdopt." ".filelist." ".s:ShellEscape(topath))
+ if v:shell_error != 0
+ call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localcopycmd<".g:netrw_localcopycmd."> to something that works",80)
+" call Dret("s:NetrwObtain 0 : failed: ".g:netrw_localcopycmd." ".filelist." ".s:ShellEscape(topath))
+ return
+ endif
+ endif
+ elseif !exists("b:netrw_curdir")
+ call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36)
+ else
+ call netrw#ErrorMsg(s:WARNING,"local browsing directory and current directory are identical",37)
+ endif
+
+ else
+ " obtain files from remote b:netrw_curdir to local tgtdir
+" call Decho("obtain a file from remote ".b:netrw_curdir." to ".tgtdir,'~'.expand("<slnum>"))
+ if type(a:fname) == 1
+ call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname)
+ endif
+ call s:NetrwMethod(b:netrw_curdir)
+
+ if b:netrw_method == 4
+ " obtain file using scp
+" call Decho("obtain via scp (method#4)",'~'.expand("<slnum>"))
+ if exists("g:netrw_port") && g:netrw_port != ""
+ let useport= " ".g:netrw_scpport." ".g:netrw_port
+ else
+ let useport= ""
+ endif
+ if b:netrw_fname =~ '/'
+ let path= substitute(b:netrw_fname,'^\(.*/\).\{-}$','\1','')
+ else
+ let path= ""
+ endif
+ let filelist= join(map(deepcopy(fnamelist),'escape(s:ShellEscape(g:netrw_machine.":".path.v:val,1)," ")'))
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".filelist." ".s:ShellEscape(tgtdir,1))
+
+ elseif b:netrw_method == 2
+ " obtain file using ftp + .netrc
+" call Decho("obtain via ftp+.netrc (method #2)",'~'.expand("<slnum>"))
+ call s:SaveBufVars()|sil NetrwKeepj new|call s:RestoreBufVars()
+ let tmpbufnr= bufnr("%")
+ setl ff=unix
+ if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
+ NetrwKeepj put =g:netrw_ftpmode
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("b:netrw_fname") && b:netrw_fname != ""
+ call setline(line("$")+1,'cd "'.b:netrw_fname.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+ for fname in fnamelist
+ call setline(line("$")+1,'get "'.fname.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endfor
+ if exists("g:netrw_port") && g:netrw_port != ""
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1))
+ else
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1))
+ endif
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
+ let debugkeep= &debug
+ setl debug=msg
+ call netrw#ErrorMsg(s:ERROR,getline(1),4)
+ let &debug= debugkeep
+ endif
+
+ elseif b:netrw_method == 3
+ " obtain with ftp + machine, id, passwd, and fname (ie. no .netrc)
+" call Decho("obtain via ftp+mipf (method #3)",'~'.expand("<slnum>"))
+ call s:SaveBufVars()|sil NetrwKeepj new|call s:RestoreBufVars()
+ let tmpbufnr= bufnr("%")
+ setl ff=unix
+
+ if exists("g:netrw_port") && g:netrw_port != ""
+ NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ else
+ NetrwKeepj put ='open '.g:netrw_machine
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ NetrwKeepj put =g:netrw_uid
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ if exists("s:netrw_passwd") && s:netrw_passwd != ""
+ NetrwKeepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ elseif exists("s:netrw_passwd")
+ NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+ endif
+
+ if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
+ NetrwKeepj put =g:netrw_ftpmode
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("b:netrw_fname") && b:netrw_fname != ""
+ NetrwKeepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+ for fname in fnamelist
+ NetrwKeepj call setline(line("$")+1,'get "'.fname.'"')
+ endfor
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+
+ " perform ftp:
+ " -i : turns off interactive prompting from ftp
+ " -n unix : DON'T use <.netrc>, even though it exists
+ " -n win32: quit being obnoxious about password
+ " Note: using "_dd to delete to the black hole register; avoids messing up @@
+ NetrwKeepj norm! 1G"_dd
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ if getline(1) !~ "^$"
+" call Decho("error<".getline(1).">",'~'.expand("<slnum>"))
+ if !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),5)
+ endif
+ endif
+
+ elseif b:netrw_method == 9
+ " obtain file using sftp
+" call Decho("obtain via sftp (method #9)",'~'.expand("<slnum>"))
+ if a:fname =~ '/'
+ let localfile= substitute(a:fname,'^.*/','','')
+ else
+ let localfile= a:fname
+ endif
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1).s:ShellEscape(localfile)." ".s:ShellEscape(tgtdir))
+
+ elseif !exists("b:netrw_method") || b:netrw_method < 0
+ " probably a badly formed url; protocol not recognized
+" call Dret("netrw#Obtain : unsupported method")
+ return
+
+ else
+ " protocol recognized but not supported for Obtain (yet?)
+ if !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"current protocol not supported for obtaining file",97)
+ endif
+" call Dret("netrw#Obtain : current protocol not supported for obtaining file")
+ return
+ endif
+
+ " restore status line
+ if type(a:fname) == 1 && exists("s:netrw_users_stl")
+ NetrwKeepj call s:SetupNetrwStatusLine(s:netrw_users_stl)
+ endif
+
+ endif
+
+ " cleanup
+ if exists("tmpbufnr")
+ if bufnr("%") != tmpbufnr
+ exe tmpbufnr."bw!"
+ else
+ q!
+ endif
+ endif
+
+" call Dret("netrw#Obtain")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Nread: save position, call netrw#NetRead(), and restore position {{{2
+fun! netrw#Nread(mode,fname)
+" call Dfunc("netrw#Nread(mode=".a:mode." fname<".a:fname.">)")
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call netrw#NetRead(a:mode,a:fname)
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+
+ if exists("w:netrw_liststyle") && w:netrw_liststyle != s:TREELIST
+ if exists("w:netrw_bannercnt")
+ " start with cursor just after the banner
+ exe w:netrw_bannercnt
+ endif
+ endif
+" call Dret("netrw#Nread")
+endfun
+
+" ------------------------------------------------------------------------
+" s:NetrwOptionsSave: save options prior to setting to "netrw-buffer-standard" form {{{2
+" Options get restored by s:NetrwOptionsRestore()
+"
+" Option handling:
+" * save user's options (s:NetrwOptionsSave)
+" * set netrw-safe options (s:NetrwOptionsSafe)
+" - change an option only when user option != safe option (s:netrwSetSafeSetting)
+" * restore user's options (s:netrwOPtionsRestore)
+" - restore a user option when != safe option (s:NetrwRestoreSetting)
+" vt: (variable type) normally its either "w:" or "s:"
+fun! s:NetrwOptionsSave(vt)
+" call Dfunc("s:NetrwOptionsSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma)
+" call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"),'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt." hid=".&hid,'~'.expand("<slnum>"))
+" call Decho("(s:NetrwOptionsSave) lines=".&lines)
+
+ if !exists("{a:vt}netrw_optionsave")
+ let {a:vt}netrw_optionsave= 1
+ else
+" call Dret("s:NetrwOptionsSave : options already saved")
+ return
+ endif
+" call Decho("prior to save: fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." diff=".&l:diff,'~'.expand("<slnum>"))
+
+ " Save current settings and current directory
+" call Decho("saving current settings and current directory",'~'.expand("<slnum>"))
+ let s:yykeep = @@
+ if exists("&l:acd")|let {a:vt}netrw_acdkeep = &l:acd|endif
+ let {a:vt}netrw_aikeep = &l:ai
+ let {a:vt}netrw_awkeep = &l:aw
+ let {a:vt}netrw_bhkeep = &l:bh
+ let {a:vt}netrw_blkeep = &l:bl
+ let {a:vt}netrw_btkeep = &l:bt
+ let {a:vt}netrw_bombkeep = &l:bomb
+ let {a:vt}netrw_cedit = &cedit
+ let {a:vt}netrw_cikeep = &l:ci
+ let {a:vt}netrw_cinkeep = &l:cin
+ let {a:vt}netrw_cinokeep = &l:cino
+ let {a:vt}netrw_comkeep = &l:com
+ let {a:vt}netrw_cpokeep = &l:cpo
+ let {a:vt}netrw_cuckeep = &l:cuc
+ let {a:vt}netrw_culkeep = &l:cul
+" call Decho("(s:NetrwOptionsSave) COMBAK: cuc=".&l:cuc." cul=".&l:cul)
+ let {a:vt}netrw_diffkeep = &l:diff
+ let {a:vt}netrw_fenkeep = &l:fen
+ if !exists("g:netrw_ffkeep") || g:netrw_ffkeep
+ let {a:vt}netrw_ffkeep = &l:ff
+ endif
+ let {a:vt}netrw_fokeep = &l:fo " formatoptions
+ let {a:vt}netrw_gdkeep = &l:gd " gdefault
+ let {a:vt}netrw_gokeep = &l:go " guioptions
+ let {a:vt}netrw_hidkeep = &l:hidden
+ let {a:vt}netrw_imkeep = &l:im
+ let {a:vt}netrw_iskkeep = &l:isk
+ let {a:vt}netrw_lines = &lines
+ let {a:vt}netrw_lskeep = &l:ls
+ let {a:vt}netrw_makeep = &l:ma
+ let {a:vt}netrw_magickeep = &l:magic
+ let {a:vt}netrw_modkeep = &l:mod
+ let {a:vt}netrw_nukeep = &l:nu
+ let {a:vt}netrw_rnukeep = &l:rnu
+ let {a:vt}netrw_repkeep = &l:report
+ let {a:vt}netrw_rokeep = &l:ro
+ let {a:vt}netrw_selkeep = &l:sel
+ let {a:vt}netrw_spellkeep = &l:spell
+ if !g:netrw_use_noswf
+ let {a:vt}netrw_swfkeep = &l:swf
+ endif
+ let {a:vt}netrw_tskeep = &l:ts
+ let {a:vt}netrw_twkeep = &l:tw " textwidth
+ let {a:vt}netrw_wigkeep = &l:wig " wildignore
+ let {a:vt}netrw_wrapkeep = &l:wrap
+ let {a:vt}netrw_writekeep = &l:write
+
+ " save a few selected netrw-related variables
+" call Decho("saving a few selected netrw-related variables",'~'.expand("<slnum>"))
+ if g:netrw_keepdir
+ let {a:vt}netrw_dirkeep = getcwd()
+" call Decho("saving to ".a:vt."netrw_dirkeep<".{a:vt}netrw_dirkeep.">",'~'.expand("<slnum>"))
+ endif
+ if has("clipboard") && g:netrw_clipboard
+ sil! let {a:vt}netrw_starkeep = @*
+ sil! let {a:vt}netrw_pluskeep = @+
+ endif
+ sil! let {a:vt}netrw_slashkeep= @/
+
+" call Decho("(s:NetrwOptionsSave) lines=".&lines)
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
+" call Dret("s:NetrwOptionsSave : tab#".tabpagenr()." win#".winnr())
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwOptionsSafe: sets options to help netrw do its job {{{2
+" Use s:NetrwSaveOptions() to save user settings
+" Use s:NetrwOptionsRestore() to restore user settings
+fun! s:NetrwOptionsSafe(islocal)
+" call Dfunc("s:NetrwOptionsSafe(islocal=".a:islocal.") win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%"))."> winnr($)=".winnr("$"))
+" call Decho("win#".winnr()."'s ft=".&ft,'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+ if exists("+acd") | call s:NetrwSetSafeSetting("&l:acd",0)|endif
+ call s:NetrwSetSafeSetting("&l:ai",0)
+ call s:NetrwSetSafeSetting("&l:aw",0)
+ call s:NetrwSetSafeSetting("&l:bl",0)
+ call s:NetrwSetSafeSetting("&l:bomb",0)
+ if a:islocal
+ call s:NetrwSetSafeSetting("&l:bt","nofile")
+ else
+ call s:NetrwSetSafeSetting("&l:bt","acwrite")
+ endif
+ call s:NetrwSetSafeSetting("&l:ci",0)
+ call s:NetrwSetSafeSetting("&l:cin",0)
+ if g:netrw_fastbrowse > a:islocal
+ call s:NetrwSetSafeSetting("&l:bh","hide")
+ else
+ call s:NetrwSetSafeSetting("&l:bh","delete")
+ endif
+ call s:NetrwSetSafeSetting("&l:cino","")
+ call s:NetrwSetSafeSetting("&l:com","")
+ if &cpo =~ 'a' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'a','','g')) | endif
+ if &cpo =~ 'A' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'A','','g')) | endif
+ setl fo=nroql2
+ " call s:NetrwSetSafeSetting("&go","begmr")
+ if &go =~ '\ca' | call s:NetrwSetSafeSetting("&go",substitute(&go,'\ca','','g')) | endif
+ call s:NetrwSetSafeSetting("&l:hid",0)
+ call s:NetrwSetSafeSetting("&l:im",0)
+ setl isk+=@ isk+=* isk+=/
+ call s:NetrwSetSafeSetting("&l:magic",1)
+ if g:netrw_use_noswf
+ call s:NetrwSetSafeSetting("swf",0)
+ endif
+ call s:NetrwSetSafeSetting("&l:report",10000)
+ call s:NetrwSetSafeSetting("&l:sel","inclusive")
+ call s:NetrwSetSafeSetting("&l:spell",0)
+ call s:NetrwSetSafeSetting("&l:tw",0)
+ call s:NetrwSetSafeSetting("&l:wig","")
+ setl cedit&
+
+ " set up cuc and cul based on g:netrw_cursor and listing style
+ " COMBAK -- cuc cul related
+ call s:NetrwCursor(0)
+
+ " allow the user to override safe options
+" call Decho("ft<".&ft."> ei=".&ei,'~'.expand("<slnum>"))
+ if &ft == "netrw"
+" call Decho("do any netrw FileType autocmds (doau FileType netrw)",'~'.expand("<slnum>"))
+ keepalt NetrwKeepj doau FileType netrw
+ endif
+
+" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist")." bh=".&l:bh." bt<".&bt.">",'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Dret("s:NetrwOptionsSafe")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwOptionsRestore: restore options (based on prior s:NetrwOptionsSave) {{{2
+fun! s:NetrwOptionsRestore(vt)
+" call Dfunc("s:NetrwOptionsRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$"))
+" call Decho("(s:NetrwOptionsRestore) lines=".&lines)
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
+ if !exists("{a:vt}netrw_optionsave")
+" call Decho("case ".a:vt."netrw_optionsave : doesn't exist",'~'.expand("<slnum>"))
+ if !isdirectory(expand('%'))
+" call Decho("..doing filetype detect anyway")
+ filetype detect
+ endif
+" call Decho("..settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
+" call Decho("..ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("s:NetrwOptionsRestore : ".a:vt."netrw_optionsave doesn't exist")
+ return
+ endif
+ unlet {a:vt}netrw_optionsave
+
+ if exists("+acd")
+ if exists("{a:vt}netrw_acdkeep")
+" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd,'~'.expand("<slnum>"))
+ let curdir = getcwd()
+ let &l:acd = {a:vt}netrw_acdkeep
+ unlet {a:vt}netrw_acdkeep
+ if &l:acd
+ call s:NetrwLcd(curdir)
+ endif
+ endif
+ endif
+" call Decho("(s:NetrwOptionsRestore) #1 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_aikeep","&l:ai")
+ call s:NetrwRestoreSetting(a:vt."netrw_awkeep","&l:aw")
+ call s:NetrwRestoreSetting(a:vt."netrw_blkeep","&l:bl")
+ call s:NetrwRestoreSetting(a:vt."netrw_btkeep","&l:bt")
+ call s:NetrwRestoreSetting(a:vt."netrw_bombkeep","&l:bomb")
+" call Decho("(s:NetrwOptionsRestore) #2 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_cedit","&cedit")
+ call s:NetrwRestoreSetting(a:vt."netrw_cikeep","&l:ci")
+ call s:NetrwRestoreSetting(a:vt."netrw_cinkeep","&l:cin")
+ call s:NetrwRestoreSetting(a:vt."netrw_cinokeep","&l:cino")
+ call s:NetrwRestoreSetting(a:vt."netrw_comkeep","&l:com")
+" call Decho("(s:NetrwOptionsRestore) #3 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_cpokeep","&l:cpo")
+ call s:NetrwRestoreSetting(a:vt."netrw_diffkeep","&l:diff")
+ call s:NetrwRestoreSetting(a:vt."netrw_fenkeep","&l:fen")
+ if exists("g:netrw_ffkeep") && g:netrw_ffkeep
+ call s:NetrwRestoreSetting(a:vt."netrw_ffkeep")","&l:ff")
+ endif
+" call Decho("(s:NetrwOptionsRestore) #4 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_fokeep" ,"&l:fo")
+ call s:NetrwRestoreSetting(a:vt."netrw_gdkeep" ,"&l:gd")
+ call s:NetrwRestoreSetting(a:vt."netrw_gokeep" ,"&l:go")
+ call s:NetrwRestoreSetting(a:vt."netrw_hidkeep" ,"&l:hidden")
+" call Decho("(s:NetrwOptionsRestore) #5 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_imkeep" ,"&l:im")
+ call s:NetrwRestoreSetting(a:vt."netrw_iskkeep" ,"&l:isk")
+" call Decho("(s:NetrwOptionsRestore) #6 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_lines" ,"&lines")
+" call Decho("(s:NetrwOptionsRestore) #7 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_lskeep" ,"&l:ls")
+ call s:NetrwRestoreSetting(a:vt."netrw_makeep" ,"&l:ma")
+ call s:NetrwRestoreSetting(a:vt."netrw_magickeep","&l:magic")
+ call s:NetrwRestoreSetting(a:vt."netrw_modkeep" ,"&l:mod")
+ call s:NetrwRestoreSetting(a:vt."netrw_nukeep" ,"&l:nu")
+" call Decho("(s:NetrwOptionsRestore) #8 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_rnukeep" ,"&l:rnu")
+ call s:NetrwRestoreSetting(a:vt."netrw_repkeep" ,"&l:report")
+ call s:NetrwRestoreSetting(a:vt."netrw_rokeep" ,"&l:ro")
+ call s:NetrwRestoreSetting(a:vt."netrw_selkeep" ,"&l:sel")
+" call Decho("(s:NetrwOptionsRestore) #9 lines=".&lines)
+ call s:NetrwRestoreSetting(a:vt."netrw_spellkeep","&l:spell")
+ call s:NetrwRestoreSetting(a:vt."netrw_twkeep" ,"&l:tw")
+ call s:NetrwRestoreSetting(a:vt."netrw_wigkeep" ,"&l:wig")
+ call s:NetrwRestoreSetting(a:vt."netrw_wrapkeep" ,"&l:wrap")
+ call s:NetrwRestoreSetting(a:vt."netrw_writekeep","&l:write")
+" call Decho("(s:NetrwOptionsRestore) #10 lines=".&lines)
+ call s:NetrwRestoreSetting("s:yykeep","@@")
+ " former problem: start with liststyle=0; press <i> : result, following line resets l:ts.
+ " Fixed; in s:PerformListing, when w:netrw_liststyle is s:LONGLIST, will use a printf to pad filename with spaces
+ " rather than by appending a tab which previously was using "&ts" to set the desired spacing. (Sep 28, 2018)
+ call s:NetrwRestoreSetting(a:vt."netrw_tskeep","&l:ts")
+
+ if exists("{a:vt}netrw_swfkeep")
+ if &directory == ""
+ " user hasn't specified a swapfile directory;
+ " netrw will temporarily set the swapfile directory
+ " to the current directory as returned by getcwd().
+ let &l:directory= getcwd()
+ sil! let &l:swf = {a:vt}netrw_swfkeep
+ setl directory=
+ unlet {a:vt}netrw_swfkeep
+ elseif &l:swf != {a:vt}netrw_swfkeep
+ if !g:netrw_use_noswf
+ " following line causes a Press ENTER in windows -- can't seem to work around it!!!
+ sil! let &l:swf= {a:vt}netrw_swfkeep
+ endif
+ unlet {a:vt}netrw_swfkeep
+ endif
+ endif
+ if exists("{a:vt}netrw_dirkeep") && isdirectory(s:NetrwFile({a:vt}netrw_dirkeep)) && g:netrw_keepdir
+ let dirkeep = substitute({a:vt}netrw_dirkeep,'\\','/','g')
+ if exists("{a:vt}netrw_dirkeep")
+ call s:NetrwLcd(dirkeep)
+ unlet {a:vt}netrw_dirkeep
+ endif
+ endif
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("has clipboard",'~'.expand("<slnum>"))
+ call s:NetrwRestoreSetting(a:vt."netrw_starkeep","@*")
+ call s:NetrwRestoreSetting(a:vt."netrw_pluskeep","@+")
+ endif
+ call s:NetrwRestoreSetting(a:vt."netrw_slashkeep","@/")
+
+" call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd,'~'.expand("<slnum>"))
+" call Decho("fo=".&fo.(exists("+acd")? " acd=".&acd : " acd doesn't exist"),'~'.expand("<slnum>"))
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Decho("diff=".&l:diff." win#".winnr()." w:netrw_diffkeep=".(exists("w:netrw_diffkeep")? w:netrw_diffkeep : "doesn't exist"),'~'.expand("<slnum>"))
+" call Decho("ts=".&l:ts,'~'.expand("<slnum>"))
+ " Moved the filetype detect here from NetrwGetFile() because remote files
+ " were having their filetype detect-generated settings overwritten by
+ " NetrwOptionRestore.
+ if &ft != "netrw"
+ if !isdirectory(expand('%'))
+" call Decho("before: filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
+ filetype detect
+" call Decho("after : filetype detect (ft=".&ft.")",'~'.expand("<slnum>"))
+ endif
+ endif
+" call Decho("(s:NetrwOptionsRestore) lines=".&lines)
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>"))
+" call Dret("s:NetrwOptionsRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly)
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSetSafeSetting: sets an option to a safe setting {{{2
+" but only when the options' value and the safe setting differ
+" Doing this means that netrw will not come up as having changed a
+" setting last when it really didn't actually change it.
+"
+" Called from s:NetrwOptionsSafe
+" ex. call s:NetrwSetSafeSetting("&l:sel","inclusive")
+fun! s:NetrwSetSafeSetting(setting,safesetting)
+" call Dfunc("s:NetrwSetSafeSetting(setting<".a:setting."> safesetting<".a:safesetting.">)")
+
+ if a:setting =~ '^&'
+" call Decho("fyi: a:setting starts with &")
+ exe "let settingval= ".a:setting
+" call Decho("fyi: settingval<".settingval.">")
+
+ if settingval != a:safesetting
+" call Decho("set setting<".a:setting."> to option value<".a:safesetting.">")
+ if type(a:safesetting) == 0
+ exe "let ".a:setting."=".a:safesetting
+ elseif type(a:safesetting) == 1
+ exe "let ".a:setting."= '".a:safesetting."'"
+ else
+ call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:setting." with a safesetting of type#".type(a:safesetting),105)
+ endif
+ endif
+ endif
+
+" call Dret("s:NetrwSetSafeSetting")
+endfun
+
+" ------------------------------------------------------------------------
+" s:NetrwRestoreSetting: restores specified setting using associated keepvar, {{{2
+" but only if the setting value differs from the associated keepvar.
+" Doing this means that netrw will not come up as having changed a
+" setting last when it really didn't actually change it.
+"
+" Used by s:NetrwOptionsRestore() to restore each netrw-senstive setting
+" keepvars are set up by s:NetrwOptionsSave
+fun! s:NetrwRestoreSetting(keepvar,setting)
+""" call Dfunc("s:NetrwRestoreSetting(a:keepvar<".a:keepvar."> a:setting<".a:setting.">)")
+
+ " typically called from s:NetrwOptionsRestore
+ " call s:NetrwRestoreSettings(keep-option-variable-name,'associated-option')
+ " ex. call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel")
+ " Restores option (but only if different) from a:keepvar
+ if exists(a:keepvar)
+ exe "let keepvarval= ".a:keepvar
+ exe "let setting= ".a:setting
+
+"" call Decho("fyi: a:keepvar<".a:keepvar."> exists")
+"" call Decho("fyi: keepvarval=".keepvarval)
+"" call Decho("fyi: a:setting<".a:setting."> setting<".setting.">")
+
+ if setting != keepvarval
+"" call Decho("restore setting<".a:setting."> (currently=".setting.") to keepvarval<".keepvarval.">")
+ if type(a:setting) == 0
+ exe "let ".a:setting."= ".keepvarval
+ elseif type(a:setting) == 1
+ exe "let ".a:setting."= '".substitute(keepvarval,"'","''","g")."'"
+ else
+ call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:keepvar." with a setting of type#".type(a:setting),105)
+ endif
+ endif
+
+ exe "unlet ".a:keepvar
+ endif
+
+"" call Dret("s:NetrwRestoreSetting")
+endfun
+
+" ---------------------------------------------------------------------
+" NetrwStatusLine: {{{2
+fun! NetrwStatusLine()
+
+" vvv NetrwStatusLine() debugging vvv
+" let g:stlmsg=""
+" if !exists("w:netrw_explore_bufnr")
+" let g:stlmsg="!X<explore_bufnr>"
+" elseif w:netrw_explore_bufnr != bufnr("%")
+" let g:stlmsg="explore_bufnr!=".bufnr("%")
+" endif
+" if !exists("w:netrw_explore_line")
+" let g:stlmsg=" !X<explore_line>"
+" elseif w:netrw_explore_line != line(".")
+" let g:stlmsg=" explore_line!={line(.)<".line(".").">"
+" endif
+" if !exists("w:netrw_explore_list")
+" let g:stlmsg=" !X<explore_list>"
+" endif
+" ^^^ NetrwStatusLine() debugging ^^^
+
+ if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
+ " restore user's status line
+ let &stl = s:netrw_users_stl
+ let &laststatus = s:netrw_users_ls
+ if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
+ if exists("w:netrw_explore_line") |unlet w:netrw_explore_line |endif
+ return ""
+ else
+ return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen
+ endif
+endfun
+
+" ===============================
+" Netrw Transfer Functions: {{{1
+" ===============================
+
+" ------------------------------------------------------------------------
+" netrw#NetRead: responsible for reading a file over the net {{{2
+" mode: =0 read remote file and insert before current line
+" =1 read remote file and insert after current line
+" =2 replace with remote file
+" =3 obtain file, but leave in temporary format
+fun! netrw#NetRead(mode,...)
+" call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw.((a:0 > 0)? " a:1<".a:1.">" : ""))
+
+ " NetRead: save options {{{3
+ call s:NetrwOptionsSave("w:")
+ call s:NetrwOptionsSafe(0)
+ call s:RestoreCursorline()
+ " NetrwSafeOptions sets a buffer up for a netrw listing, which includes buflisting off.
+ " However, this setting is not wanted for a remote editing session. The buffer should be "nofile", still.
+ setl bl
+" call Decho("buf#".bufnr("%")."<".bufname("%")."> bl=".&bl." bt=".&bt." bh=".&bh,'~'.expand("<slnum>"))
+
+ " NetRead: interpret mode into a readcmd {{{3
+ if a:mode == 0 " read remote file before current line
+ let readcmd = "0r"
+ elseif a:mode == 1 " read file after current line
+ let readcmd = "r"
+ elseif a:mode == 2 " replace with remote file
+ let readcmd = "%r"
+ elseif a:mode == 3 " skip read of file (leave as temporary)
+ let readcmd = "t"
+ else
+ exe a:mode
+ let readcmd = "r"
+ endif
+ let ichoice = (a:0 == 0)? 0 : 1
+" call Decho("readcmd<".readcmd."> ichoice=".ichoice,'~'.expand("<slnum>"))
+
+ " NetRead: get temporary filename {{{3
+ let tmpfile= s:GetTempfile("")
+ if tmpfile == ""
+" call Dret("netrw#NetRead : unable to get a tempfile!")
+ return
+ endif
+
+ while ichoice <= a:0
+
+ " attempt to repeat with previous host-file-etc
+ if exists("b:netrw_lastfile") && a:0 == 0
+" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">",'~'.expand("<slnum>"))
+ let choice = b:netrw_lastfile
+ let ichoice= ichoice + 1
+
+ else
+ exe "let choice= a:" . ichoice
+" call Decho("no lastfile: choice<" . choice . ">",'~'.expand("<slnum>"))
+
+ if match(choice,"?") == 0
+ " give help
+ echomsg 'NetRead Usage:'
+ echomsg ':Nread machine:path uses rcp'
+ echomsg ':Nread "machine path" uses ftp with <.netrc>'
+ echomsg ':Nread "machine id password path" uses ftp'
+ echomsg ':Nread dav://machine[:port]/path uses cadaver'
+ echomsg ':Nread fetch://machine/path uses fetch'
+ echomsg ':Nread ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>'
+ echomsg ':Nread http://[user@]machine/path uses http wget'
+ echomsg ':Nread file:///path uses elinks'
+ echomsg ':Nread https://[user@]machine/path uses http wget'
+ echomsg ':Nread rcp://[user@]machine/path uses rcp'
+ echomsg ':Nread rsync://machine[:port]/path uses rsync'
+ echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp'
+ echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp'
+ sleep 4
+ break
+
+ elseif match(choice,'^"') != -1
+ " Reconstruct Choice if choice starts with '"'
+" call Decho("reconstructing choice",'~'.expand("<slnum>"))
+ if match(choice,'"$') != -1
+ " case "..."
+ let choice= strpart(choice,1,strlen(choice)-2)
+ else
+ " case "... ... ..."
+ let choice = strpart(choice,1,strlen(choice)-1)
+ let wholechoice = ""
+
+ while match(choice,'"$') == -1
+ let wholechoice = wholechoice . " " . choice
+ let ichoice = ichoice + 1
+ if ichoice > a:0
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3)
+ endif
+" call Dret("netrw#NetRead :2 getcwd<".getcwd().">")
+ return
+ endif
+ let choice= a:{ichoice}
+ endwhile
+ let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1)
+ endif
+ endif
+ endif
+
+" call Decho("choice<" . choice . ">",'~'.expand("<slnum>"))
+ let ichoice= ichoice + 1
+
+ " NetRead: Determine method of read (ftp, rcp, etc) {{{3
+ call s:NetrwMethod(choice)
+ if !exists("b:netrw_method") || b:netrw_method < 0
+" call Dret("netrw#NetRead : unsupported method")
+ return
+ endif
+ let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix
+
+ " Check whether or not NetrwBrowse() should be handling this request
+" call Decho("checking if NetrwBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">",'~'.expand("<slnum>"))
+ if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^https\=://'
+" call Decho("yes, choice matches '^.*[\/]$'",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwBrowse(0,choice)
+" call Dret("netrw#NetRead :3 getcwd<".getcwd().">")
+ return
+ endif
+
+ " ============
+ " NetRead: Perform Protocol-Based Read {{{3
+ " ===========================
+ if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
+ echo "(netrw) Processing your read request..."
+ endif
+
+ ".........................................
+ " NetRead: (rcp) NetRead Method #1 {{{3
+ if b:netrw_method == 1 " read with rcp
+" call Decho("read via rcp (method #1)",'~'.expand("<slnum>"))
+ " ER: nothing done with g:netrw_uid yet?
+ " ER: on Win2K" rcp machine[.user]:file tmpfile
+ " ER: when machine contains '.' adding .user is required (use $USERNAME)
+ " ER: the tmpfile is full path: rcp sees C:\... as host C
+ if s:netrw_has_nt_rcp == 1
+ if exists("g:netrw_uid") && ( g:netrw_uid != "" )
+ let uid_machine = g:netrw_machine .'.'. g:netrw_uid
+ else
+ " Any way needed it machine contains a '.'
+ let uid_machine = g:netrw_machine .'.'. $USERNAME
+ endif
+ else
+ if exists("g:netrw_uid") && ( g:netrw_uid != "" )
+ let uid_machine = g:netrw_uid .'@'. g:netrw_machine
+ else
+ let uid_machine = g:netrw_machine
+ endif
+ endif
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".s:ShellEscape(uid_machine.":".b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1))
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (ftp + <.netrc>) NetRead Method #2 {{{3
+ elseif b:netrw_method == 2 " read with ftp + <.netrc>
+" call Decho("read via ftp+.netrc (method #2)",'~'.expand("<slnum>"))
+ let netrw_fname= b:netrw_fname
+ NetrwKeepj call s:SaveBufVars()|new|NetrwKeepj call s:RestoreBufVars()
+ let filtbuf= bufnr("%")
+ setl ff=unix
+ NetrwKeepj put =g:netrw_ftpmode
+" call Decho("filter input: ".getline(line("$")),'~'.expand("<slnum>"))
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline(line("$")),'~'.expand("<slnum>"))
+ endif
+ call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile)
+" call Decho("filter input: ".getline(line("$")),'~'.expand("<slnum>"))
+ if exists("g:netrw_port") && g:netrw_port != ""
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1))
+ else
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1))
+ endif
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
+ let debugkeep = &debug
+ setl debug=msg
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),4)
+ let &debug = debugkeep
+ endif
+ call s:SaveBufVars()
+ keepj bd!
+ if bufname("%") == "" && getline("$") == "" && line('$') == 1
+ " needed when one sources a file in a nolbl setting window via ftp
+ q!
+ endif
+ call s:RestoreBufVars()
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (ftp + machine,id,passwd,filename) NetRead Method #3 {{{3
+ elseif b:netrw_method == 3 " read with ftp + machine, id, passwd, and fname
+ " Construct execution string (four lines) which will be passed through filter
+" call Decho("read via ftp+mipf (method #3)",'~'.expand("<slnum>"))
+ let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
+ NetrwKeepj call s:SaveBufVars()|new|NetrwKeepj call s:RestoreBufVars()
+ let filtbuf= bufnr("%")
+ setl ff=unix
+ if exists("g:netrw_port") && g:netrw_port != ""
+ NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ else
+ NetrwKeepj put ='open '.g:netrw_machine
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ NetrwKeepj put =g:netrw_uid
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ if exists("s:netrw_passwd")
+ NetrwKeepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ elseif exists("s:netrw_passwd")
+ NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+ endif
+
+ if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
+ NetrwKeepj put =g:netrw_ftpmode
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj put ='get \"'.netrw_fname.'\" '.tmpfile
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+
+ " perform ftp:
+ " -i : turns off interactive prompting from ftp
+ " -n unix : DON'T use <.netrc>, even though it exists
+ " -n win32: quit being obnoxious about password
+ NetrwKeepj norm! 1G"_dd
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ if getline(1) !~ "^$"
+" call Decho("error<".getline(1).">",'~'.expand("<slnum>"))
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,getline(1),5)
+ endif
+ endif
+ call s:SaveBufVars()|keepj bd!|call s:RestoreBufVars()
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (scp) NetRead Method #4 {{{3
+ elseif b:netrw_method == 4 " read with scp
+" call Decho("read via scp (method #4)",'~'.expand("<slnum>"))
+ if exists("g:netrw_port") && g:netrw_port != ""
+ let useport= " ".g:netrw_scpport." ".g:netrw_port
+ else
+ let useport= ""
+ endif
+ " 'C' in 'C:\path\to\file' is handled as hostname on windows.
+ " This is workaround to avoid mis-handle windows local-path:
+ if g:netrw_scp_cmd =~ '^scp' && (has("win32") || has("win95") || has("win64") || has("win16"))
+ let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\(\a\):[/\\]\(.*\)$', '/\1/\2', '')
+ else
+ let tmpfile_get = tmpfile
+ endif
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".escape(s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1),' ')." ".s:ShellEscape(tmpfile_get,1))
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (http) NetRead Method #5 (wget) {{{3
+ elseif b:netrw_method == 5
+" call Decho("read via http (method #5)",'~'.expand("<slnum>"))
+ if g:netrw_http_cmd == ""
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6)
+ endif
+" call Dret("netrw#NetRead :4 getcwd<".getcwd().">")
+ return
+ endif
+
+ if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd")
+ " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch)
+" call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)",'~'.expand("<slnum>"))
+ if exists("g:netrw_http_xcmd")
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".s:ShellEscape(tmpfile,1))
+ else
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.b:netrw_fname,1))
+ endif
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+
+ else
+ " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker)
+" call Decho("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)",'~'.expand("<slnum>"))
+ let netrw_html= substitute(b:netrw_fname,"#.*$","","")
+ let netrw_tag = substitute(b:netrw_fname,"^.*#","","")
+" call Decho("netrw_html<".netrw_html.">",'~'.expand("<slnum>"))
+" call Decho("netrw_tag <".netrw_tag.">",'~'.expand("<slnum>"))
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(b:netrw_http."://".g:netrw_machine.netrw_html,1))
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+" call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/','~'.expand("<slnum>"))
+ exe 'NetrwKeepj norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\<CR>"
+ endif
+ let b:netrw_lastfile = choice
+" call Decho("setl ro",'~'.expand("<slnum>"))
+ setl ro nomod
+
+ ".........................................
+ " NetRead: (dav) NetRead Method #6 {{{3
+ elseif b:netrw_method == 6
+" call Decho("read via cadaver (method #6)",'~'.expand("<slnum>"))
+
+ if !executable(g:netrw_dav_cmd)
+ call netrw#ErrorMsg(s:ERROR,g:netrw_dav_cmd." is not executable",73)
+" call Dret("netrw#NetRead : ".g:netrw_dav_cmd." not executable")
+ return
+ endif
+ if g:netrw_dav_cmd =~ "curl"
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_dav_cmd." ".s:ShellEscape("dav://".g:netrw_machine.b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1))
+ else
+ " Construct execution string (four lines) which will be passed through filter
+ let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
+ new
+ setl ff=unix
+ if exists("g:netrw_port") && g:netrw_port != ""
+ NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port
+ else
+ NetrwKeepj put ='open '.g:netrw_machine
+ endif
+ if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
+ NetrwKeepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
+ endif
+ NetrwKeepj put ='get '.netrw_fname.' '.tmpfile
+ NetrwKeepj put ='quit'
+
+ " perform cadaver operation:
+ NetrwKeepj norm! 1G"_dd
+ call s:NetrwExe(s:netrw_silentxfer."%!".g:netrw_dav_cmd)
+ keepj bd!
+ endif
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (rsync) NetRead Method #7 {{{3
+ elseif b:netrw_method == 7
+" call Decho("read via rsync (method #7)",'~'.expand("<slnum>"))
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1)." ".s:ShellEscape(tmpfile,1))
+ let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (fetch) NetRead Method #8 {{{3
+ " fetch://[user@]host[:http]/path
+ elseif b:netrw_method == 8
+" call Decho("read via fetch (method #8)",'~'.expand("<slnum>"))
+ if g:netrw_fetch_cmd == ""
+ if !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"fetch command not available",7)
+ endif
+" call Dret("NetRead")
+ return
+ endif
+ if exists("g:netrw_option") && g:netrw_option =~ ":https\="
+ let netrw_option= "http"
+ else
+ let netrw_option= "ftp"
+ endif
+" call Decho("read via fetch for ".netrw_option,'~'.expand("<slnum>"))
+
+ if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != ""
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1))
+ else
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1))
+ endif
+
+ let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+" call Decho("setl ro",'~'.expand("<slnum>"))
+ setl ro nomod
+
+ ".........................................
+ " NetRead: (sftp) NetRead Method #9 {{{3
+ elseif b:netrw_method == 9
+" call Decho("read via sftp (method #9)",'~'.expand("<slnum>"))
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile)
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: (file) NetRead Method #10 {{{3
+ elseif b:netrw_method == 10 && exists("g:netrw_file_cmd")
+" " call Decho("read via ".b:netrw_file_cmd." (method #10)",'~'.expand("<slnum>"))
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_file_cmd." ".s:ShellEscape(b:netrw_fname,1)." ".tmpfile)
+ let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetRead: Complain {{{3
+ else
+ call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8)
+ endif
+ endwhile
+
+ " NetRead: cleanup {{{3
+ if exists("b:netrw_method")
+" call Decho("cleanup b:netrw_method and b:netrw_fname",'~'.expand("<slnum>"))
+ unlet b:netrw_method
+ unlet b:netrw_fname
+ endif
+ if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' && tmpfile !~ '.tar.xz$' && tmpfile !~ '.txz'
+" call Decho("cleanup by deleting tmpfile<".tmpfile.">",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwDelete(tmpfile)
+ endif
+ NetrwKeepj call s:NetrwOptionsRestore("w:")
+
+" call Dret("netrw#NetRead :5 getcwd<".getcwd().">")
+endfun
+
+" ------------------------------------------------------------------------
+" netrw#NetWrite: responsible for writing a file over the net {{{2
+fun! netrw#NetWrite(...) range
+" call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw)
+
+ " NetWrite: option handling {{{3
+ let mod= 0
+ call s:NetrwOptionsSave("w:")
+ call s:NetrwOptionsSafe(0)
+
+ " NetWrite: Get Temporary Filename {{{3
+ let tmpfile= s:GetTempfile("")
+ if tmpfile == ""
+" call Dret("netrw#NetWrite : unable to get a tempfile!")
+ return
+ endif
+
+ if a:0 == 0
+ let ichoice = 0
+ else
+ let ichoice = 1
+ endif
+
+ let curbufname= expand("%")
+" call Decho("curbufname<".curbufname.">",'~'.expand("<slnum>"))
+ if &binary
+ " For binary writes, always write entire file.
+ " (line numbers don't really make sense for that).
+ " Also supports the writing of tar and zip files.
+" call Decho("(write entire file) sil exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile),'~'.expand("<slnum>"))
+ exe "sil NetrwKeepj w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
+ elseif g:netrw_cygwin
+ " write (selected portion of) file to temporary
+ let cygtmpfile= substitute(tmpfile,g:netrw_cygdrive.'/\(.\)','\1:','')
+" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile),'~'.expand("<slnum>"))
+ exe "sil NetrwKeepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)
+ else
+ " write (selected portion of) file to temporary
+" call Decho("(write selected portion) sil exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile),'~'.expand("<slnum>"))
+ exe "sil NetrwKeepj ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)
+ endif
+
+ if curbufname == ""
+ " when the file is [No Name], and one attempts to Nwrite it, the buffer takes
+ " on the temporary file's name. Deletion of the temporary file during
+ " cleanup then causes an error message.
+ 0file!
+ endif
+
+ " NetWrite: while choice loop: {{{3
+ while ichoice <= a:0
+
+ " Process arguments: {{{4
+ " attempt to repeat with previous host-file-etc
+ if exists("b:netrw_lastfile") && a:0 == 0
+" call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">",'~'.expand("<slnum>"))
+ let choice = b:netrw_lastfile
+ let ichoice= ichoice + 1
+ else
+ exe "let choice= a:" . ichoice
+
+ " Reconstruct Choice when choice starts with '"'
+ if match(choice,"?") == 0
+ echomsg 'NetWrite Usage:"'
+ echomsg ':Nwrite machine:path uses rcp'
+ echomsg ':Nwrite "machine path" uses ftp with <.netrc>'
+ echomsg ':Nwrite "machine id password path" uses ftp'
+ echomsg ':Nwrite dav://[user@]machine/path uses cadaver'
+ echomsg ':Nwrite fetch://[user@]machine/path uses fetch'
+ echomsg ':Nwrite ftp://machine[#port]/path uses ftp (autodetects <.netrc>)'
+ echomsg ':Nwrite rcp://machine/path uses rcp'
+ echomsg ':Nwrite rsync://[user@]machine/path uses rsync'
+ echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp'
+ echomsg ':Nwrite sftp://[user@]machine/path uses sftp'
+ sleep 4
+ break
+
+ elseif match(choice,"^\"") != -1
+ if match(choice,"\"$") != -1
+ " case "..."
+ let choice=strpart(choice,1,strlen(choice)-2)
+ else
+ " case "... ... ..."
+ let choice = strpart(choice,1,strlen(choice)-1)
+ let wholechoice = ""
+
+ while match(choice,"\"$") == -1
+ let wholechoice= wholechoice . " " . choice
+ let ichoice = ichoice + 1
+ if choice > a:0
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13)
+ endif
+" call Dret("netrw#NetWrite")
+ return
+ endif
+ let choice= a:{ichoice}
+ endwhile
+ let choice= strpart(wholechoice,1,strlen(wholechoice)-1) . " " . strpart(choice,0,strlen(choice)-1)
+ endif
+ endif
+ endif
+ let ichoice= ichoice + 1
+" call Decho("choice<" . choice . "> ichoice=".ichoice,'~'.expand("<slnum>"))
+
+ " Determine method of write (ftp, rcp, etc) {{{4
+ NetrwKeepj call s:NetrwMethod(choice)
+ if !exists("b:netrw_method") || b:netrw_method < 0
+" call Dfunc("netrw#NetWrite : unsupported method")
+ return
+ endif
+
+ " =============
+ " NetWrite: Perform Protocol-Based Write {{{3
+ " ============================
+ if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
+ echo "(netrw) Processing your write request..."
+" call Decho("Processing your write request...",'~'.expand("<slnum>"))
+ endif
+
+ ".........................................
+ " NetWrite: (rcp) NetWrite Method #1 {{{3
+ if b:netrw_method == 1
+" call Decho("write via rcp (method #1)",'~'.expand("<slnum>"))
+ if s:netrw_has_nt_rcp == 1
+ if exists("g:netrw_uid") && ( g:netrw_uid != "" )
+ let uid_machine = g:netrw_machine .'.'. g:netrw_uid
+ else
+ let uid_machine = g:netrw_machine .'.'. $USERNAME
+ endif
+ else
+ if exists("g:netrw_uid") && ( g:netrw_uid != "" )
+ let uid_machine = g:netrw_uid .'@'. g:netrw_machine
+ else
+ let uid_machine = g:netrw_machine
+ endif
+ endif
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(uid_machine.":".b:netrw_fname,1))
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetWrite: (ftp + <.netrc>) NetWrite Method #2 {{{3
+ elseif b:netrw_method == 2
+" call Decho("write via ftp+.netrc (method #2)",'~'.expand("<slnum>"))
+ let netrw_fname = b:netrw_fname
+
+ " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead
+ let bhkeep = &l:bh
+ let curbuf = bufnr("%")
+ setl bh=hide
+ keepj keepalt enew
+
+" call Decho("filter input window#".winnr(),'~'.expand("<slnum>"))
+ setl ff=unix
+ NetrwKeepj put =g:netrw_ftpmode
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline("$"),'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"')
+" call Decho("filter input: ".getline("$"),'~'.expand("<slnum>"))
+ if exists("g:netrw_port") && g:netrw_port != ""
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1))
+ else
+" call Decho("filter input window#".winnr(),'~'.expand("<slnum>"))
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1))
+ endif
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ if getline(1) !~ "^$"
+ if !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,getline(1),14)
+ endif
+ let mod=1
+ endif
+
+ " remove enew buffer (quietly)
+ let filtbuf= bufnr("%")
+ exe curbuf."b!"
+ let &l:bh = bhkeep
+ exe filtbuf."bw!"
+
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetWrite: (ftp + machine, id, passwd, filename) NetWrite Method #3 {{{3
+ elseif b:netrw_method == 3
+ " Construct execution string (three or more lines) which will be passed through filter
+" call Decho("read via ftp+mipf (method #3)",'~'.expand("<slnum>"))
+ let netrw_fname = b:netrw_fname
+ let bhkeep = &l:bh
+
+ " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead
+ let curbuf = bufnr("%")
+ setl bh=hide
+ keepj keepalt enew
+ setl ff=unix
+
+ if exists("g:netrw_port") && g:netrw_port != ""
+ NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ else
+ NetrwKeepj put ='open '.g:netrw_machine
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ NetrwKeepj put =g:netrw_uid
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ if exists("s:netrw_passwd") && s:netrw_passwd != ""
+ NetrwKeepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ elseif exists("s:netrw_passwd") && s:netrw_passwd != ""
+ NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+ endif
+ NetrwKeepj put =g:netrw_ftpmode
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline("$"),'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"'
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ " save choice/id/password for future use
+ let b:netrw_lastfile = choice
+
+ " perform ftp:
+ " -i : turns off interactive prompting from ftp
+ " -n unix : DON'T use <.netrc>, even though it exists
+ " -n win32: quit being obnoxious about password
+ NetrwKeepj norm! 1G"_dd
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ if getline(1) !~ "^$"
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,getline(1),15)
+ endif
+ let mod=1
+ endif
+
+ " remove enew buffer (quietly)
+ let filtbuf= bufnr("%")
+ exe curbuf."b!"
+ let &l:bh= bhkeep
+ exe filtbuf."bw!"
+
+ ".........................................
+ " NetWrite: (scp) NetWrite Method #4 {{{3
+ elseif b:netrw_method == 4
+" call Decho("write via scp (method #4)",'~'.expand("<slnum>"))
+ if exists("g:netrw_port") && g:netrw_port != ""
+ let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port)
+ else
+ let useport= ""
+ endif
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.":".b:netrw_fname,1))
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetWrite: (http) NetWrite Method #5 {{{3
+ elseif b:netrw_method == 5
+" call Decho("write via http (method #5)",'~'.expand("<slnum>"))
+ let curl= substitute(g:netrw_http_put_cmd,'\s\+.*$',"","")
+ if executable(curl)
+ let url= g:netrw_choice
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_http_put_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(url,1) )
+ elseif !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"can't write to http using <".g:netrw_http_put_cmd.">".",16)
+ endif
+
+ ".........................................
+ " NetWrite: (dav) NetWrite Method #6 (cadaver) {{{3
+ elseif b:netrw_method == 6
+" call Decho("write via cadaver (method #6)",'~'.expand("<slnum>"))
+
+ " Construct execution string (four lines) which will be passed through filter
+ let netrw_fname = escape(b:netrw_fname,g:netrw_fname_escape)
+ let bhkeep = &l:bh
+
+ " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead
+ let curbuf = bufnr("%")
+ setl bh=hide
+ keepj keepalt enew
+
+ setl ff=unix
+ if exists("g:netrw_port") && g:netrw_port != ""
+ NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port
+ else
+ NetrwKeepj put ='open '.g:netrw_machine
+ endif
+ if exists("g:netrw_uid") && exists("s:netrw_passwd") && g:netrw_uid != ""
+ NetrwKeepj put ='user '.g:netrw_uid.' '.s:netrw_passwd
+ endif
+ NetrwKeepj put ='put '.tmpfile.' '.netrw_fname
+
+ " perform cadaver operation:
+ NetrwKeepj norm! 1G"_dd
+ call s:NetrwExe(s:netrw_silentxfer."%!".g:netrw_dav_cmd)
+
+ " remove enew buffer (quietly)
+ let filtbuf= bufnr("%")
+ exe curbuf."b!"
+ let &l:bh = bhkeep
+ exe filtbuf."bw!"
+
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetWrite: (rsync) NetWrite Method #7 {{{3
+ elseif b:netrw_method == 7
+" call Decho("write via rsync (method #7)",'~'.expand("<slnum>"))
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".s:ShellEscape(tmpfile,1)." ".s:ShellEscape(g:netrw_machine.g:netrw_rsync_sep.b:netrw_fname,1))
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetWrite: (sftp) NetWrite Method #9 {{{3
+ elseif b:netrw_method == 9
+" call Decho("write via sftp (method #9)",'~'.expand("<slnum>"))
+ let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
+ if exists("g:netrw_uid") && ( g:netrw_uid != "" )
+ let uid_machine = g:netrw_uid .'@'. g:netrw_machine
+ else
+ let uid_machine = g:netrw_machine
+ endif
+
+ " formerly just a "new...bd!", that changed the window sizes when equalalways. Using enew workaround instead
+ let bhkeep = &l:bh
+ let curbuf = bufnr("%")
+ setl bh=hide
+ keepj keepalt enew
+
+ setl ff=unix
+ call setline(1,'put "'.escape(tmpfile,'\').'" '.netrw_fname)
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ let sftpcmd= substitute(g:netrw_sftp_cmd,"%TEMPFILE%",escape(tmpfile,'\'),"g")
+ call s:NetrwExe(s:netrw_silentxfer."%!".sftpcmd.' '.s:ShellEscape(uid_machine,1))
+ let filtbuf= bufnr("%")
+ exe curbuf."b!"
+ let &l:bh = bhkeep
+ exe filtbuf."bw!"
+ let b:netrw_lastfile = choice
+
+ ".........................................
+ " NetWrite: Complain {{{3
+ else
+ call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17)
+ let leavemod= 1
+ endif
+ endwhile
+
+ " NetWrite: Cleanup: {{{3
+" call Decho("cleanup",'~'.expand("<slnum>"))
+ if s:FileReadable(tmpfile)
+" call Decho("tmpfile<".tmpfile."> readable, will now delete it",'~'.expand("<slnum>"))
+ call s:NetrwDelete(tmpfile)
+ endif
+ call s:NetrwOptionsRestore("w:")
+
+ if a:firstline == 1 && a:lastline == line("$")
+ " restore modifiability; usually equivalent to set nomod
+ let &mod= mod
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ elseif !exists("leavemod")
+ " indicate that the buffer has not been modified since last written
+" call Decho("set nomod",'~'.expand("<slnum>"))
+ setl nomod
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ endif
+
+" call Dret("netrw#NetWrite")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#NetSource: source a remotely hosted vim script {{{2
+" uses NetRead to get a copy of the file into a temporarily file,
+" then sources that file,
+" then removes that file.
+fun! netrw#NetSource(...)
+" call Dfunc("netrw#NetSource() a:0=".a:0)
+ if a:0 > 0 && a:1 == '?'
+ " give help
+ echomsg 'NetSource Usage:'
+ echomsg ':Nsource dav://machine[:port]/path uses cadaver'
+ echomsg ':Nsource fetch://machine/path uses fetch'
+ echomsg ':Nsource ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>'
+ echomsg ':Nsource http[s]://[user@]machine/path uses http wget'
+ echomsg ':Nsource rcp://[user@]machine/path uses rcp'
+ echomsg ':Nsource rsync://machine[:port]/path uses rsync'
+ echomsg ':Nsource scp://[user@]machine[[:#]port]/path uses scp'
+ echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp'
+ sleep 4
+ else
+ let i= 1
+ while i <= a:0
+ call netrw#NetRead(3,a:{i})
+" call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">",'~'.expand("<slnum>"))
+ if s:FileReadable(s:netrw_tmpfile)
+" call Decho("exe so ".fnameescape(s:netrw_tmpfile),'~'.expand("<slnum>"))
+ exe "so ".fnameescape(s:netrw_tmpfile)
+" call Decho("delete(".s:netrw_tmpfile.")",'~'.expand("<slnum>"))
+ if delete(s:netrw_tmpfile)
+ call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".s:netrw_tmpfile.">!",103)
+ endif
+ unlet s:netrw_tmpfile
+ else
+ call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48)
+ endif
+ let i= i + 1
+ endwhile
+ endif
+" call Dret("netrw#NetSource")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#SetTreetop: resets the tree top to the current directory/specified directory {{{2
+" (implements the :Ntree command)
+fun! netrw#SetTreetop(iscmd,...)
+" call Dfunc("netrw#SetTreetop(iscmd=".a:iscmd." ".((a:0 > 0)? a:1 : "").") a:0=".a:0)
+" call Decho("w:netrw_treetop<".w:netrw_treetop.">")
+
+ " iscmd==0: netrw#SetTreetop called using gn mapping
+ " iscmd==1: netrw#SetTreetop called using :Ntree from the command line
+" call Decho("(iscmd=".a:iscmd.": called using :Ntree from command line",'~'.expand("<slnum>"))
+ " clear out the current tree
+ if exists("w:netrw_treetop")
+" call Decho("clearing out current tree",'~'.expand("<slnum>"))
+ let inittreetop= w:netrw_treetop
+ unlet w:netrw_treetop
+ endif
+ if exists("w:netrw_treedict")
+" call Decho("freeing w:netrw_treedict",'~'.expand("<slnum>"))
+ unlet w:netrw_treedict
+ endif
+" call Decho("inittreetop<".(exists("inittreetop")? inittreetop : "n/a").">")
+
+ if (a:iscmd == 0 || a:1 == "") && exists("inittreetop")
+ let treedir = s:NetrwTreePath(inittreetop)
+" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
+ else
+ if isdirectory(s:NetrwFile(a:1))
+" call Decho("a:1<".a:1."> is a directory",'~'.expand("<slnum>"))
+ let treedir = a:1
+ let s:netrw_treetop = treedir
+ elseif exists("b:netrw_curdir") && (isdirectory(s:NetrwFile(b:netrw_curdir."/".a:1)) || a:1 =~ '^\a\{3,}://')
+ let treedir = b:netrw_curdir."/".a:1
+ let s:netrw_treetop = treedir
+" call Decho("a:1<".a:1."> is NOT a directory, using treedir<".treedir.">",'~'.expand("<slnum>"))
+ else
+ " normally the cursor is left in the message window.
+ " However, here this results in the directory being listed in the message window, which is not wanted.
+ let netrwbuf= bufnr("%")
+ call netrw#ErrorMsg(s:ERROR,"sorry, ".a:1." doesn't seem to be a directory!",95)
+ exe bufwinnr(netrwbuf)."wincmd w"
+ let treedir = "."
+ let s:netrw_treetop = getcwd()
+ endif
+ endif
+" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
+
+ " determine if treedir is remote or local
+ let islocal= expand("%") !~ '^\a\{3,}://'
+" call Decho("islocal=".islocal,'~'.expand("<slnum>"))
+
+ " browse the resulting directory
+ if islocal
+ call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(islocal,treedir))
+ else
+ call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,treedir))
+ endif
+
+" call Dret("netrw#SetTreetop")
+endfun
+
+" ===========================================
+" s:NetrwGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
+" readcmd == %r : replace buffer with newly read file
+" == 0r : read file at top of buffer
+" == r : read file after current line
+" == t : leave file in temporary form (ie. don't read into buffer)
+fun! s:NetrwGetFile(readcmd, tfile, method)
+" call Dfunc("NetrwGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
+
+ " readcmd=='t': simply do nothing
+ if a:readcmd == 't'
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("NetrwGetFile : skip read of tfile<".a:tfile.">")
+ return
+ endif
+
+ " get name of remote filename (ie. url and all)
+ let rfile= bufname("%")
+" call Decho("rfile<".rfile.">",'~'.expand("<slnum>"))
+
+ if exists("*NetReadFixup")
+ " for the use of NetReadFixup (not otherwise used internally)
+ let line2= line("$")
+ endif
+
+ if a:readcmd[0] == '%'
+ " get file into buffer
+" call Decho("get file into buffer",'~'.expand("<slnum>"))
+
+ " rename the current buffer to the temp file (ie. tfile)
+ if g:netrw_cygwin
+ let tfile= substitute(a:tfile,g:netrw_cygdrive.'/\(.\)','\1:','')
+ else
+ let tfile= a:tfile
+ endif
+ call s:NetrwBufRename(tfile)
+
+ " edit temporary file (ie. read the temporary file in)
+ if rfile =~ '\.zip$'
+" call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)",'~'.expand("<slnum>"))
+ call zip#Browse(tfile)
+ elseif rfile =~ '\.tar$'
+" call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)",'~'.expand("<slnum>"))
+ call tar#Browse(tfile)
+ elseif rfile =~ '\.tar\.gz$'
+" call Decho("handling remote gzip-compressed tar file",'~'.expand("<slnum>"))
+ call tar#Browse(tfile)
+ elseif rfile =~ '\.tar\.bz2$'
+" call Decho("handling remote bz2-compressed tar file",'~'.expand("<slnum>"))
+ call tar#Browse(tfile)
+ elseif rfile =~ '\.tar\.xz$'
+" call Decho("handling remote xz-compressed tar file",'~'.expand("<slnum>"))
+ call tar#Browse(tfile)
+ elseif rfile =~ '\.txz$'
+" call Decho("handling remote xz-compressed tar file (.txz)",'~'.expand("<slnum>"))
+ call tar#Browse(tfile)
+ else
+" call Decho("edit temporary file",'~'.expand("<slnum>"))
+ NetrwKeepj e!
+ endif
+
+ " rename buffer back to remote filename
+ call s:NetrwBufRename(rfile)
+
+ " Detect filetype of local version of remote file.
+ " Note that isk must not include a "/" for scripts.vim
+ " to process this detection correctly.
+" call Decho("detect filetype of local version of remote file",'~'.expand("<slnum>"))
+ let iskkeep= &l:isk
+ setl isk-=/
+ let &l:isk= iskkeep
+" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)")
+ let line1 = 1
+ let line2 = line("$")
+
+ elseif !&ma
+ " attempting to read a file after the current line in the file, but the buffer is not modifiable
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"attempt to read<".a:tfile."> into a non-modifiable buffer!",94)
+" call Dret("NetrwGetFile : attempt to read<".a:tfile."> into a non-modifiable buffer!")
+ return
+
+ elseif s:FileReadable(a:tfile)
+ " read file after current line
+" call Decho("read file<".a:tfile."> after current line",'~'.expand("<slnum>"))
+ let curline = line(".")
+ let lastline= line("$")
+" call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline,'~'.expand("<slnum>"))
+ exe "NetrwKeepj ".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)
+ let line1= curline + 1
+ let line2= line("$") - lastline + 1
+
+ else
+ " not readable
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Decho("tfile<".a:tfile."> not readable",'~'.expand("<slnum>"))
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9)
+" call Dret("NetrwGetFile : tfile<".a:tfile."> not readable")
+ return
+ endif
+
+ " User-provided (ie. optional) fix-it-up command
+ if exists("*NetReadFixup")
+" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")",'~'.expand("<slnum>"))
+ NetrwKeepj call NetReadFixup(a:method, line1, line2)
+" else " Decho
+" call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")",'~'.expand("<slnum>"))
+ endif
+
+ if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
+ " update the Buffers menu
+ NetrwKeepj call s:UpdateBuffersMenu()
+ endif
+
+" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile),'~'.expand("<slnum>"))
+
+ " make sure file is being displayed
+" redraw!
+
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("NetrwGetFile")
+endfun
+
+" ------------------------------------------------------------------------
+" s:NetrwMethod: determine method of transfer {{{2
+" Input:
+" choice = url [protocol:]//[userid@]hostname[:port]/[path-to-file]
+" Output:
+" b:netrw_method= 1: rcp
+" 2: ftp + <.netrc>
+" 3: ftp + machine, id, password, and [path]filename
+" 4: scp
+" 5: http[s] (wget)
+" 6: dav
+" 7: rsync
+" 8: fetch
+" 9: sftp
+" 10: file
+" g:netrw_machine= hostname
+" b:netrw_fname = filename
+" g:netrw_port = optional port number (for ftp)
+" g:netrw_choice = copy of input url (choice)
+fun! s:NetrwMethod(choice)
+" call Dfunc("s:NetrwMethod(a:choice<".a:choice.">)")
+
+ " sanity check: choice should have at least three slashes in it
+ if strlen(substitute(a:choice,'[^/]','','g')) < 3
+ call netrw#ErrorMsg(s:ERROR,"not a netrw-style url; netrw uses protocol://[user@]hostname[:port]/[path])",78)
+ let b:netrw_method = -1
+" call Dret("s:NetrwMethod : incorrect url format<".a:choice.">")
+ return
+ endif
+
+ " record current g:netrw_machine, if any
+ " curmachine used if protocol == ftp and no .netrc
+ if exists("g:netrw_machine")
+ let curmachine= g:netrw_machine
+" call Decho("curmachine<".curmachine.">",'~'.expand("<slnum>"))
+ else
+ let curmachine= "N O T A HOST"
+ endif
+ if exists("g:netrw_port")
+ let netrw_port= g:netrw_port
+ endif
+
+ " insure that netrw_ftp_cmd starts off every method determination
+ " with the current g:netrw_ftp_cmd
+ let s:netrw_ftp_cmd= g:netrw_ftp_cmd
+
+ " initialization
+ let b:netrw_method = 0
+ let g:netrw_machine = ""
+ let b:netrw_fname = ""
+ let g:netrw_port = ""
+ let g:netrw_choice = a:choice
+
+ " Patterns:
+ " mipf : a:machine a:id password filename Use ftp
+ " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
+ " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid s:netrw_passwd
+ " rcpurm : rcp://[user@]host/filename Use rcp
+ " rcphf : [user@]host:filename Use rcp
+ " scpurm : scp://[user@]host[[#:]port]/filename Use scp
+ " httpurm : http[s]://[user@]host/filename Use wget
+ " davurm : dav[s]://host[:port]/path Use cadaver/curl
+ " rsyncurm : rsync://host[:port]/path Use rsync
+ " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http)
+ " sftpurm : sftp://[user@]host/filename Use scp
+ " fileurm : file://[user@]host/filename Use elinks or links
+ let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$'
+ let mf = '^\(\S\+\)\s\+\(\S\+\)$'
+ let ftpurm = '^ftp://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
+ let rcpurm = '^rcp://\%(\([^/]*\)@\)\=\([^/]\{-}\)/\(.*\)$'
+ let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$'
+ let scpurm = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$'
+ let httpurm = '^https\=://\([^/]\{-}\)\(/.*\)\=$'
+ let davurm = '^davs\=://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$'
+ let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$'
+ let fetchurm = '^fetch://\(\([^/]*\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$'
+ let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$'
+ let fileurm = '^file\=://\(.*\)$'
+
+" call Decho("determine method:",'~'.expand("<slnum>"))
+ " Determine Method
+ " Method#1: rcp://user@hostname/...path-to-file {{{3
+ if match(a:choice,rcpurm) == 0
+" call Decho("rcp://...",'~'.expand("<slnum>"))
+ let b:netrw_method = 1
+ let userid = substitute(a:choice,rcpurm,'\1',"")
+ let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"")
+ let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"")
+ if userid != ""
+ let g:netrw_uid= userid
+ endif
+
+ " Method#4: scp://user@hostname/...path-to-file {{{3
+ elseif match(a:choice,scpurm) == 0
+" call Decho("scp://...",'~'.expand("<slnum>"))
+ let b:netrw_method = 4
+ let g:netrw_machine = substitute(a:choice,scpurm,'\1',"")
+ let g:netrw_port = substitute(a:choice,scpurm,'\2',"")
+ let b:netrw_fname = substitute(a:choice,scpurm,'\3',"")
+
+ " Method#5: http[s]://user@hostname/...path-to-file {{{3
+ elseif match(a:choice,httpurm) == 0
+" call Decho("http[s]://...",'~'.expand("<slnum>"))
+ let b:netrw_method = 5
+ let g:netrw_machine= substitute(a:choice,httpurm,'\1',"")
+ let b:netrw_fname = substitute(a:choice,httpurm,'\2',"")
+ let b:netrw_http = (a:choice =~ '^https:')? "https" : "http"
+
+ " Method#6: dav://hostname[:port]/..path-to-file.. {{{3
+ elseif match(a:choice,davurm) == 0
+" call Decho("dav://...",'~'.expand("<slnum>"))
+ let b:netrw_method= 6
+ if a:choice =~ 'davs:'
+ let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"")
+ else
+ let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"")
+ endif
+ let b:netrw_fname = substitute(a:choice,davurm,'\3',"")
+
+ " Method#7: rsync://user@hostname/...path-to-file {{{3
+ elseif match(a:choice,rsyncurm) == 0
+" call Decho("rsync://...",'~'.expand("<slnum>"))
+ let b:netrw_method = 7
+ let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"")
+ let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"")
+
+ " Methods 2,3: ftp://[user@]hostname[[:#]port]/...path-to-file {{{3
+ elseif match(a:choice,ftpurm) == 0
+" call Decho("ftp://...",'~'.expand("<slnum>"))
+ let userid = substitute(a:choice,ftpurm,'\2',"")
+ let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"")
+ let g:netrw_port = substitute(a:choice,ftpurm,'\4',"")
+ let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"")
+" call Decho("g:netrw_machine<".g:netrw_machine.">",'~'.expand("<slnum>"))
+ if userid != ""
+ let g:netrw_uid= userid
+ endif
+
+ if curmachine != g:netrw_machine
+ if exists("s:netrw_hup[".g:netrw_machine."]")
+ call NetUserPass("ftp:".g:netrw_machine)
+ elseif exists("s:netrw_passwd")
+ " if there's a change in hostname, require password re-entry
+ unlet s:netrw_passwd
+ endif
+ if exists("netrw_port")
+ unlet netrw_port
+ endif
+ endif
+
+ if exists("g:netrw_uid") && exists("s:netrw_passwd")
+ let b:netrw_method = 3
+ else
+ let host= substitute(g:netrw_machine,'\..*$','','')
+ if exists("s:netrw_hup[host]")
+ call NetUserPass("ftp:".host)
+
+ elseif (has("win32") || has("win95") || has("win64") || has("win16")) && s:netrw_ftp_cmd =~# '-[sS]:'
+" call Decho("has -s: : s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
+" call Decho(" g:netrw_ftp_cmd<".g:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
+ if g:netrw_ftp_cmd =~# '-[sS]:\S*MACHINE\>'
+ let s:netrw_ftp_cmd= substitute(g:netrw_ftp_cmd,'\<MACHINE\>',g:netrw_machine,'')
+" call Decho("s:netrw_ftp_cmd<".s:netrw_ftp_cmd.">",'~'.expand("<slnum>"))
+ endif
+ let b:netrw_method= 2
+ elseif s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc
+" call Decho("using <".expand("$HOME/.netrc")."> (readable)",'~'.expand("<slnum>"))
+ let b:netrw_method= 2
+ else
+ if !exists("g:netrw_uid") || g:netrw_uid == ""
+ call NetUserPass()
+ elseif !exists("s:netrw_passwd") || s:netrw_passwd == ""
+ call NetUserPass(g:netrw_uid)
+ " else just use current g:netrw_uid and s:netrw_passwd
+ endif
+ let b:netrw_method= 3
+ endif
+ endif
+
+ " Method#8: fetch {{{3
+ elseif match(a:choice,fetchurm) == 0
+" call Decho("fetch://...",'~'.expand("<slnum>"))
+ let b:netrw_method = 8
+ let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"")
+ let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"")
+ let b:netrw_option = substitute(a:choice,fetchurm,'\4',"")
+ let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"")
+
+ " Method#3: Issue an ftp : "machine id password [path/]filename" {{{3
+ elseif match(a:choice,mipf) == 0
+" call Decho("(ftp) host id pass file",'~'.expand("<slnum>"))
+ let b:netrw_method = 3
+ let g:netrw_machine = substitute(a:choice,mipf,'\1',"")
+ let g:netrw_uid = substitute(a:choice,mipf,'\2',"")
+ let s:netrw_passwd = substitute(a:choice,mipf,'\3',"")
+ let b:netrw_fname = substitute(a:choice,mipf,'\4',"")
+ call NetUserPass(g:netrw_machine,g:netrw_uid,s:netrw_passwd)
+
+ " Method#3: Issue an ftp: "hostname [path/]filename" {{{3
+ elseif match(a:choice,mf) == 0
+" call Decho("(ftp) host file",'~'.expand("<slnum>"))
+ if exists("g:netrw_uid") && exists("s:netrw_passwd")
+ let b:netrw_method = 3
+ let g:netrw_machine = substitute(a:choice,mf,'\1',"")
+ let b:netrw_fname = substitute(a:choice,mf,'\2',"")
+
+ elseif s:FileReadable(expand("$HOME/.netrc"))
+ let b:netrw_method = 2
+ let g:netrw_machine = substitute(a:choice,mf,'\1',"")
+ let b:netrw_fname = substitute(a:choice,mf,'\2',"")
+ endif
+
+ " Method#9: sftp://user@hostname/...path-to-file {{{3
+ elseif match(a:choice,sftpurm) == 0
+" call Decho("sftp://...",'~'.expand("<slnum>"))
+ let b:netrw_method = 9
+ let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"")
+ let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"")
+
+ " Method#1: Issue an rcp: hostname:filename" (this one should be last) {{{3
+ elseif match(a:choice,rcphf) == 0
+" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">",'~'.expand("<slnum>"))
+ let b:netrw_method = 1
+ let userid = substitute(a:choice,rcphf,'\2',"")
+ let g:netrw_machine = substitute(a:choice,rcphf,'\3',"")
+ let b:netrw_fname = substitute(a:choice,rcphf,'\4',"")
+" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">",'~'.expand("<slnum>"))
+" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">",'~'.expand("<slnum>"))
+" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">",'~'.expand("<slnum>"))
+" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">",'~'.expand("<slnum>"))
+ if userid != ""
+ let g:netrw_uid= userid
+ endif
+
+ " Method#10: file://user@hostname/...path-to-file {{{3
+ elseif match(a:choice,fileurm) == 0 && exists("g:netrw_file_cmd")
+" call Decho("http[s]://...",'~'.expand("<slnum>"))
+ let b:netrw_method = 10
+ let b:netrw_fname = substitute(a:choice,fileurm,'\1',"")
+" call Decho('\1<'.substitute(a:choice,fileurm,'\1',"").">",'~'.expand("<slnum>"))
+
+ " Cannot Determine Method {{{3
+ else
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:WARNING,"cannot determine method (format: protocol://[user@]hostname[:port]/[path])",45)
+ endif
+ let b:netrw_method = -1
+ endif
+ "}}}3
+
+ if g:netrw_port != ""
+ " remove any leading [:#] from port number
+ let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','')
+ elseif exists("netrw_port")
+ " retain port number as implicit for subsequent ftp operations
+ let g:netrw_port= netrw_port
+ endif
+
+" call Decho("a:choice <".a:choice.">",'~'.expand("<slnum>"))
+" call Decho("b:netrw_method <".b:netrw_method.">",'~'.expand("<slnum>"))
+" call Decho("g:netrw_machine<".g:netrw_machine.">",'~'.expand("<slnum>"))
+" call Decho("g:netrw_port <".g:netrw_port.">",'~'.expand("<slnum>"))
+" if exists("g:netrw_uid") "Decho
+" call Decho("g:netrw_uid <".g:netrw_uid.">",'~'.expand("<slnum>"))
+" endif "Decho
+" if exists("s:netrw_passwd") "Decho
+" call Decho("s:netrw_passwd <".s:netrw_passwd.">",'~'.expand("<slnum>"))
+" endif "Decho
+" call Decho("b:netrw_fname <".b:netrw_fname.">",'~'.expand("<slnum>"))
+" call Dret("s:NetrwMethod : b:netrw_method=".b:netrw_method." g:netrw_port=".g:netrw_port)
+endfun
+
+" ------------------------------------------------------------------------
+" NetReadFixup: this sort of function is typically written by the user {{{2
+" to handle extra junk that their system's ftp dumps
+" into the transfer. This function is provided as an
+" example and as a fix for a Windows 95 problem: in my
+" experience, win95's ftp always dumped four blank lines
+" at the end of the transfer.
+if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
+ fun! NetReadFixup(method, line1, line2)
+" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
+
+ " sanity checks -- attempt to convert inputs to integers
+ let method = a:method + 0
+ let line1 = a:line1 + 0
+ let line2 = a:line2 + 0
+ if type(method) != 0 || type(line1) != 0 || type(line2) != 0 || method < 0 || line1 <= 0 || line2 <= 0
+" call Dret("NetReadFixup")
+ return
+ endif
+
+ if method == 3 " ftp (no <.netrc>)
+ let fourblanklines= line2 - 3
+ if fourblanklines >= line1
+ exe "sil NetrwKeepj ".fourblanklines.",".line2."g/^\s*$/d"
+ call histdel("/",-1)
+ endif
+ endif
+
+" call Dret("NetReadFixup")
+ endfun
+endif
+
+" ---------------------------------------------------------------------
+" NetUserPass: set username and password for subsequent ftp transfer {{{2
+" Usage: :call NetUserPass() -- will prompt for userid and password
+" :call NetUserPass("uid") -- will prompt for password
+" :call NetUserPass("uid","password") -- sets global userid and password
+" :call NetUserPass("ftp:host") -- looks up userid and password using hup dictionary
+" :call NetUserPass("host","uid","password") -- sets hup dictionary with host, userid, password
+fun! NetUserPass(...)
+
+" call Dfunc("NetUserPass() a:0=".a:0)
+
+ if !exists('s:netrw_hup')
+ let s:netrw_hup= {}
+ endif
+
+ if a:0 == 0
+ " case: no input arguments
+
+ " change host and username if not previously entered; get new password
+ if !exists("g:netrw_machine")
+ let g:netrw_machine= input('Enter hostname: ')
+ endif
+ if !exists("g:netrw_uid") || g:netrw_uid == ""
+ " get username (user-id) via prompt
+ let g:netrw_uid= input('Enter username: ')
+ endif
+ " get password via prompting
+ let s:netrw_passwd= inputsecret("Enter Password: ")
+
+ " set up hup database
+ let host = substitute(g:netrw_machine,'\..*$','','')
+ if !exists('s:netrw_hup[host]')
+ let s:netrw_hup[host]= {}
+ endif
+ let s:netrw_hup[host].uid = g:netrw_uid
+ let s:netrw_hup[host].passwd = s:netrw_passwd
+
+ elseif a:0 == 1
+ " case: one input argument
+
+ if a:1 =~ '^ftp:'
+ " get host from ftp:... url
+ " access userid and password from hup (host-user-passwd) dictionary
+" call Decho("case a:0=1: a:1<".a:1."> (get host from ftp:... url)",'~'.expand("<slnum>"))
+ let host = substitute(a:1,'^ftp:','','')
+ let host = substitute(host,'\..*','','')
+ if exists("s:netrw_hup[host]")
+ let g:netrw_uid = s:netrw_hup[host].uid
+ let s:netrw_passwd = s:netrw_hup[host].passwd
+" call Decho("get s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">",'~'.expand("<slnum>"))
+" call Decho("get s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">",'~'.expand("<slnum>"))
+ else
+ let g:netrw_uid = input("Enter UserId: ")
+ let s:netrw_passwd = inputsecret("Enter Password: ")
+ endif
+
+ else
+ " case: one input argument, not an url. Using it as a new user-id.
+" call Decho("case a:0=1: a:1<".a:1."> (get host from input argument, not an url)",'~'.expand("<slnum>"))
+ if exists("g:netrw_machine")
+ if g:netrw_machine =~ '[0-9.]\+'
+ let host= g:netrw_machine
+ else
+ let host= substitute(g:netrw_machine,'\..*$','','')
+ endif
+ else
+ let g:netrw_machine= input('Enter hostname: ')
+ endif
+ let g:netrw_uid = a:1
+" call Decho("set g:netrw_uid= <".g:netrw_uid.">",'~'.expand("<slnum>"))
+ if exists("g:netrw_passwd")
+ " ask for password if one not previously entered
+ let s:netrw_passwd= g:netrw_passwd
+ else
+ let s:netrw_passwd = inputsecret("Enter Password: ")
+ endif
+ endif
+
+" call Decho("host<".host.">",'~'.expand("<slnum>"))
+ if exists("host")
+ if !exists('s:netrw_hup[host]')
+ let s:netrw_hup[host]= {}
+ endif
+ let s:netrw_hup[host].uid = g:netrw_uid
+ let s:netrw_hup[host].passwd = s:netrw_passwd
+ endif
+
+ elseif a:0 == 2
+ let g:netrw_uid = a:1
+ let s:netrw_passwd = a:2
+
+ elseif a:0 == 3
+ " enter hostname, user-id, and password into the hup dictionary
+ let host = substitute(a:1,'^\a\+:','','')
+ let host = substitute(host,'\..*$','','')
+ if !exists('s:netrw_hup[host]')
+ let s:netrw_hup[host]= {}
+ endif
+ let s:netrw_hup[host].uid = a:2
+ let s:netrw_hup[host].passwd = a:3
+ let g:netrw_uid = s:netrw_hup[host].uid
+ let s:netrw_passwd = s:netrw_hup[host].passwd
+" call Decho("set s:netrw_hup[".host."].uid <".s:netrw_hup[host].uid.">",'~'.expand("<slnum>"))
+" call Decho("set s:netrw_hup[".host."].passwd<".s:netrw_hup[host].passwd.">",'~'.expand("<slnum>"))
+ endif
+
+" call Dret("NetUserPass : uid<".g:netrw_uid."> passwd<".s:netrw_passwd.">")
+endfun
+
+" =================================
+" Shared Browsing Support: {{{1
+" =================================
+
+" ---------------------------------------------------------------------
+" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2
+fun! s:ExplorePatHls(pattern)
+" call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)")
+ let repat= substitute(a:pattern,'^**/\{1,2}','','')
+" call Decho("repat<".repat.">",'~'.expand("<slnum>"))
+ let repat= escape(repat,'][.\')
+" call Decho("repat<".repat.">",'~'.expand("<slnum>"))
+ let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>'
+" call Dret("s:ExplorePatHls repat<".repat.">")
+ return repat
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBookHistHandler: {{{2
+" 0: (user: <mb>) bookmark current directory
+" 1: (user: <gb>) change to the bookmarked directory
+" 2: (user: <qb>) list bookmarks
+" 3: (browsing) records current directory history
+" 4: (user: <u>) go up (previous) directory, using history
+" 5: (user: <U>) go down (next) directory, using history
+" 6: (user: <mB>) delete bookmark
+fun! s:NetrwBookHistHandler(chg,curdir)
+" call Dfunc("s:NetrwBookHistHandler(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." histcnt=".g:netrw_dirhistcnt." histmax=".g:netrw_dirhistmax)
+ if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
+" " call Dret("s:NetrwBookHistHandler - suppressed due to g:netrw_dirhistmax")
+ return
+ endif
+
+ let ykeep = @@
+ let curbufnr = bufnr("%")
+
+ if a:chg == 0
+ " bookmark the current directory
+" call Decho("(user: <b>) bookmark the current directory",'~'.expand("<slnum>"))
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ call s:NetrwBookmark(0)
+ echo "bookmarked marked files"
+ else
+ call s:MakeBookmark(a:curdir)
+ echo "bookmarked the current directory"
+ endif
+
+ elseif a:chg == 1
+ " change to the bookmarked directory
+" call Decho("(user: <".v:count."gb>) change to the bookmarked directory",'~'.expand("<slnum>"))
+ if exists("g:netrw_bookmarklist[v:count-1]")
+" call Decho("(user: <".v:count."gb>) bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("<slnum>"))
+ exe "NetrwKeepj e ".fnameescape(g:netrw_bookmarklist[v:count-1])
+ else
+ echomsg "Sorry, bookmark#".v:count." doesn't exist!"
+ endif
+
+ elseif a:chg == 2
+" redraw!
+ let didwork= 0
+ " list user's bookmarks
+" call Decho("(user: <q>) list user's bookmarks",'~'.expand("<slnum>"))
+ if exists("g:netrw_bookmarklist")
+" call Decho('list '.len(g:netrw_bookmarklist).' bookmarks','~'.expand("<slnum>"))
+ let cnt= 1
+ for bmd in g:netrw_bookmarklist
+" call Decho("Netrw Bookmark#".cnt.": ".g:netrw_bookmarklist[cnt-1],'~'.expand("<slnum>"))
+ echo printf("Netrw Bookmark#%-2d: %s",cnt,g:netrw_bookmarklist[cnt-1])
+ let didwork = 1
+ let cnt = cnt + 1
+ endfor
+ endif
+
+ " list directory history
+ " Note: history is saved only when PerformListing is done;
+ " ie. when netrw can re-use a netrw buffer, the current directory is not saved in the history.
+ let cnt = g:netrw_dirhistcnt
+ let first = 1
+ let histcnt = 0
+ if g:netrw_dirhistmax > 0
+ while ( first || cnt != g:netrw_dirhistcnt )
+" call Decho("first=".first." cnt=".cnt." dirhistcnt=".g:netrw_dirhistcnt,'~'.expand("<slnum>"))
+ if exists("g:netrw_dirhist_{cnt}")
+" call Decho("Netrw History#".histcnt.": ".g:netrw_dirhist_{cnt},'~'.expand("<slnum>"))
+ echo printf("Netrw History#%-2d: %s",histcnt,g:netrw_dirhist_{cnt})
+ let didwork= 1
+ endif
+ let histcnt = histcnt + 1
+ let first = 0
+ let cnt = ( cnt - 1 ) % g:netrw_dirhistmax
+ if cnt < 0
+ let cnt= cnt + g:netrw_dirhistmax
+ endif
+ endwhile
+ else
+ let g:netrw_dirhistcnt= 0
+ endif
+ if didwork
+ call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+ endif
+
+ elseif a:chg == 3
+ " saves most recently visited directories (when they differ)
+" call Decho("(browsing) record curdir history",'~'.expand("<slnum>"))
+ if !exists("g:netrw_dirhistcnt") || !exists("g:netrw_dirhist_{g:netrw_dirhistcnt}") || g:netrw_dirhist_{g:netrw_dirhistcnt} != a:curdir
+ if g:netrw_dirhistmax > 0
+ let g:netrw_dirhistcnt = ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax
+ let g:netrw_dirhist_{g:netrw_dirhistcnt} = a:curdir
+ endif
+" call Decho("save dirhist#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("<slnum>"))
+ endif
+
+ elseif a:chg == 4
+ " u: change to the previous directory stored on the history list
+" call Decho("(user: <u>) chg to prev dir from history",'~'.expand("<slnum>"))
+ if g:netrw_dirhistmax > 0
+ let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - v:count1 ) % g:netrw_dirhistmax
+ if g:netrw_dirhistcnt < 0
+ let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax
+ endif
+ else
+ let g:netrw_dirhistcnt= 0
+ endif
+ if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}")
+" call Decho("changedir u#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("<slnum>"))
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
+ setl ma noro
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+ sil! NetrwKeepj %d _
+ setl nomod
+" call Decho("setl nomod",'~'.expand("<slnum>"))
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ endif
+" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("<slnum>"))
+ exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt})
+ else
+ if g:netrw_dirhistmax > 0
+ let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + v:count1 ) % g:netrw_dirhistmax
+ else
+ let g:netrw_dirhistcnt= 0
+ endif
+ echo "Sorry, no predecessor directory exists yet"
+ endif
+
+ elseif a:chg == 5
+ " U: change to the subsequent directory stored on the history list
+" call Decho("(user: <U>) chg to next dir from history",'~'.expand("<slnum>"))
+ if g:netrw_dirhistmax > 0
+ let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt + 1 ) % g:netrw_dirhistmax
+ if exists("g:netrw_dirhist_{g:netrw_dirhistcnt}")
+" call Decho("changedir U#".g:netrw_dirhistcnt."<".g:netrw_dirhist_{g:netrw_dirhistcnt}.">",'~'.expand("<slnum>"))
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+ setl ma noro
+ sil! NetrwKeepj %d _
+" call Decho("removed all lines from buffer (%d)",'~'.expand("<slnum>"))
+" call Decho("setl nomod",'~'.expand("<slnum>"))
+ setl nomod
+" call Decho("(set nomod) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ endif
+" call Decho("exe e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt}),'~'.expand("<slnum>"))
+ exe "NetrwKeepj e! ".fnameescape(g:netrw_dirhist_{g:netrw_dirhistcnt})
+ else
+ let g:netrw_dirhistcnt= ( g:netrw_dirhistcnt - 1 ) % g:netrw_dirhistmax
+ if g:netrw_dirhistcnt < 0
+ let g:netrw_dirhistcnt= g:netrw_dirhistcnt + g:netrw_dirhistmax
+ endif
+ echo "Sorry, no successor directory exists yet"
+ endif
+ else
+ let g:netrw_dirhistcnt= 0
+ echo "Sorry, no successor directory exists yet (g:netrw_dirhistmax is ".g:netrw_dirhistmax.")"
+ endif
+
+ elseif a:chg == 6
+" call Decho("(user: <mB>) delete bookmark'd directory",'~'.expand("<slnum>"))
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ call s:NetrwBookmark(1)
+ echo "removed marked files from bookmarks"
+ else
+ " delete the v:count'th bookmark
+ let iremove = v:count
+ let dremove = g:netrw_bookmarklist[iremove - 1]
+" call Decho("delete bookmark#".iremove."<".g:netrw_bookmarklist[iremove - 1].">",'~'.expand("<slnum>"))
+ call s:MergeBookmarks()
+" call Decho("remove g:netrw_bookmarklist[".(iremove-1)."]<".g:netrw_bookmarklist[(iremove-1)].">",'~'.expand("<slnum>"))
+ NetrwKeepj call remove(g:netrw_bookmarklist,iremove-1)
+ echo "removed ".dremove." from g:netrw_bookmarklist"
+" call Decho("g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("<slnum>"))
+ endif
+" call Decho("resulting g:netrw_bookmarklist=".string(g:netrw_bookmarklist),'~'.expand("<slnum>"))
+ endif
+ call s:NetrwBookmarkMenu()
+ call s:NetrwTgtMenu()
+ let @@= ykeep
+" call Dret("s:NetrwBookHistHandler")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBookHistRead: this function reads bookmarks and history {{{2
+" Will source the history file (.netrwhist) only if the g:netrw_disthistmax is > 0.
+" Sister function: s:NetrwBookHistSave()
+fun! s:NetrwBookHistRead()
+" call Dfunc("s:NetrwBookHistRead()")
+ if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
+" call Dret("s:NetrwBookHistRead - nothing read (suppressed due to dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a").")")
+ return
+ endif
+ let ykeep= @@
+
+ " read bookmarks
+ if !exists("s:netrw_initbookhist")
+ let home = s:NetrwHome()
+ let savefile= home."/.netrwbook"
+ if filereadable(s:NetrwFile(savefile))
+" call Decho("sourcing .netrwbook",'~'.expand("<slnum>"))
+ exe "keepalt NetrwKeepj so ".savefile
+ endif
+
+ " read history
+ if g:netrw_dirhistmax > 0
+ let savefile= home."/.netrwhist"
+ if filereadable(s:NetrwFile(savefile))
+" call Decho("sourcing .netrwhist",'~'.expand("<slnum>"))
+ exe "keepalt NetrwKeepj so ".savefile
+ endif
+ let s:netrw_initbookhist= 1
+ au VimLeave * call s:NetrwBookHistSave()
+ endif
+ endif
+
+ let @@= ykeep
+" call Decho("dirhistmax=".(exists("g:netrw_dirhistmax")? g:netrw_dirhistmax : "n/a"),'~'.expand("<slnum>"))
+" call Decho("dirhistcnt=".(exists("g:netrw_dirhistcnt")? g:netrw_dirhistcnt : "n/a"),'~'.expand("<slnum>"))
+" call Dret("s:NetrwBookHistRead")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBookHistSave: this function saves bookmarks and history to files {{{2
+" Sister function: s:NetrwBookHistRead()
+" I used to do this via viminfo but that appears to
+" be unreliable for long-term storage
+" If g:netrw_dirhistmax is <= 0, no history or bookmarks
+" will be saved.
+" (s:NetrwBookHistHandler(3,...) used to record history)
+fun! s:NetrwBookHistSave()
+" call Dfunc("s:NetrwBookHistSave() dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt)
+ if !exists("g:netrw_dirhistmax") || g:netrw_dirhistmax <= 0
+" call Dret("s:NetrwBookHistSave : nothing saved (dirhistmax=".g:netrw_dirhistmax.")")
+ return
+ endif
+
+ let savefile= s:NetrwHome()."/.netrwhist"
+" call Decho("savefile<".savefile.">",'~'.expand("<slnum>"))
+ 1split
+
+ " setting up a new buffer which will become .netrwhist
+ call s:NetrwEnew()
+" call Decho("case g:netrw_use_noswf=".g:netrw_use_noswf.(exists("+acd")? " +acd" : " -acd"),'~'.expand("<slnum>"))
+ if g:netrw_use_noswf
+ setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000 noswf
+ else
+ setl cino= com= cpo-=a cpo-=A fo=nroql2 tw=0 report=10000
+ endif
+ setl nocin noai noci magic nospell nohid wig= noaw
+ setl ma noro write
+ if exists("+acd") | setl noacd | endif
+ sil! NetrwKeepj keepalt %d _
+
+ " rename enew'd file: .netrwhist -- no attempt to merge
+ " record dirhistmax and current dirhistcnt
+ " save history
+" call Decho("saving history: dirhistmax=".g:netrw_dirhistmax." dirhistcnt=".g:netrw_dirhistcnt." lastline=".line("$"),'~'.expand("<slnum>"))
+ sil! keepalt file .netrwhist
+ call setline(1,"let g:netrw_dirhistmax =".g:netrw_dirhistmax)
+ call setline(2,"let g:netrw_dirhistcnt =".g:netrw_dirhistcnt)
+ if g:netrw_dirhistmax > 0
+ let lastline = line("$")
+ let cnt = g:netrw_dirhistcnt
+ let first = 1
+ while ( first || cnt != g:netrw_dirhistcnt )
+ let lastline= lastline + 1
+ if exists("g:netrw_dirhist_{cnt}")
+ call setline(lastline,'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'")
+" call Decho("..".lastline.'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'",'~'.expand("<slnum>"))
+ endif
+ let first = 0
+ let cnt = ( cnt - 1 ) % g:netrw_dirhistmax
+ if cnt < 0
+ let cnt= cnt + g:netrw_dirhistmax
+ endif
+ endwhile
+ exe "sil! w! ".savefile
+" call Decho("exe sil! w! ".savefile,'~'.expand("<slnum>"))
+ endif
+
+ " save bookmarks
+ sil NetrwKeepj %d _
+ if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != []
+" call Decho("saving bookmarks",'~'.expand("<slnum>"))
+ " merge and write .netrwbook
+ let savefile= s:NetrwHome()."/.netrwbook"
+
+ if filereadable(s:NetrwFile(savefile))
+ let booklist= deepcopy(g:netrw_bookmarklist)
+ exe "sil NetrwKeepj keepalt so ".savefile
+ for bdm in booklist
+ if index(g:netrw_bookmarklist,bdm) == -1
+ call add(g:netrw_bookmarklist,bdm)
+ endif
+ endfor
+ call sort(g:netrw_bookmarklist)
+ endif
+
+ " construct and save .netrwbook
+ call setline(1,"let g:netrw_bookmarklist= ".string(g:netrw_bookmarklist))
+ exe "sil! w! ".savefile
+" call Decho("exe sil! w! ".savefile,'~'.expand("<slnum>"))
+ endif
+
+ " cleanup -- remove buffer used to construct history
+ let bgone= bufnr("%")
+ q!
+ exe "keepalt ".bgone."bwipe!"
+
+" call Dret("s:NetrwBookHistSave")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBrowse: This function uses the command in g:netrw_list_cmd to provide a {{{2
+" list of the contents of a local or remote directory. It is assumed that the
+" g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted
+" with the requested remote hostname first.
+" Often called via: Explore/e dirname/etc -> netrw#LocalBrowseCheck() -> s:NetrwBrowse()
+fun! s:NetrwBrowse(islocal,dirname)
+ if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
+" call Dfunc("s:NetrwBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")."<".bufname("%")."> win#".winnr())
+" call Decho("fyi: modified=".&modified." modifiable=".&modifiable." readonly=".&readonly,'~'.expand("<slnum>"))
+" call Decho("fyi: tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Dredir("ls!","s:NetrwBrowse")
+
+ " save alternate-file's filename if w:netrw_rexlocal doesn't exist
+ " This is useful when one edits a local file, then :e ., then :Rex
+ if a:islocal && !exists("w:netrw_rexfile") && bufname("#") != ""
+ let w:netrw_rexfile= bufname("#")
+" call Decho("setting w:netrw_rexfile<".w:netrw_rexfile."> win#".winnr(),'~'.expand("<slnum>"))
+ endif
+
+ " s:NetrwBrowse : initialize history {{{3
+ if !exists("s:netrw_initbookhist")
+ NetrwKeepj call s:NetrwBookHistRead()
+ endif
+
+ " s:NetrwBrowse : simplify the dirname (especially for ".."s in dirnames) {{{3
+ if a:dirname !~ '^\a\{3,}://'
+ let dirname= simplify(a:dirname)
+" call Decho("simplified dirname<".dirname.">")
+ else
+ let dirname= a:dirname
+ endif
+
+ " repoint t:netrw_lexbufnr if appropriate
+ if exists("t:netrw_lexbufnr") && bufnr("%") == t:netrw_lexbufnr
+" call Decho("set repointlexbufnr to true!")
+ let repointlexbufnr= 1
+ endif
+
+ " s:NetrwBrowse : sanity checks: {{{3
+ if exists("s:netrw_skipbrowse")
+ unlet s:netrw_skipbrowse
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." filename<".expand("%")."> win#".winnr()." ft<".&ft.">",'~'.expand("<slnum>"))
+" call Dret("s:NetrwBrowse : s:netrw_skipbrowse existed")
+ return
+ endif
+ if !exists("*shellescape")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing shellescape()",69)
+" call Dret("s:NetrwBrowse : missing shellescape()")
+ return
+ endif
+ if !exists("*fnameescape")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw can't run -- your vim is missing fnameescape()",70)
+" call Dret("s:NetrwBrowse : missing fnameescape()")
+ return
+ endif
+
+ " s:NetrwBrowse : save options: {{{3
+ call s:NetrwOptionsSave("w:")
+
+ " s:NetrwBrowse : re-instate any marked files {{{3
+ if has("syntax") && exists("g:syntax_on") && g:syntax_on
+ if exists("s:netrwmarkfilelist_{bufnr('%')}")
+" call Decho("clearing marked files",'~'.expand("<slnum>"))
+ exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
+ endif
+ endif
+
+ if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep
+ " s:NetrwBrowse : set up "safe" options for local directory/file {{{3
+" call Decho("handle w:netrw_acdkeep:",'~'.expand("<slnum>"))
+" call Decho("NetrwKeepj lcd ".fnameescape(dirname)." (due to w:netrw_acdkeep=".w:netrw_acdkeep." - acd=".&acd.")",'~'.expand("<slnum>"))
+ if s:NetrwLcd(dirname)
+" call Dret("s:NetrwBrowse : lcd failure")
+ return
+ endif
+ " call s:NetrwOptionsSafe() " tst952 failed with this enabled.
+" call Decho("getcwd<".getcwd().">",'~'.expand("<slnum>"))
+
+ elseif !a:islocal && dirname !~ '[\/]$' && dirname !~ '^"'
+ " s:NetrwBrowse : remote regular file handler {{{3
+" call Decho("handle remote regular file: dirname<".dirname.">",'~'.expand("<slnum>"))
+ if bufname(dirname) != ""
+" call Decho("edit buf#".bufname(dirname)." in win#".winnr(),'~'.expand("<slnum>"))
+ exe "NetrwKeepj b ".bufname(dirname)
+ else
+ " attempt transfer of remote regular file
+" call Decho("attempt transfer as regular file<".dirname.">",'~'.expand("<slnum>"))
+
+ " remove any filetype indicator from end of dirname, except for the
+ " "this is a directory" indicator (/).
+ " There shouldn't be one of those here, anyway.
+ let path= substitute(dirname,'[*=@|]\r\=$','','e')
+" call Decho("new path<".path.">",'~'.expand("<slnum>"))
+ call s:RemotePathAnalysis(dirname)
+
+ " s:NetrwBrowse : remote-read the requested file into current buffer {{{3
+ call s:NetrwEnew(dirname)
+ call s:NetrwOptionsSafe(a:islocal)
+ setl ma noro
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+ let b:netrw_curdir = dirname
+ let url = s:method."://".((s:user == "")? "" : s:user."@").s:machine.(s:port ? ":".s:port : "")."/".s:path
+ call s:NetrwBufRename(url)
+ exe "sil! NetrwKeepj keepalt doau BufReadPre ".fnameescape(s:fname)
+ sil call netrw#NetRead(2,url)
+ " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error
+" call Decho("url<".url.">",'~'.expand("<slnum>"))
+" call Decho("s:path<".s:path.">",'~'.expand("<slnum>"))
+" call Decho("s:fname<".s:fname.">",'~'.expand("<slnum>"))
+ if s:path =~ '.bz2'
+ exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.bz2$','',''))
+ elseif s:path =~ '.gz'
+ exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.gz$','',''))
+ elseif s:path =~ '.gz'
+ exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(substitute(s:fname,'\.txz$','',''))
+ else
+ exe "sil NetrwKeepj keepalt doau BufReadPost ".fnameescape(s:fname)
+ endif
+ endif
+
+ " s:NetrwBrowse : save certain window-oriented variables into buffer-oriented variables {{{3
+ call s:SetBufWinVars()
+ call s:NetrwOptionsRestore("w:")
+" call Decho("setl ma nomod",'~'.expand("<slnum>"))
+ setl ma nomod noro
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+
+" call Dret("s:NetrwBrowse : file<".s:fname.">")
+ return
+ endif
+
+ " use buffer-oriented WinVars if buffer variables exist but associated window variables don't {{{3
+ call s:UseBufWinVars()
+
+ " set up some variables {{{3
+ let b:netrw_browser_active = 1
+ let dirname = dirname
+ let s:last_sort_by = g:netrw_sort_by
+
+ " set up menu {{{3
+ NetrwKeepj call s:NetrwMenu(1)
+
+ " get/set-up buffer {{{3
+" call Decho("saving position across a buffer refresh",'~'.expand("<slnum>"))
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let reusing= s:NetrwGetBuffer(a:islocal,dirname)
+
+ " maintain markfile highlighting
+ if has("syntax") && exists("g:syntax_on") && g:syntax_on
+ if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
+" " call Decho("bufnr(%)=".bufnr('%'),'~'.expand("<slnum>"))
+" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("<slnum>"))
+ exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
+ else
+" " call Decho("2match none",'~'.expand("<slnum>"))
+ 2match none
+ endif
+ endif
+ if reusing && line("$") > 1
+ call s:NetrwOptionsRestore("w:")
+" call Decho("setl noma nomod nowrap",'~'.expand("<slnum>"))
+ setl noma nomod nowrap
+" call Decho("(set noma nomod nowrap) ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("s:NetrwBrowse : re-using not-cleared buffer")
+ return
+ endif
+
+ " set b:netrw_curdir to the new directory name {{{3
+" call Decho("set b:netrw_curdir to the new directory name<".dirname."> (buf#".bufnr("%").")",'~'.expand("<slnum>"))
+ let b:netrw_curdir= dirname
+ if b:netrw_curdir =~ '[/\\]$'
+ let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e')
+ endif
+ if b:netrw_curdir =~ '\a:$' && (has("win32") || has("win95") || has("win64") || has("win16"))
+ let b:netrw_curdir= b:netrw_curdir."/"
+ endif
+ if b:netrw_curdir == ''
+ if has("amiga")
+ " On the Amiga, the empty string connotes the current directory
+ let b:netrw_curdir= getcwd()
+ else
+ " under unix, when the root directory is encountered, the result
+ " from the preceding substitute is an empty string.
+ let b:netrw_curdir= '/'
+ endif
+ endif
+ if !a:islocal && b:netrw_curdir !~ '/$'
+ let b:netrw_curdir= b:netrw_curdir.'/'
+ endif
+" call Decho("b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("<slnum>"))
+
+ " ------------
+ " (local only) {{{3
+ " ------------
+ if a:islocal
+" call Decho("local only:",'~'.expand("<slnum>"))
+
+ " Set up ShellCmdPost handling. Append current buffer to browselist
+ call s:LocalFastBrowser()
+
+ " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3
+ if !g:netrw_keepdir
+" call Decho("handle g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd,'~'.expand("<slnum>"))
+" call Decho("l:acd".(exists("&l:acd")? "=".&l:acd : " doesn't exist"),'~'.expand("<slnum>"))
+ if !exists("&l:acd") || !&l:acd
+ if s:NetrwLcd(b:netrw_curdir)
+" call Dret("s:NetrwBrowse : lcd failure")
+ return
+ endif
+ endif
+ endif
+
+ " --------------------------------
+ " remote handling: {{{3
+ " --------------------------------
+ else
+" call Decho("remote only:",'~'.expand("<slnum>"))
+
+ " analyze dirname and g:netrw_list_cmd {{{3
+" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> dirname<".dirname.">",'~'.expand("<slnum>"))
+ if dirname =~# "^NetrwTreeListing\>"
+ let dirname= b:netrw_curdir
+" call Decho("(dirname was <NetrwTreeListing>) dirname<".dirname.">",'~'.expand("<slnum>"))
+ elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")
+ let dirname= substitute(b:netrw_curdir,'\\','/','g')
+ if dirname !~ '/$'
+ let dirname= dirname.'/'
+ endif
+ let b:netrw_curdir = dirname
+" call Decho("(liststyle is TREELIST) dirname<".dirname.">",'~'.expand("<slnum>"))
+ else
+ let dirname = substitute(dirname,'\\','/','g')
+" call Decho("(normal) dirname<".dirname.">",'~'.expand("<slnum>"))
+ endif
+
+ let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
+ if dirname !~ dirpat
+ if !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20)
+ endif
+ NetrwKeepj call s:NetrwOptionsRestore("w:")
+" call Decho("setl noma nomod nowrap",'~'.expand("<slnum>"))
+ setl noma nomod nowrap
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">")
+ return
+ endif
+ let b:netrw_curdir= dirname
+" call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)",'~'.expand("<slnum>"))
+ endif " (additional remote handling)
+
+ " -------------------------------
+ " Perform Directory Listing: {{{3
+ " -------------------------------
+ NetrwKeepj call s:NetrwMaps(a:islocal)
+ NetrwKeepj call s:NetrwCommands(a:islocal)
+ NetrwKeepj call s:PerformListing(a:islocal)
+
+ " restore option(s)
+ call s:NetrwOptionsRestore("w:")
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+
+ " If there is a rexposn: restore position with rexposn
+ " Otherwise : set rexposn
+ if exists("s:rexposn_".bufnr("%"))
+" call Decho("restoring posn to s:rexposn_".bufnr('%')."<".string(s:rexposn_{bufnr('%')}).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(s:rexposn_{bufnr('%')})
+ if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt
+ NetrwKeepj exe w:netrw_bannercnt
+ endif
+ else
+ NetrwKeepj call s:SetRexDir(a:islocal,b:netrw_curdir)
+ endif
+ if v:version >= 700 && has("balloon_eval") && &beval == 0 && &l:bexpr == "" && !exists("g:netrw_nobeval")
+ let &l:bexpr= "netrw#BalloonHelp()"
+" call Decho("set up balloon help: l:bexpr=".&l:bexpr,'~'.expand("<slnum>"))
+ setl beval
+ endif
+
+ " repoint t:netrw_lexbufnr if appropriate
+ if exists("repointlexbufnr")
+ let t:netrw_lexbufnr= bufnr("%")
+" call Decho("repoint t:netrw_lexbufnr to #".t:netrw_lexbufnr)
+ endif
+
+ " restore position
+ if reusing
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+ endif
+
+ " The s:LocalBrowseRefresh() function is called by an autocmd
+ " installed by s:LocalFastBrowser() when g:netrw_fastbrowse <= 1 (ie. slow or medium speed).
+ " However, s:NetrwBrowse() causes the FocusGained event to fire the first time.
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("s:NetrwBrowse : did PerformListing ft<".&ft.">")
+ return
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwFile: because of g:netrw_keepdir, isdirectory(), type(), etc may or {{{2
+" may not apply correctly; ie. netrw's idea of the current directory may
+" differ from vim's. This function insures that netrw's idea of the current
+" directory is used.
+" Returns a path to the file specified by a:fname
+fun! s:NetrwFile(fname)
+" "" call Dfunc("s:NetrwFile(fname<".a:fname.">) win#".winnr())
+" "" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("<slnum>"))
+" "" call Decho("g:netrw_cygwin =".(exists("g:netrw_cygwin")? g:netrw_cygwin : 'n/a'),'~'.expand("<slnum>"))
+" "" call Decho("g:netrw_liststyle=".(exists("g:netrw_liststyle")? g:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
+" "" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
+
+ " clean up any leading treedepthstring
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ let fname= substitute(a:fname,'^'.s:treedepthstring.'\+','','')
+" "" call Decho("clean up any leading treedepthstring: fname<".fname.">",'~'.expand("<slnum>"))
+ else
+ let fname= a:fname
+ endif
+
+ if g:netrw_keepdir
+ " vim's idea of the current directory possibly may differ from netrw's
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+ endif
+
+ if !exists("g:netrw_cygwin") && (has("win32") || has("win95") || has("win64") || has("win16"))
+ if fname =~ '^\' || fname =~ '^\a:\'
+ " windows, but full path given
+ let ret= fname
+" "" call Decho("windows+full path: isdirectory(".fname.")",'~'.expand("<slnum>"))
+ else
+ " windows, relative path given
+ let ret= s:ComposePath(b:netrw_curdir,fname)
+" "" call Decho("windows+rltv path: isdirectory(".fname.")",'~'.expand("<slnum>"))
+ endif
+
+ elseif fname =~ '^/'
+ " not windows, full path given
+ let ret= fname
+" "" call Decho("unix+full path: isdirectory(".fname.")",'~'.expand("<slnum>"))
+ else
+ " not windows, relative path given
+ let ret= s:ComposePath(b:netrw_curdir,fname)
+" "" call Decho("unix+rltv path: isdirectory(".fname.")",'~'.expand("<slnum>"))
+ endif
+ else
+ " vim and netrw agree on the current directory
+ let ret= fname
+" "" call Decho("vim and netrw agree on current directory (g:netrw_keepdir=".g:netrw_keepdir.")",'~'.expand("<slnum>"))
+" "" call Decho("vim directory: ".getcwd(),'~'.expand("<slnum>"))
+" "" call Decho("netrw directory: ".(exists("b:netrw_curdir")? b:netrw_curdir : 'n/a'),'~'.expand("<slnum>"))
+ endif
+
+" "" call Dret("s:NetrwFile ".ret)
+ return ret
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwFileInfo: supports qf (query for file information) {{{2
+fun! s:NetrwFileInfo(islocal,fname)
+" call Dfunc("s:NetrwFileInfo(islocal=".a:islocal." fname<".a:fname.">) b:netrw_curdir<".b:netrw_curdir.">")
+ let ykeep= @@
+ if a:islocal
+ let lsopt= "-lsad"
+ if g:netrw_sizestyle =~# 'H'
+ let lsopt= "-lsadh"
+ elseif g:netrw_sizestyle =~# 'h'
+ let lsopt= "-lsadh --si"
+ endif
+" call Decho("(s:NetrwFileInfo) lsopt<".lsopt.">")
+ if (has("unix") || has("macunix")) && executable("/bin/ls")
+
+ if getline(".") == "../"
+ echo system("/bin/ls ".lsopt." ".s:ShellEscape(".."))
+" call Decho("#1: echo system(/bin/ls -lsad ".s:ShellEscape(..).")",'~'.expand("<slnum>"))
+
+ elseif w:netrw_liststyle == s:TREELIST && getline(".") !~ '^'.s:treedepthstring
+ echo system("/bin/ls ".lsopt." ".s:ShellEscape(b:netrw_curdir))
+" call Decho("#2: echo system(/bin/ls -lsad ".s:ShellEscape(b:netrw_curdir).")",'~'.expand("<slnum>"))
+
+ elseif exists("b:netrw_curdir")
+ echo system("/bin/ls ".lsopt." ".s:ShellEscape(s:ComposePath(b:netrw_curdir,a:fname)))
+" call Decho("#3: echo system(/bin/ls -lsad ".s:ShellEscape(b:netrw_curdir.a:fname).")",'~'.expand("<slnum>"))
+
+ else
+" call Decho('using ls '.a:fname." using cwd<".getcwd().">",'~'.expand("<slnum>"))
+ echo system("/bin/ls ".lsopt." ".s:ShellEscape(s:NetrwFile(a:fname)))
+" call Decho("#5: echo system(/bin/ls -lsad ".s:ShellEscape(a:fname).")",'~'.expand("<slnum>"))
+ endif
+ else
+ " use vim functions to return information about file below cursor
+" call Decho("using vim functions to query for file info",'~'.expand("<slnum>"))
+ if !isdirectory(s:NetrwFile(a:fname)) && !filereadable(s:NetrwFile(a:fname)) && a:fname =~ '[*@/]'
+ let fname= substitute(a:fname,".$","","")
+ else
+ let fname= a:fname
+ endif
+ let t = getftime(s:NetrwFile(fname))
+ let sz = getfsize(s:NetrwFile(fname))
+ if g:netrw_sizestyle =~# "[hH]"
+ let sz= s:NetrwHumanReadable(sz)
+ endif
+ echo a:fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(s:NetrwFile(fname)))
+" call Decho("fname.": ".sz." ".strftime(g:netrw_timefmt,getftime(fname)),'~'.expand("<slnum>"))
+ endif
+ else
+ echo "sorry, \"qf\" not supported yet for remote files"
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwFileInfo")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwFullPath: returns the full path to a directory and/or file {{{2
+fun! s:NetrwFullPath(filename)
+" " call Dfunc("s:NetrwFullPath(filename<".a:filename.">)")
+ let filename= a:filename
+ if filename !~ '^/'
+ let filename= resolve(getcwd().'/'.filename)
+ endif
+ if filename != "/" && filename =~ '/$'
+ let filename= substitute(filename,'/$','','')
+ endif
+" " call Dret("s:NetrwFullPath <".filename.">")
+ return filename
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwGetBuffer: [get a new|find an old netrw] buffer for a netrw listing {{{2
+" returns 0=cleared buffer
+" 1=re-used buffer (buffer not cleared)
+" Nov 09, 2020: tst952 shows that when user does :set hidden that NetrwGetBuffer will come up with a [No Name] buffer (hid fix)
+fun! s:NetrwGetBuffer(islocal,dirname)
+" call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle)
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." hid=".&hid,'~'.expand("<slnum>"))
+" call Decho("netrwbuf dictionary=".(exists("s:netrwbuf")? string(s:netrwbuf) : 'n/a'),'~'.expand("<slnum>"))
+" call Dredir("ls!","s:NetrwGetBuffer")
+ let dirname= a:dirname
+
+ " re-use buffer if possible {{{3
+" call Decho("--re-use a buffer if possible--",'~'.expand("<slnum>"))
+ if !exists("s:netrwbuf")
+" call Decho(" s:netrwbuf initialized to {}",'~'.expand("<slnum>"))
+ let s:netrwbuf= {}
+ endif
+" call Decho(" s:netrwbuf =".string(s:netrwbuf),'~'.expand("<slnum>"))
+" call Decho(" w:netrw_liststyle =".(exists("w:netrw_liststyle")? w:netrw_liststyle : "n/a"),'~'.expand("<slnum>"))
+
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ let bufnum = -1
+
+ if !empty(s:netrwbuf) && has_key(s:netrwbuf,s:NetrwFullPath(dirname))
+ if has_key(s:netrwbuf,"NetrwTreeListing")
+ let bufnum= s:netrwbuf["NetrwTreeListing"]
+ else
+ let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)]
+ endif
+" call Decho(" NetrwTreeListing: bufnum#".bufnum,'~'.expand("<slnum>"))
+ if !bufexists(bufnum)
+ call remove(s:netrwbuf,"NetrwTreeListing"])
+ let bufnum= -1
+ endif
+ elseif bufnr("NetrwTreeListing") != -1
+ let bufnum= bufnr("NetrwTreeListing")
+" call Decho(" NetrwTreeListing".": bufnum#".bufnum,'~'.expand("<slnum>"))
+ else
+" call Decho(" did not find a NetrwTreeListing buffer",'~'.expand("<slnum>"))
+ let bufnum= -1
+ endif
+
+ elseif has_key(s:netrwbuf,s:NetrwFullPath(dirname))
+ let bufnum= s:netrwbuf[s:NetrwFullPath(dirname)]
+" call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnum,'~'.expand("<slnum>"))
+ if !bufexists(bufnum)
+ call remove(s:netrwbuf,s:NetrwFullPath(dirname))
+ let bufnum= -1
+ endif
+
+ else
+" call Decho(" lookup netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."] not a key",'~'.expand("<slnum>"))
+ let bufnum= -1
+ endif
+" call Decho(" bufnum#".bufnum,'~'.expand("<slnum>"))
+
+ " hijack the current buffer
+ " IF the buffer already has the desired name
+ " AND it is empty
+ let curbuf = bufname("%")
+ if curbuf == '.'
+ let curbuf = getcwd()
+ endif
+" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)")
+" call Decho("deciding if netrw may hijack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("<slnum>"))
+" call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("<slnum>"))
+" call Decho("..curbuf<".curbuf.">",'~'.expand("<slnum>"))
+" call Decho("..line($)=".line("$")." AND this is 1",'~'.expand("<slnum>"))
+" call Decho("..getline(%)<".getline("%")."> AND this line is empty",'~'.expand("<slnum>"))
+ if dirname == curbuf && line("$") == 1 && getline("%") == ""
+" call Dret("s:NetrwGetBuffer 0<cleared buffer> : highjacking buffer#".bufnr("%"))
+ return 0
+ else " DEBUG
+" call Decho("..did NOT hijack buffer",'~'.expand("<slnum>"))
+ endif
+ " Aug 14, 2021: was thinking about looking for a [No Name] buffer here and using it, but that might cause problems
+
+ " get enew buffer and name it -or- re-use buffer {{{3
+ if bufnum < 0 " get enew buffer and name it
+" call Decho("--get enew buffer and name it (bufnum#".bufnum."<0 OR bufexists(".bufnum.")=".bufexists(bufnum)."==0)",'~'.expand("<slnum>"))
+ call s:NetrwEnew(dirname)
+" call Decho(" got enew buffer#".bufnr("%")." (altbuf<".expand("#").">)",'~'.expand("<slnum>"))
+ " name the buffer
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ " Got enew buffer; transform into a NetrwTreeListing
+" call Decho("--transform enew buffer#".bufnr("%")." into a NetrwTreeListing --",'~'.expand("<slnum>"))
+ let w:netrw_treebufnr = bufnr("%")
+ call s:NetrwBufRename("NetrwTreeListing")
+ if g:netrw_use_noswf
+ setl nobl bt=nofile noswf
+ else
+ setl nobl bt=nofile
+ endif
+ nnoremap <silent> <buffer> [[ :sil call <SID>TreeListMove('[[')<cr>
+ nnoremap <silent> <buffer> ]] :sil call <SID>TreeListMove(']]')<cr>
+ nnoremap <silent> <buffer> [] :sil call <SID>TreeListMove('[]')<cr>
+ nnoremap <silent> <buffer> ][ :sil call <SID>TreeListMove('][')<cr>
+" call Decho(" tree listing bufnr=".w:netrw_treebufnr,'~'.expand("<slnum>"))
+ else
+ call s:NetrwBufRename(dirname)
+ " enter the new buffer into the s:netrwbuf dictionary
+ let s:netrwbuf[s:NetrwFullPath(dirname)]= bufnr("%")
+" call Decho("update netrwbuf dictionary: s:netrwbuf[".s:NetrwFullPath(dirname)."]=".bufnr("%"),'~'.expand("<slnum>"))
+" call Decho("netrwbuf dictionary=".string(s:netrwbuf),'~'.expand("<slnum>"))
+ endif
+" call Decho(" named enew buffer#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
+
+ else " Re-use the buffer
+" call Decho("--re-use buffer#".bufnum." (bufnum#".bufnum.">=0 AND bufexists(".bufnum.")=".bufexists(bufnum)."!=0)",'~'.expand("<slnum>"))
+ let eikeep= &ei
+ setl ei=all
+ if getline(2) =~# '^" Netrw Directory Listing'
+" call Decho(" getline(2)<".getline(2).'> matches "Netrw Directory Listing" : using keepalt b '.bufnum,'~'.expand("<slnum>"))
+ exe "sil! NetrwKeepj noswapfile keepalt b ".bufnum
+ else
+" call Decho(" getline(2)<".getline(2).'> does not match "Netrw Directory Listing" : using b '.bufnum,'~'.expand("<slnum>"))
+ exe "sil! NetrwKeepj noswapfile keepalt b ".bufnum
+ endif
+" call Decho(" line($)=".line("$"),'~'.expand("<slnum>"))
+ if bufname("%") == '.'
+ call s:NetrwBufRename(getcwd())
+ endif
+ let &ei= eikeep
+
+ if line("$") <= 1 && getline(1) == ""
+ " empty buffer
+ NetrwKeepj call s:NetrwListSettings(a:islocal)
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Dret("s:NetrwGetBuffer 0<buffer empty> : re-using buffer#".bufnr("%").", but its empty, so refresh it")
+ return 0
+
+ elseif g:netrw_fastbrowse == 0 || (a:islocal && g:netrw_fastbrowse == 1)
+" call Decho("g:netrw_fastbrowse=".g:netrw_fastbrowse." a:islocal=".a:islocal.": clear buffer",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwListSettings(a:islocal)
+ sil NetrwKeepj %d _
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but refreshing due to g:netrw_fastbrowse=".g:netrw_fastbrowse)
+ return 0
+
+ elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+" call Decho("--re-use tree listing--",'~'.expand("<slnum>"))
+" call Decho(" clear buffer<".expand("%")."> with :%d",'~'.expand("<slnum>"))
+ setl ma
+ sil NetrwKeepj %d _
+ NetrwKeepj call s:NetrwListSettings(a:islocal)
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Dret("s:NetrwGetBuffer 0<cleared buffer> : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh")
+ return 0
+
+ else
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Dret("s:NetrwGetBuffer 1<buffer not cleared>")
+ return 1
+ endif
+ endif
+
+ " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3
+ " fastbrowse Local Remote Hiding a buffer implies it may be re-used (fast)
+ " slow 0 D D Deleting a buffer implies it will not be re-used (slow)
+ " med 1 D H
+ " fast 2 H H
+" call Decho("--do netrw settings: make this buffer#".bufnr("%")." not-a-file, modifiable, not line-numbered, etc--",'~'.expand("<slnum>"))
+ let fname= expand("%")
+ NetrwKeepj call s:NetrwListSettings(a:islocal)
+ call s:NetrwBufRename(fname)
+
+ " delete all lines from buffer {{{3
+" call Decho("--delete all lines from buffer--",'~'.expand("<slnum>"))
+" call Decho(" clear buffer<".expand("%")."> with :%d",'~'.expand("<slnum>"))
+ sil! keepalt NetrwKeepj %d _
+
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Dret("s:NetrwGetBuffer 0<cleared buffer>")
+ return 0
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwGetcwd: get the current directory. {{{2
+" Change backslashes to forward slashes, if any.
+" If doesc is true, escape certain troublesome characters
+fun! s:NetrwGetcwd(doesc)
+" call Dfunc("NetrwGetcwd(doesc=".a:doesc.")")
+ let curdir= substitute(getcwd(),'\\','/','ge')
+ if curdir !~ '[\/]$'
+ let curdir= curdir.'/'
+ endif
+ if a:doesc
+ let curdir= fnameescape(curdir)
+ endif
+" call Dret("NetrwGetcwd <".curdir.">")
+ return curdir
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwGetWord: it gets the directory/file named under the cursor {{{2
+fun! s:NetrwGetWord()
+" call Dfunc("s:NetrwGetWord() liststyle=".s:ShowStyle()." virtcol=".virtcol("."))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+ let keepsol= &l:sol
+ setl nosol
+
+ call s:UseBufWinVars()
+
+ " insure that w:netrw_liststyle is set up
+ if !exists("w:netrw_liststyle")
+ if exists("g:netrw_liststyle")
+ let w:netrw_liststyle= g:netrw_liststyle
+ else
+ let w:netrw_liststyle= s:THINLIST
+ endif
+" call Decho("w:netrw_liststyle=".w:netrw_liststyle,'~'.expand("<slnum>"))
+ endif
+
+ if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt
+ " Active Banner support
+" call Decho("active banner handling",'~'.expand("<slnum>"))
+ NetrwKeepj norm! 0
+ let dirname= "./"
+ let curline= getline('.')
+
+ if curline =~# '"\s*Sorted by\s'
+ NetrwKeepj norm! "_s
+ let s:netrw_skipbrowse= 1
+ echo 'Pressing "s" also works'
+
+ elseif curline =~# '"\s*Sort sequence:'
+ let s:netrw_skipbrowse= 1
+ echo 'Press "S" to edit sorting sequence'
+
+ elseif curline =~# '"\s*Quick Help:'
+ NetrwKeepj norm! ?
+ let s:netrw_skipbrowse= 1
+
+ elseif curline =~# '"\s*\%(Hiding\|Showing\):'
+ NetrwKeepj norm! a
+ let s:netrw_skipbrowse= 1
+ echo 'Pressing "a" also works'
+
+ elseif line("$") > w:netrw_bannercnt
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt
+ endif
+
+ elseif w:netrw_liststyle == s:THINLIST
+" call Decho("thin column handling",'~'.expand("<slnum>"))
+ NetrwKeepj norm! 0
+ let dirname= substitute(getline('.'),'\t -->.*$','','')
+
+ elseif w:netrw_liststyle == s:LONGLIST
+" call Decho("long column handling",'~'.expand("<slnum>"))
+ NetrwKeepj norm! 0
+ let dirname= substitute(getline('.'),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e')
+
+ elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+" call Decho("treelist handling",'~'.expand("<slnum>"))
+ let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e')
+ let dirname= substitute(dirname,'\t -->.*$','','')
+
+ else
+" call Decho("obtain word from wide listing",'~'.expand("<slnum>"))
+ let dirname= getline('.')
+
+ if !exists("b:netrw_cpf")
+ let b:netrw_cpf= 0
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
+ call histdel("/",-1)
+" "call Decho("computed cpf=".b:netrw_cpf,'~'.expand("<slnum>"))
+ endif
+
+" call Decho("buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
+ let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf
+" call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt,'~'.expand("<slnum>"))
+" call Decho("1: dirname<".dirname.">",'~'.expand("<slnum>"))
+ if filestart == 0
+ NetrwKeepj norm! 0ma
+ else
+ call cursor(line("."),filestart+1)
+ NetrwKeepj norm! ma
+ endif
+ let rega= @a
+ let eofname= filestart + b:netrw_cpf + 1
+ if eofname <= col("$")
+ call cursor(line("."),filestart+b:netrw_cpf+1)
+ NetrwKeepj norm! "ay`a
+ else
+ NetrwKeepj norm! "ay$
+ endif
+ let dirname = @a
+ let @a = rega
+" call Decho("2: dirname<".dirname.">",'~'.expand("<slnum>"))
+ let dirname= substitute(dirname,'\s\+$','','e')
+" call Decho("3: dirname<".dirname.">",'~'.expand("<slnum>"))
+ endif
+
+ " symlinks are indicated by a trailing "@". Remove it before further processing.
+ let dirname= substitute(dirname,"@$","","")
+
+ " executables are indicated by a trailing "*". Remove it before further processing.
+ let dirname= substitute(dirname,"\*$","","")
+
+ let &l:sol= keepsol
+
+" call Dret("s:NetrwGetWord <".dirname.">")
+ return dirname
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwListSettings: make standard settings for making a netrw listing {{{2
+" g:netrw_bufsettings will be used after the listing is produced.
+" Called by s:NetrwGetBuffer()
+fun! s:NetrwListSettings(islocal)
+" call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")")
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+ let fname= bufname("%")
+" " call Decho("setl bt=nofile nobl ma nonu nowrap noro nornu",'~'.expand("<slnum>"))
+ " nobl noma nomod nonu noma nowrap ro nornu (std g:netrw_bufsettings)
+ setl bt=nofile nobl ma nonu nowrap noro nornu
+ call s:NetrwBufRename(fname)
+ if g:netrw_use_noswf
+ setl noswf
+ endif
+" call Dredir("ls!","s:NetrwListSettings")
+" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("<slnum>"))
+ exe "setl ts=".(g:netrw_maxfilenamelen+1)
+ setl isk+=.,~,-
+ if g:netrw_fastbrowse > a:islocal
+ setl bh=hide
+ else
+ setl bh=delete
+ endif
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Dret("s:NetrwListSettings")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwListStyle: change list style (thin - long - wide - tree) {{{2
+" islocal=0: remote browsing
+" =1: local browsing
+fun! s:NetrwListStyle(islocal)
+" call Dfunc("NetrwListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle)
+
+ let ykeep = @@
+ let fname = s:NetrwGetWord()
+ if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+" call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle,'~'.expand("<slnum>"))
+" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">",'~'.expand("<slnum>"))
+
+ " repoint t:netrw_lexbufnr if appropriate
+ if exists("t:netrw_lexbufnr") && bufnr("%") == t:netrw_lexbufnr
+" call Decho("set repointlexbufnr to true!")
+ let repointlexbufnr= 1
+ endif
+
+ if w:netrw_liststyle == s:THINLIST
+ " use one column listing
+" call Decho("use one column list",'~'.expand("<slnum>"))
+ let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+
+ elseif w:netrw_liststyle == s:LONGLIST
+ " use long list
+" call Decho("use long list",'~'.expand("<slnum>"))
+ let g:netrw_list_cmd = g:netrw_list_cmd." -l"
+
+ elseif w:netrw_liststyle == s:WIDELIST
+ " give wide list
+" call Decho("use wide list",'~'.expand("<slnum>"))
+ let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+
+ elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+" call Decho("use tree list",'~'.expand("<slnum>"))
+ let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+
+ else
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46)
+ let g:netrw_liststyle = s:THINLIST
+ let w:netrw_liststyle = g:netrw_liststyle
+ let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge')
+ endif
+ setl ma noro
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+
+ " clear buffer - this will cause NetrwBrowse/LocalBrowseCheck to do a refresh
+" call Decho("clear buffer<".expand("%")."> with :%d",'~'.expand("<slnum>"))
+ sil! NetrwKeepj %d _
+ " following prevents tree listing buffer from being marked "modified"
+" call Decho("setl nomod",'~'.expand("<slnum>"))
+ setl nomod
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+
+ " refresh the listing
+" call Decho("refresh the listing",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+ NetrwKeepj call s:NetrwCursor(0)
+
+ " repoint t:netrw_lexbufnr if appropriate
+ if exists("repointlexbufnr")
+ let t:netrw_lexbufnr= bufnr("%")
+" call Decho("repoint t:netrw_lexbufnr to #".t:netrw_lexbufnr)
+ endif
+
+ " restore position; keep cursor on the filename
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ let @@= ykeep
+
+" call Dret("NetrwListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : ""))
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBannerCtrl: toggles the display of the banner {{{2
+fun! s:NetrwBannerCtrl(islocal)
+" call Dfunc("s:NetrwBannerCtrl(islocal=".a:islocal.") g:netrw_banner=".g:netrw_banner)
+
+ let ykeep= @@
+ " toggle the banner (enable/suppress)
+ let g:netrw_banner= !g:netrw_banner
+
+ " refresh the listing
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+
+ " keep cursor on the filename
+ if g:netrw_banner && exists("w:netrw_bannercnt") && line(".") >= w:netrw_bannercnt
+ let fname= s:NetrwGetWord()
+ sil NetrwKeepj $
+ let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc')
+" " call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A'),'~'.expand("<slnum>"))
+ if result <= 0 && exists("w:netrw_bannercnt")
+ exe "NetrwKeepj ".w:netrw_bannercnt
+ endif
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwBannerCtrl : g:netrw_banner=".g:netrw_banner)
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBookmark: supports :NetrwMB[!] [file]s {{{2
+"
+" No bang: enters files/directories into Netrw's bookmark system
+" No argument and in netrw buffer:
+" if there are marked files: bookmark marked files
+" otherwise : bookmark file/directory under cursor
+" No argument and not in netrw buffer: bookmarks current open file
+" Has arguments: globs them individually and bookmarks them
+"
+" With bang: deletes files/directories from Netrw's bookmark system
+fun! s:NetrwBookmark(del,...)
+" call Dfunc("s:NetrwBookmark(del=".a:del.",...) a:0=".a:0)
+ if a:0 == 0
+ if &ft == "netrw"
+ let curbufnr = bufnr("%")
+
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ " for every filename in the marked list
+" call Decho("bookmark every filename in marked list",'~'.expand("<slnum>"))
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let islocal= expand("%") !~ '^\a\{3,}://'
+ for fname in s:netrwmarkfilelist_{curbufnr}
+ if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif
+ endfor
+ let curdir = exists("b:netrw_curdir")? b:netrw_curdir : getcwd()
+ call s:NetrwUnmarkList(curbufnr,curdir)
+ NetrwKeepj call s:NetrwRefresh(islocal,s:NetrwBrowseChgDir(islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ else
+ let fname= s:NetrwGetWord()
+ if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif
+ endif
+
+ else
+ " bookmark currently open file
+" call Decho("bookmark currently open file",'~'.expand("<slnum>"))
+ let fname= expand("%")
+ if a:del|call s:DeleteBookmark(fname)|else|call s:MakeBookmark(fname)|endif
+ endif
+
+ else
+ " bookmark specified files
+ " attempts to infer if working remote or local
+ " by deciding if the current file begins with an url
+ " Globbing cannot be done remotely.
+ let islocal= expand("%") !~ '^\a\{3,}://'
+" call Decho("bookmark specified file".((a:0>1)? "s" : ""),'~'.expand("<slnum>"))
+ let i = 1
+ while i <= a:0
+ if islocal
+ if v:version > 704 || (v:version == 704 && has("patch656"))
+ let mbfiles= glob(fnameescape(a:{i}),0,1,1)
+ else
+ let mbfiles= glob(fnameescape(a:{i}),0,1)
+ endif
+ else
+ let mbfiles= [a:{i}]
+ endif
+" call Decho("mbfiles".string(mbfiles),'~'.expand("<slnum>"))
+ for mbfile in mbfiles
+" call Decho("mbfile<".mbfile.">",'~'.expand("<slnum>"))
+ if a:del|call s:DeleteBookmark(mbfile)|else|call s:MakeBookmark(mbfile)|endif
+ endfor
+ let i= i + 1
+ endwhile
+ endif
+
+ " update the menu
+ call s:NetrwBookmarkMenu()
+
+" call Dret("s:NetrwBookmark")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBookmarkMenu: Uses menu priorities {{{2
+" .2.[cnt] for bookmarks, and
+" .3.[cnt] for history
+" (see s:NetrwMenu())
+fun! s:NetrwBookmarkMenu()
+ if !exists("s:netrw_menucnt")
+ return
+ endif
+" call Dfunc("NetrwBookmarkMenu() histcnt=".g:netrw_dirhistcnt." menucnt=".s:netrw_menucnt)
+
+ " the following test assures that gvim is running, has menus available, and has menus enabled.
+ if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
+ if exists("g:NetrwTopLvlMenu")
+" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)",'~'.expand("<slnum>"))
+ exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks'
+ exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete'
+ endif
+ if !exists("s:netrw_initbookhist")
+ call s:NetrwBookHistRead()
+ endif
+
+ " show bookmarked places
+ if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0
+ let cnt= 1
+ for bmd in g:netrw_bookmarklist
+" call Decho('sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmd.' :e '.bmd,'~'.expand("<slnum>"))
+ let bmd= escape(bmd,g:netrw_menu_escape)
+
+ " show bookmarks for goto menu
+ exe 'sil! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmd.' :e '.bmd."\<cr>"
+
+ " show bookmarks for deletion menu
+ exe 'sil! menu '.g:NetrwMenuPriority.".8.2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Delete.'.bmd.' '.cnt."mB"
+ let cnt= cnt + 1
+ endfor
+
+ endif
+
+ " show directory browsing history
+ if g:netrw_dirhistmax > 0
+ let cnt = g:netrw_dirhistcnt
+ let first = 1
+ let histcnt = 0
+ while ( first || cnt != g:netrw_dirhistcnt )
+ let histcnt = histcnt + 1
+ let priority = g:netrw_dirhistcnt + histcnt
+ if exists("g:netrw_dirhist_{cnt}")
+ let histdir= escape(g:netrw_dirhist_{cnt},g:netrw_menu_escape)
+" call Decho('sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir,'~'.expand("<slnum>"))
+ exe 'sil! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.histdir.' :e '.histdir."\<cr>"
+ endif
+ let first = 0
+ let cnt = ( cnt - 1 ) % g:netrw_dirhistmax
+ if cnt < 0
+ let cnt= cnt + g:netrw_dirhistmax
+ endif
+ endwhile
+ endif
+
+ endif
+" call Dret("NetrwBookmarkMenu")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBrowseChgDir: constructs a new directory based on the current {{{2
+" directory and a new directory name. Also, if the
+" "new directory name" is actually a file,
+" NetrwBrowseChgDir() edits the file.
+fun! s:NetrwBrowseChgDir(islocal,newdir,...)
+" call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." win#".winnr()." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+
+ let ykeep= @@
+ if !exists("b:netrw_curdir")
+ " Don't try to change-directory: this can happen, for example, when netrw#ErrorMsg has been called
+ " and the current window is the NetrwMessage window.
+ let @@= ykeep
+" call Decho("b:netrw_curdir doesn't exist!",'~'.expand("<slnum>"))
+" call Decho("getcwd<".getcwd().">",'~'.expand("<slnum>"))
+" call Dredir("ls!","s:NetrwBrowseChgDir")
+" call Dret("s:NetrwBrowseChgDir")
+ return
+ endif
+" call Decho("b:netrw_curdir<".b:netrw_curdir.">")
+
+ " NetrwBrowseChgDir; save options and initialize {{{3
+" call Decho("saving options",'~'.expand("<slnum>"))
+ call s:SavePosn(s:netrw_posn)
+ NetrwKeepj call s:NetrwOptionsSave("s:")
+ NetrwKeepj call s:NetrwOptionsSafe(a:islocal)
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+ let dirname = substitute(b:netrw_curdir,'\\','/','ge')
+ else
+ let dirname = b:netrw_curdir
+ endif
+ let newdir = a:newdir
+ let dolockout = 0
+ let dorestore = 1
+" call Decho("win#".winnr(),'~'.expand("<slnum>"))
+" call Decho("dirname<".dirname.">",'~'.expand("<slnum>"))
+" call Decho("newdir<".newdir.">",'~'.expand("<slnum>"))
+
+ " ignore <cr>s when done in the banner
+" call Decho('(s:NetrwBrowseChgDir) ignore [return]s when done in banner (g:netrw_banner='.g:netrw_banner.")",'~'.expand("<slnum>"))
+ if g:netrw_banner
+" call Decho("win#".winnr()." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#"),'~'.expand("<slnum>"))
+ if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt
+ if getline(".") =~# 'Quick Help'
+" call Decho("#1: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ let g:netrw_quickhelp= (g:netrw_quickhelp + 1)%len(s:QuickHelp)
+" call Decho("#2: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ setl ma noro nowrap
+ NetrwKeepj call setline(line('.'),'" Quick Help: <F1>:help '.s:QuickHelp[g:netrw_quickhelp])
+ setl noma nomod nowrap
+ NetrwKeepj call s:NetrwOptionsRestore("s:")
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ endif
+ endif
+" else " Decho
+" call Decho("g:netrw_banner=".g:netrw_banner." (no banner)",'~'.expand("<slnum>"))
+ endif
+
+ " set up o/s-dependent directory recognition pattern
+ if has("amiga")
+ let dirpat= '[\/:]$'
+ else
+ let dirpat= '[\/]$'
+ endif
+" call Decho("set up o/s-dependent directory recognition pattern: dirname<".dirname."> dirpat<".dirpat.">",'~'.expand("<slnum>"))
+
+ if dirname !~ dirpat
+ " apparently vim is "recognizing" that it is in a directory and
+ " is removing the trailing "/". Bad idea, so let's put it back.
+ let dirname= dirname.'/'
+" call Decho("adjusting dirname<".dirname.'> (put trailing "/" back)','~'.expand("<slnum>"))
+ endif
+
+" call Decho("[newdir<".newdir."> ".((newdir =~ dirpat)? "=~" : "!~")." dirpat<".dirpat.">] && [islocal=".a:islocal."] && [newdir is ".(isdirectory(s:NetrwFile(newdir))? "" : "not ")."a directory]",'~'.expand("<slnum>"))
+ if newdir !~ dirpat && !(a:islocal && isdirectory(s:NetrwFile(s:ComposePath(dirname,newdir))))
+ " ------------------------------
+ " NetrwBrowseChgDir: edit a file {{{3
+ " ------------------------------
+" call Decho('edit-a-file: case "handling a file": win#'.winnr().' newdir<'.newdir.'> !~ dirpat<'.dirpat.">",'~'.expand("<slnum>"))
+
+ " save position for benefit of Rexplore
+ let s:rexposn_{bufnr("%")}= winsaveview()
+" call Decho("edit-a-file: saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("<slnum>"))
+" call Decho("edit-a-file: win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft,'~'.expand("<slnum>"))
+" call Decho("edit-a-file: w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a')." w:netrw_treedict:".(exists("w:netrw_treedict")? "exists" : 'n/a')." newdir<".newdir.">",'~'.expand("<slnum>"))
+
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)'
+" call Decho("edit-a-file: handle tree listing: w:netrw_treedict<".(exists("w:netrw_treedict")? string(w:netrw_treedict) : 'n/a').">",'~'.expand("<slnum>"))
+" call Decho("edit-a-file: newdir<".newdir.">",'~'.expand("<slnum>"))
+" let newdir = s:NetrwTreePath(s:netrw_treetop)
+" call Decho("edit-a-file: COMBAK why doesn't this recognize file1's directory???")
+ let dirname= s:NetrwTreeDir(a:islocal)
+ "COMBAK : not working for a symlink -- but what about a regular file? a directory?
+" call Decho("COMBAK : not working for a symlink -- but what about a regular file? a directory?")
+ " Feb 17, 2019: following if-else-endif restored -- wasn't editing a file in tree mode
+ if dirname =~ '/$'
+ let dirname= dirname.newdir
+ else
+ let dirname= dirname."/".newdir
+ endif
+" call Decho("edit-a-file: dirname<".dirname.">",'~'.expand("<slnum>"))
+" call Decho("edit-a-file: tree listing",'~'.expand("<slnum>"))
+ elseif newdir =~ '^\(/\|\a:\)'
+" call Decho("edit-a-file: handle an url or path starting with /: <".newdir.">",'~'.expand("<slnum>"))
+ let dirname= newdir
+ else
+ let dirname= s:ComposePath(dirname,newdir)
+ endif
+" call Decho("edit-a-file: handling a file: dirname<".dirname."> (a:0=".a:0.")",'~'.expand("<slnum>"))
+ " this lets netrw#BrowseX avoid the edit
+ if a:0 < 1
+" call Decho("edit-a-file: (a:0=".a:0."<1) set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist"),'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwOptionsRestore("s:")
+ let curdir= b:netrw_curdir
+ if !exists("s:didsplit")
+" " call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".string(g:netrw_browse_split)." win#".winnr()." g:netrw_chgwin=".g:netrw_chgwin",'~'.expand("<slnum>"))
+ if type(g:netrw_browse_split) == 3
+ " open file in server
+ " Note that g:netrw_browse_split is a List: [servername,tabnr,winnr]
+" call Decho("edit-a-file: open file in server",'~'.expand("<slnum>"))
+ call s:NetrwServerEdit(a:islocal,dirname)
+" call Dret("s:NetrwBrowseChgDir")
+ return
+
+ elseif g:netrw_browse_split == 1
+ " horizontally splitting the window first
+" call Decho("edit-a-file: horizontally splitting window prior to edit",'~'.expand("<slnum>"))
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
+ exe "keepalt ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
+ if !&ea
+ keepalt wincmd _
+ endif
+ call s:SetRexDir(a:islocal,curdir)
+
+ elseif g:netrw_browse_split == 2
+ " vertically splitting the window first
+" call Decho("edit-a-file: vertically splitting window prior to edit",'~'.expand("<slnum>"))
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
+ exe "keepalt ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s"
+ if !&ea
+ keepalt wincmd |
+ endif
+ call s:SetRexDir(a:islocal,curdir)
+
+ elseif g:netrw_browse_split == 3
+ " open file in new tab
+" call Decho("edit-a-file: opening new tab prior to edit",'~'.expand("<slnum>"))
+ keepalt tabnew
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+ endif
+ call s:SetRexDir(a:islocal,curdir)
+
+ elseif g:netrw_browse_split == 4
+ " act like "P" (ie. open previous window)
+" call Decho("edit-a-file: use previous window for edit",'~'.expand("<slnum>"))
+ if s:NetrwPrevWinOpen(2) == 3
+ let @@= ykeep
+" call Dret("s:NetrwBrowseChgDir")
+ return
+ endif
+ call s:SetRexDir(a:islocal,curdir)
+
+ else
+ " handling a file, didn't split, so remove menu
+" call Decho("edit-a-file: handling a file+didn't split, so remove menu",'~'.expand("<slnum>"))
+ call s:NetrwMenu(0)
+ " optional change to window
+ if g:netrw_chgwin >= 1
+" call Decho("edit-a-file: changing window to #".g:netrw_chgwin.": (due to g:netrw_chgwin)",'~'.expand("<slnum>"))
+ if winnr("$")+1 == g:netrw_chgwin
+ " if g:netrw_chgwin is set to one more than the last window, then
+ " vertically split the last window to make that window available.
+ let curwin= winnr()
+ exe "NetrwKeepj keepalt ".winnr("$")."wincmd w"
+ vs
+ exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd ".curwin
+ endif
+ exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w"
+ endif
+ call s:SetRexDir(a:islocal,curdir)
+ endif
+
+ endif
+
+ " the point where netrw actually edits the (local) file
+ " if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
+ " no keepalt to support :e # to return to a directory listing
+ if !&mod
+ " if e the new file would fail due to &mod, then don't change any of the flags
+ let dolockout= 1
+ endif
+ if a:islocal
+" call Decho("edit-a-file: edit local file: exe e! ".fnameescape(dirname),'~'.expand("<slnum>"))
+ " some like c-^ to return to the last edited file
+ " others like c-^ to return to the netrw buffer
+ " Apr 30, 2020: used to have e! here. That can cause loss of a modified file,
+ " so emit error E37 instead.
+ if exists("g:netrw_altfile") && g:netrw_altfile
+ exe "NetrwKeepj keepalt e ".fnameescape(dirname)
+ else
+ exe "NetrwKeepj e ".fnameescape(dirname)
+ endif
+" call Decho("edit-a-file: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod,'~'.expand("<slnum>"))
+ " COMBAK -- cuc cul related
+ call s:NetrwCursor(1)
+ if &hidden || &bufhidden == "hide"
+ " file came from vim's hidden storage. Don't "restore" options with it.
+ let dorestore= 0
+ endif
+ else
+" call Decho("edit-a-file: remote file: NetrwBrowse will edit it",'~'.expand("<slnum>"))
+ endif
+
+ " handle g:Netrw_funcref -- call external-to-netrw functions
+ " This code will handle g:Netrw_funcref as an individual function reference
+ " or as a list of function references. It will ignore anything that's not
+ " a function reference. See :help Funcref for information about function references.
+ if exists("g:Netrw_funcref")
+" call Decho("edit-a-file: handle optional Funcrefs",'~'.expand("<slnum>"))
+ if type(g:Netrw_funcref) == 2
+" call Decho("edit-a-file: handling a g:Netrw_funcref",'~'.expand("<slnum>"))
+ NetrwKeepj call g:Netrw_funcref()
+ elseif type(g:Netrw_funcref) == 3
+" call Decho("edit-a-file: handling a list of g:Netrw_funcrefs",'~'.expand("<slnum>"))
+ for Fncref in g:Netrw_funcref
+ if type(Fncref) == 2
+ NetrwKeepj call Fncref()
+ endif
+ endfor
+ endif
+ endif
+ endif
+
+ elseif newdir =~ '^/'
+ " ----------------------------------------------------
+ " NetrwBrowseChgDir: just go to the new directory spec {{{3
+ " ----------------------------------------------------
+" call Decho('goto-newdir: case "just go to new directory spec": newdir<'.newdir.'>','~'.expand("<slnum>"))
+ let dirname = newdir
+ NetrwKeepj call s:SetRexDir(a:islocal,dirname)
+ NetrwKeepj call s:NetrwOptionsRestore("s:")
+ norm! m`
+
+ elseif newdir == './'
+ " ---------------------------------------------
+ " NetrwBrowseChgDir: refresh the directory list {{{3
+ " ---------------------------------------------
+" call Decho('(s:NetrwBrowseChgDir)refresh-dirlist: case "refresh directory listing": newdir == "./"','~'.expand("<slnum>"))
+ NetrwKeepj call s:SetRexDir(a:islocal,dirname)
+ norm! m`
+
+ elseif newdir == '../'
+ " --------------------------------------
+ " NetrwBrowseChgDir: go up one directory {{{3
+ " --------------------------------------
+" call Decho('(s:NetrwBrowseChgDir)go-up: case "go up one directory": newdir == "../"','~'.expand("<slnum>"))
+
+ if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+ " force a refresh
+" call Decho("go-up: clear buffer<".expand("%")."> with :%d",'~'.expand("<slnum>"))
+" call Decho("go-up: setl noro ma",'~'.expand("<slnum>"))
+ setl noro ma
+ NetrwKeepj %d _
+ endif
+
+ if has("amiga")
+ " amiga
+" call Decho('go-up: case "go up one directory": newdir == "../" and amiga','~'.expand("<slnum>"))
+ if a:islocal
+ let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','')
+ let dirname= substitute(dirname,'/$','','')
+ else
+ let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','')
+ endif
+" call Decho("go-up: amiga: dirname<".dirname."> (go up one dir)",'~'.expand("<slnum>"))
+
+ elseif !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
+ " windows
+ if a:islocal
+ let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
+ if dirname == ""
+ let dirname= '/'
+ endif
+ else
+ let dirname= substitute(dirname,'^\(\a\{3,}://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
+ endif
+ if dirname =~ '^\a:$'
+ let dirname= dirname.'/'
+ endif
+" call Decho("go-up: windows: dirname<".dirname."> (go up one dir)",'~'.expand("<slnum>"))
+
+ else
+ " unix or cygwin
+" call Decho('(s:NetrwBrowseChgDir)go-up: case "go up one directory": newdir == "../" and unix or cygwin','~'.expand("<slnum>"))
+ if a:islocal
+ let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','')
+ if dirname == ""
+ let dirname= '/'
+ endif
+ else
+ let dirname= substitute(dirname,'^\(\a\{3,}://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','')
+ endif
+" call Decho("go-up: unix: dirname<".dirname."> (go up one dir)",'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj call s:SetRexDir(a:islocal,dirname)
+ norm! m`
+
+ elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+ " --------------------------------------
+ " NetrwBrowseChgDir: Handle Tree Listing {{{3
+ " --------------------------------------
+" call Decho('(s:NetrwBrowseChgDir)tree-list: case liststyle is TREELIST and w:netrw_treedict exists','~'.expand("<slnum>"))
+ " force a refresh (for TREELIST, NetrwTreeDir() will force the refresh)
+" call Decho("tree-list: setl noro ma",'~'.expand("<slnum>"))
+ setl noro ma
+ if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir"))
+" call Decho("tree-list: clear buffer<".expand("%")."> with :%d (force refresh)",'~'.expand("<slnum>"))
+ NetrwKeepj %d _
+ endif
+ let treedir = s:NetrwTreeDir(a:islocal)
+" call Decho("tree-list: treedir<".treedir.">",'~'.expand("<slnum>"))
+ let s:treecurpos = winsaveview()
+ let haskey = 0
+" call Decho("tree-list: w:netrw_treedict<".string(w:netrw_treedict).">",'~'.expand("<slnum>"))
+
+ " search treedict for tree dir as-is
+" call Decho("tree-list: search treedict for tree dir as-is",'~'.expand("<slnum>"))
+ if has_key(w:netrw_treedict,treedir)
+" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'> : found it!','~'.expand("<slnum>"))
+ let haskey= 1
+ else
+" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'> : not found','~'.expand("<slnum>"))
+ endif
+
+ " search treedict for treedir with a [/@] appended
+" call Decho("tree-list: search treedict for treedir with a [/@] appended",'~'.expand("<slnum>"))
+ if !haskey && treedir !~ '[/@]$'
+ if has_key(w:netrw_treedict,treedir."/")
+ let treedir= treedir."/"
+" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched.for treedir<'.treedir.'> found it!','~'.expand("<slnum>"))
+ let haskey = 1
+ else
+" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'/> : not found','~'.expand("<slnum>"))
+ endif
+ endif
+
+ " search treedict for treedir with any trailing / elided
+" call Decho("tree-list: search treedict for treedir with any trailing / elided",'~'.expand("<slnum>"))
+ if !haskey && treedir =~ '/$'
+ let treedir= substitute(treedir,'/$','','')
+ if has_key(w:netrw_treedict,treedir)
+" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched.for treedir<'.treedir.'> found it!','~'.expand("<slnum>"))
+ let haskey = 1
+ else
+" call Decho('(s:NetrwBrowseChgDir)tree-list: ....searched for treedir<'.treedir.'> : not found','~'.expand("<slnum>"))
+ endif
+ endif
+
+" call Decho("haskey=".haskey,'~'.expand("<slnum>"))
+ if haskey
+ " close tree listing for selected subdirectory
+" call Decho("tree-list: closing selected subdirectory<".dirname.">",'~'.expand("<slnum>"))
+ call remove(w:netrw_treedict,treedir)
+" call Decho("tree-list: removed entry<".treedir."> from treedict",'~'.expand("<slnum>"))
+" call Decho("tree-list: yielding treedict<".string(w:netrw_treedict).">",'~'.expand("<slnum>"))
+ let dirname= w:netrw_treetop
+ else
+ " go down one directory
+ let dirname= substitute(treedir,'/*$','/','')
+" call Decho("tree-list: go down one dir: treedir<".treedir.">",'~'.expand("<slnum>"))
+" call Decho("tree-list: ... : dirname<".dirname.">",'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj call s:SetRexDir(a:islocal,dirname)
+" call Decho("setting s:treeforceredraw to true",'~'.expand("<slnum>"))
+ let s:treeforceredraw = 1
+
+ else
+ " ----------------------------------------
+ " NetrwBrowseChgDir: Go down one directory {{{3
+ " ----------------------------------------
+ let dirname = s:ComposePath(dirname,newdir)
+" call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">",'~'.expand("<slnum>"))
+ NetrwKeepj call s:SetRexDir(a:islocal,dirname)
+ norm! m`
+ endif
+
+ " --------------------------------------
+ " NetrwBrowseChgDir: Restore and Cleanup {{{3
+ " --------------------------------------
+ if dorestore
+ " dorestore is zero'd when a local file was hidden or bufhidden;
+ " in such a case, we want to keep whatever settings it may have.
+" call Decho("doing option restore (dorestore=".dorestore.")",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwOptionsRestore("s:")
+" else " Decho
+" call Decho("skipping option restore (dorestore==0): hidden=".&hidden." bufhidden=".&bufhidden." mod=".&mod,'~'.expand("<slnum>"))
+ endif
+ if dolockout && dorestore
+" call Decho("restore: filewritable(dirname<".dirname.">)=".filewritable(dirname),'~'.expand("<slnum>"))
+ if filewritable(dirname)
+" call Decho("restore: doing modification lockout settings: ma nomod noro",'~'.expand("<slnum>"))
+" call Decho("restore: setl ma nomod noro",'~'.expand("<slnum>"))
+ setl ma noro nomod
+" call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ else
+" call Decho("restore: doing modification lockout settings: ma nomod ro",'~'.expand("<slnum>"))
+" call Decho("restore: setl ma nomod noro",'~'.expand("<slnum>"))
+ setl ma ro nomod
+" call Decho("restore: ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ endif
+ endif
+ call s:RestorePosn(s:netrw_posn)
+ let @@= ykeep
+
+" call Dret("s:NetrwBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">")
+ return dirname
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBrowseUpDir: implements the "-" mappings {{{2
+" for thin, long, and wide: cursor placed just after banner
+" for tree, keeps cursor on current filename
+fun! s:NetrwBrowseUpDir(islocal)
+" call Dfunc("s:NetrwBrowseUpDir(islocal=".a:islocal.")")
+ if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt-1
+ " this test needed because occasionally this function seems to be incorrectly called
+ " when multiple leftmouse clicks are taken when atop the one line help in the banner.
+ " I'm allowing the very bottom line to permit a "-" exit so that one may escape empty
+ " directories.
+" call Dret("s:NetrwBrowseUpDir : cursor not in file area")
+ return
+ endif
+
+ norm! 0
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+" call Decho("case: treestyle",'~'.expand("<slnum>"))
+ let curline= getline(".")
+ let swwline= winline() - 1
+ if exists("w:netrw_treetop")
+ let b:netrw_curdir= w:netrw_treetop
+ elseif exists("b:netrw_curdir")
+ let w:netrw_treetop= b:netrw_curdir
+ else
+ let w:netrw_treetop= getcwd()
+ let b:netrw_curdir = w:netrw_treetop
+ endif
+ let curfile = getline(".")
+ let curpath = s:NetrwTreePath(w:netrw_treetop)
+ if a:islocal
+ call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../'))
+ else
+ call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../'))
+ endif
+" call Decho("looking for curfile<^".s:treedepthstring.curfile.">",'~'.expand("<slnum>"))
+" call Decho("having curpath<".curpath.">",'~'.expand("<slnum>"))
+ if w:netrw_treetop == '/'
+ keepj call search('^\M'.curfile,"w")
+ elseif curfile == '../'
+ keepj call search('^\M'.curfile,"wb")
+ else
+" call Decho("search(^\\M".s:treedepthstring.curfile.") backwards"))
+ while 1
+ keepj call search('^\M'.s:treedepthstring.curfile,"wb")
+ let treepath= s:NetrwTreePath(w:netrw_treetop)
+" call Decho("..current treepath<".treepath.">",'~'.expand("<slnum>"))
+ if treepath == curpath
+ break
+ endif
+ endwhile
+ endif
+
+ else
+" call Decho("case: not treestyle",'~'.expand("<slnum>"))
+ call s:SavePosn(s:netrw_posn)
+ if exists("b:netrw_curdir")
+ let curdir= b:netrw_curdir
+ else
+ let curdir= expand(getcwd())
+ endif
+ if a:islocal
+ call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,'../'))
+ else
+ call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,'../'))
+ endif
+ call s:RestorePosn(s:netrw_posn)
+ let curdir= substitute(curdir,'^.*[\/]','','')
+ call search('\<'.curdir.'/','wc')
+ endif
+" call Dret("s:NetrwBrowseUpDir")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#BrowseX: (implements "x" and "gx") executes a special "viewer" script or program for the {{{2
+" given filename; typically this means given their extension.
+" 0=local, 1=remote
+fun! netrw#BrowseX(fname,remote)
+ let use_ctrlo= 1
+" call Dfunc("netrw#BrowseX(fname<".a:fname."> remote=".a:remote.") implements x and gx maps")
+
+ if a:remote == 0 && isdirectory(a:fname)
+ " if its really just a local directory, then do a "gf" instead
+" call Decho("remote≡0 and a:fname<".a:fname."> ".(isdirectory(a:fname)? "is a directory" : "is not a directory"),'~'.expand("<slnum>"))
+" call Decho("..appears to be a local directory; using e ".a:fname." instead",'~'.expand("<slnum>"))
+ exe "e ".a:fname
+" call Dret("netrw#BrowseX")
+ return
+ elseif a:remote == 1 && a:fname !~ '^https\=:' && a:fname =~ '/$'
+ " remote directory, not a webpage access, looks like an attempt to do a directory listing
+" call Decho("remote≡1 and a:fname<".a:fname.">",'~'.expand("<slnum>"))
+" call Decho("..and fname ".((a:fname =~ '^https\=:')? 'matches' : 'does not match').'^https\=:','~'.expand("<slnum>"))
+" call Decho("..and fname ".((a:fname =~ '/$')? 'matches' : 'does not match').' /$','~'.expand("<slnum>"))
+" call Decho("..appears to be a remote directory listing request; using gf instead",'~'.expand("<slnum>"))
+ norm! gf
+" call Dret("netrw#BrowseX")
+ return
+ endif
+" call Decho("not a local file nor a webpage request",'~'.expand("<slnum>"))
+
+ if exists("g:netrw_browsex_viewer") && exists("g:netrw_browsex_support_remote") && !g:netrw_browsex_support_remote
+ let remote = a:remote
+ else
+ let remote = 0
+ endif
+
+ let ykeep = @@
+ let screenposn = winsaveview()
+" call Decho("saving posn to screenposn<".string(screenposn).">",'~'.expand("<slnum>"))
+
+ " need to save and restore aw setting as gx can invoke this function from non-netrw buffers
+ let awkeep = &aw
+ set noaw
+
+ " special core dump handler
+ if a:fname =~ '/core\(\.\d\+\)\=$'
+ if exists("g:Netrw_corehandler")
+ if type(g:Netrw_corehandler) == 2
+ " g:Netrw_corehandler is a function reference (see :help Funcref)
+" call Decho("g:Netrw_corehandler is a funcref",'~'.expand("<slnum>"))
+ call g:Netrw_corehandler(s:NetrwFile(a:fname))
+ elseif type(g:Netrw_corehandler) == 3
+ " g:Netrw_corehandler is a List of function references (see :help Funcref)
+" call Decho("g:Netrw_corehandler is a List",'~'.expand("<slnum>"))
+ for Fncref in g:Netrw_corehandler
+ if type(FncRef) == 2
+ call FncRef(a:fname)
+ endif
+ endfor
+ endif
+" call Decho("restoring posn: screenposn<".string(screenposn).">,'~'.expand("<slnum>"))"
+ call winrestview(screenposn)
+ let @@= ykeep
+ let &aw= awkeep
+" call Dret("netrw#BrowseX : coredump handler invoked")
+ return
+ endif
+ endif
+
+ " set up the filename
+ " (lower case the extension, make a local copy of a remote file)
+ let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e')
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ let exten= substitute(exten,'^.*$','\L&\E','')
+ endif
+ if exten =~ "[\\/]"
+ let exten= ""
+ endif
+" call Decho("exten<".exten.">",'~'.expand("<slnum>"))
+
+ if remote == 1
+ " create a local copy
+" call Decho("remote: remote=".remote.": create a local copy of <".a:fname.">",'~'.expand("<slnum>"))
+ setl bh=delete
+ call netrw#NetRead(3,a:fname)
+ " attempt to rename tempfile
+ let basename= substitute(a:fname,'^\(.*\)/\(.*\)\.\([^.]*\)$','\2','')
+ let newname = substitute(s:netrw_tmpfile,'^\(.*\)/\(.*\)\.\([^.]*\)$','\1/'.basename.'.\3','')
+" call Decho("basename<".basename.">",'~'.expand("<slnum>"))
+" call Decho("newname <".newname.">",'~'.expand("<slnum>"))
+ if s:netrw_tmpfile != newname && newname != ""
+ if rename(s:netrw_tmpfile,newname) == 0
+ " renaming succeeded
+" call Decho("renaming succeeded (tmpfile<".s:netrw_tmpfile."> to <".newname.">)")
+ let fname= newname
+ else
+ " renaming failed
+" call Decho("renaming failed (tmpfile<".s:netrw_tmpfile."> to <".newname.">)")
+ let fname= s:netrw_tmpfile
+ endif
+ else
+ let fname= s:netrw_tmpfile
+ endif
+ else
+" call Decho("local: remote=".remote.": handling local copy of <".a:fname.">",'~'.expand("<slnum>"))
+ let fname= a:fname
+ " special ~ handler for local
+ if fname =~ '^\~' && expand("$HOME") != ""
+" call Decho('invoking special ~ handler','~'.expand("<slnum>"))
+ let fname= s:NetrwFile(substitute(fname,'^\~',expand("$HOME"),''))
+ endif
+ endif
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten),'~'.expand("<slnum>"))
+
+ " set up redirection (avoids browser messages)
+ " by default, g:netrw_suppress_gx_mesg is true
+ if g:netrw_suppress_gx_mesg
+ if &srr =~ "%s"
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+ let redir= substitute(&srr,"%s","nul","")
+ else
+ let redir= substitute(&srr,"%s","/dev/null","")
+ endif
+ elseif (has("win32") || has("win95") || has("win64") || has("win16"))
+ let redir= &srr . "nul"
+ else
+ let redir= &srr . "/dev/null"
+ endif
+ endif
+" call Decho("set up redirection: redir{".redir."} srr{".&srr."}",'~'.expand("<slnum>"))
+
+ " extract any viewing options. Assumes that they're set apart by spaces.
+ if exists("g:netrw_browsex_viewer")
+" call Decho("extract any viewing options from g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">",'~'.expand("<slnum>"))
+ if g:netrw_browsex_viewer =~ '\s'
+ let viewer = substitute(g:netrw_browsex_viewer,'\s.*$','','')
+ let viewopt = substitute(g:netrw_browsex_viewer,'^\S\+\s*','','')." "
+ let oviewer = ''
+ let cnt = 1
+ while !executable(viewer) && viewer != oviewer
+ let viewer = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\1','')
+ let viewopt = substitute(g:netrw_browsex_viewer,'^\(\(^\S\+\s\+\)\{'.cnt.'}\S\+\)\(.*\)$','\3','')." "
+ let cnt = cnt + 1
+ let oviewer = viewer
+" call Decho("!exe: viewer<".viewer."> viewopt<".viewopt.">",'~'.expand("<slnum>"))
+ endwhile
+ else
+ let viewer = g:netrw_browsex_viewer
+ let viewopt = ""
+ endif
+" call Decho("viewer<".viewer."> viewopt<".viewopt.">",'~'.expand("<slnum>"))
+ endif
+
+ " execute the file handler
+" call Decho("execute the file handler (if any)",'~'.expand("<slnum>"))
+ if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-'
+" call Decho("(netrw#BrowseX) g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">",'~'.expand("<slnum>"))
+ let ret= netrwFileHandlers#Invoke(exten,fname)
+
+ elseif exists("g:netrw_browsex_viewer") && executable(viewer)
+" call Decho("(netrw#BrowseX) g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil !".viewer." ".viewopt.s:ShellEscape(fname,1).redir)
+ let ret= v:shell_error
+
+ elseif has("win32") || has("win64")
+" call Decho("(netrw#BrowseX) win".(has("win32")? "32" : "64"),'~'.expand("<slnum>"))
+ if executable("start")
+ call s:NetrwExe('sil! !start rundll32 url.dll,FileProtocolHandler '.s:ShellEscape(fname,1))
+ elseif executable("rundll32")
+ call s:NetrwExe('sil! !rundll32 url.dll,FileProtocolHandler '.s:ShellEscape(fname,1))
+ else
+ call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)
+ endif
+ let ret= v:shell_error
+
+ elseif has("win32unix")
+ let winfname= 'c:\cygwin'.substitute(fname,'/','\\','g')
+" call Decho("(netrw#BrowseX) cygwin: winfname<".s:ShellEscape(winfname,1).">",'~'.expand("<slnum>"))
+ if executable("start")
+" call Decho("(netrw#BrowseX) win32unix+start",'~'.expand("<slnum>"))
+ call s:NetrwExe('sil !start rundll32 url.dll,FileProtocolHandler '.s:ShellEscape(winfname,1))
+ elseif executable("rundll32")
+" call Decho("(netrw#BrowseX) win32unix+rundll32",'~'.expand("<slnum>"))
+ call s:NetrwExe('sil !rundll32 url.dll,FileProtocolHandler '.s:ShellEscape(winfname,1))
+ elseif executable("cygstart")
+" call Decho("(netrw#BrowseX) win32unix+cygstart",'~'.expand("<slnum>"))
+ call s:NetrwExe('sil !cygstart '.s:ShellEscape(fname,1))
+ else
+ call netrw#ErrorMsg(s:WARNING,"rundll32 not on path",74)
+ endif
+ let ret= v:shell_error
+
+ elseif has("unix") && $DESKTOP_SESSION == "mate" && executable("atril")
+" call Decho("(netrw#BrowseX) unix and atril",'~'.expand("<slnum>"))
+ if a:fname =~ '^https\=://'
+ " atril does not appear to understand how to handle html -- so use gvim to edit the document
+ let use_ctrlo= 0
+" call Decho("fname<".fname.">")
+" call Decho("a:fname<".a:fname.">")
+ call s:NetrwExe("sil! !gvim ".fname.' -c "keepj keepalt file '.fnameescape(a:fname).'"')
+
+ else
+ call s:NetrwExe("sil !atril ".s:ShellEscape(fname,1).redir)
+ endif
+ let ret= v:shell_error
+
+ elseif has("unix") && executable("kfmclient") && s:CheckIfKde()
+" call Decho("(netrw#BrowseX) unix and kfmclient",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil !kfmclient exec ".s:ShellEscape(fname,1)." ".redir)
+ let ret= v:shell_error
+
+ elseif has("unix") && executable("exo-open") && executable("xdg-open") && executable("setsid")
+" call Decho("(netrw#BrowseX) unix, exo-open, xdg-open",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil !setsid xdg-open ".s:ShellEscape(fname,1).redir.'&')
+ let ret= v:shell_error
+
+ elseif has("unix") && executable("xdg-open")
+" call Decho("(netrw#BrowseX) unix and xdg-open",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil !xdg-open ".s:ShellEscape(fname,1).redir.'&')
+ let ret= v:shell_error
+
+ elseif has("macunix") && executable("open")
+" call Decho("(netrw#BrowseX) macunix and open",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil !open ".s:ShellEscape(fname,1)." ".redir)
+ let ret= v:shell_error
+
+ else
+ " netrwFileHandlers#Invoke() always returns 0
+" call Decho("(netrw#BrowseX) use netrwFileHandlers",'~'.expand("<slnum>"))
+ let ret= netrwFileHandlers#Invoke(exten,fname)
+ endif
+
+ " if unsuccessful, attempt netrwFileHandlers#Invoke()
+ if ret
+" call Decho("(netrw#BrowseX) ret=".ret," indicates unsuccessful thus far",'~'.expand("<slnum>"))
+ let ret= netrwFileHandlers#Invoke(exten,fname)
+ endif
+
+ " restoring redraw! after external file handlers
+ redraw!
+
+ " cleanup: remove temporary file,
+ " delete current buffer if success with handler,
+ " return to prior buffer (directory listing)
+ " Feb 12, 2008: had to de-activiate removal of
+ " temporary file because it wasn't getting seen.
+" if remote == 1 && fname != a:fname
+"" call Decho("deleting temporary file<".fname.">",'~'.expand("<slnum>"))
+" call s:NetrwDelete(fname)
+" endif
+
+ if remote == 1
+ setl bh=delete bt=nofile
+ if g:netrw_use_noswf
+ setl noswf
+ endif
+ if use_ctrlo
+ exe "sil! NetrwKeepj norm! \<c-o>"
+ endif
+ endif
+" call Decho("restoring posn to screenposn<".string(screenposn).">",'~'.expand("<slnum>"))
+ call winrestview(screenposn)
+ let @@ = ykeep
+ let &aw= awkeep
+
+" call Dret("netrw#BrowseX")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#GX: gets word under cursor for gx support {{{2
+" See also: netrw#BrowseXVis
+" netrw#BrowseX
+fun! netrw#GX()
+" call Dfunc("netrw#GX()")
+ if &ft == "netrw"
+ let fname= s:NetrwGetWord()
+ else
+ let fname= expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>'))
+ endif
+" call Dret("netrw#GX <".fname.">")
+ return fname
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#BrowseXVis: used by gx in visual mode to select a file for browsing {{{2
+fun! netrw#BrowseXVis()
+" call Dfunc("netrw#BrowseXVis()")
+ let akeep = @a
+ norm! gv"ay
+ let gxfile= @a
+ let @a = akeep
+ call netrw#BrowseX(gxfile,netrw#CheckIfRemote(gxfile))
+" call Dret("netrw#BrowseXVis")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBufRename: renames a buffer without the side effect of retaining an unlisted buffer having the old name {{{2
+" Using the file command on a "[No Name]" buffer does not seem to cause the old "[No Name]" buffer
+" to become an unlisted buffer, so in that case don't bwipe it.
+fun! s:NetrwBufRename(newname)
+" call Dfunc("s:NetrwBufRename(newname<".a:newname.">) buf(%)#".bufnr("%")."<".bufname(bufnr("%")).">")
+" call Dredir("ls!","s:NetrwBufRename (before rename)")
+ let oldbufname= bufname(bufnr("%"))
+" call Decho("buf#".bufnr("%").": oldbufname<".oldbufname.">",'~'.expand("<slnum>"))
+
+ if oldbufname != a:newname
+" call Decho("do buffer rename: oldbufname<".oldbufname."> ≠ a:newname<".a:newname.">",'~'.expand("<slnum>"))
+ let b:junk= 1
+" call Decho("rename buffer: sil! keepj keepalt file ".fnameescape(a:newname),'~'.expand("<slnum>"))
+ exe 'sil! keepj keepalt file '.fnameescape(a:newname)
+" call Dredir("ls!","s:NetrwBufRename (before bwipe)~".expand("<slnum>"))
+ let oldbufnr= bufnr(oldbufname)
+" call Decho("oldbufname<".oldbufname."> oldbufnr#".oldbufnr,'~'.expand("<slnum>"))
+" call Decho("bufnr(%)=".bufnr("%"),'~'.expand("<slnum>"))
+ if oldbufname != "" && oldbufnr != -1 && oldbufnr != bufnr("%")
+" call Decho("bwipe ".oldbufnr,'~'.expand("<slnum>"))
+ exe "bwipe! ".oldbufnr
+" else " Decho
+" call Decho("did *not* bwipe buf#".oldbufnr,'~'.expand("<slnum>"))
+" call Decho("..reason: if oldbufname<".oldbufname."> is empty",'~'.expand("<slnum>"))"
+" call Decho("..reason: if oldbufnr#".oldbufnr." is -1",'~'.expand("<slnum>"))"
+" call Decho("..reason: if oldbufnr#".oldbufnr." != bufnr(%)#".bufnr("%"),'~'.expand("<slnum>"))"
+ endif
+" call Dredir("ls!","s:NetrwBufRename (after rename)")
+" else " Decho
+" call Decho("oldbufname<".oldbufname."> == a:newname: did *not* rename",'~'.expand("<slnum>"))
+ endif
+
+" call Dret("s:NetrwBufRename : buf#".bufnr("%").": oldname<".oldbufname."> newname<".a:newname."> expand(%)<".expand("%").">")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#CheckIfRemote: returns 1 if current file looks like an url, 0 else {{{2
+fun! netrw#CheckIfRemote(...)
+" call Dfunc("netrw#CheckIfRemote() a:0=".a:0)
+ if a:0 > 0
+ let curfile= a:1
+ else
+ let curfile= expand("%")
+ endif
+" call Decho("curfile<".curfile.">")
+ if curfile =~ '^\a\{3,}://'
+" call Dret("netrw#CheckIfRemote 1")
+ return 1
+ else
+" call Dret("netrw#CheckIfRemote 0")
+ return 0
+ endif
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwChgPerm: (implements "gp") change file permission {{{2
+fun! s:NetrwChgPerm(islocal,curdir)
+" call Dfunc("s:NetrwChgPerm(islocal=".a:islocal." curdir<".a:curdir.">)")
+ let ykeep = @@
+ call inputsave()
+ let newperm= input("Enter new permission: ")
+ call inputrestore()
+ let chgperm= substitute(g:netrw_chgperm,'\<FILENAME\>',s:ShellEscape(expand("<cfile>")),'')
+ let chgperm= substitute(chgperm,'\<PERM\>',s:ShellEscape(newperm),'')
+" call Decho("chgperm<".chgperm.">",'~'.expand("<slnum>"))
+ call system(chgperm)
+ if v:shell_error != 0
+ NetrwKeepj call netrw#ErrorMsg(1,"changing permission on file<".expand("<cfile>")."> seems to have failed",75)
+ endif
+ if a:islocal
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwChgPerm")
+endfun
+
+" ---------------------------------------------------------------------
+" s:CheckIfKde: checks if kdeinit is running {{{2
+" Returns 0: kdeinit not running
+" 1: kdeinit is running
+fun! s:CheckIfKde()
+" call Dfunc("s:CheckIfKde()")
+ " seems kde systems often have gnome-open due to dependencies, even though
+ " gnome-open's subsidiary display tools are largely absent. Kde systems
+ " usually have "kdeinit" running, though... (tnx Mikolaj Machowski)
+ if !exists("s:haskdeinit")
+ if has("unix") && executable("ps") && !has("win32unix")
+ let s:haskdeinit= system("ps -e") =~ '\<kdeinit'
+ if v:shell_error
+ let s:haskdeinit = 0
+ endif
+ else
+ let s:haskdeinit= 0
+ endif
+" call Decho("setting s:haskdeinit=".s:haskdeinit,'~'.expand("<slnum>"))
+ endif
+
+" call Dret("s:CheckIfKde ".s:haskdeinit)
+ return s:haskdeinit
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwClearExplore: clear explore variables (if any) {{{2
+fun! s:NetrwClearExplore()
+" call Dfunc("s:NetrwClearExplore()")
+ 2match none
+ if exists("s:explore_match") |unlet s:explore_match |endif
+ if exists("s:explore_indx") |unlet s:explore_indx |endif
+ if exists("s:netrw_explore_prvdir") |unlet s:netrw_explore_prvdir |endif
+ if exists("s:dirstarstar") |unlet s:dirstarstar |endif
+ if exists("s:explore_prvdir") |unlet s:explore_prvdir |endif
+ if exists("w:netrw_explore_indx") |unlet w:netrw_explore_indx |endif
+ if exists("w:netrw_explore_listlen")|unlet w:netrw_explore_listlen|endif
+ if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif
+ if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif
+" redraw!
+ echo " "
+ echo " "
+" call Dret("s:NetrwClearExplore")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwExploreListUniq: {{{2
+fun! s:NetrwExploreListUniq(explist)
+" call Dfunc("s:NetrwExploreListUniq(explist<".string(a:explist).">)")
+
+ " this assumes that the list is already sorted
+ let newexplist= []
+ for member in a:explist
+ if !exists("uniqmember") || member != uniqmember
+ let uniqmember = member
+ let newexplist = newexplist + [ member ]
+ endif
+ endfor
+
+" call Dret("s:NetrwExploreListUniq newexplist<".string(newexplist).">")
+ return newexplist
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwForceChgDir: (gd support) Force treatment as a directory {{{2
+fun! s:NetrwForceChgDir(islocal,newdir)
+" call Dfunc("s:NetrwForceChgDir(islocal=".a:islocal." newdir<".a:newdir.">)")
+ let ykeep= @@
+ if a:newdir !~ '/$'
+ " ok, looks like force is needed to get directory-style treatment
+ if a:newdir =~ '@$'
+ let newdir= substitute(a:newdir,'@$','/','')
+ elseif a:newdir =~ '[*=|\\]$'
+ let newdir= substitute(a:newdir,'.$','/','')
+ else
+ let newdir= a:newdir.'/'
+ endif
+" call Decho("adjusting newdir<".newdir."> due to gd",'~'.expand("<slnum>"))
+ else
+ " should already be getting treatment as a directory
+ let newdir= a:newdir
+ endif
+ let newdir= s:NetrwBrowseChgDir(a:islocal,newdir)
+ call s:NetrwBrowse(a:islocal,newdir)
+ let @@= ykeep
+" call Dret("s:NetrwForceChgDir")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwGlob: does glob() if local, remote listing otherwise {{{2
+" direntry: this is the name of the directory. Will be fnameescape'd to prevent wildcard handling by glob()
+" expr : this is the expression to follow the directory. Will use s:ComposePath()
+" pare =1: remove the current directory from the resulting glob() filelist
+" =0: leave the current directory in the resulting glob() filelist
+fun! s:NetrwGlob(direntry,expr,pare)
+" call Dfunc("s:NetrwGlob(direntry<".a:direntry."> expr<".a:expr."> pare=".a:pare.")")
+ if netrw#CheckIfRemote()
+ keepalt 1sp
+ keepalt enew
+ let keep_liststyle = w:netrw_liststyle
+ let w:netrw_liststyle = s:THINLIST
+ if s:NetrwRemoteListing() == 0
+ keepj keepalt %s@/@@
+ let filelist= getline(1,$)
+ q!
+ else
+ " remote listing error -- leave treedict unchanged
+ let filelist= w:netrw_treedict[a:direntry]
+ endif
+ let w:netrw_liststyle= keep_liststyle
+ elseif v:version > 704 || (v:version == 704 && has("patch656"))
+ let filelist= glob(s:ComposePath(fnameescape(a:direntry),a:expr),0,1,1)
+ if a:pare
+ let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")')
+ endif
+ else
+ let filelist= glob(s:ComposePath(fnameescape(a:direntry),a:expr),0,1)
+ if a:pare
+ let filelist= map(filelist,'substitute(v:val, "^.*/", "", "")')
+ endif
+ endif
+" call Dret("s:NetrwGlob ".string(filelist))
+ return filelist
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwForceFile: (gf support) Force treatment as a file {{{2
+fun! s:NetrwForceFile(islocal,newfile)
+" call Dfunc("s:NetrwForceFile(islocal=".a:islocal." newdir<".a:newfile.">)")
+ if a:newfile =~ '[/@*=|\\]$'
+ let newfile= substitute(a:newfile,'.$','','')
+ else
+ let newfile= a:newfile
+ endif
+ if a:islocal
+ call s:NetrwBrowseChgDir(a:islocal,newfile)
+ else
+ call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,newfile))
+ endif
+" call Dret("s:NetrwForceFile")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwHide: this function is invoked by the "a" map for browsing {{{2
+" and switches the hiding mode. The actual hiding is done by
+" s:NetrwListHide().
+" g:netrw_hide= 0: show all
+" 1: show not-hidden files
+" 2: show hidden files only
+fun! s:NetrwHide(islocal)
+" call Dfunc("NetrwHide(islocal=".a:islocal.") g:netrw_hide=".g:netrw_hide)
+ let ykeep= @@
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist_{bufnr('%')}")
+" call Decho("((g:netrw_hide == 1)? "unhide" : "hide")." files in markfilelist<".string(s:netrwmarkfilelist_{bufnr("%")}).">",'~'.expand("<slnum>"))
+" call Decho("g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("<slnum>"))
+
+ " hide the files in the markfile list
+ for fname in s:netrwmarkfilelist_{bufnr("%")}
+" call Decho("match(g:netrw_list_hide<".g:netrw_list_hide.'> fname<\<'.fname.'\>>)='.match(g:netrw_list_hide,'\<'.fname.'\>')." l:isk=".&l:isk,'~'.expand("<slnum>"))
+ if match(g:netrw_list_hide,'\<'.fname.'\>') != -1
+ " remove fname from hiding list
+ let g:netrw_list_hide= substitute(g:netrw_list_hide,'..\<'.escape(fname,g:netrw_fname_escape).'\>..','','')
+ let g:netrw_list_hide= substitute(g:netrw_list_hide,',,',',','g')
+ let g:netrw_list_hide= substitute(g:netrw_list_hide,'^,\|,$','','')
+" call Decho("unhide: g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("<slnum>"))
+ else
+ " append fname to hiding list
+ if exists("g:netrw_list_hide") && g:netrw_list_hide != ""
+ let g:netrw_list_hide= g:netrw_list_hide.',\<'.escape(fname,g:netrw_fname_escape).'\>'
+ else
+ let g:netrw_list_hide= '\<'.escape(fname,g:netrw_fname_escape).'\>'
+ endif
+" call Decho("hide: g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("<slnum>"))
+ endif
+ endfor
+ NetrwKeepj call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)
+ let g:netrw_hide= 1
+
+ else
+
+ " switch between show-all/show-not-hidden/show-hidden
+ let g:netrw_hide=(g:netrw_hide+1)%3
+ exe "NetrwKeepj norm! 0"
+ if g:netrw_hide && g:netrw_list_hide == ""
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49)
+ let @@= ykeep
+" call Dret("NetrwHide")
+ return
+ endif
+ endif
+
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ let @@= ykeep
+" call Dret("NetrwHide")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwHideEdit: allows user to edit the file/directory hiding list {{{2
+fun! s:NetrwHideEdit(islocal)
+" call Dfunc("NetrwHideEdit(islocal=".a:islocal.")")
+
+ let ykeep= @@
+ " save current cursor position
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+
+ " get new hiding list from user
+ call inputsave()
+ let newhide= input("Edit Hiding List: ",g:netrw_list_hide)
+ call inputrestore()
+ let g:netrw_list_hide= newhide
+" call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("<slnum>"))
+
+ " refresh the listing
+ sil NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,"./"))
+
+ " restore cursor position
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+ let @@= ykeep
+
+" call Dret("NetrwHideEdit")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwHidden: invoked by "gh" {{{2
+fun! s:NetrwHidden(islocal)
+" call Dfunc("s:NetrwHidden()")
+ let ykeep= @@
+ " save current position
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+
+ if g:netrw_list_hide =~ '\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+'
+ " remove .file pattern from hiding list
+" call Decho("remove .file pattern from hiding list",'~'.expand("<slnum>"))
+ let g:netrw_list_hide= substitute(g:netrw_list_hide,'\(^\|,\)\\(^\\|\\s\\s\\)\\zs\\.\\S\\+','','')
+ elseif s:Strlen(g:netrw_list_hide) >= 1
+" call Decho("add .file pattern from hiding list",'~'.expand("<slnum>"))
+ let g:netrw_list_hide= g:netrw_list_hide . ',\(^\|\s\s\)\zs\.\S\+'
+ else
+" call Decho("set .file pattern as hiding list",'~'.expand("<slnum>"))
+ let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
+ endif
+ if g:netrw_list_hide =~ '^,'
+ let g:netrw_list_hide= strpart(g:netrw_list_hide,1)
+ endif
+
+ " refresh screen and return to saved position
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ let @@= ykeep
+" call Dret("s:NetrwHidden")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2
+fun! s:NetrwHome()
+ if exists("g:netrw_home")
+ let home= expand(g:netrw_home)
+ else
+ " go to vim plugin home
+ for home in split(&rtp,',') + ['']
+ if isdirectory(s:NetrwFile(home)) && filewritable(s:NetrwFile(home)) | break | endif
+ let basehome= substitute(home,'[/\\]\.vim$','','')
+ if isdirectory(s:NetrwFile(basehome)) && filewritable(s:NetrwFile(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
+ if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home))
+" call Decho("insure that the home<".home."> directory exists")
+ if exists("g:netrw_mkdir")
+" call Decho("call system(".g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home)).")")
+ call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home)))
+ else
+" call Decho("mkdir(".home.")")
+ call mkdir(home)
+ endif
+ endif
+ let g:netrw_home= home
+ return home
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwLeftmouse: handles the <leftmouse> when in a netrw browsing window {{{2
+fun! s:NetrwLeftmouse(islocal)
+ if exists("s:netrwdrag")
+ return
+ endif
+ if &ft != "netrw"
+ return
+ endif
+" call Dfunc("s:NetrwLeftmouse(islocal=".a:islocal.")")
+
+ let ykeep= @@
+ " check if the status bar was clicked on instead of a file/directory name
+ while getchar(0) != 0
+ "clear the input stream
+ endwhile
+ call feedkeys("\<LeftMouse>")
+ let c = getchar()
+ let mouse_lnum = v:mouse_lnum
+ let wlastline = line('w$')
+ let lastline = line('$')
+" call Decho("v:mouse_lnum=".mouse_lnum." line(w$)=".wlastline." line($)=".lastline." v:mouse_win=".v:mouse_win." winnr#".winnr(),'~'.expand("<slnum>"))
+" call Decho("v:mouse_col =".v:mouse_col." col=".col(".")." wincol =".wincol()." winwidth =".winwidth(0),'~'.expand("<slnum>"))
+ if mouse_lnum >= wlastline + 1 || v:mouse_win != winnr()
+ " appears to be a status bar leftmouse click
+ let @@= ykeep
+" call Dret("s:NetrwLeftmouse : detected a status bar leftmouse click")
+ return
+ endif
+ " Dec 04, 2013: following test prevents leftmouse selection/deselection of directories and files in treelist mode
+ " Windows are separated by vertical separator bars - but the mouse seems to be doing what it should when dragging that bar
+ " without this test when its disabled.
+ " May 26, 2014: edit file, :Lex, resize window -- causes refresh. Reinstated a modified test. See if problems develop.
+" call Decho("v:mouse_col=".v:mouse_col." col#".col('.')." virtcol#".virtcol('.')." col($)#".col("$")." virtcol($)#".virtcol("$"),'~'.expand("<slnum>"))
+ if v:mouse_col > virtcol('.')
+ let @@= ykeep
+" call Dret("s:NetrwLeftmouse : detected a vertical separator bar leftmouse click")
+ return
+ endif
+
+ if a:islocal
+ if exists("b:netrw_curdir")
+ NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
+ endif
+ else
+ if exists("b:netrw_curdir")
+ NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
+ endif
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwLeftmouse")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwCLeftmouse: used to select a file/directory for a target {{{2
+fun! s:NetrwCLeftmouse(islocal)
+ if &ft != "netrw"
+ return
+ endif
+" call Dfunc("s:NetrwCLeftmouse(islocal=".a:islocal.")")
+ call s:NetrwMarkFileTgt(a:islocal)
+" call Dret("s:NetrwCLeftmouse")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwServerEdit: edit file in a server gvim, usually NETRWSERVER (implements <c-r>){{{2
+" a:islocal=0 : <c-r> not used, remote
+" a:islocal=1 : <c-r> not used, local
+" a:islocal=2 : <c-r> used, remote
+" a:islocal=3 : <c-r> used, local
+fun! s:NetrwServerEdit(islocal,fname)
+" call Dfunc("s:NetrwServerEdit(islocal=".a:islocal.",fname<".a:fname.">)")
+ let islocal = a:islocal%2 " =0: remote =1: local
+ let ctrlr = a:islocal >= 2 " =0: <c-r> not used =1: <c-r> used
+" call Decho("islocal=".islocal." ctrlr=".ctrlr,'~'.expand("<slnum>"))
+
+ if (islocal && isdirectory(s:NetrwFile(a:fname))) || (!islocal && a:fname =~ '/$')
+ " handle directories in the local window -- not in the remote vim server
+ " user must have closed the NETRWSERVER window. Treat as normal editing from netrw.
+" call Decho("handling directory in client window",'~'.expand("<slnum>"))
+ let g:netrw_browse_split= 0
+ if exists("s:netrw_browse_split") && exists("s:netrw_browse_split_".winnr())
+ let g:netrw_browse_split= s:netrw_browse_split_{winnr()}
+ unlet s:netrw_browse_split_{winnr()}
+ endif
+ call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,a:fname))
+" call Dret("s:NetrwServerEdit")
+ return
+ endif
+
+" call Decho("handling file in server window",'~'.expand("<slnum>"))
+ if has("clientserver") && executable("gvim")
+" call Decho("has clientserver and gvim",'~'.expand("<slnum>"))
+
+ if exists("g:netrw_browse_split") && type(g:netrw_browse_split) == 3
+" call Decho("g:netrw_browse_split=".string(g:netrw_browse_split),'~'.expand("<slnum>"))
+ let srvrname = g:netrw_browse_split[0]
+ let tabnum = g:netrw_browse_split[1]
+ let winnum = g:netrw_browse_split[2]
+
+ if serverlist() !~ '\<'.srvrname.'\>'
+" call Decho("server not available; ctrlr=".ctrlr,'~'.expand("<slnum>"))
+
+ if !ctrlr
+ " user must have closed the server window and the user did not use <c-r>, but
+ " used something like <cr>.
+" call Decho("user must have closed server AND did not use ctrl-r",'~'.expand("<slnum>"))
+ if exists("g:netrw_browse_split")
+ unlet g:netrw_browse_split
+ endif
+ let g:netrw_browse_split= 0
+ if exists("s:netrw_browse_split_".winnr())
+ let g:netrw_browse_split= s:netrw_browse_split_{winnr()}
+ endif
+ call s:NetrwBrowseChgDir(islocal,a:fname)
+" call Dret("s:NetrwServerEdit")
+ return
+
+ elseif has("win32") && executable("start")
+ " start up remote netrw server under windows
+" call Decho("starting up gvim server<".srvrname."> for windows",'~'.expand("<slnum>"))
+ call system("start gvim --servername ".srvrname)
+
+ else
+ " start up remote netrw server under linux
+" call Decho("starting up gvim server<".srvrname.">",'~'.expand("<slnum>"))
+ call system("gvim --servername ".srvrname)
+ endif
+ endif
+
+" call Decho("srvrname<".srvrname."> tabnum=".tabnum." winnum=".winnum." server-editing<".a:fname.">",'~'.expand("<slnum>"))
+ call remote_send(srvrname,":tabn ".tabnum."\<cr>")
+ call remote_send(srvrname,":".winnum."wincmd w\<cr>")
+ call remote_send(srvrname,":e ".fnameescape(s:NetrwFile(a:fname))."\<cr>")
+
+ else
+
+ if serverlist() !~ '\<'.g:netrw_servername.'\>'
+
+ if !ctrlr
+" call Decho("server<".g:netrw_servername."> not available and ctrl-r not used",'~'.expand("<slnum>"))
+ if exists("g:netrw_browse_split")
+ unlet g:netrw_browse_split
+ endif
+ let g:netrw_browse_split= 0
+ call s:NetrwBrowse(islocal,s:NetrwBrowseChgDir(islocal,a:fname))
+" call Dret("s:NetrwServerEdit")
+ return
+
+ else
+" call Decho("server<".g:netrw_servername."> not available but ctrl-r used",'~'.expand("<slnum>"))
+ if has("win32") && executable("start")
+ " start up remote netrw server under windows
+" call Decho("starting up gvim server<".g:netrw_servername."> for windows",'~'.expand("<slnum>"))
+ call system("start gvim --servername ".g:netrw_servername)
+ else
+ " start up remote netrw server under linux
+" call Decho("starting up gvim server<".g:netrw_servername.">",'~'.expand("<slnum>"))
+ call system("gvim --servername ".g:netrw_servername)
+ endif
+ endif
+ endif
+
+ while 1
+ try
+" call Decho("remote-send: e ".a:fname,'~'.expand("<slnum>"))
+ call remote_send(g:netrw_servername,":e ".fnameescape(s:NetrwFile(a:fname))."\<cr>")
+ break
+ catch /^Vim\%((\a\+)\)\=:E241/
+ sleep 200m
+ endtry
+ endwhile
+
+ if exists("g:netrw_browse_split")
+ if type(g:netrw_browse_split) != 3
+ let s:netrw_browse_split_{winnr()}= g:netrw_browse_split
+ endif
+ unlet g:netrw_browse_split
+ endif
+ let g:netrw_browse_split= [g:netrw_servername,1,1]
+ endif
+
+ else
+ call netrw#ErrorMsg(s:ERROR,"you need a gui-capable vim and client-server to use <ctrl-r>",98)
+ endif
+
+" call Dret("s:NetrwServerEdit")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSLeftmouse: marks the file under the cursor. May be dragged to select additional files {{{2
+fun! s:NetrwSLeftmouse(islocal)
+ if &ft != "netrw"
+ return
+ endif
+" call Dfunc("s:NetrwSLeftmouse(islocal=".a:islocal.")")
+
+ let s:ngw= s:NetrwGetWord()
+ call s:NetrwMarkFile(a:islocal,s:ngw)
+
+" call Dret("s:NetrwSLeftmouse")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSLeftdrag: invoked via a shift-leftmouse and dragging {{{2
+" Used to mark multiple files.
+fun! s:NetrwSLeftdrag(islocal)
+" call Dfunc("s:NetrwSLeftdrag(islocal=".a:islocal.")")
+ if !exists("s:netrwdrag")
+ let s:netrwdrag = winnr()
+ if a:islocal
+ nno <silent> <s-leftrelease> <leftmouse>:<c-u>call <SID>NetrwSLeftrelease(1)<cr>
+ else
+ nno <silent> <s-leftrelease> <leftmouse>:<c-u>call <SID>NetrwSLeftrelease(0)<cr>
+ endif
+ endif
+ let ngw = s:NetrwGetWord()
+ if !exists("s:ngw") || s:ngw != ngw
+ call s:NetrwMarkFile(a:islocal,ngw)
+ endif
+ let s:ngw= ngw
+" call Dret("s:NetrwSLeftdrag : s:netrwdrag=".s:netrwdrag." buf#".bufnr("%"))
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSLeftrelease: terminates shift-leftmouse dragging {{{2
+fun! s:NetrwSLeftrelease(islocal)
+" call Dfunc("s:NetrwSLeftrelease(islocal=".a:islocal.") s:netrwdrag=".s:netrwdrag." buf#".bufnr("%"))
+ if exists("s:netrwdrag")
+ nunmap <s-leftrelease>
+ let ngw = s:NetrwGetWord()
+ if !exists("s:ngw") || s:ngw != ngw
+ call s:NetrwMarkFile(a:islocal,ngw)
+ endif
+ if exists("s:ngw")
+ unlet s:ngw
+ endif
+ unlet s:netrwdrag
+ endif
+" call Dret("s:NetrwSLeftrelease")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwListHide: uses [range]g~...~d to delete files that match {{{2
+" comma-separated patterns given in g:netrw_list_hide
+fun! s:NetrwListHide()
+" call Dfunc("s:NetrwListHide() g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">")
+" call Decho("initial: ".string(getline(w:netrw_bannercnt,'$')))
+ let ykeep= @@
+
+ " find a character not in the "hide" string to use as a separator for :g and :v commands
+ " How-it-works: take the hiding command, convert it into a range.
+ " Duplicate characters don't matter.
+ " Remove all such characters from the '/~@#...890' string.
+ " Use the first character left as a separator character.
+" call Decho("find a character not in the hide string to use as a separator",'~'.expand("<slnum>"))
+ let listhide= g:netrw_list_hide
+ let sep = strpart(substitute('~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
+" call Decho("sep<".sep."> (sep not in hide string)",'~'.expand("<slnum>"))
+
+ while listhide != ""
+ if listhide =~ ','
+ let hide = substitute(listhide,',.*$','','e')
+ let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e')
+ else
+ let hide = listhide
+ let listhide = ""
+ endif
+" call Decho("..extracted pattern from listhide: hide<".hide."> g:netrw_sort_by<".g:netrw_sort_by.'>','~'.expand("<slnum>"))
+ if g:netrw_sort_by =~ '^[ts]'
+ if hide =~ '^\^'
+" call Decho("..modify hide to handle a \"^...\" pattern",'~'.expand("<slnum>"))
+ let hide= substitute(hide,'^\^','^\(\\d\\+/\)','')
+ elseif hide =~ '^\\(\^'
+ let hide= substitute(hide,'^\\(\^','\\(^\\(\\d\\+/\\)','')
+ endif
+" call Decho("..hide<".hide."> listhide<".listhide.'>','~'.expand("<slnum>"))
+ endif
+
+ " Prune the list by hiding any files which match
+" call Decho("..prune the list by hiding any files which ".((g:netrw_hide == 1)? "" : "don't")."match hide<".hide.">")
+ if g:netrw_hide == 1
+" call Decho("..hiding<".hide.">",'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d'
+ elseif g:netrw_hide == 2
+" call Decho("..showing<".hide.">",'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @'
+ endif
+" call Decho("..result: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("<slnum>"))
+ endwhile
+
+ if g:netrw_hide == 2
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d'
+" call Decho("..v KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e'
+" call Decho("..g KEEP: ".string(getline(w:netrw_bannercnt,'$')),'~'.expand("<slnum>"))
+ endif
+
+ " remove any blank lines that have somehow remained.
+ " This seems to happen under Windows.
+ exe 'sil! NetrwKeepj 1,$g@^\s*$@d'
+
+ let @@= ykeep
+" call Dret("s:NetrwListHide")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMakeDir: this function makes a directory (both local and remote) {{{2
+" implements the "d" mapping.
+fun! s:NetrwMakeDir(usrhost)
+" call Dfunc("s:NetrwMakeDir(usrhost<".a:usrhost.">)")
+
+ let ykeep= @@
+ " get name of new directory from user. A bare <CR> will skip.
+ " if its currently a directory, also request will be skipped, but with
+ " a message.
+ call inputsave()
+ let newdirname= input("Please give directory name: ")
+ call inputrestore()
+" call Decho("newdirname<".newdirname.">",'~'.expand("<slnum>"))
+
+ if newdirname == ""
+ let @@= ykeep
+" call Dret("s:NetrwMakeDir : user aborted with bare <cr>")
+ return
+ endif
+
+ if a:usrhost == ""
+" call Decho("local mkdir",'~'.expand("<slnum>"))
+
+ " Local mkdir:
+ " sanity checks
+ let fullnewdir= b:netrw_curdir.'/'.newdirname
+" call Decho("fullnewdir<".fullnewdir.">",'~'.expand("<slnum>"))
+ if isdirectory(s:NetrwFile(fullnewdir))
+ if !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24)
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwMakeDir : directory<".newdirname."> exists previously")
+ return
+ endif
+ if s:FileReadable(fullnewdir)
+ if !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25)
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwMakeDir : file<".newdirname."> exists previously")
+ return
+ endif
+
+ " requested new local directory is neither a pre-existing file or
+ " directory, so make it!
+ if exists("*mkdir")
+ if has("unix")
+ call mkdir(fullnewdir,"p",xor(0777, system("umask")))
+ else
+ call mkdir(fullnewdir,"p")
+ endif
+ else
+ let netrw_origdir= s:NetrwGetcwd(1)
+ if s:NetrwLcd(b:netrw_curdir)
+" call Dret("s:NetrwMakeDir : lcd failure")
+ return
+ endif
+" call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">",'~'.expand("<slnum>"))
+ call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(newdirname,1))
+ if v:shell_error != 0
+ let @@= ykeep
+ call netrw#ErrorMsg(s:ERROR,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80)
+" call Dret("s:NetrwMakeDir : failed: sil! !".g:netrw_localmkdir.' '.s:ShellEscape(newdirname,1))
+ return
+ endif
+ if !g:netrw_keepdir
+" call Decho("restoring netrw_origdir since g:netrw_keepdir=".g:netrw_keepdir,'~'.expand("<slnum>"))
+ if s:NetrwLcd(netrw_origdir)
+" call Dret("s:NetrwBrowse : lcd failure")
+ return
+ endif
+ endif
+ endif
+
+ if v:shell_error == 0
+ " refresh listing
+" call Decho("refresh listing",'~'.expand("<slnum>"))
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+ elseif !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26)
+ endif
+" redraw!
+
+ elseif !exists("b:netrw_method") || b:netrw_method == 4
+ " Remote mkdir: using ssh
+" call Decho("remote mkdir",'~'.expand("<slnum>"))
+ let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd)
+ let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname
+ call s:NetrwExe("sil! !".mkdircmd." ".s:ShellEscape(newdirname,1))
+ if v:shell_error == 0
+ " refresh listing
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ elseif !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27)
+ endif
+" redraw!
+
+ elseif b:netrw_method == 2
+ " Remote mkdir: using ftp+.netrc
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+" call Decho("b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("<slnum>"))
+ if exists("b:netrw_fname")
+" call Decho("b:netrw_fname<".b:netrw_fname.">",'~'.expand("<slnum>"))
+ let remotepath= b:netrw_fname
+ else
+ let remotepath= ""
+ endif
+ call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"')
+ NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+
+ elseif b:netrw_method == 3
+ " Remote mkdir: using ftp + machine, id, passwd, and fname (ie. no .netrc)
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+" call Decho("b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("<slnum>"))
+ if exists("b:netrw_fname")
+" call Decho("b:netrw_fname<".b:netrw_fname.">",'~'.expand("<slnum>"))
+ let remotepath= b:netrw_fname
+ else
+ let remotepath= ""
+ endif
+ call s:NetrwRemoteFtpCmd(remotepath,g:netrw_remote_mkdir.' "'.newdirname.'"')
+ NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ endif
+
+ let @@= ykeep
+" call Dret("s:NetrwMakeDir")
+endfun
+
+" ---------------------------------------------------------------------
+" s:TreeSqueezeDir: allows a shift-cr (gvim only) to squeeze the current tree-listing directory {{{2
+fun! s:TreeSqueezeDir(islocal)
+" call Dfunc("s:TreeSqueezeDir(islocal=".a:islocal.")")
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+ " its a tree-listing style
+ let curdepth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e')
+ let stopline = (exists("w:netrw_bannercnt")? (w:netrw_bannercnt + 1) : 1)
+ let depth = strchars(substitute(curdepth,' ','','g'))
+ let srch = -1
+" call Decho("curdepth<".curdepth.'>','~'.expand("<slnum>"))
+" call Decho("depth =".depth,'~'.expand("<slnum>"))
+" call Decho("stopline#".stopline,'~'.expand("<slnum>"))
+" call Decho("curline#".line(".")."<".getline('.').'>','~'.expand("<slnum>"))
+ if depth >= 2
+ NetrwKeepj norm! 0
+ let curdepthm1= substitute(curdepth,'^'.s:treedepthstring,'','')
+ let srch = search('^'.curdepthm1.'\%('.s:treedepthstring.'\)\@!','bW',stopline)
+" call Decho("curdepthm1<".curdepthm1.'>','~'.expand("<slnum>"))
+" call Decho("case depth>=2: srch<".srch.'>','~'.expand("<slnum>"))
+ elseif depth == 1
+ NetrwKeepj norm! 0
+ let treedepthchr= substitute(s:treedepthstring,' ','','')
+ let srch = search('^[^'.treedepthchr.']','bW',stopline)
+" call Decho("case depth==1: srch<".srch.'>','~'.expand("<slnum>"))
+ endif
+ if srch > 0
+" call Decho("squeezing at line#".line(".").": ".getline('.'),'~'.expand("<slnum>"))
+ call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,s:NetrwGetWord()))
+ exe srch
+ endif
+ endif
+" call Dret("s:TreeSqueezeDir")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMaps: {{{2
+fun! s:NetrwMaps(islocal)
+" call Dfunc("s:NetrwMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">")
+
+ " mouse <Plug> maps: {{{3
+ if g:netrw_mousemaps && g:netrw_retmap
+" call Decho("set up Rexplore 2-leftmouse",'~'.expand("<slnum>"))
+ if !hasmapto("<Plug>NetrwReturn")
+ if maparg("<2-leftmouse>","n") == "" || maparg("<2-leftmouse>","n") =~ '^-$'
+" call Decho("making map for 2-leftmouse",'~'.expand("<slnum>"))
+ nmap <unique> <silent> <2-leftmouse> <Plug>NetrwReturn
+ elseif maparg("<c-leftmouse>","n") == ""
+" call Decho("making map for c-leftmouse",'~'.expand("<slnum>"))
+ nmap <unique> <silent> <c-leftmouse> <Plug>NetrwReturn
+ endif
+ endif
+ nno <silent> <Plug>NetrwReturn :Rexplore<cr>
+" call Decho("made <Plug>NetrwReturn map",'~'.expand("<slnum>"))
+ endif
+
+ " generate default <Plug> maps {{{3
+ if !hasmapto('<Plug>NetrwHide') |nmap <buffer> <silent> <nowait> a <Plug>NetrwHide_a|endif
+ if !hasmapto('<Plug>NetrwBrowseUpDir') |nmap <buffer> <silent> <nowait> - <Plug>NetrwBrowseUpDir|endif
+ if !hasmapto('<Plug>NetrwOpenFile') |nmap <buffer> <silent> <nowait> % <Plug>NetrwOpenFile|endif
+ if !hasmapto('<Plug>NetrwBadd_cb') |nmap <buffer> <silent> <nowait> cb <Plug>NetrwBadd_cb|endif
+ if !hasmapto('<Plug>NetrwBadd_cB') |nmap <buffer> <silent> <nowait> cB <Plug>NetrwBadd_cB|endif
+ if !hasmapto('<Plug>NetrwLcd') |nmap <buffer> <silent> <nowait> cd <Plug>NetrwLcd|endif
+ if !hasmapto('<Plug>NetrwSetChgwin') |nmap <buffer> <silent> <nowait> C <Plug>NetrwSetChgwin|endif
+ if !hasmapto('<Plug>NetrwRefresh') |nmap <buffer> <silent> <nowait> <c-l> <Plug>NetrwRefresh|endif
+ if !hasmapto('<Plug>NetrwLocalBrowseCheck') |nmap <buffer> <silent> <nowait> <cr> <Plug>NetrwLocalBrowseCheck|endif
+ if !hasmapto('<Plug>NetrwServerEdit') |nmap <buffer> <silent> <nowait> <c-r> <Plug>NetrwServerEdit|endif
+ if !hasmapto('<Plug>NetrwMakeDir') |nmap <buffer> <silent> <nowait> d <Plug>NetrwMakeDir|endif
+ if !hasmapto('<Plug>NetrwBookHistHandler_gb')|nmap <buffer> <silent> <nowait> gb <Plug>NetrwBookHistHandler_gb|endif
+" ---------------------------------------------------------------------
+" if !hasmapto('<Plug>NetrwForceChgDir') |nmap <buffer> <silent> <nowait> gd <Plug>NetrwForceChgDir|endif
+" if !hasmapto('<Plug>NetrwForceFile') |nmap <buffer> <silent> <nowait> gf <Plug>NetrwForceFile|endif
+" if !hasmapto('<Plug>NetrwHidden') |nmap <buffer> <silent> <nowait> gh <Plug>NetrwHidden|endif
+" if !hasmapto('<Plug>NetrwSetTreetop') |nmap <buffer> <silent> <nowait> gn <Plug>NetrwSetTreetop|endif
+" if !hasmapto('<Plug>NetrwChgPerm') |nmap <buffer> <silent> <nowait> gp <Plug>NetrwChgPerm|endif
+" if !hasmapto('<Plug>NetrwBannerCtrl') |nmap <buffer> <silent> <nowait> I <Plug>NetrwBannerCtrl|endif
+" if !hasmapto('<Plug>NetrwListStyle') |nmap <buffer> <silent> <nowait> i <Plug>NetrwListStyle|endif
+" if !hasmapto('<Plug>NetrwMarkMoveMF2Arglist')|nmap <buffer> <silent> <nowait> ma <Plug>NetrwMarkMoveMF2Arglist|endif
+" if !hasmapto('<Plug>NetrwMarkMoveArglist2MF')|nmap <buffer> <silent> <nowait> mA <Plug>NetrwMarkMoveArglist2MF|endif
+" if !hasmapto('<Plug>NetrwBookHistHandler_mA')|nmap <buffer> <silent> <nowait> mb <Plug>NetrwBookHistHandler_mA|endif
+" if !hasmapto('<Plug>NetrwBookHistHandler_mB')|nmap <buffer> <silent> <nowait> mB <Plug>NetrwBookHistHandler_mB|endif
+" if !hasmapto('<Plug>NetrwMarkFileCopy') |nmap <buffer> <silent> <nowait> mc <Plug>NetrwMarkFileCopy|endif
+" if !hasmapto('<Plug>NetrwMarkFileDiff') |nmap <buffer> <silent> <nowait> md <Plug>NetrwMarkFileDiff|endif
+" if !hasmapto('<Plug>NetrwMarkFileEdit') |nmap <buffer> <silent> <nowait> me <Plug>NetrwMarkFileEdit|endif
+" if !hasmapto('<Plug>NetrwMarkFile') |nmap <buffer> <silent> <nowait> mf <Plug>NetrwMarkFile|endif
+" if !hasmapto('<Plug>NetrwUnmarkList') |nmap <buffer> <silent> <nowait> mF <Plug>NetrwUnmarkList|endif
+" if !hasmapto('<Plug>NetrwMarkFileGrep') |nmap <buffer> <silent> <nowait> mg <Plug>NetrwMarkFileGrep|endif
+" if !hasmapto('<Plug>NetrwMarkHideSfx') |nmap <buffer> <silent> <nowait> mh <Plug>NetrwMarkHideSfx|endif
+" if !hasmapto('<Plug>NetrwMarkFileMove') |nmap <buffer> <silent> <nowait> mm <Plug>NetrwMarkFileMove|endif
+" if !hasmapto('<Plug>NetrwMarkFilePrint') |nmap <buffer> <silent> <nowait> mp <Plug>NetrwMarkFilePrint|endif
+" if !hasmapto('<Plug>NetrwMarkFileRegexp') |nmap <buffer> <silent> <nowait> mr <Plug>NetrwMarkFileRegexp|endif
+" if !hasmapto('<Plug>NetrwMarkFileSource') |nmap <buffer> <silent> <nowait> ms <Plug>NetrwMarkFileSource|endif
+" if !hasmapto('<Plug>NetrwMarkFileTag') |nmap <buffer> <silent> <nowait> mT <Plug>NetrwMarkFileTag|endif
+" if !hasmapto('<Plug>NetrwMarkFileTgt') |nmap <buffer> <silent> <nowait> mt <Plug>NetrwMarkFileTgt|endif
+" if !hasmapto('<Plug>NetrwUnMarkFile') |nmap <buffer> <silent> <nowait> mu <Plug>NetrwUnMarkFile|endif
+" if !hasmapto('<Plug>NetrwMarkFileVimCmd') |nmap <buffer> <silent> <nowait> mv <Plug>NetrwMarkFileVimCmd|endif
+" if !hasmapto('<Plug>NetrwMarkFileExe_mx') |nmap <buffer> <silent> <nowait> mx <Plug>NetrwMarkFileExe_mx|endif
+" if !hasmapto('<Plug>NetrwMarkFileExe_mX') |nmap <buffer> <silent> <nowait> mX <Plug>NetrwMarkFileExe_mX|endif
+" if !hasmapto('<Plug>NetrwMarkFileCompress') |nmap <buffer> <silent> <nowait> mz <Plug>NetrwMarkFileCompress|endif
+" if !hasmapto('<Plug>NetrwObtain') |nmap <buffer> <silent> <nowait> O <Plug>NetrwObtain|endif
+" if !hasmapto('<Plug>NetrwSplit_o') |nmap <buffer> <silent> <nowait> o <Plug>NetrwSplit_o|endif
+" if !hasmapto('<Plug>NetrwPreview') |nmap <buffer> <silent> <nowait> p <Plug>NetrwPreview|endif
+" if !hasmapto('<Plug>NetrwPrevWinOpen') |nmap <buffer> <silent> <nowait> P <Plug>NetrwPrevWinOpen|endif
+" if !hasmapto('<Plug>NetrwBookHistHandler_qb')|nmap <buffer> <silent> <nowait> qb <Plug>NetrwBookHistHandler_qb|endif
+" if !hasmapto('<Plug>NetrwFileInfo') |nmap <buffer> <silent> <nowait> qf <Plug>NetrwFileInfo|endif
+" if !hasmapto('<Plug>NetrwMarkFileQFEL_qF') |nmap <buffer> <silent> <nowait> qF <Plug>NetrwMarkFileQFEL_qF|endif
+" if !hasmapto('<Plug>NetrwMarkFileQFEL_qL') |nmap <buffer> <silent> <nowait> qL <Plug>NetrwMarkFileQFEL_qL|endif
+" if !hasmapto('<Plug>NetrwSortStyle') |nmap <buffer> <silent> <nowait> s <Plug>NetrwSortStyle|endif
+" if !hasmapto('<Plug>NetSortSequence') |nmap <buffer> <silent> <nowait> S <Plug>NetSortSequence|endif
+" if !hasmapto('<Plug>NetrwSetTgt_Tb') |nmap <buffer> <silent> <nowait> Tb <Plug>NetrwSetTgt_Tb|endif
+" if !hasmapto('<Plug>NetrwSetTgt_Th') |nmap <buffer> <silent> <nowait> Th <Plug>NetrwSetTgt_Th|endif
+" if !hasmapto('<Plug>NetrwSplit_t') |nmap <buffer> <silent> <nowait> t <Plug>NetrwSplit_t|endif
+" if !hasmapto('<Plug>NetrwBookHistHandler_u') |nmap <buffer> <silent> <nowait> u <Plug>NetrwBookHistHandler_u|endif
+" if !hasmapto('<Plug>NetrwBookHistHandler_U') |nmap <buffer> <silent> <nowait> U <Plug>NetrwBookHistHandler_U|endif
+" if !hasmapto('<Plug>NetrwSplit_v') |nmap <buffer> <silent> <nowait> v <Plug>NetrwSplit_v|endif
+" if !hasmapto('<Plug>NetrwBrowseX') |nmap <buffer> <silent> <nowait> x <Plug>NetrwBrowseX|endif
+" if !hasmapto('<Plug>NetrwLocalExecute') |nmap <buffer> <silent> <nowait> X <Plug>NetrwLocalExecute|endif
+
+ if a:islocal
+" call Decho("make local maps",'~'.expand("<slnum>"))
+ " local normal-mode maps {{{3
+ nnoremap <buffer> <silent> <Plug>NetrwHide_a :<c-u>call <SID>NetrwHide(1)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBrowseUpDir :<c-u>call <SID>NetrwBrowseUpDir(1)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwOpenFile :<c-u>call <SID>NetrwOpenFile(1)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBadd_cb :<c-u>call <SID>NetrwBadd(1,0)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBadd_cB :<c-u>call <SID>NetrwBadd(1,1)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwLcd :<c-u>call <SID>NetrwLcd(b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwSetChgwin :<c-u>call <SID>NetrwSetChgwin()<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwLocalBrowseCheck :<c-u>call netrw#LocalBrowseCheck(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord()))<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwServerEdit :<c-u>call <SID>NetrwServerEdit(3,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwMakeDir :<c-u>call <SID>NetrwMakeDir("")<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBookHistHandler_gb :<c-u>call <SID>NetrwBookHistHandler(1,b:netrw_curdir)<cr>
+" ---------------------------------------------------------------------
+ nnoremap <buffer> <silent> <nowait> gd :<c-u>call <SID>NetrwForceChgDir(1,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> gf :<c-u>call <SID>NetrwForceFile(1,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> gh :<c-u>call <SID>NetrwHidden(1)<cr>
+ nnoremap <buffer> <silent> <nowait> gn :<c-u>call netrw#SetTreetop(0,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> gp :<c-u>call <SID>NetrwChgPerm(1,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> I :<c-u>call <SID>NetrwBannerCtrl(1)<cr>
+ nnoremap <buffer> <silent> <nowait> i :<c-u>call <SID>NetrwListStyle(1)<cr>
+ nnoremap <buffer> <silent> <nowait> ma :<c-u>call <SID>NetrwMarkFileArgList(1,0)<cr>
+ nnoremap <buffer> <silent> <nowait> mA :<c-u>call <SID>NetrwMarkFileArgList(1,1)<cr>
+ nnoremap <buffer> <silent> <nowait> mb :<c-u>call <SID>NetrwBookHistHandler(0,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> mB :<c-u>call <SID>NetrwBookHistHandler(6,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> mc :<c-u>call <SID>NetrwMarkFileCopy(1)<cr>
+ nnoremap <buffer> <silent> <nowait> md :<c-u>call <SID>NetrwMarkFileDiff(1)<cr>
+ nnoremap <buffer> <silent> <nowait> me :<c-u>call <SID>NetrwMarkFileEdit(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mf :<c-u>call <SID>NetrwMarkFile(1,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> mF :<c-u>call <SID>NetrwUnmarkList(bufnr("%"),b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mp :<c-u>call <SID>NetrwMarkFilePrint(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(1)<cr>
+ nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mt :<c-u>call <SID>NetrwMarkFileTgt(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mu :<c-u>call <SID>NetrwUnMarkFile(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mv :<c-u>call <SID>NetrwMarkFileVimCmd(1)<cr>
+ nnoremap <buffer> <silent> <nowait> mx :<c-u>call <SID>NetrwMarkFileExe(1,0)<cr>
+ nnoremap <buffer> <silent> <nowait> mX :<c-u>call <SID>NetrwMarkFileExe(1,1)<cr>
+ nnoremap <buffer> <silent> <nowait> mz :<c-u>call <SID>NetrwMarkFileCompress(1)<cr>
+ nnoremap <buffer> <silent> <nowait> O :<c-u>call <SID>NetrwObtain(1)<cr>
+ nnoremap <buffer> <silent> <nowait> o :call <SID>NetrwSplit(3)<cr>
+ nnoremap <buffer> <silent> <nowait> p :<c-u>call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr>
+ nnoremap <buffer> <silent> <nowait> P :<c-u>call <SID>NetrwPrevWinOpen(1)<cr>
+ nnoremap <buffer> <silent> <nowait> qb :<c-u>call <SID>NetrwBookHistHandler(2,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> qf :<c-u>call <SID>NetrwFileInfo(1,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> qF :<c-u>call <SID>NetrwMarkFileQFEL(1,getqflist())<cr>
+ nnoremap <buffer> <silent> <nowait> qL :<c-u>call <SID>NetrwMarkFileQFEL(1,getloclist(v:count))<cr>
+ nnoremap <buffer> <silent> <nowait> s :call <SID>NetrwSortStyle(1)<cr>
+ nnoremap <buffer> <silent> <nowait> S :<c-u>call <SID>NetSortSequence(1)<cr>
+ nnoremap <buffer> <silent> <nowait> Tb :<c-u>call <SID>NetrwSetTgt(1,'b',v:count1)<cr>
+ nnoremap <buffer> <silent> <nowait> t :call <SID>NetrwSplit(4)<cr>
+ nnoremap <buffer> <silent> <nowait> Th :<c-u>call <SID>NetrwSetTgt(1,'h',v:count)<cr>
+ nnoremap <buffer> <silent> <nowait> u :<c-u>call <SID>NetrwBookHistHandler(4,expand("%"))<cr>
+ nnoremap <buffer> <silent> <nowait> U :<c-u>call <SID>NetrwBookHistHandler(5,expand("%"))<cr>
+ nnoremap <buffer> <silent> <nowait> v :call <SID>NetrwSplit(5)<cr>
+ nnoremap <buffer> <silent> <nowait> x :<c-u>call netrw#BrowseX(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),0),0)"<cr>
+ nnoremap <buffer> <silent> <nowait> X :<c-u>call <SID>NetrwLocalExecute(expand("<cword>"))"<cr>
+
+ nnoremap <buffer> <silent> <nowait> r :<c-u>let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,'./'))<cr>
+ if !hasmapto('<Plug>NetrwHideEdit')
+ nmap <buffer> <unique> <c-h> <Plug>NetrwHideEdit
+ endif
+ nnoremap <buffer> <silent> <Plug>NetrwHideEdit :call <SID>NetrwHideEdit(1)<cr>
+ if !hasmapto('<Plug>NetrwRefresh')
+ nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh
+ endif
+ nnoremap <buffer> <silent> <Plug>NetrwRefresh <c-l>:call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,(exists("w:netrw_liststyle") && exists("w:netrw_treetop") && w:netrw_liststyle == 3)? w:netrw_treetop : './'))<cr>
+ if s:didstarstar || !mapcheck("<s-down>","n")
+ nnoremap <buffer> <silent> <s-down> :Nexplore<cr>
+ endif
+ if s:didstarstar || !mapcheck("<s-up>","n")
+ nnoremap <buffer> <silent> <s-up> :Pexplore<cr>
+ endif
+ if !hasmapto('<Plug>NetrwTreeSqueeze')
+ nmap <buffer> <silent> <nowait> <s-cr> <Plug>NetrwTreeSqueeze
+ endif
+ nnoremap <buffer> <silent> <Plug>NetrwTreeSqueeze :call <SID>TreeSqueezeDir(1)<cr>
+ let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape)
+ if g:netrw_mousemaps == 1
+ nmap <buffer> <leftmouse> <Plug>NetrwLeftmouse
+ nmap <buffer> <c-leftmouse> <Plug>NetrwCLeftmouse
+ nmap <buffer> <middlemouse> <Plug>NetrwMiddlemouse
+ nmap <buffer> <s-leftmouse> <Plug>NetrwSLeftmouse
+ nmap <buffer> <s-leftdrag> <Plug>NetrwSLeftdrag
+ nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse
+ imap <buffer> <leftmouse> <Plug>ILeftmouse
+ imap <buffer> <middlemouse> <Plug>IMiddlemouse
+ nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwCLeftmouse <leftmouse>:call <SID>NetrwCLeftmouse(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwSLeftmouse(1)<cr>
+ nno <buffer> <silent> <Plug>NetrwSLeftdrag <leftmouse>:call <SID>NetrwSLeftdrag(1)<cr>
+ nmap <buffer> <silent> <Plug>Netrw2Leftmouse -
+ exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ endif
+ exe 'nnoremap <buffer> <silent> <nowait> <del> :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <nowait> D :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <nowait> R :call <SID>NetrwLocalRename("'.mapsafecurdir.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <nowait> d :call <SID>NetrwMakeDir("")<cr>'
+ exe 'vnoremap <buffer> <silent> <nowait> <del> :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <nowait> D :call <SID>NetrwLocalRm("'.mapsafecurdir.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <nowait> R :call <SID>NetrwLocalRename("'.mapsafecurdir.'")<cr>'
+ nnoremap <buffer> <F1> :he netrw-quickhelp<cr>
+
+ " support user-specified maps
+ call netrw#UserMaps(1)
+
+ else
+ " remote normal-mode maps {{{3
+" call Decho("make remote maps",'~'.expand("<slnum>"))
+ call s:RemotePathAnalysis(b:netrw_curdir)
+ nnoremap <buffer> <silent> <Plug>NetrwHide_a :<c-u>call <SID>NetrwHide(0)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBrowseUpDir :<c-u>call <SID>NetrwBrowseUpDir(0)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwOpenFile :<c-u>call <SID>NetrwOpenFile(0)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBadd_cb :<c-u>call <SID>NetrwBadd(0,0)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBadd_cB :<c-u>call <SID>NetrwBadd(0,1)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwLcd :<c-u>call <SID>NetrwLcd(b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwSetChgwin :<c-u>call <SID>NetrwSetChgwin()<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwRefresh :<c-u>call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwLocalBrowseCheck :<c-u>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()))<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwServerEdit :<c-u>call <SID>NetrwServerEdit(2,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <Plug>NetrwBookHistHandler_gb :<c-u>call <SID>NetrwBookHistHandler(1,b:netrw_curdir)<cr>
+" ---------------------------------------------------------------------
+ nnoremap <buffer> <silent> <nowait> gd :<c-u>call <SID>NetrwForceChgDir(0,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> gf :<c-u>call <SID>NetrwForceFile(0,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> gh :<c-u>call <SID>NetrwHidden(0)<cr>
+ nnoremap <buffer> <silent> <nowait> gp :<c-u>call <SID>NetrwChgPerm(0,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> I :<c-u>call <SID>NetrwBannerCtrl(1)<cr>
+ nnoremap <buffer> <silent> <nowait> i :<c-u>call <SID>NetrwListStyle(0)<cr>
+ nnoremap <buffer> <silent> <nowait> ma :<c-u>call <SID>NetrwMarkFileArgList(0,0)<cr>
+ nnoremap <buffer> <silent> <nowait> mA :<c-u>call <SID>NetrwMarkFileArgList(0,1)<cr>
+ nnoremap <buffer> <silent> <nowait> mb :<c-u>call <SID>NetrwBookHistHandler(0,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> mB :<c-u>call <SID>NetrwBookHistHandler(6,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> mc :<c-u>call <SID>NetrwMarkFileCopy(0)<cr>
+ nnoremap <buffer> <silent> <nowait> md :<c-u>call <SID>NetrwMarkFileDiff(0)<cr>
+ nnoremap <buffer> <silent> <nowait> me :<c-u>call <SID>NetrwMarkFileEdit(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mf :<c-u>call <SID>NetrwMarkFile(0,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> mF :<c-u>call <SID>NetrwUnmarkList(bufnr("%"),b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mp :<c-u>call <SID>NetrwMarkFilePrint(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(0)<cr>
+ nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mt :<c-u>call <SID>NetrwMarkFileTgt(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mu :<c-u>call <SID>NetrwUnMarkFile(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mv :<c-u>call <SID>NetrwMarkFileVimCmd(0)<cr>
+ nnoremap <buffer> <silent> <nowait> mx :<c-u>call <SID>NetrwMarkFileExe(0,0)<cr>
+ nnoremap <buffer> <silent> <nowait> mX :<c-u>call <SID>NetrwMarkFileExe(0,1)<cr>
+ nnoremap <buffer> <silent> <nowait> mz :<c-u>call <SID>NetrwMarkFileCompress(0)<cr>
+ nnoremap <buffer> <silent> <nowait> O :<c-u>call <SID>NetrwObtain(0)<cr>
+ nnoremap <buffer> <silent> <nowait> o :call <SID>NetrwSplit(0)<cr>
+ nnoremap <buffer> <silent> <nowait> p :<c-u>call <SID>NetrwPreview(<SID>NetrwBrowseChgDir(1,<SID>NetrwGetWord(),1))<cr>
+ nnoremap <buffer> <silent> <nowait> P :<c-u>call <SID>NetrwPrevWinOpen(0)<cr>
+ nnoremap <buffer> <silent> <nowait> qb :<c-u>call <SID>NetrwBookHistHandler(2,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> qf :<c-u>call <SID>NetrwFileInfo(0,<SID>NetrwGetWord())<cr>
+ nnoremap <buffer> <silent> <nowait> qF :<c-u>call <SID>NetrwMarkFileQFEL(0,getqflist())<cr>
+ nnoremap <buffer> <silent> <nowait> qL :<c-u>call <SID>NetrwMarkFileQFEL(0,getloclist(v:count))<cr>
+ nnoremap <buffer> <silent> <nowait> r :<c-u>let g:netrw_sort_direction= (g:netrw_sort_direction =~# 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetrwBrowse(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+ nnoremap <buffer> <silent> <nowait> s :call <SID>NetrwSortStyle(0)<cr>
+ nnoremap <buffer> <silent> <nowait> S :<c-u>call <SID>NetSortSequence(0)<cr>
+ nnoremap <buffer> <silent> <nowait> Tb :<c-u>call <SID>NetrwSetTgt(0,'b',v:count1)<cr>
+ nnoremap <buffer> <silent> <nowait> t :call <SID>NetrwSplit(1)<cr>
+ nnoremap <buffer> <silent> <nowait> Th :<c-u>call <SID>NetrwSetTgt(0,'h',v:count)<cr>
+ nnoremap <buffer> <silent> <nowait> u :<c-u>call <SID>NetrwBookHistHandler(4,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> U :<c-u>call <SID>NetrwBookHistHandler(5,b:netrw_curdir)<cr>
+ nnoremap <buffer> <silent> <nowait> v :call <SID>NetrwSplit(2)<cr>
+ nnoremap <buffer> <silent> <nowait> x :<c-u>call netrw#BrowseX(<SID>NetrwBrowseChgDir(0,<SID>NetrwGetWord()),1)<cr>
+ if !hasmapto('<Plug>NetrwHideEdit')
+ nmap <buffer> <c-h> <Plug>NetrwHideEdit
+ endif
+ nnoremap <buffer> <silent> <Plug>NetrwHideEdit :call <SID>NetrwHideEdit(0)<cr>
+ if !hasmapto('<Plug>NetrwRefresh')
+ nmap <buffer> <c-l> <Plug>NetrwRefresh
+ endif
+ if !hasmapto('<Plug>NetrwTreeSqueeze')
+ nmap <buffer> <silent> <nowait> <s-cr> <Plug>NetrwTreeSqueeze
+ endif
+ nnoremap <buffer> <silent> <Plug>NetrwTreeSqueeze :call <SID>TreeSqueezeDir(0)<cr>
+
+ let mapsafepath = escape(s:path, s:netrw_map_escape)
+ let mapsafeusermach = escape(((s:user == "")? "" : s:user."@").s:machine, s:netrw_map_escape)
+
+ nnoremap <buffer> <silent> <Plug>NetrwRefresh :call <SID>NetrwRefresh(0,<SID>NetrwBrowseChgDir(0,'./'))<cr>
+ if g:netrw_mousemaps == 1
+ nmap <buffer> <leftmouse> <Plug>NetrwLeftmouse
+ nno <buffer> <silent> <Plug>NetrwLeftmouse <leftmouse>:call <SID>NetrwLeftmouse(0)<cr>
+ nmap <buffer> <c-leftmouse> <Plug>NetrwCLeftmouse
+ nno <buffer> <silent> <Plug>NetrwCLeftmouse <leftmouse>:call <SID>NetrwCLeftmouse(0)<cr>
+ nmap <buffer> <s-leftmouse> <Plug>NetrwSLeftmouse
+ nno <buffer> <silent> <Plug>NetrwSLeftmouse <leftmouse>:call <SID>NetrwSLeftmouse(0)<cr>
+ nmap <buffer> <s-leftdrag> <Plug>NetrwSLeftdrag
+ nno <buffer> <silent> <Plug>NetrwSLeftdrag <leftmouse>:call <SID>NetrwSLeftdrag(0)<cr>
+ nmap <middlemouse> <Plug>NetrwMiddlemouse
+ nno <buffer> <silent> <middlemouse> <Plug>NetrwMiddlemouse <leftmouse>:call <SID>NetrwPrevWinOpen(0)<cr>
+ nmap <buffer> <2-leftmouse> <Plug>Netrw2Leftmouse
+ nmap <buffer> <silent> <Plug>Netrw2Leftmouse -
+ imap <buffer> <leftmouse> <Plug>ILeftmouse
+ imap <buffer> <middlemouse> <Plug>IMiddlemouse
+ imap <buffer> <s-leftmouse> <Plug>ISLeftmouse
+ exe 'nnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <rightmouse> <leftmouse>:call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ endif
+ exe 'nnoremap <buffer> <silent> <nowait> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <nowait> d :call <SID>NetrwMakeDir("'.mapsafeusermach.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <nowait> D :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'nnoremap <buffer> <silent> <nowait> R :call <SID>NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <nowait> <del> :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <nowait> D :call <SID>NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ exe 'vnoremap <buffer> <silent> <nowait> R :call <SID>NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")<cr>'
+ nnoremap <buffer> <F1> :he netrw-quickhelp<cr>
+
+ " support user-specified maps
+ call netrw#UserMaps(0)
+ endif " }}}3
+
+" call Dret("s:NetrwMaps")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwCommands: set up commands {{{2
+" If -buffer, the command is only available from within netrw buffers
+" Otherwise, the command is available from any window, so long as netrw
+" has been used at least once in the session.
+fun! s:NetrwCommands(islocal)
+" call Dfunc("s:NetrwCommands(islocal=".a:islocal.")")
+
+ com! -nargs=* -complete=file -bang NetrwMB call s:NetrwBookmark(<bang>0,<f-args>)
+ com! -nargs=* NetrwC call s:NetrwSetChgwin(<q-args>)
+ com! Rexplore if exists("w:netrw_rexlocal")|call s:NetrwRexplore(w:netrw_rexlocal,exists("w:netrw_rexdir")? w:netrw_rexdir : ".")|else|call netrw#ErrorMsg(s:WARNING,"win#".winnr()." not a former netrw window",79)|endif
+ if a:islocal
+ com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(1,<f-args>)
+ else
+ com! -buffer -nargs=+ -complete=file MF call s:NetrwMarkFiles(0,<f-args>)
+ endif
+ com! -buffer -nargs=? -complete=file MT call s:NetrwMarkTarget(<q-args>)
+
+" call Dret("s:NetrwCommands")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFiles: apply s:NetrwMarkFile() to named file(s) {{{2
+" glob()ing only works with local files
+fun! s:NetrwMarkFiles(islocal,...)
+" call Dfunc("s:NetrwMarkFiles(islocal=".a:islocal."...) a:0=".a:0)
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let i = 1
+ while i <= a:0
+ if a:islocal
+ if v:version > 704 || (v:version == 704 && has("patch656"))
+ let mffiles= glob(a:{i},0,1,1)
+ else
+ let mffiles= glob(a:{i},0,1)
+ endif
+ else
+ let mffiles= [a:{i}]
+ endif
+" call Decho("mffiles".string(mffiles),'~'.expand("<slnum>"))
+ for mffile in mffiles
+" call Decho("mffile<".mffile.">",'~'.expand("<slnum>"))
+ call s:NetrwMarkFile(a:islocal,mffile)
+ endfor
+ let i= i + 1
+ endwhile
+" call Dret("s:NetrwMarkFiles")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkTarget: implements :MT (mark target) {{{2
+fun! s:NetrwMarkTarget(...)
+" call Dfunc("s:NetrwMarkTarget() a:0=".a:0)
+ if a:0 == 0 || (a:0 == 1 && a:1 == "")
+ let curdir = s:NetrwGetCurdir(1)
+ let tgt = b:netrw_curdir
+ else
+ let curdir = s:NetrwGetCurdir((a:1 =~ '^\a\{3,}://')? 0 : 1)
+ let tgt = a:1
+ endif
+" call Decho("tgt<".tgt.">",'~'.expand("<slnum>"))
+ let s:netrwmftgt = tgt
+ let s:netrwmftgt_islocal = tgt !~ '^\a\{3,}://'
+ let curislocal = b:netrw_curdir !~ '^\a\{3,}://'
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call s:NetrwRefresh(curislocal,s:NetrwBrowseChgDir(curislocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+" call Dret("s:NetrwMarkTarget")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFile: (invoked by mf) This function is used to both {{{2
+" mark and unmark files. If a markfile list exists,
+" then the rename and delete functions will use it instead
+" of whatever may happen to be under the cursor at that
+" moment. When the mouse and gui are available,
+" shift-leftmouse may also be used to mark files.
+"
+" Creates two lists
+" s:netrwmarkfilelist -- holds complete paths to all marked files
+" s:netrwmarkfilelist_# -- holds list of marked files in current-buffer's directory (#==bufnr())
+"
+" Creates a marked file match string
+" s:netrwmarfilemtch_# -- used with 2match to display marked files
+"
+" Creates a buffer version of islocal
+" b:netrw_islocal
+fun! s:NetrwMarkFile(islocal,fname)
+" call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)")
+" call Decho("bufnr(%)=".bufnr("%").": ".bufname("%"),'~'.expand("<slnum>"))
+
+ " sanity check
+ if empty(a:fname)
+" call Dret("s:NetrwMarkFile : empty fname")
+ return
+ endif
+ let curdir = s:NetrwGetCurdir(a:islocal)
+
+ let ykeep = @@
+ let curbufnr= bufnr("%")
+ if a:fname =~ '^\a'
+ let leader= '\<'
+ else
+ let leader= ''
+ endif
+ if a:fname =~ '\a$'
+ let trailer = '\>[@=|\/\*]\=\ze\%( \|\t\|$\)'
+ else
+ let trailer = '[@=|\/\*]\=\ze\%( \|\t\|$\)'
+ endif
+
+ if exists("s:netrwmarkfilelist_".curbufnr)
+ " markfile list pre-exists
+" call Decho("case s:netrwmarkfilelist_".curbufnr." already exists",'~'.expand("<slnum>"))
+" call Decho("starting s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("<slnum>"))
+" call Decho("starting s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">",'~'.expand("<slnum>"))
+ let b:netrw_islocal= a:islocal
+
+ if index(s:netrwmarkfilelist_{curbufnr},a:fname) == -1
+ " append filename to buffer's markfilelist
+" call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("<slnum>"))
+ call add(s:netrwmarkfilelist_{curbufnr},a:fname)
+ let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(a:fname,g:netrw_markfileesc).trailer
+
+ else
+ " remove filename from buffer's markfilelist
+" call Decho("remove filename<".a:fname."> from local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("<slnum>"))
+ call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname')
+ if s:netrwmarkfilelist_{curbufnr} == []
+ " local markfilelist is empty; remove it entirely
+" call Decho("markfile list now empty",'~'.expand("<slnum>"))
+ call s:NetrwUnmarkList(curbufnr,curdir)
+ else
+ " rebuild match list to display markings correctly
+" call Decho("rebuild s:netrwmarkfilemtch_".curbufnr,'~'.expand("<slnum>"))
+ let s:netrwmarkfilemtch_{curbufnr}= ""
+ let first = 1
+ for fname in s:netrwmarkfilelist_{curbufnr}
+ if first
+ let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.leader.escape(fname,g:netrw_markfileesc).trailer
+ else
+ let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|'.leader.escape(fname,g:netrw_markfileesc).trailer
+ endif
+ let first= 0
+ endfor
+" call Decho("ending s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("<slnum>"))
+ endif
+ endif
+
+ else
+ " initialize new markfilelist
+" call Decho("case: initialize new markfilelist",'~'.expand("<slnum>"))
+
+" call Decho("add fname<".a:fname."> to new markfilelist_".curbufnr,'~'.expand("<slnum>"))
+ let s:netrwmarkfilelist_{curbufnr}= []
+ call add(s:netrwmarkfilelist_{curbufnr},substitute(a:fname,'[|@]$','',''))
+" call Decho("ending s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">",'~'.expand("<slnum>"))
+
+ " build initial markfile matching pattern
+ if a:fname =~ '/$'
+ let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc)
+ else
+ let s:netrwmarkfilemtch_{curbufnr}= leader.escape(a:fname,g:netrw_markfileesc).trailer
+ endif
+" call Decho("ending s:netrwmarkfilemtch_".curbufnr."<".s:netrwmarkfilemtch_{curbufnr}.">",'~'.expand("<slnum>"))
+ endif
+
+ " handle global markfilelist
+ if exists("s:netrwmarkfilelist")
+ let dname= s:ComposePath(b:netrw_curdir,a:fname)
+ if index(s:netrwmarkfilelist,dname) == -1
+ " append new filename to global markfilelist
+ call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname))
+" call Decho("append filename<".a:fname."> to global s:markfilelist<".string(s:netrwmarkfilelist).">",'~'.expand("<slnum>"))
+ else
+ " remove new filename from global markfilelist
+" call Decho("remove new filename from global s:markfilelist",'~'.expand("<slnum>"))
+" call Decho("..filter(".string(s:netrwmarkfilelist).",'v:val != '.".dname.")",'~'.expand("<slnum>"))
+ call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"')
+" call Decho("..ending s:netrwmarkfilelist <".string(s:netrwmarkfilelist).">",'~'.expand("<slnum>"))
+ if s:netrwmarkfilelist == []
+" call Decho("s:netrwmarkfilelist is empty; unlet it",'~'.expand("<slnum>"))
+ unlet s:netrwmarkfilelist
+ endif
+ endif
+ else
+ " initialize new global-directory markfilelist
+ let s:netrwmarkfilelist= []
+ call add(s:netrwmarkfilelist,s:ComposePath(b:netrw_curdir,a:fname))
+" call Decho("init s:netrwmarkfilelist<".string(s:netrwmarkfilelist).">",'~'.expand("<slnum>"))
+ endif
+
+ " set up 2match'ing to netrwmarkfilemtch_# list
+ if has("syntax") && exists("g:syntax_on") && g:syntax_on
+ if exists("s:netrwmarkfilemtch_{curbufnr}") && s:netrwmarkfilemtch_{curbufnr} != ""
+" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/",'~'.expand("<slnum>"))
+ if exists("g:did_drchip_netrwlist_syntax")
+ exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{curbufnr}."/"
+ endif
+ else
+" " call Decho("2match none",'~'.expand("<slnum>"))
+ 2match none
+ endif
+ endif
+ let @@= ykeep
+" call Decho("s:netrwmarkfilelist[".(exists("s:netrwmarkfilelist")? string(s:netrwmarkfilelist) : "")."] (avail in all buffers)",'~'.expand("<slnum>"))
+" call Dret("s:NetrwMarkFile : s:netrwmarkfilelist_".curbufnr."<".(exists("s:netrwmarkfilelist_{curbufnr}")? string(s:netrwmarkfilelist_{curbufnr}) : " doesn't exist")."> (buf#".curbufnr."list)")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileArgList: ma: move the marked file list to the argument list (tomflist=0) {{{2
+" mA: move the argument list to marked file list (tomflist=1)
+" Uses the global marked file list
+fun! s:NetrwMarkFileArgList(islocal,tomflist)
+" call Dfunc("s:NetrwMarkFileArgList(islocal=".a:islocal.",tomflist=".a:tomflist.")")
+
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+
+ if a:tomflist
+ " mA: move argument list to marked file list
+ while argc()
+ let fname= argv(0)
+" call Decho("exe argdel ".fname,'~'.expand("<slnum>"))
+ exe "argdel ".fnameescape(fname)
+ call s:NetrwMarkFile(a:islocal,fname)
+ endwhile
+
+ else
+ " ma: move marked file list to argument list
+ if exists("s:netrwmarkfilelist")
+
+ " for every filename in the marked list
+ for fname in s:netrwmarkfilelist
+" call Decho("exe argadd ".fname,'~'.expand("<slnum>"))
+ exe "argadd ".fnameescape(fname)
+ endfor " for every file in the marked list
+
+ " unmark list and refresh
+ call s:NetrwUnmarkList(curbufnr,curdir)
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ endif
+ endif
+
+" call Dret("s:NetrwMarkFileArgList")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileCompress: (invoked by mz) This function is used to {{{2
+" compress/decompress files using the programs
+" in g:netrw_compress and g:netrw_uncompress,
+" using g:netrw_compress_suffix to know which to
+" do. By default:
+" g:netrw_compress = "gzip"
+" g:netrw_decompress = { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , ".tar" : "tar -xf", ".xz" : "unxz"}
+fun! s:NetrwMarkFileCompress(islocal)
+" call Dfunc("s:NetrwMarkFileCompress(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileCompress")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist_{curbufnr}") && exists("g:netrw_compress") && exists("g:netrw_decompress")
+
+ " for every filename in the marked list
+ for fname in s:netrwmarkfilelist_{curbufnr}
+ let sfx= substitute(fname,'^.\{-}\(\.\a\+\)$','\1','')
+" call Decho("extracted sfx<".sfx.">",'~'.expand("<slnum>"))
+ if exists("g:netrw_decompress['".sfx."']")
+ " fname has a suffix indicating that its compressed; apply associated decompression routine
+ let exe= g:netrw_decompress[sfx]
+" call Decho("fname<".fname."> is compressed so decompress with <".exe.">",'~'.expand("<slnum>"))
+ let exe= netrw#WinPath(exe)
+ if a:islocal
+ if g:netrw_keepdir
+ let fname= s:ShellEscape(s:ComposePath(curdir,fname))
+ endif
+ call system(exe." ".fname)
+ if v:shell_error
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to apply<".exe."> to file<".fname.">",50)
+ endif
+ else
+ let fname= s:ShellEscape(b:netrw_curdir.fname,1)
+ NetrwKeepj call s:RemoteSystem(exe." ".fname)
+ endif
+
+ endif
+ unlet sfx
+
+ if exists("exe")
+ unlet exe
+ elseif a:islocal
+ " fname not a compressed file, so compress it
+ call system(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(s:ComposePath(b:netrw_curdir,fname)))
+ if v:shell_error
+ call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_compress<".g:netrw_compress."> to something that works",104)
+ endif
+ else
+ " fname not a compressed file, so compress it
+ NetrwKeepj call s:RemoteSystem(netrw#WinPath(g:netrw_compress)." ".s:ShellEscape(fname))
+ endif
+ endfor " for every file in the marked list
+
+ call s:NetrwUnmarkList(curbufnr,curdir)
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ endif
+" call Dret("s:NetrwMarkFileCompress")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileCopy: (invoked by mc) copy marked files to target {{{2
+" If no marked files, then set up directory as the
+" target. Currently does not support copying entire
+" directories. Uses the local-buffer marked file list.
+" Returns 1=success (used by NetrwMarkFileMove())
+" 0=failure
+fun! s:NetrwMarkFileCopy(islocal,...)
+" call Dfunc("s:NetrwMarkFileCopy(islocal=".a:islocal.") target<".(exists("s:netrwmftgt")? s:netrwmftgt : '---')."> a:0=".a:0)
+
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+ if b:netrw_curdir !~ '/$'
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= curdir
+ endif
+ let b:netrw_curdir= b:netrw_curdir."/"
+ endif
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileCopy")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if !exists("s:netrwmftgt")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your marked file target is empty! (:help netrw-mt)",67)
+" call Dret("s:NetrwMarkFileCopy 0")
+ return 0
+ endif
+" call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+
+ if a:islocal && s:netrwmftgt_islocal
+ " Copy marked files, local directory to local directory
+" call Decho("copy from local to local",'~'.expand("<slnum>"))
+ if !executable(g:netrw_localcopycmd)
+ call netrw#ErrorMsg(s:ERROR,"g:netrw_localcopycmd<".g:netrw_localcopycmd."> not executable on your system, aborting",91)
+" call Dfunc("s:NetrwMarkFileMove : g:netrw_localcopycmd<".g:netrw_localcopycmd."> n/a!")
+ return
+ endif
+
+ " copy marked files while within the same directory (ie. allow renaming)
+ if simplify(s:netrwmftgt) == simplify(b:netrw_curdir)
+ if len(s:netrwmarkfilelist_{bufnr('%')}) == 1
+ " only one marked file
+" call Decho("case: only one marked file",'~'.expand("<slnum>"))
+ let args = s:ShellEscape(b:netrw_curdir.s:netrwmarkfilelist_{bufnr('%')}[0])
+ let oldname = s:netrwmarkfilelist_{bufnr('%')}[0]
+ elseif a:0 == 1
+" call Decho("case: handling one input argument",'~'.expand("<slnum>"))
+ " this happens when the next case was used to recursively call s:NetrwMarkFileCopy()
+ let args = s:ShellEscape(b:netrw_curdir.a:1)
+ let oldname = a:1
+ else
+ " copy multiple marked files inside the same directory
+" call Decho("case: handling a multiple marked files",'~'.expand("<slnum>"))
+ let s:recursive= 1
+ for oldname in s:netrwmarkfilelist_{bufnr("%")}
+ let ret= s:NetrwMarkFileCopy(a:islocal,oldname)
+ if ret == 0
+ break
+ endif
+ endfor
+ unlet s:recursive
+ call s:NetrwUnmarkList(curbufnr,curdir)
+" call Dret("s:NetrwMarkFileCopy ".ret)
+ return ret
+ endif
+
+ call inputsave()
+ let newname= input("Copy ".oldname." to : ",oldname,"file")
+ call inputrestore()
+ if newname == ""
+" call Dret("s:NetrwMarkFileCopy 0")
+ return 0
+ endif
+ let args= s:ShellEscape(oldname)
+ let tgt = s:ShellEscape(s:netrwmftgt.'/'.newname)
+ else
+ let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"s:ShellEscape(b:netrw_curdir.\"/\".v:val)"))
+ let tgt = s:ShellEscape(s:netrwmftgt)
+ endif
+ if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
+ let args= substitute(args,'/','\\','g')
+ let tgt = substitute(tgt, '/','\\','g')
+ endif
+ if args =~ "'" |let args= substitute(args,"'\\(.*\\)'",'\1','')|endif
+ if tgt =~ "'" |let tgt = substitute(tgt ,"'\\(.*\\)'",'\1','')|endif
+ if args =~ '//'|let args= substitute(args,'//','/','g')|endif
+ if tgt =~ '//'|let tgt = substitute(tgt ,'//','/','g')|endif
+" call Decho("args <".args.">",'~'.expand("<slnum>"))
+" call Decho("tgt <".tgt.">",'~'.expand("<slnum>"))
+ if isdirectory(s:NetrwFile(args))
+" call Decho("args<".args."> is a directory",'~'.expand("<slnum>"))
+ let copycmd= g:netrw_localcopydircmd
+" call Decho("using copydircmd<".copycmd.">",'~'.expand("<slnum>"))
+ if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
+ " window's xcopy doesn't copy a directory to a target properly. Instead, it copies a directory's
+ " contents to a target. One must append the source directory name to the target to get xcopy to
+ " do the right thing.
+ let tgt= tgt.'\'.substitute(a:1,'^.*[\\/]','','')
+" call Decho("modified tgt for xcopy",'~'.expand("<slnum>"))
+ endif
+ else
+ let copycmd= g:netrw_localcopycmd
+ endif
+ if g:netrw_localcopycmd =~ '\s'
+ let copycmd = substitute(copycmd,'\s.*$','','')
+ let copycmdargs = substitute(copycmd,'^.\{-}\(\s.*\)$','\1','')
+ let copycmd = netrw#WinPath(copycmd).copycmdargs
+ else
+ let copycmd = netrw#WinPath(copycmd)
+ endif
+" call Decho("args <".args.">",'~'.expand("<slnum>"))
+" call Decho("tgt <".tgt.">",'~'.expand("<slnum>"))
+" call Decho("copycmd<".copycmd.">",'~'.expand("<slnum>"))
+" call Decho("system(".copycmd." '".args."' '".tgt."')",'~'.expand("<slnum>"))
+ call system(copycmd.g:netrw_localcopycmdopt." '".args."' '".tgt."'")
+ if v:shell_error != 0
+ if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir
+ call netrw#ErrorMsg(s:ERROR,"copy failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",101)
+ else
+ call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localcopycmd<".g:netrw_localcopycmd.">; it doesn't work!",80)
+ endif
+" call Dret("s:NetrwMarkFileCopy 0 : failed: system(".g:netrw_localcopycmd." ".args." ".s:ShellEscape(s:netrwmftgt))
+ return 0
+ endif
+
+ elseif a:islocal && !s:netrwmftgt_islocal
+ " Copy marked files, local directory to remote directory
+" call Decho("copy from local to remote",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwUpload(s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt)
+
+ elseif !a:islocal && s:netrwmftgt_islocal
+ " Copy marked files, remote directory to local directory
+" call Decho("copy from remote to local",'~'.expand("<slnum>"))
+ NetrwKeepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},s:netrwmftgt)
+
+ elseif !a:islocal && !s:netrwmftgt_islocal
+ " Copy marked files, remote directory to remote directory
+" call Decho("copy from remote to remote",'~'.expand("<slnum>"))
+ let curdir = getcwd()
+ let tmpdir = s:GetTempfile("")
+ if tmpdir !~ '/'
+ let tmpdir= curdir."/".tmpdir
+ endif
+ if exists("*mkdir")
+ call mkdir(tmpdir)
+ else
+ call s:NetrwExe("sil! !".g:netrw_localmkdir.g:netrw_localmkdiropt.' '.s:ShellEscape(tmpdir,1))
+ if v:shell_error != 0
+ call netrw#ErrorMsg(s:WARNING,"consider setting g:netrw_localmkdir<".g:netrw_localmkdir."> to something that works",80)
+" call Dret("s:NetrwMarkFileCopy : failed: sil! !".g:netrw_localmkdir.' '.s:ShellEscape(tmpdir,1) )
+ return
+ endif
+ endif
+ if isdirectory(s:NetrwFile(tmpdir))
+ if s:NetrwLcd(tmpdir)
+" call Dret("s:NetrwMarkFileCopy : lcd failure")
+ return
+ endif
+ NetrwKeepj call netrw#Obtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir)
+ let localfiles= map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")')
+ NetrwKeepj call s:NetrwUpload(localfiles,s:netrwmftgt)
+ if getcwd() == tmpdir
+ for fname in s:netrwmarkfilelist_{bufnr('%')}
+ NetrwKeepj call s:NetrwDelete(fname)
+ endfor
+ if s:NetrwLcd(curdir)
+" call Dret("s:NetrwMarkFileCopy : lcd failure")
+ return
+ endif
+ if delete(tmpdir,"d")
+ call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".tmpdir.">!",103)
+ endif
+ else
+ if s:NetrwLcd(curdir)
+" call Dret("s:NetrwMarkFileCopy : lcd failure")
+ return
+ endif
+ endif
+ endif
+ endif
+
+ " -------
+ " cleanup
+ " -------
+" call Decho("cleanup",'~'.expand("<slnum>"))
+ " remove markings from local buffer
+ call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer
+" call Decho(" g:netrw_fastbrowse =".g:netrw_fastbrowse,'~'.expand("<slnum>"))
+" call Decho(" s:netrwmftgt =".s:netrwmftgt,'~'.expand("<slnum>"))
+" call Decho(" s:netrwmftgt_islocal=".s:netrwmftgt_islocal,'~'.expand("<slnum>"))
+" call Decho(" curdir =".curdir,'~'.expand("<slnum>"))
+" call Decho(" a:islocal =".a:islocal,'~'.expand("<slnum>"))
+" call Decho(" curbufnr =".curbufnr,'~'.expand("<slnum>"))
+ if exists("s:recursive")
+" call Decho(" s:recursive =".s:recursive,'~'.expand("<slnum>"))
+ else
+" call Decho(" s:recursive =n/a",'~'.expand("<slnum>"))
+ endif
+ " see s:LocalFastBrowser() for g:netrw_fastbrowse interpretation (refreshing done for both slow and medium)
+ if g:netrw_fastbrowse <= 1
+ NetrwKeepj call s:LocalBrowseRefresh()
+ else
+ " refresh local and targets for fast browsing
+ if !exists("s:recursive")
+ " remove markings from local buffer
+" call Decho(" remove markings from local buffer",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwUnmarkList(curbufnr,curdir)
+ endif
+
+ " refresh buffers
+ if s:netrwmftgt_islocal
+" call Decho(" refresh s:netrwmftgt=".s:netrwmftgt,'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt)
+ endif
+ if a:islocal && s:netrwmftgt != curdir
+" call Decho(" refresh curdir=".curdir,'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefreshDir(a:islocal,curdir)
+ endif
+ endif
+
+" call Dret("s:NetrwMarkFileCopy 1")
+ return 1
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileDiff: (invoked by md) This function is used to {{{2
+" invoke vim's diff mode on the marked files.
+" Either two or three files can be so handled.
+" Uses the global marked file list.
+fun! s:NetrwMarkFileDiff(islocal)
+" call Dfunc("s:NetrwMarkFileDiff(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">")
+ let curbufnr= bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileDiff")
+ return
+ endif
+ let curdir= s:NetrwGetCurdir(a:islocal)
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist_{".curbufnr."}")
+ let cnt = 0
+ for fname in s:netrwmarkfilelist
+ let cnt= cnt + 1
+ if cnt == 1
+" call Decho("diffthis: fname<".fname.">",'~'.expand("<slnum>"))
+ exe "NetrwKeepj e ".fnameescape(fname)
+ diffthis
+ elseif cnt == 2 || cnt == 3
+ vsplit
+ wincmd l
+" call Decho("diffthis: ".fname,'~'.expand("<slnum>"))
+ exe "NetrwKeepj e ".fnameescape(fname)
+ diffthis
+ else
+ break
+ endif
+ endfor
+ call s:NetrwUnmarkList(curbufnr,curdir)
+ endif
+
+" call Dret("s:NetrwMarkFileDiff")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileEdit: (invoked by me) put marked files on arg list and start editing them {{{2
+" Uses global markfilelist
+fun! s:NetrwMarkFileEdit(islocal)
+" call Dfunc("s:NetrwMarkFileEdit(islocal=".a:islocal.")")
+
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileEdit")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ call s:SetRexDir(a:islocal,curdir)
+ let flist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)"))
+ " unmark markedfile list
+" call s:NetrwUnmarkList(curbufnr,curdir)
+ call s:NetrwUnmarkAll()
+" call Decho("exe sil args ".flist,'~'.expand("<slnum>"))
+ exe "sil args ".flist
+ endif
+ echo "(use :bn, :bp to navigate files; :Rex to return)"
+
+" call Dret("s:NetrwMarkFileEdit")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileQFEL: convert a quickfix-error or location list into a marked file list {{{2
+fun! s:NetrwMarkFileQFEL(islocal,qfel)
+" call Dfunc("s:NetrwMarkFileQFEL(islocal=".a:islocal.",qfel)")
+ call s:NetrwUnmarkAll()
+ let curbufnr= bufnr("%")
+
+ if !empty(a:qfel)
+ for entry in a:qfel
+ let bufnmbr= entry["bufnr"]
+" call Decho("bufname(".bufnmbr.")<".bufname(bufnmbr)."> line#".entry["lnum"]." text=".entry["text"],'~'.expand("<slnum>"))
+ if !exists("s:netrwmarkfilelist_{curbufnr}")
+" call Decho("case: no marked file list",'~'.expand("<slnum>"))
+ call s:NetrwMarkFile(a:islocal,bufname(bufnmbr))
+ elseif index(s:netrwmarkfilelist_{curbufnr},bufname(bufnmbr)) == -1
+ " s:NetrwMarkFile will remove duplicate entries from the marked file list.
+ " So, this test lets two or more hits on the same pattern to be ignored.
+" call Decho("case: ".bufname(bufnmbr)." not currently in marked file list",'~'.expand("<slnum>"))
+ call s:NetrwMarkFile(a:islocal,bufname(bufnmbr))
+ else
+" call Decho("case: ".bufname(bufnmbr)." already in marked file list",'~'.expand("<slnum>"))
+ endif
+ endfor
+ echo "(use me to edit marked files)"
+ else
+ call netrw#ErrorMsg(s:WARNING,"can't convert quickfix error list; its empty!",92)
+ endif
+
+" call Dret("s:NetrwMarkFileQFEL")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileExe: (invoked by mx and mX) execute arbitrary system command on marked files {{{2
+" mx enbloc=0: Uses the local marked-file list, applies command to each file individually
+" mX enbloc=1: Uses the global marked-file list, applies command to entire list
+fun! s:NetrwMarkFileExe(islocal,enbloc)
+" call Dfunc("s:NetrwMarkFileExe(islocal=".a:islocal.",enbloc=".a:enbloc.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+
+ if a:enbloc == 0
+ " individually apply command to files, one at a time
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileExe")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ " get the command
+ call inputsave()
+ let cmd= input("Enter command: ","","file")
+ call inputrestore()
+" call Decho("cmd<".cmd.">",'~'.expand("<slnum>"))
+ if cmd == ""
+" call Dret("s:NetrwMarkFileExe : early exit, empty command")
+ return
+ endif
+
+ " apply command to marked files, individually. Substitute: filename -> %
+ " If no %, then append a space and the filename to the command
+ for fname in s:netrwmarkfilelist_{curbufnr}
+ if a:islocal
+ if g:netrw_keepdir
+ let fname= s:ShellEscape(netrw#WinPath(s:ComposePath(curdir,fname)))
+ endif
+ else
+ let fname= s:ShellEscape(netrw#WinPath(b:netrw_curdir.fname))
+ endif
+ if cmd =~ '%'
+ let xcmd= substitute(cmd,'%',fname,'g')
+ else
+ let xcmd= cmd.' '.fname
+ endif
+ if a:islocal
+" call Decho("local: xcmd<".xcmd.">",'~'.expand("<slnum>"))
+ let ret= system(xcmd)
+ else
+" call Decho("remote: xcmd<".xcmd.">",'~'.expand("<slnum>"))
+ let ret= s:RemoteSystem(xcmd)
+ endif
+ if v:shell_error < 0
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54)
+ break
+ else
+ echo ret
+ endif
+ endfor
+
+ " unmark marked file list
+ call s:NetrwUnmarkList(curbufnr,curdir)
+
+ " refresh the listing
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ else
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
+ endif
+
+ else " apply command to global list of files, en bloc
+
+ call inputsave()
+ let cmd= input("Enter command: ","","file")
+ call inputrestore()
+" call Decho("cmd<".cmd.">",'~'.expand("<slnum>"))
+ if cmd == ""
+" call Dret("s:NetrwMarkFileExe : early exit, empty command")
+ return
+ endif
+ if cmd =~ '%'
+ let cmd= substitute(cmd,'%',join(map(s:netrwmarkfilelist,'s:ShellEscape(v:val)'),' '),'g')
+ else
+ let cmd= cmd.' '.join(map(s:netrwmarkfilelist,'s:ShellEscape(v:val)'),' ')
+ endif
+ if a:islocal
+ call system(cmd)
+ if v:shell_error < 0
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"command<".xcmd."> failed, aborting",54)
+ endif
+ else
+ let ret= s:RemoteSystem(cmd)
+ endif
+ call s:NetrwUnmarkAll()
+
+ " refresh the listing
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+
+ endif
+
+" call Dret("s:NetrwMarkFileExe")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkHideSfx: (invoked by mh) (un)hide files having same suffix
+" as the marked file(s) (toggles suffix presence)
+" Uses the local marked file list.
+fun! s:NetrwMarkHideSfx(islocal)
+" call Dfunc("s:NetrwMarkHideSfx(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curbufnr = bufnr("%")
+
+ " s:netrwmarkfilelist_{curbufnr}: the List of marked files
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+
+ for fname in s:netrwmarkfilelist_{curbufnr}
+" call Decho("s:NetrwMarkFileCopy: fname<".fname.">",'~'.expand("<slnum>"))
+ " construct suffix pattern
+ if fname =~ '\.'
+ let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','')
+ else
+ let sfxpat= '^\%(\%(\.\)\@!.\)*$'
+ endif
+ " determine if its in the hiding list or not
+ let inhidelist= 0
+ if g:netrw_list_hide != ""
+ let itemnum = 0
+ let hidelist= split(g:netrw_list_hide,',')
+ for hidepat in hidelist
+ if sfxpat == hidepat
+ let inhidelist= 1
+ break
+ endif
+ let itemnum= itemnum + 1
+ endfor
+ endif
+" call Decho("fname<".fname."> inhidelist=".inhidelist." sfxpat<".sfxpat.">",'~'.expand("<slnum>"))
+ if inhidelist
+ " remove sfxpat from list
+ call remove(hidelist,itemnum)
+ let g:netrw_list_hide= join(hidelist,",")
+ elseif g:netrw_list_hide != ""
+ " append sfxpat to non-empty list
+ let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat
+ else
+ " set hiding list to sfxpat
+ let g:netrw_list_hide= sfxpat
+ endif
+ endfor
+
+ " refresh the listing
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ else
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
+ endif
+
+" call Dret("s:NetrwMarkHideSfx")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileVimCmd: (invoked by mv) execute arbitrary vim command on marked files, one at a time {{{2
+" Uses the local marked-file list.
+fun! s:NetrwMarkFileVimCmd(islocal)
+" call Dfunc("s:NetrwMarkFileVimCmd(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileVimCmd")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ " get the command
+ call inputsave()
+ let cmd= input("Enter vim command: ","","file")
+ call inputrestore()
+" call Decho("cmd<".cmd.">",'~'.expand("<slnum>"))
+ if cmd == ""
+" " call Dret("s:NetrwMarkFileVimCmd : early exit, empty command")
+ return
+ endif
+
+ " apply command to marked files. Substitute: filename -> %
+ " If no %, then append a space and the filename to the command
+ for fname in s:netrwmarkfilelist_{curbufnr}
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+ if a:islocal
+ 1split
+ exe "sil! NetrwKeepj keepalt e ".fnameescape(fname)
+" call Decho("local<".fname.">: exe ".cmd,'~'.expand("<slnum>"))
+ exe cmd
+ exe "sil! keepalt wq!"
+ else
+" call Decho("remote<".fname.">: exe ".cmd." : NOT SUPPORTED YET",'~'.expand("<slnum>"))
+ echo "sorry, \"mv\" not supported yet for remote files"
+ endif
+ endfor
+
+ " unmark marked file list
+ call s:NetrwUnmarkList(curbufnr,curdir)
+
+ " refresh the listing
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ else
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
+ endif
+
+" call Dret("s:NetrwMarkFileVimCmd")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkHideSfx: (invoked by mh) (un)hide files having same suffix
+" as the marked file(s) (toggles suffix presence)
+" Uses the local marked file list.
+fun! s:NetrwMarkHideSfx(islocal)
+" call Dfunc("s:NetrwMarkHideSfx(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curbufnr = bufnr("%")
+
+ " s:netrwmarkfilelist_{curbufnr}: the List of marked files
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+
+ for fname in s:netrwmarkfilelist_{curbufnr}
+" call Decho("s:NetrwMarkFileCopy: fname<".fname.">",'~'.expand("<slnum>"))
+ " construct suffix pattern
+ if fname =~ '\.'
+ let sfxpat= "^.*".substitute(fname,'^.*\(\.[^. ]\+\)$','\1','')
+ else
+ let sfxpat= '^\%(\%(\.\)\@!.\)*$'
+ endif
+ " determine if its in the hiding list or not
+ let inhidelist= 0
+ if g:netrw_list_hide != ""
+ let itemnum = 0
+ let hidelist= split(g:netrw_list_hide,',')
+ for hidepat in hidelist
+ if sfxpat == hidepat
+ let inhidelist= 1
+ break
+ endif
+ let itemnum= itemnum + 1
+ endfor
+ endif
+" call Decho("fname<".fname."> inhidelist=".inhidelist." sfxpat<".sfxpat.">",'~'.expand("<slnum>"))
+ if inhidelist
+ " remove sfxpat from list
+ call remove(hidelist,itemnum)
+ let g:netrw_list_hide= join(hidelist,",")
+ elseif g:netrw_list_hide != ""
+ " append sfxpat to non-empty list
+ let g:netrw_list_hide= g:netrw_list_hide.",".sfxpat
+ else
+ " set hiding list to sfxpat
+ let g:netrw_list_hide= sfxpat
+ endif
+ endfor
+
+ " refresh the listing
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ else
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"no files marked!",59)
+ endif
+
+" call Dret("s:NetrwMarkHideSfx")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileGrep: (invoked by mg) This function applies vimgrep to marked files {{{2
+" Uses the global markfilelist
+fun! s:NetrwMarkFileGrep(islocal)
+" call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curbufnr = bufnr("%")
+ let curdir = s:NetrwGetCurdir(a:islocal)
+
+ if exists("s:netrwmarkfilelist")
+" call Decho("using s:netrwmarkfilelist".string(s:netrwmarkfilelist).">",'~'.expand("<slnum>"))
+ let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)"))
+" call Decho("keeping copy of s:netrwmarkfilelist in function-local variable,'~'.expand("<slnum>"))"
+ call s:NetrwUnmarkAll()
+ else
+" call Decho('no marked files, using "*"','~'.expand("<slnum>"))
+ let netrwmarkfilelist= "*"
+ endif
+
+ " ask user for pattern
+" call Decho("ask user for search pattern",'~'.expand("<slnum>"))
+ call inputsave()
+ let pat= input("Enter pattern: ","")
+ call inputrestore()
+ let patbang = ""
+ if pat =~ '^!'
+ let patbang = "!"
+ let pat = strpart(pat,2)
+ endif
+ if pat =~ '^\i'
+ let pat = escape(pat,'/')
+ let pat = '/'.pat.'/'
+ else
+ let nonisi = pat[0]
+ endif
+
+ " use vimgrep for both local and remote
+" call Decho("exe vimgrep".patbang." ".pat." ".netrwmarkfilelist,'~'.expand("<slnum>"))
+ try
+ exe "NetrwKeepj noautocmd vimgrep".patbang." ".pat." ".netrwmarkfilelist
+ catch /^Vim\%((\a\+)\)\=:E480/
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"no match with pattern<".pat.">",76)
+" call Dret("s:NetrwMarkFileGrep : unable to find pattern<".pat.">")
+ return
+ endtry
+ echo "(use :cn, :cp to navigate, :Rex to return)"
+
+ 2match none
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+
+ if exists("nonisi")
+ " original, user-supplied pattern did not begin with a character from isident
+" call Decho("looking for trailing nonisi<".nonisi."> followed by a j, gj, or jg",'~'.expand("<slnum>"))
+ if pat =~# nonisi.'j$\|'.nonisi.'gj$\|'.nonisi.'jg$'
+ call s:NetrwMarkFileQFEL(a:islocal,getqflist())
+ endif
+ endif
+
+" call Dret("s:NetrwMarkFileGrep")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileMove: (invoked by mm) execute arbitrary command on marked files, one at a time {{{2
+" uses the global marked file list
+" s:netrwmfloc= 0: target directory is remote
+" = 1: target directory is local
+fun! s:NetrwMarkFileMove(islocal)
+" call Dfunc("s:NetrwMarkFileMove(islocal=".a:islocal.")")
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileMove")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if !exists("s:netrwmftgt")
+ NetrwKeepj call netrw#ErrorMsg(2,"your marked file target is empty! (:help netrw-mt)",67)
+" call Dret("s:NetrwMarkFileCopy 0")
+ return 0
+ endif
+" call Decho("sanity chk passed: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+
+ if a:islocal && s:netrwmftgt_islocal
+ " move: local -> local
+" call Decho("move from local to local",'~'.expand("<slnum>"))
+" call Decho("local to local move",'~'.expand("<slnum>"))
+ if !executable(g:netrw_localmovecmd)
+ call netrw#ErrorMsg(s:ERROR,"g:netrw_localmovecmd<".g:netrw_localmovecmd."> not executable on your system, aborting",90)
+" call Dfunc("s:NetrwMarkFileMove : g:netrw_localmovecmd<".g:netrw_localmovecmd."> n/a!")
+ return
+ endif
+ let tgt = s:ShellEscape(s:netrwmftgt)
+" call Decho("tgt<".tgt.">",'~'.expand("<slnum>"))
+ if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
+ let tgt= substitute(tgt, '/','\\','g')
+" call Decho("windows exception: tgt<".tgt.">",'~'.expand("<slnum>"))
+ if g:netrw_localmovecmd =~ '\s'
+ let movecmd = substitute(g:netrw_localmovecmd,'\s.*$','','')
+ let movecmdargs = substitute(g:netrw_localmovecmd,'^.\{-}\(\s.*\)$','\1','')
+ let movecmd = netrw#WinPath(movecmd).movecmdargs
+" call Decho("windows exception: movecmd<".movecmd."> (#1: had a space)",'~'.expand("<slnum>"))
+ else
+ let movecmd = netrw#WinPath(movecmd)
+" call Decho("windows exception: movecmd<".movecmd."> (#2: no space)",'~'.expand("<slnum>"))
+ endif
+ else
+ let movecmd = netrw#WinPath(g:netrw_localmovecmd)
+" call Decho("movecmd<".movecmd."> (#3 linux or cygwin)",'~'.expand("<slnum>"))
+ endif
+ for fname in s:netrwmarkfilelist_{bufnr("%")}
+ if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
+ let fname= substitute(fname,'/','\\','g')
+ endif
+" call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("<slnum>"))
+ let ret= system(movecmd.g:netrw_localmovecmdopt." ".s:ShellEscape(fname)." ".tgt)
+ if v:shell_error != 0
+ if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir
+ call netrw#ErrorMsg(s:ERROR,"move failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",100)
+ else
+ call netrw#ErrorMsg(s:ERROR,"tried using g:netrw_localmovecmd<".g:netrw_localmovecmd.">; it doesn't work!",54)
+ endif
+ break
+ endif
+ endfor
+
+ elseif a:islocal && !s:netrwmftgt_islocal
+ " move: local -> remote
+" call Decho("move from local to remote",'~'.expand("<slnum>"))
+" call Decho("copy",'~'.expand("<slnum>"))
+ let mflist= s:netrwmarkfilelist_{bufnr("%")}
+ NetrwKeepj call s:NetrwMarkFileCopy(a:islocal)
+" call Decho("remove",'~'.expand("<slnum>"))
+ for fname in mflist
+ let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','')
+ let ok = s:NetrwLocalRmFile(b:netrw_curdir,barefname,1)
+ endfor
+ unlet mflist
+
+ elseif !a:islocal && s:netrwmftgt_islocal
+ " move: remote -> local
+" call Decho("move from remote to local",'~'.expand("<slnum>"))
+" call Decho("copy",'~'.expand("<slnum>"))
+ let mflist= s:netrwmarkfilelist_{bufnr("%")}
+ NetrwKeepj call s:NetrwMarkFileCopy(a:islocal)
+" call Decho("remove",'~'.expand("<slnum>"))
+ for fname in mflist
+ let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','')
+ let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1)
+ endfor
+ unlet mflist
+
+ elseif !a:islocal && !s:netrwmftgt_islocal
+ " move: remote -> remote
+" call Decho("move from remote to remote",'~'.expand("<slnum>"))
+" call Decho("copy",'~'.expand("<slnum>"))
+ let mflist= s:netrwmarkfilelist_{bufnr("%")}
+ NetrwKeepj call s:NetrwMarkFileCopy(a:islocal)
+" call Decho("remove",'~'.expand("<slnum>"))
+ for fname in mflist
+ let barefname = substitute(fname,'^\(.*/\)\(.\{-}\)$','\2','')
+ let ok = s:NetrwRemoteRmFile(b:netrw_curdir,barefname,1)
+ endfor
+ unlet mflist
+ endif
+
+ " -------
+ " cleanup
+ " -------
+" call Decho("cleanup",'~'.expand("<slnum>"))
+
+ " remove markings from local buffer
+ call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer
+
+ " refresh buffers
+ if !s:netrwmftgt_islocal
+" call Decho("refresh netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefreshDir(s:netrwmftgt_islocal,s:netrwmftgt)
+ endif
+ if a:islocal
+" call Decho("refresh b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefreshDir(a:islocal,b:netrw_curdir)
+ endif
+ if g:netrw_fastbrowse <= 1
+" call Decho("since g:netrw_fastbrowse=".g:netrw_fastbrowse.", perform shell cmd refresh",'~'.expand("<slnum>"))
+ NetrwKeepj call s:LocalBrowseRefresh()
+ endif
+
+" call Dret("s:NetrwMarkFileMove")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFilePrint: (invoked by mp) This function prints marked files {{{2
+" using the hardcopy command. Local marked-file list only.
+fun! s:NetrwMarkFilePrint(islocal)
+" call Dfunc("s:NetrwMarkFilePrint(islocal=".a:islocal.")")
+ let curbufnr= bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFilePrint")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+ let curdir= s:NetrwGetCurdir(a:islocal)
+
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr}
+ call s:NetrwUnmarkList(curbufnr,curdir)
+ for fname in netrwmarkfilelist
+ if a:islocal
+ if g:netrw_keepdir
+ let fname= s:ComposePath(curdir,fname)
+ endif
+ else
+ let fname= curdir.fname
+ endif
+ 1split
+ " the autocmds will handle both local and remote files
+" call Decho("exe sil e ".escape(fname,' '),'~'.expand("<slnum>"))
+ exe "sil NetrwKeepj e ".fnameescape(fname)
+" call Decho("hardcopy",'~'.expand("<slnum>"))
+ hardcopy
+ q
+ endfor
+ 2match none
+ endif
+" call Dret("s:NetrwMarkFilePrint")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2
+" files when given a regexp (for which a prompt is
+" issued) (matches to name of files).
+fun! s:NetrwMarkFileRegexp(islocal)
+" call Dfunc("s:NetrwMarkFileRegexp(islocal=".a:islocal.")")
+
+ " get the regular expression
+ call inputsave()
+ let regexp= input("Enter regexp: ","","file")
+ call inputrestore()
+
+ if a:islocal
+ let curdir= s:NetrwGetCurdir(a:islocal)
+" call Decho("curdir<".fnameescape(curdir).">")
+ " get the matching list of files using local glob()
+" call Decho("handle local regexp",'~'.expand("<slnum>"))
+ let dirname = escape(b:netrw_curdir,g:netrw_glob_escape)
+ if v:version > 704 || (v:version == 704 && has("patch656"))
+ let filelist= glob(s:ComposePath(dirname,regexp),0,1,1)
+ else
+ let files = glob(s:ComposePath(dirname,regexp),0,0)
+ let filelist= split(files,"\n")
+ endif
+" call Decho("files<".string(filelist).">",'~'.expand("<slnum>"))
+
+ " mark the list of files
+ for fname in filelist
+ if fname =~ '^'.fnameescape(curdir)
+" call Decho("fname<".substitute(fname,'^'.fnameescape(curdir).'/','','').">",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^'.fnameescape(curdir).'/','',''))
+ else
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(fname,'^.*/','',''))
+ endif
+ endfor
+
+ else
+" call Decho("handle remote regexp",'~'.expand("<slnum>"))
+
+ " convert displayed listing into a filelist
+ let eikeep = &ei
+ let areg = @a
+ sil NetrwKeepj %y a
+ setl ei=all ma
+" call Decho("setl ei=all ma",'~'.expand("<slnum>"))
+ 1split
+ NetrwKeepj call s:NetrwEnew()
+ NetrwKeepj call s:NetrwOptionsSafe(a:islocal)
+ sil NetrwKeepj norm! "ap
+ NetrwKeepj 2
+ let bannercnt= search('^" =====','W')
+ exe "sil NetrwKeepj 1,".bannercnt."d"
+ setl bt=nofile
+ if g:netrw_liststyle == s:LONGLIST
+ sil NetrwKeepj %s/\s\{2,}\S.*$//e
+ call histdel("/",-1)
+ elseif g:netrw_liststyle == s:WIDELIST
+ sil NetrwKeepj %s/\s\{2,}/\r/ge
+ call histdel("/",-1)
+ elseif g:netrw_liststyle == s:TREELIST
+ exe 'sil NetrwKeepj %s/^'.s:treedepthstring.' //e'
+ sil! NetrwKeepj g/^ .*$/d
+ call histdel("/",-1)
+ call histdel("/",-1)
+ endif
+ " convert regexp into the more usual glob-style format
+ let regexp= substitute(regexp,'\*','.*','g')
+" call Decho("regexp<".regexp.">",'~'.expand("<slnum>"))
+ exe "sil! NetrwKeepj v/".escape(regexp,'/')."/d"
+ call histdel("/",-1)
+ let filelist= getline(1,line("$"))
+ q!
+ for filename in filelist
+ NetrwKeepj call s:NetrwMarkFile(a:islocal,substitute(filename,'^.*/','',''))
+ endfor
+ unlet filelist
+ let @a = areg
+ let &ei = eikeep
+ endif
+ echo " (use me to edit marked files)"
+
+" call Dret("s:NetrwMarkFileRegexp")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileSource: (invoked by ms) This function sources marked files {{{2
+" Uses the local marked file list.
+fun! s:NetrwMarkFileSource(islocal)
+" call Dfunc("s:NetrwMarkFileSource(islocal=".a:islocal.")")
+ let curbufnr= bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileSource")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+ let curdir= s:NetrwGetCurdir(a:islocal)
+
+ if exists("s:netrwmarkfilelist_{curbufnr}")
+ let netrwmarkfilelist = s:netrwmarkfilelist_{bufnr("%")}
+ call s:NetrwUnmarkList(curbufnr,curdir)
+ for fname in netrwmarkfilelist
+ if a:islocal
+ if g:netrw_keepdir
+ let fname= s:ComposePath(curdir,fname)
+ endif
+ else
+ let fname= curdir.fname
+ endif
+ " the autocmds will handle sourcing both local and remote files
+" call Decho("exe so ".fnameescape(fname),'~'.expand("<slnum>"))
+ exe "so ".fnameescape(fname)
+ endfor
+ 2match none
+ endif
+" call Dret("s:NetrwMarkFileSource")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileTag: (invoked by mT) This function applies g:netrw_ctags to marked files {{{2
+" Uses the global markfilelist
+fun! s:NetrwMarkFileTag(islocal)
+" call Dfunc("s:NetrwMarkFileTag(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let curbufnr = bufnr("%")
+
+ " sanity check
+ if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
+ NetrwKeepj call netrw#ErrorMsg(2,"there are no marked files in this window (:help netrw-mf)",66)
+" call Dret("s:NetrwMarkFileTag")
+ return
+ endif
+" call Decho("sanity chk passed: s:netrwmarkfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}),'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist")
+" call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">",'~'.expand("<slnum>"))
+ let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "s:ShellEscape(v:val,".!a:islocal.")"))
+ call s:NetrwUnmarkAll()
+
+ if a:islocal
+
+" call Decho("call system(".g:netrw_ctags." ".netrwmarkfilelist.")",'~'.expand("<slnum>"))
+ call system(g:netrw_ctags." ".netrwmarkfilelist)
+ if v:shell_error
+ call netrw#ErrorMsg(s:ERROR,"g:netrw_ctags<".g:netrw_ctags."> is not executable!",51)
+ endif
+
+ else
+ let cmd = s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist)
+ call netrw#Obtain(a:islocal,"tags")
+ let curdir= b:netrw_curdir
+ 1split
+ NetrwKeepj e tags
+ let path= substitute(curdir,'^\(.*\)/[^/]*$','\1/','')
+" call Decho("curdir<".curdir."> path<".path.">",'~'.expand("<slnum>"))
+ exe 'NetrwKeepj %s/\t\(\S\+\)\t/\t'.escape(path,"/\n\r\\").'\1\t/e'
+ call histdel("/",-1)
+ wq!
+ endif
+ 2match none
+ call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+ endif
+
+" call Dret("s:NetrwMarkFileTag")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMarkFileTgt: (invoked by mt) This function sets up a marked file target {{{2
+" Sets up two variables,
+" s:netrwmftgt : holds the target directory
+" s:netrwmftgt_islocal : 0=target directory is remote
+" 1=target directory is local
+fun! s:NetrwMarkFileTgt(islocal)
+" call Dfunc("s:NetrwMarkFileTgt(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ let hadtgt = exists("s:netrwmftgt")
+ if !exists("w:netrw_bannercnt")
+ let w:netrw_bannercnt= b:netrw_bannercnt
+ endif
+
+ " set up target
+ if line(".") < w:netrw_bannercnt
+" call Decho("set up target: line(.) < w:netrw_bannercnt=".w:netrw_bannercnt,'~'.expand("<slnum>"))
+ " if cursor in banner region, use b:netrw_curdir for the target unless its already the target
+ if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal") && s:netrwmftgt == b:netrw_curdir
+" call Decho("cursor in banner region, and target already is <".b:netrw_curdir.">: removing target",'~'.expand("<slnum>"))
+ unlet s:netrwmftgt s:netrwmftgt_islocal
+ if g:netrw_fastbrowse <= 1
+ call s:LocalBrowseRefresh()
+ endif
+ call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+" call Dret("s:NetrwMarkFileTgt : removed target")
+ return
+ else
+ let s:netrwmftgt= b:netrw_curdir
+" call Decho("inbanner: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+ endif
+
+ else
+ " get word under cursor.
+ " * If directory, use it for the target.
+ " * If file, use b:netrw_curdir for the target
+" call Decho("get word under cursor",'~'.expand("<slnum>"))
+ let curword= s:NetrwGetWord()
+ let tgtdir = s:ComposePath(curdir,curword)
+ if a:islocal && isdirectory(s:NetrwFile(tgtdir))
+ let s:netrwmftgt = tgtdir
+" call Decho("local isdir: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+ elseif !a:islocal && tgtdir =~ '/$'
+ let s:netrwmftgt = tgtdir
+" call Decho("remote isdir: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+ else
+ let s:netrwmftgt = curdir
+" call Decho("isfile: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+ endif
+ endif
+ if a:islocal
+ " simplify the target (eg. /abc/def/../ghi -> /abc/ghi)
+ let s:netrwmftgt= simplify(s:netrwmftgt)
+" call Decho("simplify: s:netrwmftgt<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+ endif
+ if g:netrw_cygwin
+ let s:netrwmftgt= substitute(system("cygpath ".s:ShellEscape(s:netrwmftgt)),'\n$','','')
+ let s:netrwmftgt= substitute(s:netrwmftgt,'\n$','','')
+ endif
+ let s:netrwmftgt_islocal= a:islocal
+
+ " need to do refresh so that the banner will be updated
+ " s:LocalBrowseRefresh handles all local-browsing buffers when not fast browsing
+ if g:netrw_fastbrowse <= 1
+" call Decho("g:netrw_fastbrowse=".g:netrw_fastbrowse.", so refreshing all local netrw buffers",'~'.expand("<slnum>"))
+ call s:LocalBrowseRefresh()
+ endif
+" call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,w:netrw_treetop))
+ else
+ call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+ endif
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call winrestview(svpos)
+ if !hadtgt
+ sil! NetrwKeepj norm! j
+ endif
+
+" call Decho("getmatches=".string(getmatches()),'~'.expand("<slnum>"))
+" call Decho("s:netrwmarkfilelist=".(exists("s:netrwmarkfilelist")? string(s:netrwmarkfilelist) : 'n/a'),'~'.expand("<slnum>"))
+" call Dret("s:NetrwMarkFileTgt : netrwmftgt<".(exists("s:netrwmftgt")? s:netrwmftgt : "").">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwGetCurdir: gets current directory and sets up b:netrw_curdir if necessary {{{2
+fun! s:NetrwGetCurdir(islocal)
+" call Dfunc("s:NetrwGetCurdir(islocal=".a:islocal.")")
+
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ let b:netrw_curdir = s:NetrwTreePath(w:netrw_treetop)
+" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used s:NetrwTreeDir)",'~'.expand("<slnum>"))
+ elseif !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+" call Decho("set b:netrw_curdir<".b:netrw_curdir."> (used getcwd)",'~'.expand("<slnum>"))
+ endif
+
+" call Decho("b:netrw_curdir<".b:netrw_curdir."> ".((b:netrw_curdir !~ '\<\a\{3,}://')? "does not match" : "matches")." url pattern",'~'.expand("<slnum>"))
+ if b:netrw_curdir !~ '\<\a\{3,}://'
+ let curdir= b:netrw_curdir
+" call Decho("g:netrw_keepdir=".g:netrw_keepdir,'~'.expand("<slnum>"))
+ if g:netrw_keepdir == 0
+ call s:NetrwLcd(curdir)
+ endif
+ endif
+
+" call Dret("s:NetrwGetCurdir <".curdir.">")
+ return b:netrw_curdir
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwOpenFile: query user for a filename and open it {{{2
+fun! s:NetrwOpenFile(islocal)
+" call Dfunc("s:NetrwOpenFile(islocal=".a:islocal.")")
+ let ykeep= @@
+ call inputsave()
+ let fname= input("Enter filename: ")
+ call inputrestore()
+" call Decho("(s:NetrwOpenFile) fname<".fname.">",'~'.expand("<slnum>"))
+
+ " determine if Lexplore is in use
+ if exists("t:netrw_lexbufnr")
+ " check if t:netrw_lexbufnr refers to a netrw window
+" call Decho("(s:netrwOpenFile) ..t:netrw_lexbufnr=".t:netrw_lexbufnr,'~'.expand("<slnum>"))
+ let lexwinnr = bufwinnr(t:netrw_lexbufnr)
+ if lexwinnr != -1 && exists("g:netrw_chgwin") && g:netrw_chgwin != -1
+" call Decho("(s:netrwOpenFile) ..Lexplore in use",'~'.expand("<slnum>"))
+ exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w"
+ exe "NetrwKeepj e ".fnameescape(fname)
+ let @@= ykeep
+" call Dret("s:NetrwOpenFile : creating a file with Lexplore mode")
+ endif
+ endif
+
+ " Does the filename contain a path?
+ if fname !~ '[/\\]'
+ if exists("b:netrw_curdir")
+ if exists("g:netrw_quiet")
+ let netrw_quiet_keep = g:netrw_quiet
+ endif
+ let g:netrw_quiet = 1
+ " save position for benefit of Rexplore
+ let s:rexposn_{bufnr("%")}= winsaveview()
+" call Decho("saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("<slnum>"))
+ if b:netrw_curdir =~ '/$'
+ exe "NetrwKeepj e ".fnameescape(b:netrw_curdir.fname)
+ else
+ exe "e ".fnameescape(b:netrw_curdir."/".fname)
+ endif
+ if exists("netrw_quiet_keep")
+ let g:netrw_quiet= netrw_quiet_keep
+ else
+ unlet g:netrw_quiet
+ endif
+ endif
+ else
+ exe "NetrwKeepj e ".fnameescape(fname)
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwOpenFile")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Shrink: shrinks/expands a netrw or Lexplorer window {{{2
+" For the mapping to this function be made via
+" netrwPlugin, you'll need to have had
+" g:netrw_usetab set to non-zero.
+fun! netrw#Shrink()
+" call Dfunc("netrw#Shrink() ft<".&ft."> winwidth=".winwidth(0)." lexbuf#".((exists("t:netrw_lexbufnr"))? t:netrw_lexbufnr : 'n/a'))
+ let curwin = winnr()
+ let wiwkeep = &wiw
+ set wiw=1
+
+ if &ft == "netrw"
+ if winwidth(0) > g:netrw_wiw
+ let t:netrw_winwidth= winwidth(0)
+ exe "vert resize ".g:netrw_wiw
+ wincmd l
+ if winnr() == curwin
+ wincmd h
+ endif
+" call Decho("vert resize 0",'~'.expand("<slnum>"))
+ else
+ exe "vert resize ".t:netrw_winwidth
+" call Decho("vert resize ".t:netrw_winwidth,'~'.expand("<slnum>"))
+ endif
+
+ elseif exists("t:netrw_lexbufnr")
+ exe bufwinnr(t:netrw_lexbufnr)."wincmd w"
+ if winwidth(bufwinnr(t:netrw_lexbufnr)) > g:netrw_wiw
+ let t:netrw_winwidth= winwidth(0)
+ exe "vert resize ".g:netrw_wiw
+ wincmd l
+ if winnr() == curwin
+ wincmd h
+ endif
+" call Decho("vert resize 0",'~'.expand("<slnum>"))
+ elseif winwidth(bufwinnr(t:netrw_lexbufnr)) >= 0
+ exe "vert resize ".t:netrw_winwidth
+" call Decho("vert resize ".t:netrw_winwidth,'~'.expand("<slnum>"))
+ else
+ call netrw#Lexplore(0,0)
+ endif
+
+ else
+ call netrw#Lexplore(0,0)
+ endif
+ let wiw= wiwkeep
+
+" call Dret("netrw#Shrink")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetSortSequence: allows user to edit the sorting sequence {{{2
+fun! s:NetSortSequence(islocal)
+" call Dfunc("NetSortSequence(islocal=".a:islocal.")")
+
+ let ykeep= @@
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ call inputsave()
+ let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence)
+ call inputrestore()
+
+ " refresh the listing
+ let g:netrw_sort_sequence= newsortseq
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ let @@= ykeep
+
+" call Dret("NetSortSequence")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwUnmarkList: delete local marked file list and remove their contents from the global marked-file list {{{2
+" User access provided by the <mF> mapping. (see :help netrw-mF)
+" Used by many MarkFile functions.
+fun! s:NetrwUnmarkList(curbufnr,curdir)
+" call Dfunc("s:NetrwUnmarkList(curbufnr=".a:curbufnr." curdir<".a:curdir.">)")
+
+ " remove all files in local marked-file list from global list
+ if exists("s:netrwmarkfilelist")
+ for mfile in s:netrwmarkfilelist_{a:curbufnr}
+ let dfile = s:ComposePath(a:curdir,mfile) " prepend directory to mfile
+ let idx = index(s:netrwmarkfilelist,dfile) " get index in list of dfile
+ call remove(s:netrwmarkfilelist,idx) " remove from global list
+ endfor
+ if s:netrwmarkfilelist == []
+ unlet s:netrwmarkfilelist
+ endif
+
+ " getting rid of the local marked-file lists is easy
+ unlet s:netrwmarkfilelist_{a:curbufnr}
+ endif
+ if exists("s:netrwmarkfilemtch_{a:curbufnr}")
+ unlet s:netrwmarkfilemtch_{a:curbufnr}
+ endif
+ 2match none
+" call Dret("s:NetrwUnmarkList")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwUnmarkAll: remove the global marked file list and all local ones {{{2
+fun! s:NetrwUnmarkAll()
+" call Dfunc("s:NetrwUnmarkAll()")
+ if exists("s:netrwmarkfilelist")
+ unlet s:netrwmarkfilelist
+ endif
+ sil call s:NetrwUnmarkAll2()
+ 2match none
+" call Dret("s:NetrwUnmarkAll")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwUnmarkAll2: unmark all files from all buffers {{{2
+fun! s:NetrwUnmarkAll2()
+" call Dfunc("s:NetrwUnmarkAll2()")
+ redir => netrwmarkfilelist_let
+ let
+ redir END
+ let netrwmarkfilelist_list= split(netrwmarkfilelist_let,'\n') " convert let string into a let list
+ call filter(netrwmarkfilelist_list,"v:val =~ '^s:netrwmarkfilelist_'") " retain only those vars that start as s:netrwmarkfilelist_
+ call map(netrwmarkfilelist_list,"substitute(v:val,'\\s.*$','','')") " remove what the entries are equal to
+ for flist in netrwmarkfilelist_list
+ let curbufnr= substitute(flist,'s:netrwmarkfilelist_','','')
+ unlet s:netrwmarkfilelist_{curbufnr}
+ unlet s:netrwmarkfilemtch_{curbufnr}
+ endfor
+" call Dret("s:NetrwUnmarkAll2")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwUnMarkFile: called via mu map; unmarks *all* marked files, both global and buffer-local {{{2
+"
+" Marked files are in two types of lists:
+" s:netrwmarkfilelist -- holds complete paths to all marked files
+" s:netrwmarkfilelist_# -- holds list of marked files in current-buffer's directory (#==bufnr())
+"
+" Marked files suitable for use with 2match are in:
+" s:netrwmarkfilemtch_# -- used with 2match to display marked files
+fun! s:NetrwUnMarkFile(islocal)
+" call Dfunc("s:NetrwUnMarkFile(islocal=".a:islocal.")")
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let curbufnr = bufnr("%")
+
+ " unmark marked file list
+ " (although I expect s:NetrwUpload() to do it, I'm just making sure)
+ if exists("s:netrwmarkfilelist")
+" " call Decho("unlet'ing: s:netrwmarkfilelist",'~'.expand("<slnum>"))
+ unlet s:netrwmarkfilelist
+ endif
+
+ let ibuf= 1
+ while ibuf < bufnr("$")
+ if exists("s:netrwmarkfilelist_".ibuf)
+ unlet s:netrwmarkfilelist_{ibuf}
+ unlet s:netrwmarkfilemtch_{ibuf}
+ endif
+ let ibuf = ibuf + 1
+ endwhile
+ 2match none
+
+" call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+"call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+call winrestview(svpos)
+" call Dret("s:NetrwUnMarkFile")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwMenu: generates the menu for gvim and netrw {{{2
+fun! s:NetrwMenu(domenu)
+
+ if !exists("g:NetrwMenuPriority")
+ let g:NetrwMenuPriority= 80
+ endif
+
+ if has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
+" call Dfunc("NetrwMenu(domenu=".a:domenu.")")
+
+ if !exists("s:netrw_menu_enabled") && a:domenu
+" call Decho("initialize menu",'~'.expand("<slnum>"))
+ let s:netrw_menu_enabled= 1
+ exe 'sil! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help<tab><F1> <F1>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'-Sep1- :'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory<tab>- -'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer<tab>x x'
+ if g:netrw_dirhistmax > 0
+ exe 'sil! menu '.g:NetrwMenuPriority.'.8.1 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Bookmark\ Current\ Directory<tab>mb mb'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.8.4 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Prev\ Dir\ (History)<tab>u u'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.8.5 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.Goto\ Next\ Dir\ (History)<tab>U U'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.8.6 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History.List<tab>qb qb'
+ else
+ exe 'sil! menu '.g:NetrwMenuPriority.'.8 '.g:NetrwTopLvlMenu.'Bookmarks\ and\ History :echo "(disabled)"'."\<cr>"
+ endif
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.1 '.g:NetrwTopLvlMenu.'Browsing\ Control.Horizontal\ Split<tab>o o'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.2 '.g:NetrwTopLvlMenu.'Browsing\ Control.Vertical\ Split<tab>v v'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.3 '.g:NetrwTopLvlMenu.'Browsing\ Control.New\ Tab<tab>t t'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.4 '.g:NetrwTopLvlMenu.'Browsing\ Control.Preview<tab>p p'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.5 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ File\ Hiding\ List<tab><ctrl-h>'." \<c-h>'"
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.6 '.g:NetrwTopLvlMenu.'Browsing\ Control.Edit\ Sorting\ Sequence<tab>S S'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.7 '.g:NetrwTopLvlMenu.'Browsing\ Control.Quick\ Hide/Unhide\ Dot\ Files<tab>'."gh gh"
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.8 '.g:NetrwTopLvlMenu.'Browsing\ Control.Refresh\ Listing<tab>'."<ctrl-l> \<c-l>"
+ exe 'sil! menu '.g:NetrwMenuPriority.'.9.9 '.g:NetrwTopLvlMenu.'Browsing\ Control.Settings/Options<tab>:NetrwSettings '.":NetrwSettings\<cr>"
+ exe 'sil! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/Directory<tab>D D'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Create\ New\ File<tab>% %'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.11.1 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Current\ Window<tab><cr> '."\<cr>"
+ exe 'sil! menu '.g:NetrwMenuPriority.'.11.2 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.Preview\ File/Directory<tab>p p'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.11.3 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ Previous\ Window<tab>P P'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.11.4 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Window<tab>o o'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Tab<tab>t t'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.11.5 '.g:NetrwTopLvlMenu.'Edit\ File/Dir.In\ New\ Vertical\ Window<tab>v v'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.12.1 '.g:NetrwTopLvlMenu.'Explore.Directory\ Name :Explore '
+ exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */ :Explore */'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.12.2 '.g:NetrwTopLvlMenu.'Explore.Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/ :Explore **/'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.12.3 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (curdir\ only)<tab>:Explore\ *// :Explore *//'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Files\ Containing\ String\ Pattern\ (+subdirs)<tab>:Explore\ **// :Explore **//'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Next\ Match<tab>:Nexplore :Nexplore<cr>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.12.4 '.g:NetrwTopLvlMenu.'Explore.Prev\ Match<tab>:Pexplore :Pexplore<cr>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Make\ Subdirectory<tab>d d'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.1 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ File<tab>mf mf'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.2 '.g:NetrwTopLvlMenu.'Marked\ Files.Mark\ Files\ by\ Regexp<tab>mr mr'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.3 '.g:NetrwTopLvlMenu.'Marked\ Files.Hide-Show-List\ Control<tab>a a'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.4 '.g:NetrwTopLvlMenu.'Marked\ Files.Copy\ To\ Target<tab>mc mc'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.5 '.g:NetrwTopLvlMenu.'Marked\ Files.Delete<tab>D D'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.6 '.g:NetrwTopLvlMenu.'Marked\ Files.Diff<tab>md md'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.7 '.g:NetrwTopLvlMenu.'Marked\ Files.Edit<tab>me me'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmd<tab>mx mx'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Target<tab>mm mm'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.Obtain<tab>O O'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Print<tab>mp mp'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.Replace<tab>R R'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Target<tab>mt mt'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.Tag<tab>mT mT'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.14.15 '.g:NetrwTopLvlMenu.'Marked\ Files.Zip/Unzip/Compress/Uncompress<tab>mz mz'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'Obtain\ File<tab>O O'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.thin<tab>i :let w:netrw_liststyle=0<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.long<tab>i :let w:netrw_liststyle=1<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.wide<tab>i :let w:netrw_liststyle=2<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.1.1 '.g:NetrwTopLvlMenu.'Style.Listing.tree<tab>i :let w:netrw_liststyle=3<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.1 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Show\ All<tab>a :let g:netrw_hide=0<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.3 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Normal<tab>a :let g:netrw_hide=1<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.2.2 '.g:NetrwTopLvlMenu.'Style.Normal-Hide-Show.Hidden\ Only<tab>a :let g:netrw_hide=2<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.3 '.g:NetrwTopLvlMenu.'Style.Reverse\ Sorting\ Order<tab>'."r r"
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.1 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Name<tab>s :let g:netrw_sort_by="name"<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.2 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Time<tab>s :let g:netrw_sort_by="time"<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.3 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Size<tab>s :let g:netrw_sort_by="size"<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.16.4.3 '.g:NetrwTopLvlMenu.'Style.Sorting\ Method.Exten<tab>s :let g:netrw_sort_by="exten"<cr><c-L>'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Rename\ File/Directory<tab>R R'
+ exe 'sil! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Set\ Current\ Directory<tab>c c'
+ let s:netrw_menucnt= 28
+ call s:NetrwBookmarkMenu() " provide some history! uses priorities 2,3, reserves 4, 8.2.x
+ call s:NetrwTgtMenu() " let bookmarks and history be easy targets
+
+ elseif !a:domenu
+ let s:netrwcnt = 0
+ let curwin = winnr()
+ windo if getline(2) =~# "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif
+ exe curwin."wincmd w"
+
+ if s:netrwcnt <= 1
+" call Decho("clear menus",'~'.expand("<slnum>"))
+ exe 'sil! unmenu '.g:NetrwTopLvlMenu
+" call Decho('exe sil! unmenu '.g:NetrwTopLvlMenu.'*','~'.expand("<slnum>"))
+ sil! unlet s:netrw_menu_enabled
+ endif
+ endif
+" call Dret("NetrwMenu")
+ return
+ endif
+
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwObtain: obtain file under cursor or from markfile list {{{2
+" Used by the O maps (as <SID>NetrwObtain())
+fun! s:NetrwObtain(islocal)
+" call Dfunc("NetrwObtain(islocal=".a:islocal.")")
+
+ let ykeep= @@
+ if exists("s:netrwmarkfilelist_{bufnr('%')}")
+ let islocal= s:netrwmarkfilelist_{bufnr('%')}[1] !~ '^\a\{3,}://'
+ call netrw#Obtain(islocal,s:netrwmarkfilelist_{bufnr('%')})
+ call s:NetrwUnmarkList(bufnr('%'),b:netrw_curdir)
+ else
+ call netrw#Obtain(a:islocal,s:NetrwGetWord())
+ endif
+ let @@= ykeep
+
+" call Dret("NetrwObtain")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwPrevWinOpen: open file/directory in previous window. {{{2
+" If there's only one window, then the window will first be split.
+" Returns:
+" choice = 0 : didn't have to choose
+" choice = 1 : saved modified file in window first
+" choice = 2 : didn't save modified file, opened window
+" choice = 3 : cancel open
+fun! s:NetrwPrevWinOpen(islocal)
+" call Dfunc("s:NetrwPrevWinOpen(islocal=".a:islocal.")")
+
+ let ykeep= @@
+ " grab a copy of the b:netrw_curdir to pass it along to newly split windows
+ let curdir = b:netrw_curdir
+
+ " get last window number and the word currently under the cursor
+ let origwin = winnr()
+ let lastwinnr = winnr("$")
+ let curword = s:NetrwGetWord()
+ let choice = 0
+ let s:prevwinopen= 1 " lets s:NetrwTreeDir() know that NetrwPrevWinOpen called it
+ let s:treedir = s:NetrwTreeDir(a:islocal)
+ let curdir = s:treedir
+" call Decho("winnr($)#".lastwinnr." curword<".curword.">",'~'.expand("<slnum>"))
+
+ let didsplit = 0
+ if lastwinnr == 1
+ " if only one window, open a new one first
+" call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")",'~'.expand("<slnum>"))
+ " g:netrw_preview=0: preview window shown in a horizontally split window
+ " g:netrw_preview=1: preview window shown in a vertically split window
+ if g:netrw_preview
+ " vertically split preview window
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
+" call Decho("exe ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s",'~'.expand("<slnum>"))
+ exe (g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s"
+ else
+ " horizontally split preview window
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
+" call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s",'~'.expand("<slnum>"))
+ exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
+ endif
+ let didsplit = 1
+" call Decho("did split",'~'.expand("<slnum>"))
+
+ else
+ NetrwKeepj call s:SaveBufVars()
+ let eikeep= &ei
+ setl ei=all
+ wincmd p
+" call Decho("wincmd p (now in win#".winnr().") curdir<".curdir.">",'~'.expand("<slnum>"))
+
+ " prevwinnr: the window number of the "prev" window
+ " prevbufnr: the buffer number of the buffer in the "prev" window
+ " bnrcnt : the qty of windows open on the "prev" buffer
+ let prevwinnr = winnr()
+ let prevbufnr = bufnr("%")
+ let prevbufname = bufname("%")
+ let prevmod = &mod
+ let bnrcnt = 0
+ NetrwKeepj call s:RestoreBufVars()
+" call Decho("after wincmd p: win#".winnr()." win($)#".winnr("$")." origwin#".origwin." &mod=".&mod." bufname(%)<".bufname("%")."> prevbufnr=".prevbufnr,'~'.expand("<slnum>"))
+
+ " if the previous window's buffer has been changed (ie. its modified flag is set),
+ " and it doesn't appear in any other extant window, then ask the
+ " user if s/he wants to abandon modifications therein.
+ if prevmod
+" call Decho("detected that prev window's buffer has been modified: prevbufnr=".prevbufnr." winnr()#".winnr(),'~'.expand("<slnum>"))
+ windo if winbufnr(0) == prevbufnr | let bnrcnt=bnrcnt+1 | endif
+" call Decho("prevbufnr=".prevbufnr." bnrcnt=".bnrcnt." buftype=".&bt." winnr()=".winnr()." prevwinnr#".prevwinnr,'~'.expand("<slnum>"))
+ exe prevwinnr."wincmd w"
+
+ if bnrcnt == 1 && &hidden == 0
+ " only one copy of the modified buffer in a window, and
+ " hidden not set, so overwriting will lose the modified file. Ask first...
+ let choice = confirm("Save modified buffer<".prevbufname."> first?","&Yes\n&No\n&Cancel")
+" call Decho("prevbufname<".prevbufname."> choice=".choice." current-winnr#".winnr(),'~'.expand("<slnum>"))
+ let &ei= eikeep
+
+ if choice == 1
+ " Yes -- write file & then browse
+ let v:errmsg= ""
+ sil w
+ if v:errmsg != ""
+ call netrw#ErrorMsg(s:ERROR,"unable to write <".(exists("prevbufname")? prevbufname : 'n/a').">!",30)
+ exe origwin."wincmd w"
+ let &ei = eikeep
+ let @@ = ykeep
+" call Dret("s:NetrwPrevWinOpen ".choice." : unable to write <".prevbufname.">")
+ return choice
+ endif
+
+ elseif choice == 2
+ " No -- don't worry about changed file, just browse anyway
+" call Decho("don't worry about chgd file, just browse anyway (winnr($)#".winnr("$").")",'~'.expand("<slnum>"))
+ echomsg "**note** changes to ".prevbufname." abandoned"
+
+ else
+ " Cancel -- don't do this
+" call Decho("cancel, don't browse, switch to win#".origwin,'~'.expand("<slnum>"))
+ exe origwin."wincmd w"
+ let &ei= eikeep
+ let @@ = ykeep
+" call Dret("s:NetrwPrevWinOpen ".choice." : cancelled")
+ return choice
+ endif
+ endif
+ endif
+ let &ei= eikeep
+ endif
+
+ " restore b:netrw_curdir (window split/enew may have lost it)
+ let b:netrw_curdir= curdir
+ if a:islocal < 2
+ if a:islocal
+ call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(a:islocal,curword))
+ else
+ call s:NetrwBrowse(a:islocal,s:NetrwBrowseChgDir(a:islocal,curword))
+ endif
+ endif
+ let @@= ykeep
+" call Dret("s:NetrwPrevWinOpen ".choice)
+ return choice
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwUpload: load fname to tgt (used by NetrwMarkFileCopy()) {{{2
+" Always assumed to be local -> remote
+" call s:NetrwUpload(filename, target)
+" call s:NetrwUpload(filename, target, fromdirectory)
+fun! s:NetrwUpload(fname,tgt,...)
+" call Dfunc("s:NetrwUpload(fname<".((type(a:fname) == 1)? a:fname : string(a:fname))."> tgt<".a:tgt.">) a:0=".a:0)
+
+ if a:tgt =~ '^\a\{3,}://'
+ let tgtdir= substitute(a:tgt,'^\a\{3,}://[^/]\+/\(.\{-}\)$','\1','')
+ else
+ let tgtdir= substitute(a:tgt,'^\(.*\)/[^/]*$','\1','')
+ endif
+" call Decho("tgtdir<".tgtdir.">",'~'.expand("<slnum>"))
+
+ if a:0 > 0
+ let fromdir= a:1
+ else
+ let fromdir= getcwd()
+ endif
+" call Decho("fromdir<".fromdir.">",'~'.expand("<slnum>"))
+
+ if type(a:fname) == 1
+ " handle uploading a single file using NetWrite
+" call Decho("handle uploading a single file via NetWrite",'~'.expand("<slnum>"))
+ 1split
+" call Decho("exe e ".fnameescape(s:NetrwFile(a:fname)),'~'.expand("<slnum>"))
+ exe "NetrwKeepj e ".fnameescape(s:NetrwFile(a:fname))
+" call Decho("now locally editing<".expand("%").">, has ".line("$")." lines",'~'.expand("<slnum>"))
+ if a:tgt =~ '/$'
+ let wfname= substitute(a:fname,'^.*/','','')
+" call Decho("exe w! ".fnameescape(wfname),'~'.expand("<slnum>"))
+ exe "w! ".fnameescape(a:tgt.wfname)
+ else
+" call Decho("writing local->remote: exe w ".fnameescape(a:tgt),'~'.expand("<slnum>"))
+ exe "w ".fnameescape(a:tgt)
+" call Decho("done writing local->remote",'~'.expand("<slnum>"))
+ endif
+ q!
+
+ elseif type(a:fname) == 3
+ " handle uploading a list of files via scp
+" call Decho("handle uploading a list of files via scp",'~'.expand("<slnum>"))
+ let curdir= getcwd()
+ if a:tgt =~ '^scp:'
+ if s:NetrwLcd(fromdir)
+" call Dret("s:NetrwUpload : lcd failure")
+ return
+ endif
+ let filelist= deepcopy(s:netrwmarkfilelist_{bufnr('%')})
+ let args = join(map(filelist,"s:ShellEscape(v:val, 1)"))
+ if exists("g:netrw_port") && g:netrw_port != ""
+ let useport= " ".g:netrw_scpport." ".g:netrw_port
+ else
+ let useport= ""
+ endif
+ let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','')
+ let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','')
+ call s:NetrwExe(s:netrw_silentxfer."!".g:netrw_scp_cmd.s:ShellEscape(useport,1)." ".args." ".s:ShellEscape(machine.":".tgt,1))
+ if s:NetrwLcd(curdir)
+" call Dret("s:NetrwUpload : lcd failure")
+ return
+ endif
+
+ elseif a:tgt =~ '^ftp:'
+ call s:NetrwMethod(a:tgt)
+
+ if b:netrw_method == 2
+ " handle uploading a list of files via ftp+.netrc
+ let netrw_fname = b:netrw_fname
+ sil NetrwKeepj new
+" call Decho("filter input window#".winnr(),'~'.expand("<slnum>"))
+
+ NetrwKeepj put =g:netrw_ftpmode
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ NetrwKeepj call setline(line("$")+1,'lcd "'.fromdir.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+
+ if tgtdir == ""
+ let tgtdir= '/'
+ endif
+ NetrwKeepj call setline(line("$")+1,'cd "'.tgtdir.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+
+ for fname in a:fname
+ NetrwKeepj call setline(line("$")+1,'put "'.s:NetrwFile(fname).'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endfor
+
+ if exists("g:netrw_port") && g:netrw_port != ""
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1))
+ else
+" call Decho("filter input window#".winnr(),'~'.expand("<slnum>"))
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1))
+ endif
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ sil NetrwKeepj g/Local directory now/d
+ call histdel("/",-1)
+ if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
+ call netrw#ErrorMsg(s:ERROR,getline(1),14)
+ else
+ bw!|q
+ endif
+
+ elseif b:netrw_method == 3
+ " upload with ftp + machine, id, passwd, and fname (ie. no .netrc)
+ let netrw_fname= b:netrw_fname
+ NetrwKeepj call s:SaveBufVars()|sil NetrwKeepj new|NetrwKeepj call s:RestoreBufVars()
+ let tmpbufnr= bufnr("%")
+ setl ff=unix
+
+ if exists("g:netrw_port") && g:netrw_port != ""
+ NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ else
+ NetrwKeepj put ='open '.g:netrw_machine
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ NetrwKeepj put =g:netrw_uid
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ if exists("s:netrw_passwd")
+ NetrwKeepj call setline(line("$")+1,'"'.s:netrw_passwd.'"')
+ endif
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ elseif exists("s:netrw_passwd")
+ NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+ endif
+
+ NetrwKeepj call setline(line("$")+1,'lcd "'.fromdir.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+
+ if exists("b:netrw_fname") && b:netrw_fname != ""
+ NetrwKeepj call setline(line("$")+1,'cd "'.b:netrw_fname.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endif
+
+ for fname in a:fname
+ NetrwKeepj call setline(line("$")+1,'put "'.fname.'"')
+" call Decho("filter input: ".getline('$'),'~'.expand("<slnum>"))
+ endfor
+
+ " perform ftp:
+ " -i : turns off interactive prompting from ftp
+ " -n unix : DON'T use <.netrc>, even though it exists
+ " -n win32: quit being obnoxious about password
+ NetrwKeepj norm! 1G"_dd
+ call s:NetrwExe(s:netrw_silentxfer."%!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+ " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar)
+ sil NetrwKeepj g/Local directory now/d
+ call histdel("/",-1)
+ if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying '
+ let debugkeep= &debug
+ setl debug=msg
+ call netrw#ErrorMsg(s:ERROR,getline(1),15)
+ let &debug = debugkeep
+ let mod = 1
+ else
+ bw!|q
+ endif
+ elseif !exists("b:netrw_method") || b:netrw_method < 0
+" call Dret("s:#NetrwUpload : unsupported method")
+ return
+ endif
+ else
+ call netrw#ErrorMsg(s:ERROR,"can't obtain files with protocol from<".a:tgt.">",63)
+ endif
+ endif
+
+" call Dret("s:NetrwUpload")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwPreview: supports netrw's "p" map {{{2
+fun! s:NetrwPreview(path) range
+" call Dfunc("NetrwPreview(path<".a:path.">)")
+" call Decho("g:netrw_alto =".(exists("g:netrw_alto")? g:netrw_alto : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("g:netrw_preview=".(exists("g:netrw_preview")? g:netrw_preview : 'n/a'),'~'.expand("<slnum>"))
+ let ykeep= @@
+ NetrwKeepj call s:NetrwOptionsSave("s:")
+ if a:path !~ '^\*\{1,2}/' && a:path !~ '^\a\{3,}://'
+ NetrwKeepj call s:NetrwOptionsSafe(1)
+ else
+ NetrwKeepj call s:NetrwOptionsSafe(0)
+ endif
+ if has("quickfix")
+" call Decho("has quickfix",'~'.expand("<slnum>"))
+ if !isdirectory(s:NetrwFile(a:path))
+" call Decho("good; not previewing a directory",'~'.expand("<slnum>"))
+ if g:netrw_preview
+ " vertical split
+ let pvhkeep = &pvh
+ let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
+ let &pvh = winwidth(0) - winsz
+" call Decho("g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("<slnum>"))
+ else
+ " horizontal split
+ let pvhkeep = &pvh
+ let winsz = (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
+ let &pvh = winheight(0) - winsz
+" call Decho("!g:netrw_preview: winsz=".winsz." &pvh=".&pvh." (temporarily) g:netrw_winsize=".g:netrw_winsize,'~'.expand("<slnum>"))
+ endif
+ " g:netrw_preview g:netrw_alto
+ " 1 : vert 1: top -- preview window is vertically split off and on the left
+ " 1 : vert 0: bot -- preview window is vertically split off and on the right
+ " 0 : 1: top -- preview window is horizontally split off and on the top
+ " 0 : 0: bot -- preview window is horizontally split off and on the bottom
+ "
+ " Note that the file being previewed is already known to not be a directory, hence we can avoid doing a LocalBrowseCheck() check via
+ " the BufEnter event set up in netrwPlugin.vim
+" call Decho("exe ".(g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path),'~'.expand("<slnum>"))
+ let eikeep = &ei
+ set ei=BufEnter
+ exe (g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path)
+ let &ei= eikeep
+" call Decho("winnr($)=".winnr("$"),'~'.expand("<slnum>"))
+ if exists("pvhkeep")
+ let &pvh= pvhkeep
+ endif
+ elseif !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38)
+ endif
+ elseif !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39)
+ endif
+ NetrwKeepj call s:NetrwOptionsRestore("s:")
+ let @@= ykeep
+" call Dret("NetrwPreview")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRefresh: {{{2
+fun! s:NetrwRefresh(islocal,dirname)
+" call Dfunc("s:NetrwRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") g:netrw_hide=".g:netrw_hide." g:netrw_sort_direction=".g:netrw_sort_direction)
+ " at the current time (Mar 19, 2007) all calls to NetrwRefresh() call NetrwBrowseChgDir() first.
+ setl ma noro
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+" call Decho("clear buffer<".expand("%")."> with :%d",'~'.expand("<slnum>"))
+ let ykeep = @@
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ if !exists("w:netrw_treetop")
+ if exists("b:netrw_curdir")
+ let w:netrw_treetop= b:netrw_curdir
+ else
+ let w:netrw_treetop= getcwd()
+ endif
+ endif
+ NetrwKeepj call s:NetrwRefreshTreeDict(w:netrw_treetop)
+ endif
+
+ " save the cursor position before refresh.
+ let screenposn = winsaveview()
+" call Decho("saving posn to screenposn<".string(screenposn).">",'~'.expand("<slnum>"))
+
+" call Decho("win#".winnr().": ".winheight(0)."x".winwidth(0)." curfile<".expand("%").">",'~'.expand("<slnum>"))
+" call Decho("clearing buffer prior to refresh",'~'.expand("<slnum>"))
+ sil! NetrwKeepj %d _
+ if a:islocal
+ NetrwKeepj call netrw#LocalBrowseCheck(a:dirname)
+ else
+ NetrwKeepj call s:NetrwBrowse(a:islocal,a:dirname)
+ endif
+
+ " restore position
+" call Decho("restoring posn to screenposn<".string(screenposn).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(screenposn)
+
+ " restore file marks
+ if has("syntax") && exists("g:syntax_on") && g:syntax_on
+ if exists("s:netrwmarkfilemtch_{bufnr('%')}") && s:netrwmarkfilemtch_{bufnr("%")} != ""
+" " call Decho("exe 2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/",'~'.expand("<slnum>"))
+ exe "2match netrwMarkFile /".s:netrwmarkfilemtch_{bufnr("%")}."/"
+ else
+" " call Decho("2match none (bufnr(%)=".bufnr("%")."<".bufname("%").">)",'~'.expand("<slnum>"))
+ 2match none
+ endif
+ endif
+
+" restore
+ let @@= ykeep
+" call Dret("s:NetrwRefresh")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRefreshDir: refreshes a directory by name {{{2
+" Called by NetrwMarkFileCopy()
+" Interfaces to s:NetrwRefresh() and s:LocalBrowseRefresh()
+fun! s:NetrwRefreshDir(islocal,dirname)
+" call Dfunc("s:NetrwRefreshDir(islocal=".a:islocal." dirname<".a:dirname.">) g:netrw_fastbrowse=".g:netrw_fastbrowse)
+ if g:netrw_fastbrowse == 0
+ " slowest mode (keep buffers refreshed, local or remote)
+" call Decho("slowest mode: keep buffers refreshed, local or remote",'~'.expand("<slnum>"))
+ let tgtwin= bufwinnr(a:dirname)
+" call Decho("tgtwin= bufwinnr(".a:dirname.")=".tgtwin,'~'.expand("<slnum>"))
+
+ if tgtwin > 0
+ " tgtwin is being displayed, so refresh it
+ let curwin= winnr()
+" call Decho("refresh tgtwin#".tgtwin." (curwin#".curwin.")",'~'.expand("<slnum>"))
+ exe tgtwin."wincmd w"
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+ exe curwin."wincmd w"
+
+ elseif bufnr(a:dirname) > 0
+ let bn= bufnr(a:dirname)
+" call Decho("bd bufnr(".a:dirname.")=".bn,'~'.expand("<slnum>"))
+ exe "sil keepj bd ".bn
+ endif
+
+ elseif g:netrw_fastbrowse <= 1
+" call Decho("medium-speed mode: refresh local buffers only",'~'.expand("<slnum>"))
+ NetrwKeepj call s:LocalBrowseRefresh()
+ endif
+" call Dret("s:NetrwRefreshDir")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSetChgwin: set g:netrw_chgwin; a <cr> will use the specified
+" window number to do its editing in.
+" Supports [count]C where the count, if present, is used to specify
+" a window to use for editing via the <cr> mapping.
+fun! s:NetrwSetChgwin(...)
+" call Dfunc("s:NetrwSetChgwin() v:count=".v:count)
+ if a:0 > 0
+" call Decho("a:1<".a:1.">",'~'.expand("<slnum>"))
+ if a:1 == "" " :NetrwC win#
+ let g:netrw_chgwin= winnr()
+ else " :NetrwC
+ let g:netrw_chgwin= a:1
+ endif
+ elseif v:count > 0 " [count]C
+ let g:netrw_chgwin= v:count
+ else " C
+ let g:netrw_chgwin= winnr()
+ endif
+ echo "editing window now set to window#".g:netrw_chgwin
+" call Dret("s:NetrwSetChgwin : g:netrw_chgwin=".g:netrw_chgwin)
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSetSort: sets up the sort based on the g:netrw_sort_sequence {{{2
+" What this function does is to compute a priority for the patterns
+" in the g:netrw_sort_sequence. It applies a substitute to any
+" "files" that satisfy each pattern, putting the priority / in
+" front. An "*" pattern handles the default priority.
+fun! s:NetrwSetSort()
+" call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt)
+ let ykeep= @@
+ if w:netrw_liststyle == s:LONGLIST
+ let seqlist = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge')
+ else
+ let seqlist = g:netrw_sort_sequence
+ endif
+ " sanity check -- insure that * appears somewhere
+ if seqlist == ""
+ let seqlist= '*'
+ elseif seqlist !~ '\*'
+ let seqlist= seqlist.',*'
+ endif
+ let priority = 1
+ while seqlist != ""
+ if seqlist =~ ','
+ let seq = substitute(seqlist,',.*$','','e')
+ let seqlist = substitute(seqlist,'^.\{-},\(.*\)$','\1','e')
+ else
+ let seq = seqlist
+ let seqlist = ""
+ endif
+ if priority < 10
+ let spriority= "00".priority.g:netrw_sepchr
+ elseif priority < 100
+ let spriority= "0".priority.g:netrw_sepchr
+ else
+ let spriority= priority.g:netrw_sepchr
+ endif
+" call Decho("priority=".priority." spriority<".spriority."> seq<".seq."> seqlist<".seqlist.">",'~'.expand("<slnum>"))
+
+ " sanity check
+ if w:netrw_bannercnt > line("$")
+ " apparently no files were left after a Hiding pattern was used
+" call Dret("SetSort : no files left after hiding")
+ return
+ endif
+ if seq == '*'
+ let starpriority= spriority
+ else
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/'.seq.'/s/^/'.spriority.'/'
+ call histdel("/",-1)
+ " sometimes multiple sorting patterns will match the same file or directory.
+ " The following substitute is intended to remove the excess matches.
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^\d\{3}'.g:netrw_sepchr.'\d\{3}\//s/^\d\{3}'.g:netrw_sepchr.'\(\d\{3}\/\).\@=/\1/e'
+ NetrwKeepj call histdel("/",-1)
+ endif
+ let priority = priority + 1
+ endwhile
+ if exists("starpriority")
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v/^\d\{3}'.g:netrw_sepchr.'/s/^/'.starpriority.'/e'
+ NetrwKeepj call histdel("/",-1)
+ endif
+
+ " Following line associated with priority -- items that satisfy a priority
+ " pattern get prefixed by ###/ which permits easy sorting by priority.
+ " Sometimes files can satisfy multiple priority patterns -- only the latest
+ " priority pattern needs to be retained. So, at this point, these excess
+ " priority prefixes need to be removed, but not directories that happen to
+ " be just digits themselves.
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\d\{3}'.g:netrw_sepchr.'\)\%(\d\{3}'.g:netrw_sepchr.'\)\+\ze./\1/e'
+ NetrwKeepj call histdel("/",-1)
+ let @@= ykeep
+
+" call Dret("SetSort")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSetTgt: sets the target to the specified choice index {{{2
+" Implements [count]Tb (bookhist<b>)
+" [count]Th (bookhist<h>)
+" See :help netrw-qb for how to make the choice.
+fun! s:NetrwSetTgt(islocal,bookhist,choice)
+" call Dfunc("s:NetrwSetTgt(islocal=".a:islocal." bookhist<".a:bookhist."> choice#".a:choice.")")
+
+ if a:bookhist == 'b'
+ " supports choosing a bookmark as a target using a qb-generated list
+ let choice= a:choice - 1
+ if exists("g:netrw_bookmarklist[".choice."]")
+ call netrw#MakeTgt(g:netrw_bookmarklist[choice])
+ else
+ echomsg "Sorry, bookmark#".a:choice." doesn't exist!"
+ endif
+
+ elseif a:bookhist == 'h'
+ " supports choosing a history stack entry as a target using a qb-generated list
+ let choice= (a:choice % g:netrw_dirhistmax) + 1
+ if exists("g:netrw_dirhist_".choice)
+ let histentry = g:netrw_dirhist_{choice}
+ call netrw#MakeTgt(histentry)
+ else
+ echomsg "Sorry, history#".a:choice." not available!"
+ endif
+ endif
+
+ " refresh the display
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+ endif
+ call s:NetrwRefresh(a:islocal,b:netrw_curdir)
+
+" call Dret("s:NetrwSetTgt")
+endfun
+
+" =====================================================================
+" s:NetrwSortStyle: change sorting style (name - time - size - exten) and refresh display {{{2
+fun! s:NetrwSortStyle(islocal)
+" call Dfunc("s:NetrwSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">")
+ NetrwKeepj call s:NetrwSaveWordPosn()
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+
+ let g:netrw_sort_by= (g:netrw_sort_by =~# '^n')? 'time' : (g:netrw_sort_by =~# '^t')? 'size' : (g:netrw_sort_by =~# '^siz')? 'exten' : 'name'
+ NetrwKeepj norm! 0
+ NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+
+" call Dret("s:NetrwSortStyle : netrw_sort_by<".g:netrw_sort_by.">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwSplit: mode {{{2
+" =0 : net and o
+" =1 : net and t
+" =2 : net and v
+" =3 : local and o
+" =4 : local and t
+" =5 : local and v
+fun! s:NetrwSplit(mode)
+" call Dfunc("s:NetrwSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv)
+
+ let ykeep= @@
+ call s:SaveWinVars()
+
+ if a:mode == 0
+ " remote and o
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
+ if winsz == 0|let winsz= ""|endif
+" call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s",'~'.expand("<slnum>"))
+ exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
+ let s:didsplit= 1
+ NetrwKeepj call s:RestoreWinVars()
+ NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
+ unlet s:didsplit
+
+ elseif a:mode == 1
+ " remote and t
+ let newdir = s:NetrwBrowseChgDir(0,s:NetrwGetWord())
+" call Decho("tabnew",'~'.expand("<slnum>"))
+ tabnew
+ let s:didsplit= 1
+ NetrwKeepj call s:RestoreWinVars()
+ NetrwKeepj call s:NetrwBrowse(0,newdir)
+ unlet s:didsplit
+
+ elseif a:mode == 2
+ " remote and v
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
+ if winsz == 0|let winsz= ""|endif
+" call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v",'~'.expand("<slnum>"))
+ exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
+ let s:didsplit= 1
+ NetrwKeepj call s:RestoreWinVars()
+ NetrwKeepj call s:NetrwBrowse(0,s:NetrwBrowseChgDir(0,s:NetrwGetWord()))
+ unlet s:didsplit
+
+ elseif a:mode == 3
+ " local and o
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
+ if winsz == 0|let winsz= ""|endif
+" call Decho("exe ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s",'~'.expand("<slnum>"))
+ exe (g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
+ let s:didsplit= 1
+ NetrwKeepj call s:RestoreWinVars()
+ NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
+ unlet s:didsplit
+
+ elseif a:mode == 4
+ " local and t
+ let cursorword = s:NetrwGetWord()
+ let eikeep = &ei
+ let netrw_winnr = winnr()
+ let netrw_line = line(".")
+ let netrw_col = virtcol(".")
+ NetrwKeepj norm! H0
+ let netrw_hline = line(".")
+ setl ei=all
+ exe "NetrwKeepj norm! ".netrw_hline."G0z\<CR>"
+ exe "NetrwKeepj norm! ".netrw_line."G0".netrw_col."\<bar>"
+ let &ei = eikeep
+ let netrw_curdir = s:NetrwTreeDir(0)
+" call Decho("tabnew",'~'.expand("<slnum>"))
+ tabnew
+ let b:netrw_curdir = netrw_curdir
+ let s:didsplit = 1
+ NetrwKeepj call s:RestoreWinVars()
+ NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,cursorword))
+ if &ft == "netrw"
+ setl ei=all
+ exe "NetrwKeepj norm! ".netrw_hline."G0z\<CR>"
+ exe "NetrwKeepj norm! ".netrw_line."G0".netrw_col."\<bar>"
+ let &ei= eikeep
+ endif
+ unlet s:didsplit
+
+ elseif a:mode == 5
+ " local and v
+ let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
+ if winsz == 0|let winsz= ""|endif
+" call Decho("exe ".(g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v",'~'.expand("<slnum>"))
+ exe (g:netrw_altv? "rightb " : "lefta ").winsz."wincmd v"
+ let s:didsplit= 1
+ NetrwKeepj call s:RestoreWinVars()
+ NetrwKeepj call netrw#LocalBrowseCheck(s:NetrwBrowseChgDir(1,s:NetrwGetWord()))
+ unlet s:didsplit
+
+ else
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"(NetrwSplit) unsupported mode=".a:mode,45)
+ endif
+
+ let @@= ykeep
+" call Dret("s:NetrwSplit")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwTgtMenu: {{{2
+fun! s:NetrwTgtMenu()
+ if !exists("s:netrw_menucnt")
+ return
+ endif
+" call Dfunc("s:NetrwTgtMenu()")
+
+ " the following test assures that gvim is running, has menus available, and has menus enabled.
+ if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
+ if exists("g:NetrwTopLvlMenu")
+" call Decho("removing ".g:NetrwTopLvlMenu."Bookmarks menu item(s)",'~'.expand("<slnum>"))
+ exe 'sil! unmenu '.g:NetrwTopLvlMenu.'Targets'
+ endif
+ if !exists("s:netrw_initbookhist")
+ call s:NetrwBookHistRead()
+ endif
+
+ " try to cull duplicate entries
+ let tgtdict={}
+
+ " target bookmarked places
+ if exists("g:netrw_bookmarklist") && g:netrw_bookmarklist != [] && g:netrw_dirhistmax > 0
+" call Decho("installing bookmarks as easy targets",'~'.expand("<slnum>"))
+ let cnt= 1
+ for bmd in g:netrw_bookmarklist
+ if has_key(tgtdict,bmd)
+ let cnt= cnt + 1
+ continue
+ endif
+ let tgtdict[bmd]= cnt
+ let ebmd= escape(bmd,g:netrw_menu_escape)
+ " show bookmarks for goto menu
+" call Decho("menu: Targets: ".bmd,'~'.expand("<slnum>"))
+ exe 'sil! menu <silent> '.g:NetrwMenuPriority.".19.1.".cnt." ".g:NetrwTopLvlMenu.'Targets.'.ebmd." :call netrw#MakeTgt('".bmd."')\<cr>"
+ let cnt= cnt + 1
+ endfor
+ endif
+
+ " target directory browsing history
+ if exists("g:netrw_dirhistmax") && g:netrw_dirhistmax > 0
+" call Decho("installing history as easy targets (histmax=".g:netrw_dirhistmax.")",'~'.expand("<slnum>"))
+ let histcnt = 1
+ while histcnt <= g:netrw_dirhistmax
+ let priority = g:netrw_dirhistcnt + histcnt
+ if exists("g:netrw_dirhist_{histcnt}")
+ let histentry = g:netrw_dirhist_{histcnt}
+ if has_key(tgtdict,histentry)
+ let histcnt = histcnt + 1
+ continue
+ endif
+ let tgtdict[histentry] = histcnt
+ let ehistentry = escape(histentry,g:netrw_menu_escape)
+" call Decho("menu: Targets: ".histentry,'~'.expand("<slnum>"))
+ exe 'sil! menu <silent> '.g:NetrwMenuPriority.".19.2.".priority." ".g:NetrwTopLvlMenu.'Targets.'.ehistentry." :call netrw#MakeTgt('".histentry."')\<cr>"
+ endif
+ let histcnt = histcnt + 1
+ endwhile
+ endif
+ endif
+" call Dret("s:NetrwTgtMenu")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwTreeDir: determine tree directory given current cursor position {{{2
+" (full path directory with trailing slash returned)
+fun! s:NetrwTreeDir(islocal)
+" call Dfunc("s:NetrwTreeDir(islocal=".a:islocal.") getline(".line(".").")"."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft)
+" call Decho("Determine tree directory given current cursor position")
+" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("w:netrw_treetop =".(exists("w:netrw_treetop")? w:netrw_treetop : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("current line<".getline(".").">")
+
+ if exists("s:treedir") && exists("s:prevwinopen")
+ " s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early
+" call Decho('s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early')
+ let treedir= s:treedir
+ unlet s:treedir
+ unlet s:prevwinopen
+" call Dret("s:NetrwTreeDir ".treedir.": early return since s:treedir existed previously")
+ return treedir
+ endif
+ if exists("s:prevwinopen")
+ unlet s:prevwinopen
+ endif
+
+ if !exists("b:netrw_curdir") || b:netrw_curdir == ""
+ let b:netrw_curdir= getcwd()
+ endif
+ let treedir = b:netrw_curdir
+" call Decho("set initial treedir<".treedir.">",'~'.expand("<slnum>"))
+
+ let s:treecurpos= winsaveview()
+" call Decho("saving posn to s:treecurpos<".string(s:treecurpos).">",'~'.expand("<slnum>"))
+
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+" call Decho("w:netrw_liststyle is TREELIST:",'~'.expand("<slnum>"))
+" call Decho("line#".line(".")." getline(.)<".getline('.')."> treecurpos<".string(s:treecurpos).">",'~'.expand("<slnum>"))
+
+ " extract tree directory if on a line specifying a subdirectory (ie. ends with "/")
+ let curline= substitute(getline('.'),"\t -->.*$",'','')
+ if curline =~ '/$'
+" call Decho("extract tree subdirectory from current line",'~'.expand("<slnum>"))
+ let treedir= substitute(getline('.'),'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e')
+" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
+ elseif curline =~ '@$'
+" call Decho("handle symbolic link from current line",'~'.expand("<slnum>"))
+ let treedir= resolve(substitute(substitute(getline('.'),'@.*$','','e'),'^|*\s*','','e'))
+" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
+ else
+" call Decho("do not extract tree subdirectory from current line and set treedir to empty",'~'.expand("<slnum>"))
+ let treedir= ""
+ endif
+
+ " detect user attempting to close treeroot
+" call Decho("check if user is attempting to close treeroot",'~'.expand("<slnum>"))
+" call Decho(".win#".winnr()." buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
+" call Decho(".getline(".line(".").")<".getline('.').'> '.((getline('.') =~# '^'.s:treedepthstring)? '=~#' : '!~').' ^'.s:treedepthstring,'~'.expand("<slnum>"))
+ if curline !~ '^'.s:treedepthstring && getline('.') != '..'
+" call Decho(".user may have attempted to close treeroot",'~'.expand("<slnum>"))
+ " now force a refresh
+" call Decho(".force refresh: clear buffer<".expand("%")."> with :%d",'~'.expand("<slnum>"))
+ sil! NetrwKeepj %d _
+" call Dret("s:NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".(exists("s:treecurpos")? string(s:treecurpos) : 'n/a').">")
+ return b:netrw_curdir
+" else " Decho
+" call Decho(".user not attempting to close treeroot",'~'.expand("<slnum>"))
+ endif
+
+" call Decho("islocal=".a:islocal." curline<".curline.">",'~'.expand("<slnum>"))
+ let potentialdir= s:NetrwFile(substitute(curline,'^'.s:treedepthstring.'\+ \(.*\)@$','\1',''))
+" call Decho("potentialdir<".potentialdir."> isdir=".isdirectory(potentialdir),'~'.expand("<slnum>"))
+
+ " COMBAK: a symbolic link may point anywhere -- so it will be used to start a new treetop
+" if a:islocal && curline =~ '@$' && isdirectory(s:NetrwFile(potentialdir))
+" let newdir = w:netrw_treetop.'/'.potentialdir
+" " call Decho("apply NetrwTreePath to newdir<".newdir.">",'~'.expand("<slnum>"))
+" let treedir = s:NetrwTreePath(newdir)
+" let w:netrw_treetop = newdir
+" " call Decho("newdir <".newdir.">",'~'.expand("<slnum>"))
+" else
+" call Decho("apply NetrwTreePath to treetop<".w:netrw_treetop.">",'~'.expand("<slnum>"))
+ let treedir = s:NetrwTreePath(w:netrw_treetop)
+" endif
+ endif
+
+ " sanity maintenance: keep those //s away...
+ let treedir= substitute(treedir,'//$','/','')
+" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
+
+" call Dret("s:NetrwTreeDir <".treedir."> : (side effect) s:treecurpos<".(exists("s:treecurpos")? string(s:treecurpos) : 'n/a').">")
+ return treedir
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwTreeDisplay: recursive tree display {{{2
+fun! s:NetrwTreeDisplay(dir,depth)
+" call Dfunc("NetrwTreeDisplay(dir<".a:dir."> depth<".a:depth.">)")
+
+ " insure that there are no folds
+ setl nofen
+
+ " install ../ and shortdir
+ if a:depth == ""
+ call setline(line("$")+1,'../')
+" call Decho("setline#".line("$")." ../ (depth is zero)",'~'.expand("<slnum>"))
+ endif
+ if a:dir =~ '^\a\{3,}://'
+ if a:dir == w:netrw_treetop
+ let shortdir= a:dir
+ else
+ let shortdir= substitute(a:dir,'^.*/\([^/]\+\)/$','\1/','e')
+ endif
+ call setline(line("$")+1,a:depth.shortdir)
+ else
+ let shortdir= substitute(a:dir,'^.*/','','e')
+ call setline(line("$")+1,a:depth.shortdir.'/')
+ endif
+" call Decho("setline#".line("$")." shortdir<".a:depth.shortdir.">",'~'.expand("<slnum>"))
+ " append a / to dir if its missing one
+ let dir= a:dir
+
+ " display subtrees (if any)
+ let depth= s:treedepthstring.a:depth
+" call Decho("display subtrees with depth<".depth."> and current leaves",'~'.expand("<slnum>"))
+
+ " implement g:netrw_hide for tree listings (uses g:netrw_list_hide)
+ if g:netrw_hide == 1
+ " hide given patterns
+ let listhide= split(g:netrw_list_hide,',')
+" call Decho("listhide=".string(listhide))
+ for pat in listhide
+ call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"')
+ endfor
+
+ elseif g:netrw_hide == 2
+ " show given patterns (only)
+ let listhide= split(g:netrw_list_hide,',')
+" call Decho("listhide=".string(listhide))
+ let entries=[]
+ for entry in w:netrw_treedict[dir]
+ for pat in listhide
+ if entry =~ pat
+ call add(entries,entry)
+ break
+ endif
+ endfor
+ endfor
+ let w:netrw_treedict[dir]= entries
+ endif
+ if depth != ""
+ " always remove "." and ".." entries when there's depth
+ call filter(w:netrw_treedict[dir],'v:val !~ "\\.\\.$"')
+ call filter(w:netrw_treedict[dir],'v:val !~ "\\.$"')
+ endif
+
+" call Decho("for every entry in w:netrw_treedict[".dir."]=".string(w:netrw_treedict[dir]),'~'.expand("<slnum>"))
+ for entry in w:netrw_treedict[dir]
+ if dir =~ '/$'
+ let direntry= substitute(dir.entry,'[@/]$','','e')
+ else
+ let direntry= substitute(dir.'/'.entry,'[@/]$','','e')
+ endif
+" call Decho("dir<".dir."> entry<".entry."> direntry<".direntry.">",'~'.expand("<slnum>"))
+ if entry =~ '/$' && has_key(w:netrw_treedict,direntry)
+" call Decho("<".direntry."> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwTreeDisplay(direntry,depth)
+ elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/')
+" call Decho("<".direntry."/> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwTreeDisplay(direntry.'/',depth)
+ elseif entry =~ '@$' && has_key(w:netrw_treedict,direntry.'@')
+" call Decho("<".direntry."/> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwTreeDisplay(direntry.'/',depth)
+ else
+" call Decho("<".entry."> is not a key in treedict (no subtree)",'~'.expand("<slnum>"))
+ sil! NetrwKeepj call setline(line("$")+1,depth.entry)
+ endif
+ endfor
+" call Decho("displaying: ".string(getline(w:netrw_bannercnt,'$')))
+
+" call Dret("NetrwTreeDisplay")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRefreshTreeDict: updates the contents information for a tree (w:netrw_treedict) {{{2
+fun! s:NetrwRefreshTreeDict(dir)
+" call Dfunc("s:NetrwRefreshTreeDict(dir<".a:dir.">)")
+ if !exists("w:netrw_treedict")
+" call Dret("s:NetrwRefreshTreeDict : w:netrw_treedict doesn't exist")
+ return
+ endif
+
+ for entry in w:netrw_treedict[a:dir]
+ let direntry= substitute(a:dir.'/'.entry,'[@/]$','','e')
+" call Decho("a:dir<".a:dir."> entry<".entry."> direntry<".direntry.">",'~'.expand("<slnum>"))
+
+ if entry =~ '/$' && has_key(w:netrw_treedict,direntry)
+" call Decho("<".direntry."> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefreshTreeDict(direntry)
+ let liststar = s:NetrwGlob(direntry,'*',1)
+ let listdotstar = s:NetrwGlob(direntry,'.*',1)
+ let w:netrw_treedict[direntry] = liststar + listdotstar
+" call Decho("updating w:netrw_treedict[".direntry.']='.string(w:netrw_treedict[direntry]),'~'.expand("<slnum>"))
+
+ elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/')
+" call Decho("<".direntry."/> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/')
+ let liststar = s:NetrwGlob(direntry.'/','*',1)
+ let listdotstar= s:NetrwGlob(direntry.'/','.*',1)
+ let w:netrw_treedict[direntry]= liststar + listdotstar
+" call Decho("updating w:netrw_treedict[".direntry.']='.string(w:netrw_treedict[direntry]),'~'.expand("<slnum>"))
+
+ elseif entry =~ '@$' && has_key(w:netrw_treedict,direntry.'@')
+" call Decho("<".direntry."/> is a key in treedict - display subtree for it",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefreshTreeDict(direntry.'/')
+ let liststar = s:NetrwGlob(direntry.'/','*',1)
+ let listdotstar= s:NetrwGlob(direntry.'/','.*',1)
+" call Decho("updating w:netrw_treedict[".direntry.']='.string(w:netrw_treedict[direntry]),'~'.expand("<slnum>"))
+
+ else
+" call Decho('not updating w:netrw_treedict['.string(direntry).'] with entry<'.string(entry).'> (no subtree)','~'.expand("<slnum>"))
+ endif
+ endfor
+" call Dret("s:NetrwRefreshTreeDict")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwTreeListing: displays tree listing from treetop on down, using NetrwTreeDisplay() {{{2
+" Called by s:PerformListing()
+fun! s:NetrwTreeListing(dirname)
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+" call Dfunc("s:NetrwTreeListing() bufname<".expand("%").">")
+" call Decho("curdir<".a:dirname.">",'~'.expand("<slnum>"))
+" call Decho("win#".winnr().": w:netrw_treetop ".(exists("w:netrw_treetop")? "exists" : "doesn't exist")." w:netrw_treedict ".(exists("w:netrw_treedict")? "exists" : "doesn't exit"),'~'.expand("<slnum>"))
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+
+ " update the treetop
+ if !exists("w:netrw_treetop")
+" call Decho("update the treetop (w:netrw_treetop doesn't exist yet)",'~'.expand("<slnum>"))
+ let w:netrw_treetop= a:dirname
+ let s:netrw_treetop= w:netrw_treetop
+" call Decho("w:netrw_treetop<".w:netrw_treetop."> (reusing)",'~'.expand("<slnum>"))
+ elseif (w:netrw_treetop =~ ('^'.a:dirname) && s:Strlen(a:dirname) < s:Strlen(w:netrw_treetop)) || a:dirname !~ ('^'.w:netrw_treetop)
+" call Decho("update the treetop (override w:netrw_treetop with a:dirname<".a:dirname.">)",'~'.expand("<slnum>"))
+ let w:netrw_treetop= a:dirname
+ let s:netrw_treetop= w:netrw_treetop
+" call Decho("w:netrw_treetop<".w:netrw_treetop."> (went up)",'~'.expand("<slnum>"))
+ endif
+ if exists("w:netrw_treetop")
+ let s:netrw_treetop= w:netrw_treetop
+ else
+ let w:netrw_treetop= getcwd()
+ let s:netrw_treetop= w:netrw_treetop
+ endif
+
+ if !exists("w:netrw_treedict")
+ " insure that we have a treedict, albeit empty
+" call Decho("initializing w:netrw_treedict to empty",'~'.expand("<slnum>"))
+ let w:netrw_treedict= {}
+ endif
+
+ " update the dictionary for the current directory
+" call Decho("updating: w:netrw_treedict[".a:dirname.'] -> [directory listing]','~'.expand("<slnum>"))
+" call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." line($)=".line("$"),'~'.expand("<slnum>"))
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$g@^\.\.\=/$@d _'
+ let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$"))
+" call Decho("w:treedict[".a:dirname."]= ".string(w:netrw_treedict[a:dirname]),'~'.expand("<slnum>"))
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt.",$d _"
+
+ " if past banner, record word
+ if exists("w:netrw_bannercnt") && line(".") > w:netrw_bannercnt
+ let fname= expand("<cword>")
+ else
+ let fname= ""
+ endif
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+
+ " display from treetop on down
+" call Decho("(s:NetrwTreeListing) w:netrw_treetop<".w:netrw_treetop.">")
+ NetrwKeepj call s:NetrwTreeDisplay(w:netrw_treetop,"")
+" call Decho("s:NetrwTreeDisplay) setl noma nomod ro",'~'.expand("<slnum>"))
+
+ " remove any blank line remaining as line#1 (happens in treelisting mode with banner suppressed)
+ while getline(1) =~ '^\s*$' && byte2line(1) > 0
+" call Decho("deleting blank line",'~'.expand("<slnum>"))
+ 1d
+ endwhile
+
+ exe "setl ".g:netrw_bufsettings
+
+" call Dret("s:NetrwTreeListing : bufname<".expand("%").">")
+ return
+ endif
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwTreePath: returns path to current file/directory in tree listing {{{2
+" Normally, treetop is w:netrw_treetop, but a
+" user of the function ( netrw#SetTreetop() )
+" wipes that out prior to calling this function
+fun! s:NetrwTreePath(treetop)
+" call Dfunc("s:NetrwTreePath(treetop<".a:treetop.">) line#".line(".")."<".getline(".").">")
+ if line(".") < w:netrw_bannercnt + 2
+ let treedir= a:treetop
+ if treedir !~ '/$'
+ let treedir= treedir.'/'
+ endif
+" call Dret("s:NetrwTreePath ".treedir." : line#".line(".")." ≤ ".(w:netrw_bannercnt+2))
+ return treedir
+ endif
+
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let depth = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e')
+" call Decho("depth<".depth."> 1st subst",'~'.expand("<slnum>"))
+ let depth = substitute(depth,'^'.s:treedepthstring,'','')
+" call Decho("depth<".depth."> 2nd subst (first depth removed)",'~'.expand("<slnum>"))
+ let curline= getline('.')
+" call Decho("curline<".curline.'>','~'.expand("<slnum>"))
+ if curline =~ '/$'
+" call Decho("extract tree directory from current line",'~'.expand("<slnum>"))
+ let treedir= substitute(curline,'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e')
+" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
+ elseif curline =~ '@\s\+-->'
+" call Decho("extract tree directory using symbolic link",'~'.expand("<slnum>"))
+ let treedir= substitute(curline,'^\%('.s:treedepthstring.'\)*\([^'.s:treedepthstring.'].\{-}\)$','\1','e')
+ let treedir= substitute(treedir,'@\s\+-->.*$','','e')
+" call Decho("treedir<".treedir.">",'~'.expand("<slnum>"))
+ else
+" call Decho("do not extract tree directory from current line and set treedir to empty",'~'.expand("<slnum>"))
+ let treedir= ""
+ endif
+ " construct treedir by searching backwards at correct depth
+" call Decho("construct treedir by searching backwards for correct depth",'~'.expand("<slnum>"))
+" call Decho("initial treedir<".treedir."> depth<".depth.">",'~'.expand("<slnum>"))
+ while depth != "" && search('^'.depth.'[^'.s:treedepthstring.'].\{-}/$','bW')
+ let dirname= substitute(getline('.'),'^\('.s:treedepthstring.'\)*','','e')
+ let treedir= dirname.treedir
+ let depth = substitute(depth,'^'.s:treedepthstring,'','')
+" call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">",'~'.expand("<slnum>"))
+ endwhile
+" call Decho("treedir#1<".treedir.">",'~'.expand("<slnum>"))
+ if a:treetop =~ '/$'
+ let treedir= a:treetop.treedir
+ else
+ let treedir= a:treetop.'/'.treedir
+ endif
+" call Decho("treedir#2<".treedir.">",'~'.expand("<slnum>"))
+ let treedir= substitute(treedir,'//$','/','')
+" call Decho("treedir#3<".treedir.">",'~'.expand("<slnum>"))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))"
+ call winrestview(svpos)
+" call Dret("s:NetrwTreePath <".treedir.">")
+ return treedir
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwWideListing: {{{2
+fun! s:NetrwWideListing()
+
+ if w:netrw_liststyle == s:WIDELIST
+" call Dfunc("NetrwWideListing() w:netrw_liststyle=".w:netrw_liststyle.' fo='.&fo.' l:fo='.&l:fo)
+ " look for longest filename (cpf=characters per filename)
+ " cpf: characters per filename
+ " fpl: filenames per line
+ " fpc: filenames per column
+ setl ma noro
+ let keepa= @a
+" call Decho("setl ma noro",'~'.expand("<slnum>"))
+ let b:netrw_cpf= 0
+ if line("$") >= w:netrw_bannercnt
+ " determine the maximum filename size; use that to set cpf
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif'
+ NetrwKeepj call histdel("/",-1)
+ else
+ let @a= keepa
+" call Dret("NetrwWideListing")
+ return
+ endif
+ " allow for two spaces to separate columns
+ let b:netrw_cpf= b:netrw_cpf + 2
+" call Decho("b:netrw_cpf=max_filename_length+2=".b:netrw_cpf,'~'.expand("<slnum>"))
+
+ " determine qty files per line (fpl)
+ let w:netrw_fpl= winwidth(0)/b:netrw_cpf
+ if w:netrw_fpl <= 0
+ let w:netrw_fpl= 1
+ endif
+" call Decho("fpl= [winwidth=".winwidth(0)."]/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl,'~'.expand("<slnum>"))
+
+ " make wide display
+ " fpc: files per column of wide listing
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/^.*$/\=escape(printf("%-'.b:netrw_cpf.'S",submatch(0)),"\\")/'
+ NetrwKeepj call histdel("/",-1)
+ let fpc = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl
+ let newcolstart = w:netrw_bannercnt + fpc
+ let newcolend = newcolstart + fpc - 1
+" call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]",'~'.expand("<slnum>"))
+ if has("clipboard") && g:netrw_clipboard
+" call Decho("(s:NetrwWideListing) save @* and @+",'~'.expand("<slnum>"))
+ sil! let keepregstar = @*
+ sil! let keepregplus = @+
+ endif
+ while line("$") >= newcolstart
+ if newcolend > line("$") | let newcolend= line("$") | endif
+ let newcolqty= newcolend - newcolstart
+ exe newcolstart
+ " COMBAK: both of the visual-mode using lines below are problematic vis-a-vis @*
+ if newcolqty == 0
+ exe "sil! NetrwKeepj norm! 0\<c-v>$h\"ax".w:netrw_bannercnt."G$\"ap"
+ else
+ exe "sil! NetrwKeepj norm! 0\<c-v>".newcolqty.'j$h"ax'.w:netrw_bannercnt.'G$"ap'
+ endif
+ exe "sil! NetrwKeepj ".newcolstart.','.newcolend.'d _'
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt
+ endwhile
+ if has("clipboard")
+" call Decho("(s:NetrwWideListing) restore @* and @+",'~'.expand("<slnum>"))
+ if @* != keepregstar | sil! let @* = keepregstar | endif
+ if @+ != keepregplus | sil! let @+ = keepregplus | endif
+ endif
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$s/\s\+$//e'
+ NetrwKeepj call histdel("/",-1)
+ exe 'nno <buffer> <silent> w :call search(''^.\\|\s\s\zs\S'',''W'')'."\<cr>"
+ exe 'nno <buffer> <silent> b :call search(''^.\\|\s\s\zs\S'',''bW'')'."\<cr>"
+" call Decho("NetrwWideListing) setl noma nomod ro",'~'.expand("<slnum>"))
+ exe "setl ".g:netrw_bufsettings
+ let @a= keepa
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("NetrwWideListing")
+ return
+ else
+ if hasmapto("w","n")
+ sil! nunmap <buffer> w
+ endif
+ if hasmapto("b","n")
+ sil! nunmap <buffer> b
+ endif
+ endif
+
+endfun
+
+" ---------------------------------------------------------------------
+" s:PerformListing: {{{2
+fun! s:PerformListing(islocal)
+" call Dfunc("s:PerformListing(islocal=".a:islocal.")")
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("<slnum>"))
+" call Decho("settings: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (enter)"." ei<".&ei.">",'~'.expand("<slnum>"))
+ sil! NetrwKeepj %d _
+" call DechoBuf(bufnr("%"))
+
+ " set up syntax highlighting {{{3
+" call Decho("--set up syntax highlighting (ie. setl ft=netrw)",'~'.expand("<slnum>"))
+ sil! setl ft=netrw
+
+ NetrwKeepj call s:NetrwOptionsSafe(a:islocal)
+ setl noro ma
+" call Decho("setl noro ma bh=".&bh,'~'.expand("<slnum>"))
+
+" if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho
+" call Decho("Processing your browsing request...",'~'.expand("<slnum>"))
+" endif " Decho
+
+" call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict")
+ " force a refresh for tree listings
+" call Decho("force refresh for treelisting: clear buffer<".expand("%")."> with :%d",'~'.expand("<slnum>"))
+ sil! NetrwKeepj %d _
+ endif
+
+ " save current directory on directory history list
+ NetrwKeepj call s:NetrwBookHistHandler(3,b:netrw_curdir)
+
+ " Set up the banner {{{3
+ if g:netrw_banner
+" call Decho("--set up banner",'~'.expand("<slnum>"))
+ NetrwKeepj call setline(1,'" ============================================================================')
+ if exists("g:netrw_pchk")
+ " this undocumented option allows pchk to run with different versions of netrw without causing spurious
+ " failure detections.
+ NetrwKeepj call setline(2,'" Netrw Directory Listing')
+ else
+ NetrwKeepj call setline(2,'" Netrw Directory Listing (netrw '.g:loaded_netrw.')')
+ endif
+ if exists("g:netrw_pchk")
+ let curdir= substitute(b:netrw_curdir,expand("$HOME"),'~','')
+ else
+ let curdir= b:netrw_curdir
+ endif
+ if exists("g:netrw_bannerbackslash") && g:netrw_bannerbackslash
+ NetrwKeepj call setline(3,'" '.substitute(curdir,'/','\\','g'))
+ else
+ NetrwKeepj call setline(3,'" '.curdir)
+ endif
+ let w:netrw_bannercnt= 3
+ NetrwKeepj exe "sil! NetrwKeepj ".w:netrw_bannercnt
+ else
+" call Decho("--no banner",'~'.expand("<slnum>"))
+ NetrwKeepj 1
+ let w:netrw_bannercnt= 1
+ endif
+" call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." win#".winnr(),'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("<slnum>"))
+
+ " construct sortby string: [name|time|size|exten] [reversed]
+ let sortby= g:netrw_sort_by
+ if g:netrw_sort_direction =~# "^r"
+ let sortby= sortby." reversed"
+ endif
+
+ " Sorted by... {{{3
+ if g:netrw_banner
+" call Decho("--handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("<slnum>"))
+ if g:netrw_sort_by =~# "^n"
+" call Decho("directories will be sorted by name",'~'.expand("<slnum>"))
+ " sorted by name (also includes the sorting sequence in the banner)
+ NetrwKeepj put ='\" Sorted by '.sortby
+ NetrwKeepj put ='\" Sort sequence: '.g:netrw_sort_sequence
+ let w:netrw_bannercnt= w:netrw_bannercnt + 2
+ else
+" call Decho("directories will be sorted by size or time",'~'.expand("<slnum>"))
+ " sorted by time, size, exten
+ NetrwKeepj put ='\" Sorted by '.sortby
+ let w:netrw_bannercnt= w:netrw_bannercnt + 1
+ endif
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt
+" else " Decho
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+ endif
+
+ " show copy/move target, if any {{{3
+ if g:netrw_banner
+ if exists("s:netrwmftgt") && exists("s:netrwmftgt_islocal")
+" call Decho("--show copy/move target<".s:netrwmftgt.">",'~'.expand("<slnum>"))
+ NetrwKeepj put =''
+ if s:netrwmftgt_islocal
+ sil! NetrwKeepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (local)')
+ else
+ sil! NetrwKeepj call setline(line("."),'" Copy/Move Tgt: '.s:netrwmftgt.' (remote)')
+ endif
+ let w:netrw_bannercnt= w:netrw_bannercnt + 1
+ else
+" call Decho("s:netrwmftgt does not exist, don't make Copy/Move Tgt",'~'.expand("<slnum>"))
+ endif
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt
+ endif
+
+ " Hiding... -or- Showing... {{{3
+ if g:netrw_banner
+" call Decho("--handle hiding/showing in banner (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("<slnum>"))
+ if g:netrw_list_hide != "" && g:netrw_hide
+ if g:netrw_hide == 1
+ NetrwKeepj put ='\" Hiding: '.g:netrw_list_hide
+ else
+ NetrwKeepj put ='\" Showing: '.g:netrw_list_hide
+ endif
+ let w:netrw_bannercnt= w:netrw_bannercnt + 1
+ endif
+ exe "NetrwKeepj ".w:netrw_bannercnt
+
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ let quickhelp = g:netrw_quickhelp%len(s:QuickHelp)
+" call Decho("quickhelp =".quickhelp,'~'.expand("<slnum>"))
+ NetrwKeepj put ='\" Quick Help: <F1>:help '.s:QuickHelp[quickhelp]
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ NetrwKeepj put ='\" =============================================================================='
+ let w:netrw_bannercnt= w:netrw_bannercnt + 2
+" else " Decho
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+ endif
+
+ " bannercnt should index the line just after the banner
+ if g:netrw_banner
+ let w:netrw_bannercnt= w:netrw_bannercnt + 1
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt
+" call Decho("--w:netrw_bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$"),'~'.expand("<slnum>"))
+" else " Decho
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+ endif
+
+ " get list of files
+" call Decho("--Get list of files - islocal=".a:islocal,'~'.expand("<slnum>"))
+ if a:islocal
+ NetrwKeepj call s:LocalListing()
+ else " remote
+ NetrwKeepj let badresult= s:NetrwRemoteListing()
+ if badresult
+" call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." win#".winnr()." buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
+" call Dret("s:PerformListing : error detected by NetrwRemoteListing")
+ return
+ endif
+ endif
+
+ " manipulate the directory listing (hide, sort) {{{3
+ if !exists("w:netrw_bannercnt")
+ let w:netrw_bannercnt= 0
+ endif
+" call Decho("--manipulate directory listing (hide, sort)",'~'.expand("<slnum>"))
+" call Decho("g:netrw_banner=".g:netrw_banner." w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)",'~'.expand("<slnum>"))
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+
+ if !g:netrw_banner || line("$") >= w:netrw_bannercnt
+" call Decho("manipulate directory listing (support hide)",'~'.expand("<slnum>"))
+" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("<slnum>"))
+ if g:netrw_hide && g:netrw_list_hide != ""
+ NetrwKeepj call s:NetrwListHide()
+ endif
+ if !g:netrw_banner || line("$") >= w:netrw_bannercnt
+" call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">",'~'.expand("<slnum>"))
+
+ if g:netrw_sort_by =~# "^n"
+ " sort by name
+" call Decho("sort by name",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwSetSort()
+
+ if !g:netrw_banner || w:netrw_bannercnt < line("$")
+" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+ if g:netrw_sort_direction =~# 'n'
+ " name: sort by name of file
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
+ else
+ " reverse direction sorting
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options
+ endif
+ endif
+
+ " remove priority pattern prefix
+" call Decho("remove priority pattern prefix",'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{3}'.g:netrw_sepchr.'//e'
+ NetrwKeepj call histdel("/",-1)
+
+ elseif g:netrw_sort_by =~# "^ext"
+ " exten: sort by extension
+ " The histdel(...,-1) calls remove the last search from the search history
+" call Decho("sort by extension",'~'.expand("<slnum>"))
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$g+/+s/^/001'.g:netrw_sepchr.'/'
+ NetrwKeepj call histdel("/",-1)
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v+[./]+s/^/002'.g:netrw_sepchr.'/'
+ NetrwKeepj call histdel("/",-1)
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$v+['.g:netrw_sepchr.'/]+s/^\(.*\.\)\(.\{-\}\)$/\2'.g:netrw_sepchr.'&/e'
+ NetrwKeepj call histdel("/",-1)
+ if !g:netrw_banner || w:netrw_bannercnt < line("$")
+" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+ if g:netrw_sort_direction =~# 'n'
+ " normal direction sorting
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
+ else
+ " reverse direction sorting
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options
+ endif
+ endif
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^.\{-}'.g:netrw_sepchr.'//e'
+ NetrwKeepj call histdel("/",-1)
+
+ elseif a:islocal
+ if !g:netrw_banner || w:netrw_bannercnt < line("$")
+" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction,'~'.expand("<slnum>"))
+ if g:netrw_sort_direction =~# 'n'
+" call Decho('exe sil NetrwKeepj '.w:netrw_bannercnt.',$sort','~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options
+ else
+" call Decho('exe sil NetrwKeepj '.w:netrw_bannercnt.',$sort!','~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options
+ endif
+" call Decho("remove leading digits/ (sorting) information from listing",'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{-}\///e'
+ NetrwKeepj call histdel("/",-1)
+ endif
+ endif
+
+ elseif g:netrw_sort_direction =~# 'r'
+" call Decho('(s:PerformListing) reverse the sorted listing','~'.expand("<slnum>"))
+ if !g:netrw_banner || w:netrw_bannercnt < line('$')
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g/^/m '.w:netrw_bannercnt
+ call histdel("/",-1)
+ endif
+ endif
+ endif
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+
+ " convert to wide/tree listing {{{3
+" call Decho("--modify display if wide/tree listing style",'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#1)",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwWideListing()
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#2)",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwTreeListing(b:netrw_curdir)
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#3)",'~'.expand("<slnum>"))
+
+ " resolve symbolic links if local and (thin or tree)
+ if a:islocal && (w:netrw_liststyle == s:THINLIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST))
+" call Decho("--resolve symbolic links if local and thin|tree",'~'.expand("<slnum>"))
+ sil! g/@$/call s:ShowLink()
+ endif
+
+ if exists("w:netrw_bannercnt") && (line("$") >= w:netrw_bannercnt || !g:netrw_banner)
+ " place cursor on the top-left corner of the file listing
+" call Decho("--place cursor on top-left corner of file listing",'~'.expand("<slnum>"))
+ exe 'sil! '.w:netrw_bannercnt
+ sil! NetrwKeepj norm! 0
+" call Decho(" tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("<slnum>"))
+ else
+" call Decho("--did NOT place cursor on top-left corner",'~'.expand("<slnum>"))
+" call Decho(" w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a'),'~'.expand("<slnum>"))
+" call Decho(" line($)=".line("$"),'~'.expand("<slnum>"))
+" call Decho(" g:netrw_banner=".(exists("g:netrw_banner")? g:netrw_banner : 'n/a'),'~'.expand("<slnum>"))
+ endif
+
+ " record previous current directory
+ let w:netrw_prvdir= b:netrw_curdir
+" call Decho("--record netrw_prvdir<".w:netrw_prvdir.">",'~'.expand("<slnum>"))
+
+ " save certain window-oriented variables into buffer-oriented variables {{{3
+" call Decho("--save some window-oriented variables into buffer oriented variables",'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#4)",'~'.expand("<slnum>"))
+ NetrwKeepj call s:SetBufWinVars()
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#5)",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwOptionsRestore("w:")
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#6)",'~'.expand("<slnum>"))
+
+ " set display to netrw display settings
+" call Decho("--set display to netrw display settings (".g:netrw_bufsettings.")",'~'.expand("<slnum>"))
+ exe "setl ".g:netrw_bufsettings
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#7)",'~'.expand("<slnum>"))
+ if g:netrw_liststyle == s:LONGLIST
+" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("<slnum>"))
+ exe "setl ts=".(g:netrw_maxfilenamelen+1)
+ endif
+" call Decho("PerformListing buffer:",'~'.expand("<slnum>"))
+" call DechoBuf(bufnr("%"))
+
+ if exists("s:treecurpos")
+" call Decho("s:treecurpos exists; restore posn",'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (internal#8)",'~'.expand("<slnum>"))
+" call Decho("restoring posn to s:treecurpos<".string(s:treecurpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(s:treecurpos)
+ unlet s:treecurpos
+ endif
+
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo. " (return)",'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol()." line($)=".line("$"),'~'.expand("<slnum>"))
+" call Dret("s:PerformListing : curpos<".string(getpos(".")).">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SetupNetrwStatusLine: {{{2
+fun! s:SetupNetrwStatusLine(statline)
+" call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)")
+
+ if !exists("s:netrw_setup_statline")
+ let s:netrw_setup_statline= 1
+" call Decho("do first-time status line setup",'~'.expand("<slnum>"))
+
+ if !exists("s:netrw_users_stl")
+ let s:netrw_users_stl= &stl
+ endif
+ if !exists("s:netrw_users_ls")
+ let s:netrw_users_ls= &laststatus
+ endif
+
+ " set up User9 highlighting as needed
+ let keepa= @a
+ redir @a
+ try
+ hi User9
+ catch /^Vim\%((\a\{3,})\)\=:E411/
+ if &bg == "dark"
+ hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue
+ else
+ hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue
+ endif
+ endtry
+ redir END
+ let @a= keepa
+ endif
+
+ " set up status line (may use User9 highlighting)
+ " insure that windows have a statusline
+ " make sure statusline is displayed
+ let &stl=a:statline
+ setl laststatus=2
+" call Decho("stl=".&stl,'~'.expand("<slnum>"))
+ redraw
+
+" call Dret("SetupNetrwStatusLine : stl=".&stl)
+endfun
+
+" =========================================
+" Remote Directory Browsing Support: {{{1
+" =========================================
+
+" ---------------------------------------------------------------------
+" s:NetrwRemoteFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2
+" This function assumes that a long listing will be received. Size, time,
+" and reverse sorts will be requested of the server but not otherwise
+" enforced here.
+fun! s:NetrwRemoteFtpCmd(path,listcmd)
+" call Dfunc("NetrwRemoteFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) w:netrw_method=".(exists("w:netrw_method")? w:netrw_method : (exists("b:netrw_method")? b:netrw_method : "???")))
+" call Decho("line($)=".line("$")." win#".winnr()." w:netrw_bannercnt=".w:netrw_bannercnt,'~'.expand("<slnum>"))
+ " sanity check: {{{3
+ if !exists("w:netrw_method")
+ if exists("b:netrw_method")
+ let w:netrw_method= b:netrw_method
+ else
+ call netrw#ErrorMsg(2,"(s:NetrwRemoteFtpCmd) internal netrw error",93)
+" call Dret("NetrwRemoteFtpCmd")
+ return
+ endif
+ endif
+
+ " WinXX ftp uses unix style input, so set ff to unix " {{{3
+ let ffkeep= &ff
+ setl ma ff=unix noro
+" call Decho("setl ma ff=unix noro",'~'.expand("<slnum>"))
+
+ " clear off any older non-banner lines " {{{3
+ " note that w:netrw_bannercnt indexes the line after the banner
+" call Decho('exe sil! NetrwKeepj '.w:netrw_bannercnt.",$d _ (clear off old non-banner lines)",'~'.expand("<slnum>"))
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt.",$d _"
+
+ ".........................................
+ if w:netrw_method == 2 || w:netrw_method == 5 " {{{3
+ " ftp + <.netrc>: Method #2
+ if a:path != ""
+ NetrwKeepj put ='cd \"'.a:path.'\"'
+ endif
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj call setline(line("$")+1,a:listcmd)
+" exe "NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."),''~''.expand("<slnum>"))'
+ if exists("g:netrw_port") && g:netrw_port != ""
+" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1),'~'.expand("<slnum>"))
+ exe s:netrw_silentxfer." NetrwKeepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)." ".s:ShellEscape(g:netrw_port,1)
+ else
+" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1),'~'.expand("<slnum>"))
+ exe s:netrw_silentxfer." NetrwKeepj ".w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." -i ".s:ShellEscape(g:netrw_machine,1)
+ endif
+
+ ".........................................
+ elseif w:netrw_method == 3 " {{{3
+ " ftp + machine,id,passwd,filename: Method #3
+ setl ff=unix
+ if exists("g:netrw_port") && g:netrw_port != ""
+ NetrwKeepj put ='open '.g:netrw_machine.' '.g:netrw_port
+ else
+ NetrwKeepj put ='open '.g:netrw_machine
+ endif
+
+ " handle userid and password
+ let host= substitute(g:netrw_machine,'\..*$','','')
+" call Decho("host<".host.">",'~'.expand("<slnum>"))
+ if exists("s:netrw_hup") && exists("s:netrw_hup[host]")
+ call NetUserPass("ftp:".host)
+ endif
+ if exists("g:netrw_uid") && g:netrw_uid != ""
+ if exists("g:netrw_ftp") && g:netrw_ftp == 1
+ NetrwKeepj put =g:netrw_uid
+ if exists("s:netrw_passwd") && s:netrw_passwd != ""
+ NetrwKeepj put ='\"'.s:netrw_passwd.'\"'
+ endif
+ elseif exists("s:netrw_passwd")
+ NetrwKeepj put ='user \"'.g:netrw_uid.'\" \"'.s:netrw_passwd.'\"'
+ endif
+ endif
+
+ if a:path != ""
+ NetrwKeepj put ='cd \"'.a:path.'\"'
+ endif
+ if exists("g:netrw_ftpextracmd")
+ NetrwKeepj put =g:netrw_ftpextracmd
+" call Decho("filter input: ".getline('.'),'~'.expand("<slnum>"))
+ endif
+ NetrwKeepj call setline(line("$")+1,a:listcmd)
+
+ " perform ftp:
+ " -i : turns off interactive prompting from ftp
+ " -n unix : DON'T use <.netrc>, even though it exists
+ " -n win32: quit being obnoxious about password
+ if exists("w:netrw_bannercnt")
+" exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."),''~''.expand("<slnum>"))'
+ call s:NetrwExe(s:netrw_silentxfer.w:netrw_bannercnt.",$!".s:netrw_ftp_cmd." ".g:netrw_ftp_options)
+" else " Decho
+" call Decho("WARNING: w:netrw_bannercnt doesn't exist!",'~'.expand("<slnum>"))
+" g/^./call Decho("SKIPPING ftp#".line(".").": ".getline("."),'~'.expand("<slnum>"))
+ endif
+
+ ".........................................
+ elseif w:netrw_method == 9 " {{{3
+ " sftp username@machine: Method #9
+ " s:netrw_sftp_cmd
+ setl ff=unix
+
+ " restore settings
+ let &ff= ffkeep
+" call Dret("NetrwRemoteFtpCmd")
+ return
+
+ ".........................................
+ else " {{{3
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . bufname("%") . ">",23)
+ endif
+
+ " cleanup for Windows " {{{3
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ sil! NetrwKeepj %s/\r$//e
+ NetrwKeepj call histdel("/",-1)
+ endif
+ if a:listcmd == "dir"
+ " infer directory/link based on the file permission string
+ sil! NetrwKeepj g/d\%([-r][-w][-x]\)\{3}/NetrwKeepj s@$@/@e
+ sil! NetrwKeepj g/l\%([-r][-w][-x]\)\{3}/NetrwKeepj s/$/@/e
+ NetrwKeepj call histdel("/",-1)
+ NetrwKeepj call histdel("/",-1)
+ if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST)
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e'
+ NetrwKeepj call histdel("/",-1)
+ endif
+ endif
+
+ " ftp's listing doesn't seem to include ./ or ../ " {{{3
+ if !search('^\.\/$\|\s\.\/$','wn')
+ exe 'NetrwKeepj '.w:netrw_bannercnt
+ NetrwKeepj put ='./'
+ endif
+ if !search('^\.\.\/$\|\s\.\.\/$','wn')
+ exe 'NetrwKeepj '.w:netrw_bannercnt
+ NetrwKeepj put ='../'
+ endif
+
+ " restore settings " {{{3
+ let &ff= ffkeep
+" call Dret("NetrwRemoteFtpCmd")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRemoteListing: {{{2
+fun! s:NetrwRemoteListing()
+" call Dfunc("s:NetrwRemoteListing() b:netrw_curdir<".b:netrw_curdir.">) win#".winnr())
+
+ if !exists("w:netrw_bannercnt") && exists("s:bannercnt")
+ let w:netrw_bannercnt= s:bannercnt
+ endif
+ if !exists("w:netrw_bannercnt") && exists("b:bannercnt")
+ let w:netrw_bannercnt= s:bannercnt
+ endif
+
+ call s:RemotePathAnalysis(b:netrw_curdir)
+
+ " sanity check:
+ if exists("b:netrw_method") && b:netrw_method =~ '[235]'
+" call Decho("b:netrw_method=".b:netrw_method,'~'.expand("<slnum>"))
+ if !executable("ftp")
+" call Decho("ftp is not executable",'~'.expand("<slnum>"))
+ if !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18)
+ endif
+ call s:NetrwOptionsRestore("w:")
+" call Dret("s:NetrwRemoteListing -1")
+ return -1
+ endif
+
+ elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
+" call Decho("g:netrw_list_cmd<",(exists("g:netrw_list_cmd")? 'n/a' : "-empty-").">",'~'.expand("<slnum>"))
+ if !exists("g:netrw_quiet")
+ if g:netrw_list_cmd == ""
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your g:netrw_list_cmd is empty; perhaps ".g:netrw_ssh_cmd." is not executable on your system",47)
+ else
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19)
+ endif
+ endif
+
+ NetrwKeepj call s:NetrwOptionsRestore("w:")
+" call Dret("s:NetrwRemoteListing -1")
+ return -1
+ endif " (remote handling sanity check)
+" call Decho("passed remote listing sanity checks",'~'.expand("<slnum>"))
+
+ if exists("b:netrw_method")
+" call Decho("setting w:netrw_method to b:netrw_method<".b:netrw_method.">",'~'.expand("<slnum>"))
+ let w:netrw_method= b:netrw_method
+ endif
+
+ if s:method == "ftp"
+ " use ftp to get remote file listing {{{3
+" call Decho("use ftp to get remote file listing",'~'.expand("<slnum>"))
+ let s:method = "ftp"
+ let listcmd = g:netrw_ftp_list_cmd
+ if g:netrw_sort_by =~# '^t'
+ let listcmd= g:netrw_ftp_timelist_cmd
+ elseif g:netrw_sort_by =~# '^s'
+ let listcmd= g:netrw_ftp_sizelist_cmd
+ endif
+" call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)",'~'.expand("<slnum>"))
+ call s:NetrwRemoteFtpCmd(s:path,listcmd)
+" exe "sil! keepalt NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."),''~''.expand("<slnum>"))'
+
+ " report on missing file or directory messages
+ if search('[Nn]o such file or directory\|Failed to change directory')
+ let mesg= getline(".")
+ if exists("w:netrw_bannercnt")
+ setl ma
+ exe w:netrw_bannercnt.",$d _"
+ setl noma
+ endif
+ NetrwKeepj call s:NetrwOptionsRestore("w:")
+ call netrw#ErrorMsg(s:WARNING,mesg,96)
+" call Dret("s:NetrwRemoteListing : -1")
+ return -1
+ endif
+
+ if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || (exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST)
+ " shorten the listing
+" call Decho("generate short listing",'~'.expand("<slnum>"))
+ exe "sil! keepalt NetrwKeepj ".w:netrw_bannercnt
+
+ " cleanup
+ if g:netrw_ftp_browse_reject != ""
+ exe "sil! keepalt NetrwKeepj g/".g:netrw_ftp_browse_reject."/NetrwKeepj d"
+ NetrwKeepj call histdel("/",-1)
+ endif
+ sil! NetrwKeepj %s/\r$//e
+ NetrwKeepj call histdel("/",-1)
+
+ " if there's no ../ listed, then put ../ in
+ let line1= line(".")
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt
+ let line2= search('\.\.\/\%(\s\|$\)','cnW')
+" call Decho("search(".'\.\.\/\%(\s\|$\)'."','cnW')=".line2." w:netrw_bannercnt=".w:netrw_bannercnt,'~'.expand("<slnum>"))
+ if line2 == 0
+" call Decho("netrw is putting ../ into listing",'~'.expand("<slnum>"))
+ sil! NetrwKeepj put='../'
+ endif
+ exe "sil! NetrwKeepj ".line1
+ sil! NetrwKeepj norm! 0
+
+" call Decho("line1=".line1." line2=".line2." line(.)=".line("."),'~'.expand("<slnum>"))
+ if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup
+" call Decho("M$ ftp cleanup",'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+//'
+ NetrwKeepj call histdel("/",-1)
+ else " normal ftp cleanup
+" call Decho("normal ftp cleanup",'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e'
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e'
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e'
+ NetrwKeepj call histdel("/",-1)
+ NetrwKeepj call histdel("/",-1)
+ NetrwKeepj call histdel("/",-1)
+ endif
+ endif
+
+ else
+ " use ssh to get remote file listing {{{3
+" call Decho("use ssh to get remote file listing: s:path<".s:path.">",'~'.expand("<slnum>"))
+ let listcmd= s:MakeSshCmd(g:netrw_list_cmd)
+" call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)",'~'.expand("<slnum>"))
+ if g:netrw_scp_cmd =~ '^pscp'
+" call Decho("1: exe r! ".s:ShellEscape(listcmd.s:path, 1),'~'.expand("<slnum>"))
+ exe "NetrwKeepj r! ".listcmd.s:ShellEscape(s:path, 1)
+ " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like
+ sil! NetrwKeepj g/^Listing directory/NetrwKeepj d
+ sil! NetrwKeepj g/^d[-rwx][-rwx][-rwx]/NetrwKeepj s+$+/+e
+ sil! NetrwKeepj g/^l[-rwx][-rwx][-rwx]/NetrwKeepj s+$+@+e
+ NetrwKeepj call histdel("/",-1)
+ NetrwKeepj call histdel("/",-1)
+ NetrwKeepj call histdel("/",-1)
+ if g:netrw_liststyle != s:LONGLIST
+ sil! NetrwKeepj g/^[dlsp-][-rwx][-rwx][-rwx]/NetrwKeepj s/^.*\s\(\S\+\)$/\1/e
+ NetrwKeepj call histdel("/",-1)
+ endif
+ else
+ if s:path == ""
+" call Decho("2: exe r! ".listcmd,'~'.expand("<slnum>"))
+ exe "NetrwKeepj keepalt r! ".listcmd
+ else
+" call Decho("3: exe r! ".listcmd.' '.s:ShellEscape(fnameescape(s:path),1),'~'.expand("<slnum>"))
+ exe "NetrwKeepj keepalt r! ".listcmd.' '.s:ShellEscape(fnameescape(s:path),1)
+" call Decho("listcmd<".listcmd."> path<".s:path.">",'~'.expand("<slnum>"))
+ endif
+ endif
+
+ " cleanup
+ if g:netrw_ssh_browse_reject != ""
+" call Decho("cleanup: exe sil! g/".g:netrw_ssh_browse_reject."/NetrwKeepj d",'~'.expand("<slnum>"))
+ exe "sil! g/".g:netrw_ssh_browse_reject."/NetrwKeepj d"
+ NetrwKeepj call histdel("/",-1)
+ endif
+ endif
+
+ if w:netrw_liststyle == s:LONGLIST
+ " do a long listing; these substitutions need to be done prior to sorting {{{3
+" call Decho("fix long listing:",'~'.expand("<slnum>"))
+
+ if s:method == "ftp"
+ " cleanup
+ exe "sil! NetrwKeepj ".w:netrw_bannercnt
+ while getline('.') =~# g:netrw_ftp_browse_reject
+ sil! NetrwKeepj d
+ endwhile
+ " if there's no ../ listed, then put ../ in
+ let line1= line(".")
+ sil! NetrwKeepj 1
+ sil! NetrwKeepj call search('^\.\.\/\%(\s\|$\)','W')
+ let line2= line(".")
+ if line2 == 0
+ if b:netrw_curdir != '/'
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt."put='../'"
+ endif
+ endif
+ exe "sil! NetrwKeepj ".line1
+ sil! NetrwKeepj norm! 0
+ endif
+
+ if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup
+" call Decho("M$ ftp site listing cleanup",'~'.expand("<slnum>"))
+ exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(<DIR>\|\d\+\)\s\+\)\(\w.*\)$/\2\t\1/'
+ elseif exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$")
+" call Decho("normal ftp site listing cleanup: bannercnt=".w:netrw_bannercnt." line($)=".line("$"),'~'.expand("<slnum>"))
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/ -> .*$//e'
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2 \t\1/e'
+ exe 'sil NetrwKeepj '.w:netrw_bannercnt
+ NetrwKeepj call histdel("/",-1)
+ NetrwKeepj call histdel("/",-1)
+ NetrwKeepj call histdel("/",-1)
+ endif
+ endif
+
+" if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho
+" exe "NetrwKeepj ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."),''~''.expand("<slnum>"))'
+" endif " Decho
+
+" call Dret("s:NetrwRemoteListing 0")
+ return 0
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRemoteRm: remove/delete a remote file or directory {{{2
+fun! s:NetrwRemoteRm(usrhost,path) range
+" call Dfunc("s:NetrwRemoteRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol("."))
+" call Decho("firstline=".a:firstline." lastline=".a:lastline,'~'.expand("<slnum>"))
+ let svpos= winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+
+ let all= 0
+ if exists("s:netrwmarkfilelist_{bufnr('%')}")
+ " remove all marked files
+" call Decho("remove all marked files with bufnr#".bufnr("%"),'~'.expand("<slnum>"))
+ for fname in s:netrwmarkfilelist_{bufnr("%")}
+ let ok= s:NetrwRemoteRmFile(a:path,fname,all)
+ if ok =~# 'q\%[uit]'
+ break
+ elseif ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ endfor
+ call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)
+
+ else
+ " remove files specified by range
+" call Decho("remove files specified by range",'~'.expand("<slnum>"))
+
+ " preparation for removing multiple files/directories
+ let keepsol = &l:sol
+ setl nosol
+ let ctr = a:firstline
+
+ " remove multiple files and directories
+ while ctr <= a:lastline
+ exe "NetrwKeepj ".ctr
+ let ok= s:NetrwRemoteRmFile(a:path,s:NetrwGetWord(),all)
+ if ok =~# 'q\%[uit]'
+ break
+ elseif ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ let ctr= ctr + 1
+ endwhile
+ let &l:sol = keepsol
+ endif
+
+ " refresh the (remote) directory listing
+" call Decho("refresh remote directory listing",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+
+" call Dret("s:NetrwRemoteRm")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRemoteRmFile: {{{2
+fun! s:NetrwRemoteRmFile(path,rmfile,all)
+" call Dfunc("s:NetrwRemoteRmFile(path<".a:path."> rmfile<".a:rmfile.">) all=".a:all)
+
+ let all= a:all
+ let ok = ""
+
+ if a:rmfile !~ '^"' && (a:rmfile =~ '@$' || a:rmfile !~ '[\/]$')
+ " attempt to remove file
+" call Decho("attempt to remove file (all=".all.")",'~'.expand("<slnum>"))
+ if !all
+ echohl Statement
+" call Decho("case all=0:",'~'.expand("<slnum>"))
+ call inputsave()
+ let ok= input("Confirm deletion of file<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
+ call inputrestore()
+ echohl NONE
+ if ok == ""
+ let ok="no"
+ endif
+ let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
+ if ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ endif
+
+ if all || ok =~# 'y\%[es]' || ok == ""
+" call Decho("case all=".all." or ok<".ok.">".(exists("w:netrw_method")? ': netrw_method='.w:netrw_method : ""),'~'.expand("<slnum>"))
+ if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+" call Decho("case ftp:",'~'.expand("<slnum>"))
+ let path= a:path
+ if path =~ '^\a\{3,}://'
+ let path= substitute(path,'^\a\{3,}://[^/]\+/','','')
+ endif
+ sil! NetrwKeepj .,$d _
+ call s:NetrwRemoteFtpCmd(path,"delete ".'"'.a:rmfile.'"')
+ else
+" call Decho("case ssh: g:netrw_rm_cmd<".g:netrw_rm_cmd.">",'~'.expand("<slnum>"))
+ let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd)
+" call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("<slnum>"))
+ if !exists("b:netrw_curdir")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53)
+ let ok="q"
+ else
+ let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','')
+" call Decho("netrw_rm_cmd<".netrw_rm_cmd.">",'~'.expand("<slnum>"))
+" call Decho("remotedir<".remotedir.">",'~'.expand("<slnum>"))
+" call Decho("rmfile<".a:rmfile.">",'~'.expand("<slnum>"))
+ if remotedir != ""
+ let netrw_rm_cmd= netrw_rm_cmd." ".s:ShellEscape(fnameescape(remotedir.a:rmfile))
+ else
+ let netrw_rm_cmd= netrw_rm_cmd." ".s:ShellEscape(fnameescape(a:rmfile))
+ endif
+" call Decho("call system(".netrw_rm_cmd.")",'~'.expand("<slnum>"))
+ let ret= system(netrw_rm_cmd)
+ if v:shell_error != 0
+ if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir
+ call netrw#ErrorMsg(s:ERROR,"remove failed; perhaps due to vim's current directory<".getcwd()."> not matching netrw's (".b:netrw_curdir.") (see :help netrw-cd)",102)
+ else
+ call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60)
+ endif
+ elseif ret != 0
+ call netrw#ErrorMsg(s:WARNING,"cmd<".netrw_rm_cmd."> failed",60)
+ endif
+" call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("<slnum>"))
+ endif
+ endif
+ elseif ok =~# 'q\%[uit]'
+" call Decho("ok==".ok,'~'.expand("<slnum>"))
+ endif
+
+ else
+ " attempt to remove directory
+" call Decho("attempt to remove directory",'~'.expand("<slnum>"))
+ if !all
+ call inputsave()
+ let ok= input("Confirm deletion of directory<".a:rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
+ call inputrestore()
+ if ok == ""
+ let ok="no"
+ endif
+ let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
+ if ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ endif
+
+ if all || ok =~# 'y\%[es]' || ok == ""
+ if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+ NetrwKeepj call s:NetrwRemoteFtpCmd(a:path,"rmdir ".a:rmfile)
+ else
+ let rmfile = substitute(a:path.a:rmfile,'/$','','')
+ let netrw_rmdir_cmd = s:MakeSshCmd(netrw#WinPath(g:netrw_rmdir_cmd)).' '.s:ShellEscape(netrw#WinPath(rmfile))
+" call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")",'~'.expand("<slnum>"))
+ let ret= system(netrw_rmdir_cmd)
+" call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("<slnum>"))
+
+ if v:shell_error != 0
+" call Decho("v:shell_error not 0",'~'.expand("<slnum>"))
+ let netrw_rmf_cmd= s:MakeSshCmd(netrw#WinPath(g:netrw_rmf_cmd)).' '.s:ShellEscape(netrw#WinPath(substitute(rmfile,'[\/]$','','e')))
+" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")",'~'.expand("<slnum>"))
+ let ret= system(netrw_rmf_cmd)
+" call Decho("returned=".ret." errcode=".v:shell_error,'~'.expand("<slnum>"))
+
+ if v:shell_error != 0 && !exists("g:netrw_quiet")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22)
+ endif
+ endif
+ endif
+
+ elseif ok =~# 'q\%[uit]'
+" call Decho("ok==".ok,'~'.expand("<slnum>"))
+ endif
+ endif
+
+" call Dret("s:NetrwRemoteRmFile ".ok)
+ return ok
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRemoteRename: rename a remote file or directory {{{2
+fun! s:NetrwRemoteRename(usrhost,path) range
+" call Dfunc("NetrwRemoteRename(usrhost<".a:usrhost."> path<".a:path.">)")
+
+ " preparation for removing multiple files/directories
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ let ctr = a:firstline
+ let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd)
+
+ " rename files given by the markfilelist
+ if exists("s:netrwmarkfilelist_{bufnr('%')}")
+ for oldname in s:netrwmarkfilelist_{bufnr("%")}
+" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))
+ if exists("subfrom")
+ let newname= substitute(oldname,subfrom,subto,'')
+" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">",'~'.expand("<slnum>"))
+ else
+ call inputsave()
+ let newname= input("Moving ".oldname." to : ",oldname)
+ call inputrestore()
+ if newname =~ '^s/'
+ let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','')
+ let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','')
+ let newname = substitute(oldname,subfrom,subto,'')
+" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">",'~'.expand("<slnum>"))
+ endif
+ endif
+
+ if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+ NetrwKeepj call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname)
+ else
+ let oldname= s:ShellEscape(a:path.oldname)
+ let newname= s:ShellEscape(a:path.newname)
+" call Decho("system(netrw#WinPath(".rename_cmd.") ".oldname.' '.newname.")",'~'.expand("<slnum>"))
+ let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname)
+ endif
+
+ endfor
+ call s:NetrwUnMarkFile(1)
+
+ else
+
+ " attempt to rename files/directories
+ let keepsol= &l:sol
+ setl nosol
+ while ctr <= a:lastline
+ exe "NetrwKeepj ".ctr
+
+ let oldname= s:NetrwGetWord()
+" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))
+
+ call inputsave()
+ let newname= input("Moving ".oldname." to : ",oldname)
+ call inputrestore()
+
+ if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3)
+ call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname)
+ else
+ let oldname= s:ShellEscape(a:path.oldname)
+ let newname= s:ShellEscape(a:path.newname)
+" call Decho("system(netrw#WinPath(".rename_cmd.") ".oldname.' '.newname.")",'~'.expand("<slnum>"))
+ let ret = system(netrw#WinPath(rename_cmd).' '.oldname.' '.newname)
+ endif
+
+ let ctr= ctr + 1
+ endwhile
+ let &l:sol= keepsol
+ endif
+
+ " refresh the directory
+ NetrwKeepj call s:NetrwRefresh(0,s:NetrwBrowseChgDir(0,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+
+" call Dret("NetrwRemoteRename")
+endfun
+
+" ==========================================
+" Local Directory Browsing Support: {{{1
+" ==========================================
+
+" ---------------------------------------------------------------------
+" netrw#FileUrlEdit: handles editing file://* files {{{2
+" Should accept: file://localhost/etc/fstab
+" file:///etc/fstab
+" file:///c:/WINDOWS/clock.avi
+" file:///c|/WINDOWS/clock.avi
+" file://localhost/c:/WINDOWS/clock.avi
+" file://localhost/c|/WINDOWS/clock.avi
+" file://c:/foo.txt
+" file:///c:/foo.txt
+" and %XX (where X is [0-9a-fA-F] is converted into a character with the given hexadecimal value
+fun! netrw#FileUrlEdit(fname)
+" call Dfunc("netrw#FileUrlEdit(fname<".a:fname.">)")
+ let fname = a:fname
+ if fname =~ '^file://localhost/'
+" call Decho('converting file://localhost/ -to- file:///','~'.expand("<slnum>"))
+ let fname= substitute(fname,'^file://localhost/','file:///','')
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+ endif
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+ if fname =~ '^file:///\=\a[|:]/'
+" call Decho('converting file:///\a|/ -to- file://\a:/','~'.expand("<slnum>"))
+ let fname = substitute(fname,'^file:///\=\(\a\)[|:]/','file://\1:/','')
+" call Decho("fname<".fname.">",'~'.expand("<slnum>"))
+ endif
+ endif
+ let fname2396 = netrw#RFC2396(fname)
+ let fname2396e= fnameescape(fname2396)
+ let plainfname= substitute(fname2396,'file://\(.*\)','\1',"")
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+" call Decho("windows exception for plainfname",'~'.expand("<slnum>"))
+ if plainfname =~ '^/\+\a:'
+" call Decho('removing leading "/"s','~'.expand("<slnum>"))
+ let plainfname= substitute(plainfname,'^/\+\(\a:\)','\1','')
+ endif
+ endif
+
+" call Decho("fname2396<".fname2396.">",'~'.expand("<slnum>"))
+" call Decho("plainfname<".plainfname.">",'~'.expand("<slnum>"))
+ exe "sil doau BufReadPre ".fname2396e
+ exe 'NetrwKeepj keepalt edit '.plainfname
+ exe 'sil! NetrwKeepj keepalt bdelete '.fnameescape(a:fname)
+
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("netrw#FileUrlEdit")
+ exe "sil doau BufReadPost ".fname2396e
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#LocalBrowseCheck: {{{2
+fun! netrw#LocalBrowseCheck(dirname)
+ " This function is called by netrwPlugin.vim's s:LocalBrowseCheck(), s:NetrwRexplore(),
+ " and by <cr> when atop a listed file/directory (via a buffer-local map)
+ "
+ " unfortunate interaction -- split window debugging can't be used here, must use
+ " D-echoRemOn or D-echoTabOn as the BufEnter event triggers
+ " another call to LocalBrowseCheck() when attempts to write
+ " to the DBG buffer are made.
+ "
+ " The &ft == "netrw" test was installed because the BufEnter event
+ " would hit when re-entering netrw windows, creating unexpected
+ " refreshes (and would do so in the middle of NetrwSaveOptions(), too)
+" call Dfunc("netrw#LocalBrowseCheck(dirname<".a:dirname.">)")
+" call Decho("isdir<".a:dirname."> =".isdirectory(s:NetrwFile(a:dirname)).((exists("s:treeforceredraw")? " treeforceredraw" : "")).'~'.expand("<slnum>"))
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Dredir("ls!","netrw#LocalBrowseCheck")
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Decho("current buffer#".bufnr("%")."<".bufname("%")."> ft=".&ft,'~'.expand("<slnum>"))
+
+ let ykeep= @@
+ if isdirectory(s:NetrwFile(a:dirname))
+" call Decho("is-directory ft<".&ft."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : " doesn't exist")."> dirname<".a:dirname.">"." line($)=".line("$")." ft<".&ft."> g:netrw_fastbrowse=".g:netrw_fastbrowse,'~'.expand("<slnum>"))
+
+ if &ft != "netrw" || (exists("b:netrw_curdir") && b:netrw_curdir != a:dirname) || g:netrw_fastbrowse <= 1
+" call Decho("case 1 : ft=".&ft,'~'.expand("<slnum>"))
+" call Decho("s:rexposn_".bufnr("%")."<".bufname("%")."> ".(exists("s:rexposn_".bufnr("%"))? "exists" : "does not exist"),'~'.expand("<slnum>"))
+ sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname)
+
+ elseif &ft == "netrw" && line("$") == 1
+" call Decho("case 2 (ft≡netrw && line($)≡1)",'~'.expand("<slnum>"))
+ sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname)
+
+ elseif exists("s:treeforceredraw")
+" call Decho("case 3 (treeforceredraw)",'~'.expand("<slnum>"))
+ unlet s:treeforceredraw
+ sil! NetrwKeepj keepalt call s:NetrwBrowse(1,a:dirname)
+ endif
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+" call Dret("netrw#LocalBrowseCheck")
+ return
+ endif
+
+ " The following code wipes out currently unused netrw buffers
+ " IF g:netrw_fastbrowse is zero (ie. slow browsing selected)
+ " AND IF the listing style is not a tree listing
+ if exists("g:netrw_fastbrowse") && g:netrw_fastbrowse == 0 && g:netrw_liststyle != s:TREELIST
+" call Decho("wiping out currently unused netrw buffers",'~'.expand("<slnum>"))
+ let ibuf = 1
+ let buflast = bufnr("$")
+ while ibuf <= buflast
+ if bufwinnr(ibuf) == -1 && isdirectory(s:NetrwFile(bufname(ibuf)))
+ exe "sil! keepj keepalt ".ibuf."bw!"
+ endif
+ let ibuf= ibuf + 1
+ endwhile
+ endif
+ let @@= ykeep
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+ " not a directory, ignore it
+" call Dret("netrw#LocalBrowseCheck : not a directory, ignoring it; dirname<".a:dirname.">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:LocalBrowseRefresh: this function is called after a user has {{{2
+" performed any shell command. The idea is to cause all local-browsing
+" buffers to be refreshed after a user has executed some shell command,
+" on the chance that s/he removed/created a file/directory with it.
+fun! s:LocalBrowseRefresh()
+" call Dfunc("s:LocalBrowseRefresh() tabpagenr($)=".tabpagenr("$"))
+" call Decho("s:netrw_browselist =".(exists("s:netrw_browselist")? string(s:netrw_browselist) : '<n/a>'),'~'.expand("<slnum>"))
+" call Decho("w:netrw_bannercnt =".(exists("w:netrw_bannercnt")? string(w:netrw_bannercnt) : '<n/a>'),'~'.expand("<slnum>"))
+
+ " determine which buffers currently reside in a tab
+ if !exists("s:netrw_browselist")
+" call Dret("s:LocalBrowseRefresh : browselist is empty")
+ return
+ endif
+ if !exists("w:netrw_bannercnt")
+" call Dret("s:LocalBrowseRefresh : don't refresh when focus not on netrw window")
+ return
+ endif
+ if exists("s:netrw_events") && s:netrw_events == 1
+ " s:LocalFastBrowser gets called (indirectly) from a
+ let s:netrw_events= 2
+" call Dret("s:LocalBrowseRefresh : avoid initial double refresh")
+ return
+ endif
+ let itab = 1
+ let buftablist = []
+ let ykeep = @@
+ while itab <= tabpagenr("$")
+ let buftablist = buftablist + tabpagebuflist()
+ let itab = itab + 1
+ sil! tabn
+ endwhile
+" call Decho("buftablist".string(buftablist),'~'.expand("<slnum>"))
+" call Decho("s:netrw_browselist<".(exists("s:netrw_browselist")? string(s:netrw_browselist) : "").">",'~'.expand("<slnum>"))
+ " GO through all buffers on netrw_browselist (ie. just local-netrw buffers):
+ " | refresh any netrw window
+ " | wipe out any non-displaying netrw buffer
+ let curwinid = win_getid(winnr())
+ let ibl = 0
+ for ibuf in s:netrw_browselist
+" call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf),'~'.expand("<slnum>"))
+ if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1
+ " wipe out any non-displaying netrw buffer
+ " (ibuf not shown in a current window AND
+ " ibuf not in any tab)
+" call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">",'~'.expand("<slnum>"))
+ exe "sil! keepj bd ".fnameescape(ibuf)
+ call remove(s:netrw_browselist,ibl)
+" call Decho("browselist=".string(s:netrw_browselist),'~'.expand("<slnum>"))
+ continue
+ elseif index(tabpagebuflist(),ibuf) != -1
+ " refresh any netrw buffer
+" call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf),'~'.expand("<slnum>"))
+ exe bufwinnr(ibuf)."wincmd w"
+ if getline(".") =~# 'Quick Help'
+ " decrement g:netrw_quickhelp to prevent refresh from changing g:netrw_quickhelp
+ " (counteracts s:NetrwBrowseChgDir()'s incrementing)
+ let g:netrw_quickhelp= g:netrw_quickhelp - 1
+ endif
+" call Decho("#3: quickhelp=".g:netrw_quickhelp,'~'.expand("<slnum>"))
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ NetrwKeepj call s:NetrwRefreshTreeDict(w:netrw_treetop)
+ endif
+ NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+ endif
+ let ibl= ibl + 1
+" call Decho("bottom of s:netrw_browselist for loop: ibl=".ibl,'~'.expand("<slnum>"))
+ endfor
+" call Decho("restore window: win_gotoid(".curwinid.")")
+ call win_gotoid(curwinid)
+ let @@= ykeep
+
+" call Dret("s:LocalBrowseRefresh")
+endfun
+
+" ---------------------------------------------------------------------
+" s:LocalFastBrowser: handles setting up/taking down fast browsing for the local browser {{{2
+"
+" g:netrw_ Directory Is
+" fastbrowse Local Remote
+" slow 0 D D D=Deleting a buffer implies it will not be re-used (slow)
+" med 1 D H H=Hiding a buffer implies it may be re-used (fast)
+" fast 2 H H
+"
+" Deleting a buffer means that it will be re-loaded when examined, hence "slow".
+" Hiding a buffer means that it will be re-used when examined, hence "fast".
+" (re-using a buffer may not be as accurate)
+"
+" s:netrw_events : doesn't exist, s:LocalFastBrowser() will install autocmds with medium-speed or fast browsing
+" =1: autocmds installed, but ignore next FocusGained event to avoid initial double-refresh of listing.
+" BufEnter may be first event, then a FocusGained event. Ignore the first FocusGained event.
+" If :Explore used: it sets s:netrw_events to 2, so no FocusGained events are ignored.
+" =2: autocmds installed (doesn't ignore any FocusGained events)
+fun! s:LocalFastBrowser()
+" call Dfunc("s:LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse)
+" call Decho("s:netrw_events ".(exists("s:netrw_events")? "exists" : 'n/a'),'~'.expand("<slnum>"))
+" call Decho("autocmd: ShellCmdPost ".(exists("#ShellCmdPost")? "already installed" : "not installed"),'~'.expand("<slnum>"))
+" call Decho("autocmd: FocusGained ".(exists("#FocusGained")? "already installed" : "not installed"),'~'.expand("<slnum>"))
+
+ " initialize browselist, a list of buffer numbers that the local browser has used
+ if !exists("s:netrw_browselist")
+" call Decho("initialize s:netrw_browselist",'~'.expand("<slnum>"))
+ let s:netrw_browselist= []
+ endif
+
+ " append current buffer to fastbrowse list
+ if empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1]
+" call Decho("appendng current buffer to browselist",'~'.expand("<slnum>"))
+ call add(s:netrw_browselist,bufnr("%"))
+" call Decho("browselist=".string(s:netrw_browselist),'~'.expand("<slnum>"))
+ endif
+
+ " enable autocmd events to handle refreshing/removing local browser buffers
+ " If local browse buffer is currently showing: refresh it
+ " If local browse buffer is currently hidden : wipe it
+ " g:netrw_fastbrowse=0 : slow speed, never re-use directory listing
+ " =1 : medium speed, re-use directory listing for remote only
+ " =2 : fast speed, always re-use directory listing when possible
+ if g:netrw_fastbrowse <= 1 && !exists("#ShellCmdPost") && !exists("s:netrw_events")
+ let s:netrw_events= 1
+ augroup AuNetrwEvent
+ au!
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+" call Decho("installing autocmd: ShellCmdPost",'~'.expand("<slnum>"))
+ au ShellCmdPost * call s:LocalBrowseRefresh()
+ else
+" call Decho("installing autocmds: ShellCmdPost FocusGained",'~'.expand("<slnum>"))
+ au ShellCmdPost,FocusGained * call s:LocalBrowseRefresh()
+ endif
+ augroup END
+
+ " user must have changed fastbrowse to its fast setting, so remove
+ " the associated autocmd events
+ elseif g:netrw_fastbrowse > 1 && exists("#ShellCmdPost") && exists("s:netrw_events")
+" call Decho("remove AuNetrwEvent autcmd group",'~'.expand("<slnum>"))
+ unlet s:netrw_events
+ augroup AuNetrwEvent
+ au!
+ augroup END
+ augroup! AuNetrwEvent
+ endif
+
+" call Dret("s:LocalFastBrowser : browselist<".string(s:netrw_browselist).">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:LocalListing: does the job of "ls" for local directories {{{2
+fun! s:LocalListing()
+" call Dfunc("s:LocalListing()")
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Decho("modified=".&modified." modifiable=".&modifiable." readonly=".&readonly,'~'.expand("<slnum>"))
+" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
+
+" if exists("b:netrw_curdir") |call Decho('b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("b:netrw_curdir doesn't exist",'~'.expand("<slnum>")) |endif
+" if exists("g:netrw_sort_by")|call Decho('g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("g:netrw_sort_by doesn't exist",'~'.expand("<slnum>"))|endif
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+
+ " get the list of files contained in the current directory
+ let dirname = b:netrw_curdir
+ let dirnamelen = strlen(b:netrw_curdir)
+ let filelist = s:NetrwGlob(dirname,"*",0)
+ let filelist = filelist + s:NetrwGlob(dirname,".*",0)
+" call Decho("filelist=".string(filelist),'~'.expand("<slnum>"))
+
+ if g:netrw_cygwin == 0 && (has("win32") || has("win95") || has("win64") || has("win16"))
+" call Decho("filelist=".string(filelist),'~'.expand("<slnum>"))
+ elseif index(filelist,'..') == -1 && b:netrw_curdir !~ '/'
+ " include ../ in the glob() entry if its missing
+" call Decho("forcibly including on \"..\"",'~'.expand("<slnum>"))
+ let filelist= filelist+[s:ComposePath(b:netrw_curdir,"../")]
+" call Decho("filelist=".string(filelist),'~'.expand("<slnum>"))
+ endif
+
+" call Decho("before while: dirname <".dirname.">",'~'.expand("<slnum>"))
+" call Decho("before while: dirnamelen<".dirnamelen.">",'~'.expand("<slnum>"))
+" call Decho("before while: filelist =".string(filelist),'~'.expand("<slnum>"))
+
+ if get(g:, 'netrw_dynamic_maxfilenamelen', 0)
+ let filelistcopy = map(deepcopy(filelist),'fnamemodify(v:val, ":t")')
+ let g:netrw_maxfilenamelen = max(map(filelistcopy,'len(v:val)')) + 1
+" call Decho("dynamic_maxfilenamelen: filenames =".string(filelistcopy),'~'.expand("<slnum>"))
+" call Decho("dynamic_maxfilenamelen: g:netrw_maxfilenamelen=".g:netrw_maxfilenamelen,'~'.expand("<slnum>"))
+ endif
+" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
+
+ for filename in filelist
+" call Decho(" ",'~'.expand("<slnum>"))
+" call Decho("for filename in filelist: filename<".filename.">",'~'.expand("<slnum>"))
+
+ if getftype(filename) == "link"
+ " indicate a symbolic link
+" call Decho("indicate <".filename."> is a symbolic link with trailing @",'~'.expand("<slnum>"))
+ let pfile= filename."@"
+
+ elseif getftype(filename) == "socket"
+ " indicate a socket
+" call Decho("indicate <".filename."> is a socket with trailing =",'~'.expand("<slnum>"))
+ let pfile= filename."="
+
+ elseif getftype(filename) == "fifo"
+ " indicate a fifo
+" call Decho("indicate <".filename."> is a fifo with trailing |",'~'.expand("<slnum>"))
+ let pfile= filename."|"
+
+ elseif isdirectory(s:NetrwFile(filename))
+ " indicate a directory
+" call Decho("indicate <".filename."> is a directory with trailing /",'~'.expand("<slnum>"))
+ let pfile= filename."/"
+
+ elseif exists("b:netrw_curdir") && b:netrw_curdir !~ '^.*://' && !isdirectory(s:NetrwFile(filename))
+ if (has("win32") || has("win95") || has("win64") || has("win16"))
+ if filename =~ '\.[eE][xX][eE]$' || filename =~ '\.[cC][oO][mM]$' || filename =~ '\.[bB][aA][tT]$'
+ " indicate an executable
+" call Decho("indicate <".filename."> is executable with trailing *",'~'.expand("<slnum>"))
+ let pfile= filename."*"
+ else
+ " normal file
+ let pfile= filename
+ endif
+ elseif executable(filename)
+ " indicate an executable
+" call Decho("indicate <".filename."> is executable with trailing *",'~'.expand("<slnum>"))
+ let pfile= filename."*"
+ else
+ " normal file
+ let pfile= filename
+ endif
+
+ else
+ " normal file
+ let pfile= filename
+ endif
+" call Decho("pfile<".pfile."> (after *@/ appending)",'~'.expand("<slnum>"))
+
+ if pfile =~ '//$'
+ let pfile= substitute(pfile,'//$','/','e')
+" call Decho("change // to /: pfile<".pfile.">",'~'.expand("<slnum>"))
+ endif
+ let pfile= strpart(pfile,dirnamelen)
+ let pfile= substitute(pfile,'^[/\\]','','e')
+" call Decho("filename<".filename.">",'~'.expand("<slnum>"))
+" call Decho("pfile <".pfile.">",'~'.expand("<slnum>"))
+
+ if w:netrw_liststyle == s:LONGLIST
+ let sz = getfsize(filename)
+ let fsz = strpart(" ",1,15-strlen(sz)).sz
+ if g:netrw_sizestyle =~# "[hH]"
+ let sz= s:NetrwHumanReadable(sz)
+ endif
+ let longfile= printf("%-".(g:netrw_maxfilenamelen+1)."s",pfile)
+ let pfile = longfile.sz." ".strftime(g:netrw_timefmt,getftime(filename))
+" call Decho("longlist support: sz=".sz." fsz=".fsz,'~'.expand("<slnum>"))
+ endif
+
+ if g:netrw_sort_by =~# "^t"
+ " sort by time (handles time up to 1 quintillion seconds, US)
+ " Decorate listing by prepending a timestamp/ . Sorting will then be done based on time.
+" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (time)")
+" call Decho("getftime(".filename.")=".getftime(filename),'~'.expand("<slnum>"))
+ let t = getftime(filename)
+ let ft = strpart("000000000000000000",1,18-strlen(t)).t
+" call Decho("exe NetrwKeepj put ='".ft.'/'.pfile."'",'~'.expand("<slnum>"))
+ let ftpfile= ft.'/'.pfile
+ sil! NetrwKeepj put=ftpfile
+
+ elseif g:netrw_sort_by =~ "^s"
+ " sort by size (handles file sizes up to 1 quintillion bytes, US)
+" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (size)")
+" call Decho("getfsize(".filename.")=".getfsize(filename),'~'.expand("<slnum>"))
+ let sz = getfsize(filename)
+ if g:netrw_sizestyle =~# "[hH]"
+ let sz= s:NetrwHumanReadable(sz)
+ endif
+ let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz
+" call Decho("exe NetrwKeepj put ='".fsz.'/'.filename."'",'~'.expand("<slnum>"))
+ let fszpfile= fsz.'/'.pfile
+ sil! NetrwKeepj put =fszpfile
+
+ else
+ " sort by name
+" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (name)")
+" call Decho("exe NetrwKeepj put ='".pfile."'",'~'.expand("<slnum>"))
+ sil! NetrwKeepj put=pfile
+ endif
+" call DechoBuf(bufnr("%"),"bufnr(%)")
+ endfor
+
+ " cleanup any windows mess at end-of-line
+ sil! NetrwKeepj g/^$/d
+ sil! NetrwKeepj %s/\r$//e
+ call histdel("/",-1)
+" call Decho("exe setl ts=".(g:netrw_maxfilenamelen+1),'~'.expand("<slnum>"))
+ exe "setl ts=".(g:netrw_maxfilenamelen+1)
+
+" call Dret("s:LocalListing")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwLocalExecute: uses system() to execute command under cursor ("X" command support) {{{2
+fun! s:NetrwLocalExecute(cmd)
+" call Dfunc("s:NetrwLocalExecute(cmd<".a:cmd.">)")
+ let ykeep= @@
+ " sanity check
+ if !executable(a:cmd)
+ call netrw#ErrorMsg(s:ERROR,"the file<".a:cmd."> is not executable!",89)
+ let @@= ykeep
+" call Dret("s:NetrwLocalExecute")
+ return
+ endif
+
+ let optargs= input(":!".a:cmd,"","file")
+" call Decho("optargs<".optargs.">",'~'.expand("<slnum>"))
+ let result= system(a:cmd.optargs)
+" call Decho("result,'~'.expand("<slnum>"))
+
+ " strip any ansi escape sequences off
+ let result = substitute(result,"\e\\[[0-9;]*m","","g")
+
+ " show user the result(s)
+ echomsg result
+ let @@= ykeep
+
+" call Dret("s:NetrwLocalExecute")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwLocalRename: rename a local file or directory {{{2
+fun! s:NetrwLocalRename(path) range
+" call Dfunc("NetrwLocalRename(path<".a:path.">)")
+
+ " preparation for removing multiple files/directories
+ let ykeep = @@
+ let ctr = a:firstline
+ let svpos = winsaveview()
+ let all = 0
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+
+ " rename files given by the markfilelist
+ if exists("s:netrwmarkfilelist_{bufnr('%')}")
+ for oldname in s:netrwmarkfilelist_{bufnr("%")}
+" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))
+ if exists("subfrom")
+ let newname= substitute(oldname,subfrom,subto,'')
+" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">",'~'.expand("<slnum>"))
+ else
+ call inputsave()
+ let newname= input("Moving ".oldname." to : ",oldname,"file")
+ call inputrestore()
+ if newname =~ ''
+ " two ctrl-x's : ignore all of string preceding the ctrl-x's
+ let newname = substitute(newname,'^.*','','')
+ elseif newname =~ ''
+ " one ctrl-x : ignore portion of string preceding ctrl-x but after last /
+ let newname = substitute(newname,'[^/]*','','')
+ endif
+ if newname =~ '^s/'
+ let subfrom = substitute(newname,'^s/\([^/]*\)/.*/$','\1','')
+ let subto = substitute(newname,'^s/[^/]*/\(.*\)/$','\1','')
+" call Decho("subfrom<".subfrom."> subto<".subto."> newname<".newname.">",'~'.expand("<slnum>"))
+ let newname = substitute(oldname,subfrom,subto,'')
+ endif
+ endif
+ if !all && filereadable(newname)
+ call inputsave()
+ let response= input("File<".newname."> already exists; do you want to overwrite it? (y/all/n) ")
+ call inputrestore()
+ if response == "all"
+ let all= 1
+ elseif response != "y" && response != "yes"
+ " refresh the directory
+" call Decho("refresh the directory listing",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ let @@= ykeep
+" call Dret("NetrwLocalRename")
+ return
+ endif
+ endif
+ call rename(oldname,newname)
+ endfor
+ call s:NetrwUnmarkList(bufnr("%"),b:netrw_curdir)
+
+ else
+
+ " attempt to rename files/directories
+ while ctr <= a:lastline
+ exe "NetrwKeepj ".ctr
+
+ " sanity checks
+ if line(".") < w:netrw_bannercnt
+ let ctr= ctr + 1
+ continue
+ endif
+ let curword= s:NetrwGetWord()
+ if curword == "./" || curword == "../"
+ let ctr= ctr + 1
+ continue
+ endif
+
+ NetrwKeepj norm! 0
+ let oldname= s:ComposePath(a:path,curword)
+" call Decho("oldname<".oldname.">",'~'.expand("<slnum>"))
+
+ call inputsave()
+ let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e'))
+ call inputrestore()
+
+ call rename(oldname,newname)
+" call Decho("renaming <".oldname."> to <".newname.">",'~'.expand("<slnum>"))
+
+ let ctr= ctr + 1
+ endwhile
+ endif
+
+ " refresh the directory
+" call Decho("refresh the directory listing",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ let @@= ykeep
+
+" call Dret("NetrwLocalRename")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwLocalRm: {{{2
+fun! s:NetrwLocalRm(path) range
+" call Dfunc("s:NetrwLocalRm(path<".a:path.">)")
+" call Decho("firstline=".a:firstline." lastline=".a:lastline,'~'.expand("<slnum>"))
+
+ " preparation for removing multiple files/directories
+ let ykeep = @@
+ let ret = 0
+ let all = 0
+ let svpos = winsaveview()
+" call Decho("saving posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+
+ if exists("s:netrwmarkfilelist_{bufnr('%')}")
+ " remove all marked files
+" call Decho("remove all marked files",'~'.expand("<slnum>"))
+ for fname in s:netrwmarkfilelist_{bufnr("%")}
+ let ok= s:NetrwLocalRmFile(a:path,fname,all)
+ if ok =~# 'q\%[uit]' || ok == "no"
+ break
+ elseif ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ endfor
+ call s:NetrwUnMarkFile(1)
+
+ else
+ " remove (multiple) files and directories
+" call Decho("remove files in range [".a:firstline.",".a:lastline."]",'~'.expand("<slnum>"))
+
+ let keepsol= &l:sol
+ setl nosol
+ let ctr = a:firstline
+ while ctr <= a:lastline
+ exe "NetrwKeepj ".ctr
+
+ " sanity checks
+ if line(".") < w:netrw_bannercnt
+ let ctr= ctr + 1
+ continue
+ endif
+ let curword= s:NetrwGetWord()
+ if curword == "./" || curword == "../"
+ let ctr= ctr + 1
+ continue
+ endif
+ let ok= s:NetrwLocalRmFile(a:path,curword,all)
+ if ok =~# 'q\%[uit]' || ok == "no"
+ break
+ elseif ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ let ctr= ctr + 1
+ endwhile
+ let &l:sol= keepsol
+ endif
+
+ " refresh the directory
+" call Decho("bufname<".bufname("%").">",'~'.expand("<slnum>"))
+ if bufname("%") != "NetrwMessage"
+ NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./'))
+" call Decho("restoring posn to svpos<".string(svpos).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(svpos)
+ endif
+ let @@= ykeep
+
+" call Dret("s:NetrwLocalRm")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwLocalRmFile: remove file fname given the path {{{2
+" Give confirmation prompt unless all==1
+fun! s:NetrwLocalRmFile(path,fname,all)
+" call Dfunc("s:NetrwLocalRmFile(path<".a:path."> fname<".a:fname."> all=".a:all)
+
+ let all= a:all
+ let ok = ""
+ NetrwKeepj norm! 0
+ let rmfile= s:NetrwFile(s:ComposePath(a:path,a:fname))
+" call Decho("rmfile<".rmfile.">",'~'.expand("<slnum>"))
+
+ if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
+ " attempt to remove file
+" call Decho("attempt to remove file<".rmfile.">",'~'.expand("<slnum>"))
+ if !all
+ echohl Statement
+ call inputsave()
+ let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
+ call inputrestore()
+ echohl NONE
+ if ok == ""
+ let ok="no"
+ endif
+" call Decho("response: ok<".ok.">",'~'.expand("<slnum>"))
+ let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
+" call Decho("response: ok<".ok."> (after sub)",'~'.expand("<slnum>"))
+ if ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ endif
+
+ if all || ok =~# 'y\%[es]' || ok == ""
+ let ret= s:NetrwDelete(rmfile)
+" call Decho("errcode=".v:shell_error." ret=".ret,'~'.expand("<slnum>"))
+ endif
+
+ else
+ " attempt to remove directory
+ if !all
+ echohl Statement
+ call inputsave()
+ let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
+ call inputrestore()
+ let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
+ if ok == ""
+ let ok="no"
+ endif
+ if ok =~# 'a\%[ll]'
+ let all= 1
+ endif
+ endif
+ let rmfile= substitute(rmfile,'[\/]$','','e')
+
+ if all || ok =~# 'y\%[es]' || ok == ""
+ if v:version < 704 || (v:version == 704 && !has("patch1107"))
+" " call Decho("1st attempt: system(netrw#WinPath(".g:netrw_localrmdir.') '.s:ShellEscape(rmfile).')','~'.expand("<slnum>"))
+ call system(netrw#WinPath(g:netrw_localrmdir).' '.s:ShellEscape(rmfile))
+" " call Decho("v:shell_error=".v:shell_error,'~'.expand("<slnum>"))
+
+ if v:shell_error != 0
+" " call Decho("2nd attempt to remove directory<".rmfile.">",'~'.expand("<slnum>"))
+ let errcode= s:NetrwDelete(rmfile)
+" " call Decho("errcode=".errcode,'~'.expand("<slnum>"))
+
+ if errcode != 0
+ if has("unix")
+" " call Decho("3rd attempt to remove directory<".rmfile.">",'~'.expand("<slnum>"))
+ call system("rm ".s:ShellEscape(rmfile))
+ if v:shell_error != 0 && !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34)
+ let ok="no"
+ endif
+ elseif !exists("g:netrw_quiet")
+ call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",35)
+ let ok="no"
+ endif
+ endif
+ endif
+ else
+ if delete(rmfile,"d")
+ call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".rmfile.">!",103)
+ endif
+ endif
+ endif
+ endif
+
+" call Dret("s:NetrwLocalRmFile ".ok)
+ return ok
+endfun
+
+" =====================================================================
+" Support Functions: {{{1
+
+" ---------------------------------------------------------------------
+" netrw#Access: intended to provide access to variable values for netrw's test suite {{{2
+" 0: marked file list of current buffer
+" 1: marked file target
+fun! netrw#Access(ilist)
+ if a:ilist == 0
+ if exists("s:netrwmarkfilelist_".bufnr('%'))
+ return s:netrwmarkfilelist_{bufnr('%')}
+ else
+ return "no-list-buf#".bufnr('%')
+ endif
+ elseif a:ilist == 1
+ return s:netrwmftgt
+ endif
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Call: allows user-specified mappings to call internal netrw functions {{{2
+fun! netrw#Call(funcname,...)
+ return call("s:".a:funcname,a:000)
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Expose: allows UserMaps and pchk to look at otherwise script-local variables {{{2
+" I expect this function to be used in
+" :PChkAssert netrw#Expose("netrwmarkfilelist")
+" for example.
+fun! netrw#Expose(varname)
+" call Dfunc("netrw#Expose(varname<".a:varname.">)")
+ if exists("s:".a:varname)
+ exe "let retval= s:".a:varname
+" call Decho("retval=".retval,'~'.expand("<slnum>"))
+ if exists("g:netrw_pchk")
+" call Decho("type(g:netrw_pchk=".g:netrw_pchk.")=".type(retval),'~'.expand("<slnum>"))
+ if type(retval) == 3
+ let retval = copy(retval)
+ let i = 0
+ while i < len(retval)
+ let retval[i]= substitute(retval[i],expand("$HOME"),'~','')
+ let i = i + 1
+ endwhile
+ endif
+" call Dret("netrw#Expose ".string(retval)),'~'.expand("<slnum>"))
+ return string(retval)
+ else
+" call Decho("g:netrw_pchk doesn't exist",'~'.expand("<slnum>"))
+ endif
+ else
+" call Decho("s:".a:varname." doesn't exist",'~'.expand("<slnum>"))
+ let retval= "n/a"
+ endif
+
+" call Dret("netrw#Expose ".string(retval))
+ return retval
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#Modify: allows UserMaps to set (modify) script-local variables {{{2
+fun! netrw#Modify(varname,newvalue)
+" call Dfunc("netrw#Modify(varname<".a:varname.">,newvalue<".string(a:newvalue).">)")
+ exe "let s:".a:varname."= ".string(a:newvalue)
+" call Dret("netrw#Modify")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#RFC2396: converts %xx into characters {{{2
+fun! netrw#RFC2396(fname)
+" call Dfunc("netrw#RFC2396(fname<".a:fname.">)")
+ let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t")
+" call Dret("netrw#RFC2396 ".fname)
+ return fname
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#UserMaps: supports user-specified maps {{{2
+" see :help function()
+"
+" g:Netrw_UserMaps is a List with members such as:
+" [[keymap sequence, function reference],...]
+"
+" The referenced function may return a string,
+" refresh : refresh the display
+" -other- : this string will be executed
+" or it may return a List of strings.
+"
+" Each keymap-sequence will be set up with a nnoremap
+" to invoke netrw#UserMaps(a:islocal).
+" Related functions:
+" netrw#Expose(varname) -- see s:varname variables
+" netrw#Modify(varname,newvalue) -- modify value of s:varname variable
+" netrw#Call(funcname,...) -- call internal netrw function with optional arguments
+fun! netrw#UserMaps(islocal)
+" call Dfunc("netrw#UserMaps(islocal=".a:islocal.")")
+" call Decho("g:Netrw_UserMaps ".(exists("g:Netrw_UserMaps")? "exists" : "does NOT exist"),'~'.expand("<slnum>"))
+
+ " set up usermaplist
+ if exists("g:Netrw_UserMaps") && type(g:Netrw_UserMaps) == 3
+" call Decho("g:Netrw_UserMaps has type 3<List>",'~'.expand("<slnum>"))
+ for umap in g:Netrw_UserMaps
+" call Decho("type(umap[0]<".string(umap[0]).">)=".type(umap[0])." (should be 1=string)",'~'.expand("<slnum>"))
+" call Decho("type(umap[1])=".type(umap[1])." (should be 1=string)",'~'.expand("<slnum>"))
+ " if umap[0] is a string and umap[1] is a string holding a function name
+ if type(umap[0]) == 1 && type(umap[1]) == 1
+" call Decho("nno <buffer> <silent> ".umap[0]." :call s:UserMaps(".a:islocal.",".string(umap[1]).")<cr>",'~'.expand("<slnum>"))
+ exe "nno <buffer> <silent> ".umap[0]." :call <SID>UserMaps(".a:islocal.",'".umap[1]."')<cr>"
+ else
+ call netrw#ErrorMsg(s:WARNING,"ignoring usermap <".string(umap[0])."> -- not a [string,funcref] entry",99)
+ endif
+ endfor
+ endif
+" call Dret("netrw#UserMaps")
+endfun
+
+" ---------------------------------------------------------------------
+" netrw#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{2
+fun! netrw#WinPath(path)
+" call Dfunc("netrw#WinPath(path<".a:path.">)")
+ if (!g:netrw_cygwin || &shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') && (has("win32") || has("win95") || has("win64") || has("win16"))
+ " remove cygdrive prefix, if present
+ let path = substitute(a:path,g:netrw_cygdrive.'/\(.\)','\1:','')
+ " remove trailing slash (Win95)
+ let path = substitute(path, '\(\\\|/\)$', '', 'g')
+ " remove escaped spaces
+ let path = substitute(path, '\ ', ' ', 'g')
+ " convert slashes to backslashes
+ let path = substitute(path, '/', '\', 'g')
+ else
+ let path= a:path
+ endif
+" call Dret("netrw#WinPath <".path.">")
+ return path
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBadd: adds marked files to buffer list or vice versa {{{2
+" cb : bl2mf=0 add marked files to buffer list
+" cB : bl2mf=1 use bufferlist to mark files
+" (mnemonic: cb = copy (marked files) to buffer list)
+fun! s:NetrwBadd(islocal,bl2mf)
+" " call Dfunc("s:NetrwBadd(islocal=".a:islocal." mf2bl=".mf2bl.")")
+ if a:bl2mf
+ " cB: add buffer list to marked files
+ redir => bufl
+ ls
+ redir END
+ let bufl = map(split(bufl,"\n"),'substitute(v:val,''^.\{-}"\(.*\)".\{-}$'',''\1'','''')')
+ for fname in bufl
+ call s:NetrwMarkFile(a:islocal,fname)
+ endfor
+ else
+ " cb: add marked files to buffer list
+ for fname in s:netrwmarkfilelist_{bufnr("%")}
+" " call Decho("badd ".fname,'~'.expand("<slnum>"))
+ exe "badd ".fnameescape(fname)
+ endfor
+ let curbufnr = bufnr("%")
+ let curdir = s:NetrwGetCurdir(a:islocal)
+ call s:NetrwUnmarkList(curbufnr,curdir) " remove markings from local buffer
+ endif
+" call Dret("s:NetrwBadd")
+endfun
+
+" ---------------------------------------------------------------------
+" s:ComposePath: Appends a new part to a path taking different systems into consideration {{{2
+fun! s:ComposePath(base,subdir)
+" call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)")
+
+ if has("amiga")
+" call Decho("amiga",'~'.expand("<slnum>"))
+ let ec = a:base[s:Strlen(a:base)-1]
+ if ec != '/' && ec != ':'
+ let ret = a:base."/" . a:subdir
+ else
+ let ret = a:base.a:subdir
+ endif
+
+ " COMBAK: test on windows with changing to root directory: :e C:/
+ elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16"))
+" call Decho("windows",'~'.expand("<slnum>"))
+ let ret= a:subdir
+
+ elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && (has("win32") || has("win95") || has("win64") || has("win16"))
+" call Decho("windows",'~'.expand("<slnum>"))
+ if a:base =~ '[/\\]$'
+ let ret= a:base.a:subdir
+ else
+ let ret= a:base.'/'.a:subdir
+ endif
+
+ elseif a:base =~ '^\a\{3,}://'
+" call Decho("remote linux/macos",'~'.expand("<slnum>"))
+ let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','')
+ let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','')
+ if a:subdir == '../'
+ if curpath =~ '[^/]/[^/]\+/$'
+ let curpath= substitute(curpath,'[^/]\+/$','','')
+ else
+ let curpath=""
+ endif
+ let ret= urlbase.curpath
+ else
+ let ret= urlbase.curpath.a:subdir
+ endif
+" call Decho("urlbase<".urlbase.">",'~'.expand("<slnum>"))
+" call Decho("curpath<".curpath.">",'~'.expand("<slnum>"))
+" call Decho("ret<".ret.">",'~'.expand("<slnum>"))
+
+ else
+" call Decho("local linux/macos",'~'.expand("<slnum>"))
+ let ret = substitute(a:base."/".a:subdir,"//","/","g")
+ if a:base =~ '^//'
+ " keeping initial '//' for the benefit of network share listing support
+ let ret= '/'.ret
+ endif
+ let ret= simplify(ret)
+ endif
+
+" call Dret("s:ComposePath ".ret)
+ return ret
+endfun
+
+" ---------------------------------------------------------------------
+" s:DeleteBookmark: deletes a file/directory from Netrw's bookmark system {{{2
+" Related Functions: s:MakeBookmark() s:NetrwBookHistHandler() s:NetrwBookmark()
+fun! s:DeleteBookmark(fname)
+" call Dfunc("s:DeleteBookmark(fname<".a:fname.">)")
+ call s:MergeBookmarks()
+
+ if exists("g:netrw_bookmarklist")
+ let indx= index(g:netrw_bookmarklist,a:fname)
+ if indx == -1
+ let indx= 0
+ while indx < len(g:netrw_bookmarklist)
+ if g:netrw_bookmarklist[indx] =~ a:fname
+ call remove(g:netrw_bookmarklist,indx)
+ let indx= indx - 1
+ endif
+ let indx= indx + 1
+ endwhile
+ else
+ " remove exact match
+ call remove(g:netrw_bookmarklist,indx)
+ endif
+ endif
+
+" call Dret("s:DeleteBookmark")
+endfun
+
+" ---------------------------------------------------------------------
+" s:FileReadable: o/s independent filereadable {{{2
+fun! s:FileReadable(fname)
+" call Dfunc("s:FileReadable(fname<".a:fname.">)")
+
+ if g:netrw_cygwin
+ let ret= filereadable(s:NetrwFile(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/','')))
+ else
+ let ret= filereadable(s:NetrwFile(a:fname))
+ endif
+
+" call Dret("s:FileReadable ".ret)
+ return ret
+endfun
+
+" ---------------------------------------------------------------------
+" s:GetTempfile: gets a tempname that'll work for various o/s's {{{2
+" Places correct suffix on end of temporary filename,
+" using the suffix provided with fname
+fun! s:GetTempfile(fname)
+" call Dfunc("s:GetTempfile(fname<".a:fname.">)")
+
+ if !exists("b:netrw_tmpfile")
+ " get a brand new temporary filename
+ let tmpfile= tempname()
+" call Decho("tmpfile<".tmpfile."> : from tempname()",'~'.expand("<slnum>"))
+
+ let tmpfile= substitute(tmpfile,'\','/','ge')
+" call Decho("tmpfile<".tmpfile."> : chgd any \\ -> /",'~'.expand("<slnum>"))
+
+ " sanity check -- does the temporary file's directory exist?
+ if !isdirectory(s:NetrwFile(substitute(tmpfile,'[^/]\+$','','e')))
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2)
+" call Dret("s:GetTempfile getcwd<".getcwd().">")
+ return ""
+ endif
+
+ " let netrw#NetSource() know about the tmpfile
+ let s:netrw_tmpfile= tmpfile " used by netrw#NetSource() and netrw#BrowseX()
+" call Decho("tmpfile<".tmpfile."> s:netrw_tmpfile<".s:netrw_tmpfile.">",'~'.expand("<slnum>"))
+
+ " o/s dependencies
+ if g:netrw_cygwin != 0
+ let tmpfile = substitute(tmpfile,'^\(\a\):',g:netrw_cygdrive.'/\1','e')
+ elseif has("win32") || has("win95") || has("win64") || has("win16")
+ if !exists("+shellslash") || !&ssl
+ let tmpfile = substitute(tmpfile,'/','\','g')
+ endif
+ else
+ let tmpfile = tmpfile
+ endif
+ let b:netrw_tmpfile= tmpfile
+" call Decho("o/s dependent fixed tempname<".tmpfile.">",'~'.expand("<slnum>"))
+ else
+ " re-use temporary filename
+ let tmpfile= b:netrw_tmpfile
+" call Decho("tmpfile<".tmpfile."> re-using",'~'.expand("<slnum>"))
+ endif
+
+ " use fname's suffix for the temporary file
+ if a:fname != ""
+ if a:fname =~ '\.[^./]\+$'
+" call Decho("using fname<".a:fname.">'s suffix",'~'.expand("<slnum>"))
+ if a:fname =~ '\.tar\.gz$' || a:fname =~ '\.tar\.bz2$' || a:fname =~ '\.tar\.xz$'
+ let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
+ elseif a:fname =~ '.txz$'
+ let suffix = ".txz".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
+ else
+ let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
+ endif
+" call Decho("suffix<".suffix.">",'~'.expand("<slnum>"))
+ let tmpfile= substitute(tmpfile,'\.tmp$','','e')
+" call Decho("chgd tmpfile<".tmpfile."> (removed any .tmp suffix)",'~'.expand("<slnum>"))
+ let tmpfile .= suffix
+" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">",'~'.expand("<slnum>"))
+ let s:netrw_tmpfile= tmpfile " supports netrw#NetSource()
+ endif
+ endif
+
+" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+" call Dret("s:GetTempfile <".tmpfile.">")
+ return tmpfile
+endfun
+
+" ---------------------------------------------------------------------
+" s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2
+" a correct command for use with a system() call
+fun! s:MakeSshCmd(sshcmd)
+" call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">")
+ if s:user == ""
+ let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:machine,'')
+ else
+ let sshcmd = substitute(a:sshcmd,'\<HOSTNAME\>',s:user."@".s:machine,'')
+ endif
+ if exists("g:netrw_port") && g:netrw_port != ""
+ let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.g:netrw_port,'')
+ elseif exists("s:port") && s:port != ""
+ let sshcmd= substitute(sshcmd,"USEPORT",g:netrw_sshport.' '.s:port,'')
+ else
+ let sshcmd= substitute(sshcmd,"USEPORT ",'','')
+ endif
+" call Dret("s:MakeSshCmd <".sshcmd.">")
+ return sshcmd
+endfun
+
+" ---------------------------------------------------------------------
+" s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2
+fun! s:MakeBookmark(fname)
+" call Dfunc("s:MakeBookmark(fname<".a:fname.">)")
+
+ if !exists("g:netrw_bookmarklist")
+ let g:netrw_bookmarklist= []
+ endif
+
+ if index(g:netrw_bookmarklist,a:fname) == -1
+ " curdir not currently in g:netrw_bookmarklist, so include it
+ if isdirectory(s:NetrwFile(a:fname)) && a:fname !~ '/$'
+ call add(g:netrw_bookmarklist,a:fname.'/')
+ elseif a:fname !~ '/'
+ call add(g:netrw_bookmarklist,getcwd()."/".a:fname)
+ else
+ call add(g:netrw_bookmarklist,a:fname)
+ endif
+ call sort(g:netrw_bookmarklist)
+ endif
+
+" call Dret("s:MakeBookmark")
+endfun
+
+" ---------------------------------------------------------------------
+" s:MergeBookmarks: merge current bookmarks with saved bookmarks {{{2
+fun! s:MergeBookmarks()
+" call Dfunc("s:MergeBookmarks() : merge current bookmarks into .netrwbook")
+ " get bookmarks from .netrwbook file
+ let savefile= s:NetrwHome()."/.netrwbook"
+ if filereadable(s:NetrwFile(savefile))
+" call Decho("merge bookmarks (active and file)",'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwBookHistSave()
+" call Decho("bookmark delete savefile<".savefile.">",'~'.expand("<slnum>"))
+ NetrwKeepj call delete(savefile)
+ endif
+" call Dret("s:MergeBookmarks")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBMShow: {{{2
+fun! s:NetrwBMShow()
+" call Dfunc("s:NetrwBMShow()")
+ redir => bmshowraw
+ menu
+ redir END
+ let bmshowlist = split(bmshowraw,'\n')
+ if bmshowlist != []
+ let bmshowfuncs= filter(bmshowlist,'v:val =~# "<SNR>\\d\\+_BMShow()"')
+ if bmshowfuncs != []
+ let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','')
+ if bmshowfunc =~# '^call.*BMShow()'
+ exe "sil! NetrwKeepj ".bmshowfunc
+ endif
+ endif
+ endif
+" call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwCursor: responsible for setting cursorline/cursorcolumn based upon g:netrw_cursor {{{2
+fun! s:NetrwCursor(editfile)
+ if !exists("w:netrw_liststyle")
+ let w:netrw_liststyle= g:netrw_liststyle
+ endif
+" call Dfunc("s:NetrwCursor() ft<".&ft."> liststyle=".w:netrw_liststyle." g:netrw_cursor=".g:netrw_cursor." s:netrw_usercuc=".s:netrw_usercuc." s:netrw_usercul=".s:netrw_usercul)
+
+" call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul)
+
+ if &ft != "netrw"
+ " if the current window isn't a netrw directory listing window, then use user cursorline/column
+ " settings. Affects when netrw is used to read/write a file using scp/ftp/etc.
+" call Decho("case ft!=netrw: use user cul,cuc",'~'.expand("<slnum>"))
+
+ elseif g:netrw_cursor == 8
+ if w:netrw_liststyle == s:WIDELIST
+ setl cursorline
+ setl cursorcolumn
+ else
+ setl cursorline
+ endif
+ elseif g:netrw_cursor == 7
+ setl cursorline
+ elseif g:netrw_cursor == 6
+ if w:netrw_liststyle == s:WIDELIST
+ setl cursorline
+ endif
+ elseif g:netrw_cursor == 4
+ " all styles: cursorline, cursorcolumn
+" call Decho("case g:netrw_cursor==4: setl cul cuc",'~'.expand("<slnum>"))
+ setl cursorline
+ setl cursorcolumn
+
+ elseif g:netrw_cursor == 3
+ " thin-long-tree: cursorline, user's cursorcolumn
+ " wide : cursorline, cursorcolumn
+ if w:netrw_liststyle == s:WIDELIST
+" call Decho("case g:netrw_cursor==3 and wide: setl cul cuc",'~'.expand("<slnum>"))
+ setl cursorline
+ setl cursorcolumn
+ else
+" call Decho("case g:netrw_cursor==3 and not wide: setl cul (use user's cuc)",'~'.expand("<slnum>"))
+ setl cursorline
+ endif
+
+ elseif g:netrw_cursor == 2
+ " thin-long-tree: cursorline, user's cursorcolumn
+ " wide : cursorline, user's cursorcolumn
+" call Decho("case g:netrw_cursor==2: setl cuc (use user's cul)",'~'.expand("<slnum>"))
+ setl cursorline
+
+ elseif g:netrw_cursor == 1
+ " thin-long-tree: user's cursorline, user's cursorcolumn
+ " wide : cursorline, user's cursorcolumn
+ if w:netrw_liststyle == s:WIDELIST
+" call Decho("case g:netrw_cursor==2 and wide: setl cul (use user's cuc)",'~'.expand("<slnum>"))
+ setl cursorline
+ else
+" call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)",'~'.expand("<slnum>"))
+ endif
+
+ else
+ " all styles: user's cursorline, user's cursorcolumn
+" call Decho("default: (use user's cul,cuc)",'~'.expand("<slnum>"))
+ let &l:cursorline = s:netrw_usercul
+ let &l:cursorcolumn = s:netrw_usercuc
+ endif
+
+" call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul)
+" call Dret("s:NetrwCursor : l:cursorline=".&l:cursorline." l:cursorcolumn=".&l:cursorcolumn)
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreCursorline: restores cursorline/cursorcolumn to original user settings {{{2
+fun! s:RestoreCursorline()
+" call Dfunc("s:RestoreCursorline() currently, cul=".&l:cursorline." cuc=".&l:cursorcolumn." win#".winnr()." buf#".bufnr("%"))
+ if exists("s:netrw_usercul")
+ let &l:cursorline = s:netrw_usercul
+ endif
+ if exists("s:netrw_usercuc")
+ let &l:cursorcolumn = s:netrw_usercuc
+ endif
+" call Decho("(s:RestoreCursorline) COMBAK: cuc=".&l:cuc." cul=".&l:cul)
+" call Dret("s:RestoreCursorline : restored cul=".&l:cursorline." cuc=".&l:cursorcolumn)
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwDelete: Deletes a file. {{{2
+" Uses Steve Hall's idea to insure that Windows paths stay
+" acceptable. No effect on Unix paths.
+" Examples of use: let result= s:NetrwDelete(path)
+fun! s:NetrwDelete(path)
+" call Dfunc("s:NetrwDelete(path<".a:path.">)")
+
+ let path = netrw#WinPath(a:path)
+ if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16"))
+ if exists("+shellslash")
+ let sskeep= &shellslash
+ setl noshellslash
+ let result = delete(path)
+ let &shellslash = sskeep
+ else
+" call Decho("exe let result= ".a:cmd."('".path."')",'~'.expand("<slnum>"))
+ let result= delete(path)
+ endif
+ else
+" call Decho("let result= delete(".path.")",'~'.expand("<slnum>"))
+ let result= delete(path)
+ endif
+ if result < 0
+ NetrwKeepj call netrw#ErrorMsg(s:WARNING,"delete(".path.") failed!",71)
+ endif
+
+" call Dret("s:NetrwDelete ".result)
+ return result
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwBufRemover: removes a buffer that: {{{2s
+" has buffer-id > 1
+" is unlisted
+" is unnamed
+" does not appear in any window
+fun! s:NetrwBufRemover(bufid)
+" call Dfunc("s:NetrwBufRemover(".a:bufid.")")
+" call Decho("buf#".a:bufid." ".((a:bufid > 1)? ">" : "≯")." must be >1 for removal","~".expand("<slnum>"))
+" call Decho("buf#".a:bufid." is ".(buflisted(a:bufid)? "listed" : "unlisted"),"~".expand("<slnum>"))
+" call Decho("buf#".a:bufid." has name <".bufname(a:bufid).">","~".expand("<slnum>"))
+" call Decho("buf#".a:bufid." has winid#".bufwinid(a:bufid),"~".expand("<slnum>"))
+
+ if a:bufid > 1 && !buflisted(a:bufid) && bufname(a:bufid) == "" && bufwinid(a:bufid) == -1
+" call Decho("(s:NetrwBufRemover) removing buffer#".a:bufid,"~".expand("<slnum>"))
+ exe "bd! ".a:bufid
+ endif
+
+" call Dret("s:NetrwBufRemover")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2
+fun! s:NetrwEnew(...)
+" call Dfunc("s:NetrwEnew() a:0=".a:0." win#".winnr()." winnr($)=".winnr("$")." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">")
+" call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
+
+ " Clean out the last buffer:
+ " Check if the last buffer has # > 1, is unlisted, is unnamed, and does not appear in a window
+ " If so, delete it.
+ call s:NetrwBufRemover(bufnr("$"))
+
+ " grab a function-local-variable copy of buffer variables
+" call Decho("make function-local copy of netrw variables",'~'.expand("<slnum>"))
+ if exists("b:netrw_bannercnt") |let netrw_bannercnt = b:netrw_bannercnt |endif
+ if exists("b:netrw_browser_active") |let netrw_browser_active = b:netrw_browser_active |endif
+ if exists("b:netrw_cpf") |let netrw_cpf = b:netrw_cpf |endif
+ if exists("b:netrw_curdir") |let netrw_curdir = b:netrw_curdir |endif
+ if exists("b:netrw_explore_bufnr") |let netrw_explore_bufnr = b:netrw_explore_bufnr |endif
+ if exists("b:netrw_explore_indx") |let netrw_explore_indx = b:netrw_explore_indx |endif
+ if exists("b:netrw_explore_line") |let netrw_explore_line = b:netrw_explore_line |endif
+ if exists("b:netrw_explore_list") |let netrw_explore_list = b:netrw_explore_list |endif
+ if exists("b:netrw_explore_listlen")|let netrw_explore_listlen = b:netrw_explore_listlen|endif
+ if exists("b:netrw_explore_mtchcnt")|let netrw_explore_mtchcnt = b:netrw_explore_mtchcnt|endif
+ if exists("b:netrw_fname") |let netrw_fname = b:netrw_fname |endif
+ if exists("b:netrw_lastfile") |let netrw_lastfile = b:netrw_lastfile |endif
+ if exists("b:netrw_liststyle") |let netrw_liststyle = b:netrw_liststyle |endif
+ if exists("b:netrw_method") |let netrw_method = b:netrw_method |endif
+ if exists("b:netrw_option") |let netrw_option = b:netrw_option |endif
+ if exists("b:netrw_prvdir") |let netrw_prvdir = b:netrw_prvdir |endif
+
+ NetrwKeepj call s:NetrwOptionsRestore("w:")
+" call Decho("generate a buffer with NetrwKeepj keepalt enew!",'~'.expand("<slnum>"))
+ " when tree listing uses file TreeListing... a new buffer is made.
+ " Want the old buffer to be unlisted.
+ " COMBAK: this causes a problem, see P43
+" setl nobl
+ let netrw_keepdiff= &l:diff
+ noswapfile NetrwKeepj keepalt enew!
+ let &l:diff= netrw_keepdiff
+" call Decho("bufnr($)=".bufnr("$")."<".bufname(bufnr("$"))."> winnr($)=".winnr("$"),'~'.expand("<slnum>"))
+ NetrwKeepj call s:NetrwOptionsSave("w:")
+
+ " copy function-local-variables to buffer variable equivalents
+" call Decho("copy function-local variables back to buffer netrw variables",'~'.expand("<slnum>"))
+ if exists("netrw_bannercnt") |let b:netrw_bannercnt = netrw_bannercnt |endif
+ if exists("netrw_browser_active") |let b:netrw_browser_active = netrw_browser_active |endif
+ if exists("netrw_cpf") |let b:netrw_cpf = netrw_cpf |endif
+ if exists("netrw_curdir") |let b:netrw_curdir = netrw_curdir |endif
+ if exists("netrw_explore_bufnr") |let b:netrw_explore_bufnr = netrw_explore_bufnr |endif
+ if exists("netrw_explore_indx") |let b:netrw_explore_indx = netrw_explore_indx |endif
+ if exists("netrw_explore_line") |let b:netrw_explore_line = netrw_explore_line |endif
+ if exists("netrw_explore_list") |let b:netrw_explore_list = netrw_explore_list |endif
+ if exists("netrw_explore_listlen")|let b:netrw_explore_listlen = netrw_explore_listlen|endif
+ if exists("netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt = netrw_explore_mtchcnt|endif
+ if exists("netrw_fname") |let b:netrw_fname = netrw_fname |endif
+ if exists("netrw_lastfile") |let b:netrw_lastfile = netrw_lastfile |endif
+ if exists("netrw_liststyle") |let b:netrw_liststyle = netrw_liststyle |endif
+ if exists("netrw_method") |let b:netrw_method = netrw_method |endif
+ if exists("netrw_option") |let b:netrw_option = netrw_option |endif
+ if exists("netrw_prvdir") |let b:netrw_prvdir = netrw_prvdir |endif
+
+ if a:0 > 0
+ let b:netrw_curdir= a:1
+ if b:netrw_curdir =~ '/$'
+ if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST
+ setl nobl
+ file NetrwTreeListing
+ setl nobl bt=nowrite bh=hide
+ nno <silent> <buffer> [ :sil call <SID>TreeListMove('[')<cr>
+ nno <silent> <buffer> ] :sil call <SID>TreeListMove(']')<cr>
+ else
+ call s:NetrwBufRename(b:netrw_curdir)
+ endif
+ endif
+ endif
+ if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on")
+ let &l:bexpr = "netrw#BalloonHelp()"
+ endif
+
+" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh." win#".winnr()." winnr($)#".winnr("$"))
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwExe: executes a string using "!" {{{2
+fun! s:NetrwExe(cmd)
+" call Dfunc("s:NetrwExe(a:cmd<".a:cmd.">)")
+ if has("win32") && &shell !~? 'cmd' && !g:netrw_cygwin
+" call Decho("using win32:",expand("<slnum>"))
+ let savedShell=[&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash]
+ set shell& shellcmdflag& shellxquote& shellxescape&
+ set shellquote& shellpipe& shellredir& shellslash&
+ exe a:cmd
+ let [&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash] = savedShell
+ else
+" call Decho("exe ".a:cmd,'~'.expand("<slnum>"))
+ exe a:cmd
+ endif
+ if v:shell_error
+ call netrw#ErrorMsg(s:WARNING,"shell signalled an error",106)
+ endif
+" call Dret("s:NetrwExe : v:shell_error=".v:shell_error)
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwInsureWinVars: insure that a netrw buffer has its w: variables in spite of a wincmd v or s {{{2
+fun! s:NetrwInsureWinVars()
+ if !exists("w:netrw_liststyle")
+" call Dfunc("s:NetrwInsureWinVars() win#".winnr())
+ let curbuf = bufnr("%")
+ let curwin = winnr()
+ let iwin = 1
+ while iwin <= winnr("$")
+ exe iwin."wincmd w"
+ if winnr() != curwin && bufnr("%") == curbuf && exists("w:netrw_liststyle")
+ " looks like ctrl-w_s or ctrl-w_v was used to split a netrw buffer
+ let winvars= w:
+ break
+ endif
+ let iwin= iwin + 1
+ endwhile
+ exe "keepalt ".curwin."wincmd w"
+ if exists("winvars")
+" call Decho("copying w#".iwin." window variables to w#".curwin,'~'.expand("<slnum>"))
+ for k in keys(winvars)
+ let w:{k}= winvars[k]
+ endfor
+ endif
+" call Dret("s:NetrwInsureWinVars win#".winnr())
+ endif
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwLcd: handles changing the (local) directory {{{2
+" Returns: 0=success
+" -1=failed
+fun! s:NetrwLcd(newdir)
+" call Dfunc("s:NetrwLcd(newdir<".a:newdir.">)")
+" call Decho("changing local directory",'~'.expand("<slnum>"))
+
+ let err472= 0
+ try
+ exe 'NetrwKeepj sil lcd '.fnameescape(a:newdir)
+ catch /^Vim\%((\a\+)\)\=:E344/
+ " Vim's lcd fails with E344 when attempting to go above the 'root' of a Windows share.
+ " Therefore, detect if a Windows share is present, and if E344 occurs, just settle at
+ " 'root' (ie. '\'). The share name may start with either backslashes ('\\Foo') or
+ " forward slashes ('//Foo'), depending on whether backslashes have been converted to
+ " forward slashes by earlier code; so check for both.
+ if (has("win32") || has("win95") || has("win64") || has("win16")) && !g:netrw_cygwin
+ if a:newdir =~ '^\\\\\w\+' || a:newdir =~ '^//\w\+'
+ let dirname = '\'
+ exe 'NetrwKeepj sil lcd '.fnameescape(dirname)
+ endif
+ endif
+ catch /^Vim\%((\a\+)\)\=:E472/
+ let err472= 1
+ endtry
+
+ if err472
+ call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".a:newdir."> (permissions?)",61)
+ if exists("w:netrw_prvdir")
+ let a:newdir= w:netrw_prvdir
+ else
+ call s:NetrwOptionsRestore("w:")
+" call Decho("setl noma nomod nowrap",'~'.expand("<slnum>"))
+ exe "setl ".g:netrw_bufsettings
+" call Decho(" ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
+ let a:newdir= dirname
+ endif
+" call Dret("s:NetrwBrowse -1 : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">")
+ return -1
+ endif
+
+" call Decho("getcwd <".getcwd().">")
+" call Decho("b:netrw_curdir<".b:netrw_curdir.">")
+" call Dret("s:NetrwLcd 0")
+ return 0
+endfun
+
+" ------------------------------------------------------------------------
+" s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2
+" changed sorting, etc. Also see s:NetrwRestoreWordPosn().
+fun! s:NetrwSaveWordPosn()
+" call Dfunc("NetrwSaveWordPosn()")
+ let s:netrw_saveword= '^'.fnameescape(getline('.')).'$'
+" call Dret("NetrwSaveWordPosn : saveword<".s:netrw_saveword.">")
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwHumanReadable: takes a number and makes it "human readable" {{{2
+" 1000 -> 1K, 1000000 -> 1M, 1000000000 -> 1G
+fun! s:NetrwHumanReadable(sz)
+" call Dfunc("s:NetrwHumanReadable(sz=".a:sz.") type=".type(a:sz)." style=".g:netrw_sizestyle )
+
+ if g:netrw_sizestyle == 'h'
+ if a:sz >= 1000000000
+ let sz = printf("%.1f",a:sz/1000000000.0)."g"
+ elseif a:sz >= 10000000
+ let sz = printf("%d",a:sz/1000000)."m"
+ elseif a:sz >= 1000000
+ let sz = printf("%.1f",a:sz/1000000.0)."m"
+ elseif a:sz >= 10000
+ let sz = printf("%d",a:sz/1000)."k"
+ elseif a:sz >= 1000
+ let sz = printf("%.1f",a:sz/1000.0)."k"
+ else
+ let sz= a:sz
+ endif
+
+ elseif g:netrw_sizestyle == 'H'
+ if a:sz >= 1073741824
+ let sz = printf("%.1f",a:sz/1073741824.0)."G"
+ elseif a:sz >= 10485760
+ let sz = printf("%d",a:sz/1048576)."M"
+ elseif a:sz >= 1048576
+ let sz = printf("%.1f",a:sz/1048576.0)."M"
+ elseif a:sz >= 10240
+ let sz = printf("%d",a:sz/1024)."K"
+ elseif a:sz >= 1024
+ let sz = printf("%.1f",a:sz/1024.0)."K"
+ else
+ let sz= a:sz
+ endif
+
+ else
+ let sz= a:sz
+ endif
+
+" call Dret("s:NetrwHumanReadable ".sz)
+ return sz
+endfun
+
+" ---------------------------------------------------------------------
+" s:NetrwRestoreWordPosn: used to keep cursor on same word after refresh, {{{2
+" changed sorting, etc. Also see s:NetrwSaveWordPosn().
+fun! s:NetrwRestoreWordPosn()
+" call Dfunc("NetrwRestoreWordPosn()")
+ sil! call search(s:netrw_saveword,'w')
+" call Dret("NetrwRestoreWordPosn")
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreBufVars: {{{2
+fun! s:RestoreBufVars()
+" call Dfunc("s:RestoreBufVars()")
+
+ if exists("s:netrw_curdir") |let b:netrw_curdir = s:netrw_curdir |endif
+ if exists("s:netrw_lastfile") |let b:netrw_lastfile = s:netrw_lastfile |endif
+ if exists("s:netrw_method") |let b:netrw_method = s:netrw_method |endif
+ if exists("s:netrw_fname") |let b:netrw_fname = s:netrw_fname |endif
+ if exists("s:netrw_machine") |let b:netrw_machine = s:netrw_machine |endif
+ if exists("s:netrw_browser_active")|let b:netrw_browser_active = s:netrw_browser_active|endif
+
+" call Dret("s:RestoreBufVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:RemotePathAnalysis: {{{2
+fun! s:RemotePathAnalysis(dirname)
+" call Dfunc("s:RemotePathAnalysis(a:dirname<".a:dirname.">)")
+
+ " method :// user @ machine :port /path
+ let dirpat = '^\(\w\{-}\)://\(\(\w\+\)@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$'
+ let s:method = substitute(a:dirname,dirpat,'\1','')
+ let s:user = substitute(a:dirname,dirpat,'\3','')
+ let s:machine = substitute(a:dirname,dirpat,'\4','')
+ let s:port = substitute(a:dirname,dirpat,'\5','')
+ let s:path = substitute(a:dirname,dirpat,'\6','')
+ let s:fname = substitute(s:path,'^.*/\ze.','','')
+ if s:machine =~ '@'
+ let dirpat = '^\(.*\)@\(.\{-}\)$'
+ let s:user = s:user.'@'.substitute(s:machine,dirpat,'\1','')
+ let s:machine = substitute(s:machine,dirpat,'\2','')
+ endif
+
+" call Decho("set up s:method <".s:method .">",'~'.expand("<slnum>"))
+" call Decho("set up s:user <".s:user .">",'~'.expand("<slnum>"))
+" call Decho("set up s:machine<".s:machine.">",'~'.expand("<slnum>"))
+" call Decho("set up s:port <".s:port.">",'~'.expand("<slnum>"))
+" call Decho("set up s:path <".s:path .">",'~'.expand("<slnum>"))
+" call Decho("set up s:fname <".s:fname .">",'~'.expand("<slnum>"))
+
+" call Dret("s:RemotePathAnalysis")
+endfun
+
+" ---------------------------------------------------------------------
+" s:RemoteSystem: runs a command on a remote host using ssh {{{2
+" Returns status
+" Runs system() on
+" [cd REMOTEDIRPATH;] a:cmd
+" Note that it doesn't do s:ShellEscape(a:cmd)!
+fun! s:RemoteSystem(cmd)
+" call Dfunc("s:RemoteSystem(cmd<".a:cmd.">)")
+ if !executable(g:netrw_ssh_cmd)
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"g:netrw_ssh_cmd<".g:netrw_ssh_cmd."> is not executable!",52)
+ elseif !exists("b:netrw_curdir")
+ NetrwKeepj call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53)
+ else
+ let cmd = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME")
+ let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','')
+ if remotedir != ""
+ let cmd= cmd.' cd '.s:ShellEscape(remotedir).";"
+ else
+ let cmd= cmd.' '
+ endif
+ let cmd= cmd.a:cmd
+" call Decho("call system(".cmd.")",'~'.expand("<slnum>"))
+ let ret= system(cmd)
+ endif
+" call Dret("s:RemoteSystem ".ret)
+ return ret
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestoreWinVars: (used by Explore() and NetrwSplit()) {{{2
+fun! s:RestoreWinVars()
+" call Dfunc("s:RestoreWinVars()")
+ if exists("s:bannercnt") |let w:netrw_bannercnt = s:bannercnt |unlet s:bannercnt |endif
+ if exists("s:col") |let w:netrw_col = s:col |unlet s:col |endif
+ if exists("s:curdir") |let w:netrw_curdir = s:curdir |unlet s:curdir |endif
+ if exists("s:explore_bufnr") |let w:netrw_explore_bufnr = s:explore_bufnr |unlet s:explore_bufnr |endif
+ if exists("s:explore_indx") |let w:netrw_explore_indx = s:explore_indx |unlet s:explore_indx |endif
+ if exists("s:explore_line") |let w:netrw_explore_line = s:explore_line |unlet s:explore_line |endif
+ if exists("s:explore_listlen")|let w:netrw_explore_listlen = s:explore_listlen|unlet s:explore_listlen|endif
+ if exists("s:explore_list") |let w:netrw_explore_list = s:explore_list |unlet s:explore_list |endif
+ if exists("s:explore_mtchcnt")|let w:netrw_explore_mtchcnt = s:explore_mtchcnt|unlet s:explore_mtchcnt|endif
+ if exists("s:fpl") |let w:netrw_fpl = s:fpl |unlet s:fpl |endif
+ if exists("s:hline") |let w:netrw_hline = s:hline |unlet s:hline |endif
+ if exists("s:line") |let w:netrw_line = s:line |unlet s:line |endif
+ if exists("s:liststyle") |let w:netrw_liststyle = s:liststyle |unlet s:liststyle |endif
+ if exists("s:method") |let w:netrw_method = s:method |unlet s:method |endif
+ if exists("s:prvdir") |let w:netrw_prvdir = s:prvdir |unlet s:prvdir |endif
+ if exists("s:treedict") |let w:netrw_treedict = s:treedict |unlet s:treedict |endif
+ if exists("s:treetop") |let w:netrw_treetop = s:treetop |unlet s:treetop |endif
+ if exists("s:winnr") |let w:netrw_winnr = s:winnr |unlet s:winnr |endif
+" call Dret("s:RestoreWinVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:Rexplore: implements returning from a buffer to a netrw directory {{{2
+"
+" s:SetRexDir() sets up <2-leftmouse> maps (if g:netrw_retmap
+" is true) and a command, :Rexplore, which call this function.
+"
+" s:netrw_posn is set up by s:NetrwBrowseChgDir()
+"
+" s:rexposn_BUFNR used to save/restore cursor position
+fun! s:NetrwRexplore(islocal,dirname)
+ if exists("s:netrwdrag")
+ return
+ endif
+" call Dfunc("s:NetrwRexplore() w:netrw_rexlocal=".w:netrw_rexlocal." w:netrw_rexdir<".w:netrw_rexdir."> win#".winnr())
+" call Decho("currently in bufname<".bufname("%").">",'~'.expand("<slnum>"))
+" call Decho("ft=".&ft." win#".winnr()." w:netrw_rexfile<".(exists("w:netrw_rexfile")? w:netrw_rexfile : 'n/a').">",'~'.expand("<slnum>"))
+
+ if &ft == "netrw" && exists("w:netrw_rexfile") && w:netrw_rexfile != ""
+ " a :Rex while in a netrw buffer means: edit the file in w:netrw_rexfile
+" call Decho("in netrw buffer, will edit file<".w:netrw_rexfile.">",'~'.expand("<slnum>"))
+ exe "NetrwKeepj e ".w:netrw_rexfile
+ unlet w:netrw_rexfile
+" call Dret("s:NetrwRexplore returning from netrw to buf#".bufnr("%")."<".bufname("%")."> (ft=".&ft.")")
+ return
+" else " Decho
+" call Decho("treating as not-netrw-buffer: ft=".&ft.((&ft == "netrw")? " == netrw" : "!= netrw"),'~'.expand("<slnum>"))
+" call Decho("treating as not-netrw-buffer: w:netrw_rexfile<".((exists("w:netrw_rexfile"))? w:netrw_rexfile : 'n/a').">",'~'.expand("<slnum>"))
+ endif
+
+ " ---------------------------
+ " :Rex issued while in a file
+ " ---------------------------
+
+ " record current file so :Rex can return to it from netrw
+ let w:netrw_rexfile= expand("%")
+" call Decho("set w:netrw_rexfile<".w:netrw_rexfile."> (win#".winnr().")",'~'.expand("<slnum>"))
+
+ if !exists("w:netrw_rexlocal")
+" call Dret("s:NetrwRexplore w:netrw_rexlocal doesn't exist (".&ft." win#".winnr().")")
+ return
+ endif
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+ if w:netrw_rexlocal
+ NetrwKeepj call netrw#LocalBrowseCheck(w:netrw_rexdir)
+ else
+ NetrwKeepj call s:NetrwBrowse(0,w:netrw_rexdir)
+ endif
+ if exists("s:initbeval")
+ setl beval
+ endif
+ if exists("s:rexposn_".bufnr("%"))
+" call Decho("restore posn, then unlet s:rexposn_".bufnr('%')."<".bufname("%").">",'~'.expand("<slnum>"))
+ " restore position in directory listing
+" call Decho("restoring posn to s:rexposn_".bufnr('%')."<".string(s:rexposn_{bufnr('%')}).">",'~'.expand("<slnum>"))
+ NetrwKeepj call winrestview(s:rexposn_{bufnr('%')})
+ if exists("s:rexposn_".bufnr('%'))
+ unlet s:rexposn_{bufnr('%')}
+ endif
+ else
+" call Decho("s:rexposn_".bufnr('%')."<".bufname("%")."> doesn't exist",'~'.expand("<slnum>"))
+ endif
+
+ if has("syntax") && exists("g:syntax_on") && g:syntax_on
+ if exists("s:explore_match")
+ exe "2match netrwMarkFile /".s:explore_match."/"
+ endif
+ endif
+
+" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>"))
+" call Dret("s:NetrwRexplore : ft=".&ft)
+endfun
+
+" ---------------------------------------------------------------------
+" s:SaveBufVars: save selected b: variables to s: variables {{{2
+" use s:RestoreBufVars() to restore b: variables from s: variables
+fun! s:SaveBufVars()
+" call Dfunc("s:SaveBufVars() buf#".bufnr("%"))
+
+ if exists("b:netrw_curdir") |let s:netrw_curdir = b:netrw_curdir |endif
+ if exists("b:netrw_lastfile") |let s:netrw_lastfile = b:netrw_lastfile |endif
+ if exists("b:netrw_method") |let s:netrw_method = b:netrw_method |endif
+ if exists("b:netrw_fname") |let s:netrw_fname = b:netrw_fname |endif
+ if exists("b:netrw_machine") |let s:netrw_machine = b:netrw_machine |endif
+ if exists("b:netrw_browser_active")|let s:netrw_browser_active = b:netrw_browser_active|endif
+
+" call Dret("s:SaveBufVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SavePosn: saves position associated with current buffer into a dictionary {{{2
+fun! s:SavePosn(posndict)
+" call Dfunc("s:SavePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">")
+
+ if !exists("a:posndict[bufnr('%')]")
+ let a:posndict[bufnr("%")]= []
+ endif
+" call Decho("before push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')]))
+ call add(a:posndict[bufnr("%")],winsaveview())
+" call Decho("after push: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')]))
+
+" call Dret("s:SavePosn posndict")
+ return a:posndict
+endfun
+
+" ---------------------------------------------------------------------
+" s:RestorePosn: restores position associated with current buffer using dictionary {{{2
+fun! s:RestorePosn(posndict)
+" call Dfunc("s:RestorePosn(posndict) curbuf#".bufnr("%")."<".bufname("%").">")
+ if exists("a:posndict")
+ if has_key(a:posndict,bufnr("%"))
+" call Decho("before pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')]))
+ let posnlen= len(a:posndict[bufnr("%")])
+ if posnlen > 0
+ let posnlen= posnlen - 1
+" call Decho("restoring posn posndict[".bufnr("%")."][".posnlen."]=".string(a:posndict[bufnr("%")][posnlen]),'~'.expand("<slnum>"))
+ call winrestview(a:posndict[bufnr("%")][posnlen])
+ call remove(a:posndict[bufnr("%")],posnlen)
+" call Decho("after pop: a:posndict[buf#".bufnr("%")."]=".string(a:posndict[bufnr('%')]))
+ endif
+ endif
+ endif
+" call Dret("s:RestorePosn")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SaveWinVars: (used by Explore() and NetrwSplit()) {{{2
+fun! s:SaveWinVars()
+" call Dfunc("s:SaveWinVars() win#".winnr())
+ if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif
+ if exists("w:netrw_col") |let s:col = w:netrw_col |endif
+ if exists("w:netrw_curdir") |let s:curdir = w:netrw_curdir |endif
+ if exists("w:netrw_explore_bufnr") |let s:explore_bufnr = w:netrw_explore_bufnr |endif
+ if exists("w:netrw_explore_indx") |let s:explore_indx = w:netrw_explore_indx |endif
+ if exists("w:netrw_explore_line") |let s:explore_line = w:netrw_explore_line |endif
+ if exists("w:netrw_explore_listlen")|let s:explore_listlen = w:netrw_explore_listlen|endif
+ if exists("w:netrw_explore_list") |let s:explore_list = w:netrw_explore_list |endif
+ if exists("w:netrw_explore_mtchcnt")|let s:explore_mtchcnt = w:netrw_explore_mtchcnt|endif
+ if exists("w:netrw_fpl") |let s:fpl = w:netrw_fpl |endif
+ if exists("w:netrw_hline") |let s:hline = w:netrw_hline |endif
+ if exists("w:netrw_line") |let s:line = w:netrw_line |endif
+ if exists("w:netrw_liststyle") |let s:liststyle = w:netrw_liststyle |endif
+ if exists("w:netrw_method") |let s:method = w:netrw_method |endif
+ if exists("w:netrw_prvdir") |let s:prvdir = w:netrw_prvdir |endif
+ if exists("w:netrw_treedict") |let s:treedict = w:netrw_treedict |endif
+ if exists("w:netrw_treetop") |let s:treetop = w:netrw_treetop |endif
+ if exists("w:netrw_winnr") |let s:winnr = w:netrw_winnr |endif
+" call Dret("s:SaveWinVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SetBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck()) {{{2
+" To allow separate windows to have their own activities, such as
+" Explore **/pattern, several variables have been made window-oriented.
+" However, when the user splits a browser window (ex: ctrl-w s), these
+" variables are not inherited by the new window. SetBufWinVars() and
+" UseBufWinVars() get around that.
+fun! s:SetBufWinVars()
+" call Dfunc("s:SetBufWinVars() win#".winnr())
+ if exists("w:netrw_liststyle") |let b:netrw_liststyle = w:netrw_liststyle |endif
+ if exists("w:netrw_bannercnt") |let b:netrw_bannercnt = w:netrw_bannercnt |endif
+ if exists("w:netrw_method") |let b:netrw_method = w:netrw_method |endif
+ if exists("w:netrw_prvdir") |let b:netrw_prvdir = w:netrw_prvdir |endif
+ if exists("w:netrw_explore_indx") |let b:netrw_explore_indx = w:netrw_explore_indx |endif
+ if exists("w:netrw_explore_listlen")|let b:netrw_explore_listlen= w:netrw_explore_listlen|endif
+ if exists("w:netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt= w:netrw_explore_mtchcnt|endif
+ if exists("w:netrw_explore_bufnr") |let b:netrw_explore_bufnr = w:netrw_explore_bufnr |endif
+ if exists("w:netrw_explore_line") |let b:netrw_explore_line = w:netrw_explore_line |endif
+ if exists("w:netrw_explore_list") |let b:netrw_explore_list = w:netrw_explore_list |endif
+" call Dret("s:SetBufWinVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SetRexDir: set directory for :Rexplore {{{2
+fun! s:SetRexDir(islocal,dirname)
+" call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">) win#".winnr())
+ let w:netrw_rexdir = a:dirname
+ let w:netrw_rexlocal = a:islocal
+ let s:rexposn_{bufnr("%")} = winsaveview()
+" call Decho("setting w:netrw_rexdir =".w:netrw_rexdir,'~'.expand("<slnum>"))
+" call Decho("setting w:netrw_rexlocal=".w:netrw_rexlocal,'~'.expand("<slnum>"))
+" call Decho("saving posn to s:rexposn_".bufnr("%")."<".string(s:rexposn_{bufnr("%")}).">",'~'.expand("<slnum>"))
+" call Decho("setting s:rexposn_".bufnr("%")."<".bufname("%")."> to ".string(winsaveview()),'~'.expand("<slnum>"))
+" call Dret("s:SetRexDir : win#".winnr()." ".(a:islocal? "local" : "remote")." dir: ".a:dirname)
+endfun
+
+" ---------------------------------------------------------------------
+" s:ShowLink: used to modify thin and tree listings to show links {{{2
+fun! s:ShowLink()
+" " call Dfunc("s:ShowLink()")
+" " call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">",'~'.expand("<slnum>"))
+" " call Decho(printf("line#%4d: %s",line("."),getline(".")),'~'.expand("<slnum>"))
+ if exists("b:netrw_curdir")
+ norm! $?\a
+ let fname = b:netrw_curdir.'/'.s:NetrwGetWord()
+ let resname = resolve(fname)
+" " call Decho("fname <".fname.">",'~'.expand("<slnum>"))
+" " call Decho("resname <".resname.">",'~'.expand("<slnum>"))
+" " call Decho("b:netrw_curdir<".b:netrw_curdir.">",'~'.expand("<slnum>"))
+ if resname =~ '^\M'.b:netrw_curdir.'/'
+ let dirlen = strlen(b:netrw_curdir)
+ let resname = strpart(resname,dirlen+1)
+" " call Decho("resname<".resname."> (b:netrw_curdir elided)",'~'.expand("<slnum>"))
+ endif
+ let modline = getline(".")."\t --> ".resname
+" " call Decho("fname <".fname.">",'~'.expand("<slnum>"))
+" " call Decho("modline<".modline.">",'~'.expand("<slnum>"))
+ setl noro ma
+ call setline(".",modline)
+ setl ro noma nomod
+ endif
+" " call Dret("s:ShowLink".((exists("fname")? ' : '.fname : 'n/a')))
+endfun
+
+" ---------------------------------------------------------------------
+" s:ShowStyle: {{{2
+fun! s:ShowStyle()
+ if !exists("w:netrw_liststyle")
+ let liststyle= g:netrw_liststyle
+ else
+ let liststyle= w:netrw_liststyle
+ endif
+ if liststyle == s:THINLIST
+ return s:THINLIST.":thin"
+ elseif liststyle == s:LONGLIST
+ return s:LONGLIST.":long"
+ elseif liststyle == s:WIDELIST
+ return s:WIDELIST.":wide"
+ elseif liststyle == s:TREELIST
+ return s:TREELIST.":tree"
+ else
+ return 'n/a'
+ endif
+endfun
+
+" ---------------------------------------------------------------------
+" s:Strlen: this function returns the length of a string, even if its using multi-byte characters. {{{2
+" Solution from Nicolai Weibull, vim docs (:help strlen()),
+" Tony Mechelynck, and my own invention.
+fun! s:Strlen(x)
+" "" call Dfunc("s:Strlen(x<".a:x."> g:Align_xstrlen=".g:Align_xstrlen.")")
+
+ if v:version >= 703 && exists("*strdisplaywidth")
+ let ret= strdisplaywidth(a:x)
+
+ elseif type(g:Align_xstrlen) == 1
+ " allow user to specify a function to compute the string length (ie. let g:Align_xstrlen="mystrlenfunc")
+ exe "let ret= ".g:Align_xstrlen."('".substitute(a:x,"'","''","g")."')"
+
+ elseif g:Align_xstrlen == 1
+ " number of codepoints (Latin a + combining circumflex is two codepoints)
+ " (comment from TM, solution from NW)
+ let ret= strlen(substitute(a:x,'.','c','g'))
+
+ elseif g:Align_xstrlen == 2
+ " number of spacing codepoints (Latin a + combining circumflex is one spacing
+ " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.)
+ " (comment from TM, solution from TM)
+ let ret=strlen(substitute(a:x, '.\Z', 'x', 'g'))
+
+ elseif g:Align_xstrlen == 3
+ " virtual length (counting, for instance, tabs as anything between 1 and
+ " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately
+ " preceded by lam, one otherwise, etc.)
+ " (comment from TM, solution from me)
+ let modkeep= &l:mod
+ exe "norm! o\<esc>"
+ call setline(line("."),a:x)
+ let ret= virtcol("$") - 1
+ d
+ NetrwKeepj norm! k
+ let &l:mod= modkeep
+
+ else
+ " at least give a decent default
+ let ret= strlen(a:x)
+ endif
+" "" call Dret("s:Strlen ".ret)
+ return ret
+endfun
+
+" ---------------------------------------------------------------------
+" s:ShellEscape: shellescape(), or special windows handling {{{2
+fun! s:ShellEscape(s, ...)
+ if (has('win32') || has('win64')) && $SHELL == '' && &shellslash
+ return printf('"%s"', substitute(a:s, '"', '""', 'g'))
+ endif
+ let f = a:0 > 0 ? a:1 : 0
+ return shellescape(a:s, f)
+endfun
+
+" ---------------------------------------------------------------------
+" s:TreeListMove: supports [[, ]], [], and ][ in tree mode {{{2
+fun! s:TreeListMove(dir)
+" call Dfunc("s:TreeListMove(dir<".a:dir.">)")
+ let curline = getline('.')
+ let prvline = (line(".") > 1)? getline(line(".")-1) : ''
+ let nxtline = (line(".") < line("$"))? getline(line(".")+1) : ''
+ let curindent = substitute(getline('.'),'^\(\%('.s:treedepthstring.'\)*\)[^'.s:treedepthstring.'].\{-}$','\1','e')
+ let indentm1 = substitute(curindent,'^'.s:treedepthstring,'','')
+ let treedepthchr = substitute(s:treedepthstring,' ','','g')
+ let stopline = exists("w:netrw_bannercnt")? w:netrw_bannercnt : 1
+" call Decho("prvline <".prvline."> #".(line(".")-1), '~'.expand("<slnum>"))
+" call Decho("curline <".curline."> #".line(".") , '~'.expand("<slnum>"))
+" call Decho("nxtline <".nxtline."> #".(line(".")+1), '~'.expand("<slnum>"))
+" call Decho("curindent<".curindent.">" , '~'.expand("<slnum>"))
+" call Decho("indentm1 <".indentm1.">" , '~'.expand("<slnum>"))
+ " COMBAK : need to handle when on a directory
+ " COMBAK : need to handle ]] and ][. In general, needs work!!!
+ if curline !~ '/$'
+ if a:dir == '[[' && prvline != ''
+ NetrwKeepj norm! 0
+ let nl = search('^'.indentm1.'\%('.s:treedepthstring.'\)\@!','bWe',stopline) " search backwards
+" call Decho("regfile srch back: ".nl,'~'.expand("<slnum>"))
+ elseif a:dir == '[]' && nxtline != ''
+ NetrwKeepj norm! 0
+" call Decho('srchpat<'.'^\%('.curindent.'\)\@!'.'>','~'.expand("<slnum>"))
+ let nl = search('^\%('.curindent.'\)\@!','We') " search forwards
+ if nl != 0
+ NetrwKeepj norm! k
+ else
+ NetrwKeepj norm! G
+ endif
+" call Decho("regfile srch fwd: ".nl,'~'.expand("<slnum>"))
+ endif
+ endif
+
+" call Dret("s:TreeListMove")
+endfun
+
+" ---------------------------------------------------------------------
+" s:UpdateBuffersMenu: does emenu Buffers.Refresh (but due to locale, the menu item may not be called that) {{{2
+" The Buffers.Refresh menu calls s:BMShow(); unfortunately, that means that that function
+" can't be called except via emenu. But due to locale, that menu line may not be called
+" Buffers.Refresh; hence, s:NetrwBMShow() utilizes a "cheat" to call that function anyway.
+fun! s:UpdateBuffersMenu()
+" call Dfunc("s:UpdateBuffersMenu()")
+ if has("gui") && has("menu") && has("gui_running") && &go =~# 'm' && g:netrw_menu
+ try
+ sil emenu Buffers.Refresh\ menu
+ catch /^Vim\%((\a\+)\)\=:E/
+ let v:errmsg= ""
+ sil NetrwKeepj call s:NetrwBMShow()
+ endtry
+ endif
+" call Dret("s:UpdateBuffersMenu")
+endfun
+
+" ---------------------------------------------------------------------
+" s:UseBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck() {{{2
+" Matching function to s:SetBufWinVars()
+fun! s:UseBufWinVars()
+" call Dfunc("s:UseBufWinVars()")
+ if exists("b:netrw_liststyle") && !exists("w:netrw_liststyle") |let w:netrw_liststyle = b:netrw_liststyle |endif
+ if exists("b:netrw_bannercnt") && !exists("w:netrw_bannercnt") |let w:netrw_bannercnt = b:netrw_bannercnt |endif
+ if exists("b:netrw_method") && !exists("w:netrw_method") |let w:netrw_method = b:netrw_method |endif
+ if exists("b:netrw_prvdir") && !exists("w:netrw_prvdir") |let w:netrw_prvdir = b:netrw_prvdir |endif
+ if exists("b:netrw_explore_indx") && !exists("w:netrw_explore_indx") |let w:netrw_explore_indx = b:netrw_explore_indx |endif
+ if exists("b:netrw_explore_listlen") && !exists("w:netrw_explore_listlen")|let w:netrw_explore_listlen = b:netrw_explore_listlen|endif
+ if exists("b:netrw_explore_mtchcnt") && !exists("w:netrw_explore_mtchcnt")|let w:netrw_explore_mtchcnt = b:netrw_explore_mtchcnt|endif
+ if exists("b:netrw_explore_bufnr") && !exists("w:netrw_explore_bufnr") |let w:netrw_explore_bufnr = b:netrw_explore_bufnr |endif
+ if exists("b:netrw_explore_line") && !exists("w:netrw_explore_line") |let w:netrw_explore_line = b:netrw_explore_line |endif
+ if exists("b:netrw_explore_list") && !exists("w:netrw_explore_list") |let w:netrw_explore_list = b:netrw_explore_list |endif
+" call Dret("s:UseBufWinVars")
+endfun
+
+" ---------------------------------------------------------------------
+" s:UserMaps: supports user-defined UserMaps {{{2
+" * calls a user-supplied funcref(islocal,curdir)
+" * interprets result
+" See netrw#UserMaps()
+fun! s:UserMaps(islocal,funcname)
+" call Dfunc("s:UserMaps(islocal=".a:islocal.",funcname<".a:funcname.">)")
+
+ if !exists("b:netrw_curdir")
+ let b:netrw_curdir= getcwd()
+ endif
+ let Funcref = function(a:funcname)
+ let result = Funcref(a:islocal)
+
+ if type(result) == 1
+ " if result from user's funcref is a string...
+" call Decho("result string from user funcref<".result.">",'~'.expand("<slnum>"))
+ if result == "refresh"
+" call Decho("refreshing display",'~'.expand("<slnum>"))
+ call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+ elseif result != ""
+" call Decho("executing result<".result.">",'~'.expand("<slnum>"))
+ exe result
+ endif
+
+ elseif type(result) == 3
+ " if result from user's funcref is a List...
+" call Decho("result List from user funcref<".string(result).">",'~'.expand("<slnum>"))
+ for action in result
+ if action == "refresh"
+" call Decho("refreshing display",'~'.expand("<slnum>"))
+ call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./'))
+ elseif action != ""
+" call Decho("executing action<".action.">",'~'.expand("<slnum>"))
+ exe action
+ endif
+ endfor
+ endif
+
+" call Dret("s:UserMaps")
+endfun
+
+" ==========================
+" Settings Restoration: {{{1
+" ==========================
+let &cpo= s:keepcpo
+unlet s:keepcpo
+
+" ===============
+" Modelines: {{{1
+" ===============
+" vim:ts=8 fdm=marker
diff --git a/runtime/autoload/netrwFileHandlers.vim b/runtime/autoload/netrwFileHandlers.vim
new file mode 100644
index 0000000..d07235c
--- /dev/null
+++ b/runtime/autoload/netrwFileHandlers.vim
@@ -0,0 +1,362 @@
+" netrwFileHandlers: contains various extension-based file handlers for
+" netrw's browsers' x command ("eXecute launcher")
+" Author: Charles E. Campbell
+" Date: Sep 18, 2020
+" Version: 11
+" 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= "v11"
+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
diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim
new file mode 100644
index 0000000..61c0ef7
--- /dev/null
+++ b/runtime/autoload/netrwSettings.vim
@@ -0,0 +1,249 @@
+" netrwSettings.vim: makes netrw settings simpler
+" Date: Aug 12, 2021
+" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Version: 17 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 = "v17"
+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#WinPath("")
+ 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'
+ if exists("g:netrw_altfile")
+ put = 'let g:netrw_altfile = '.g:netrw_altfile
+ else
+ put = 'let g:netrw_altfile = 0'
+ endif
+ 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_localcopycmdopt = '.g:netrw_localcopycmdopt
+ put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
+ put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
+ put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
+ put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
+ put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
+ put = 'let g:netrw_localrmdiropt = '.g:netrw_localrmdiropt
+ 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_servername = '.g:netrw_servername
+ 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
diff --git a/runtime/autoload/netrw_gitignore.vim b/runtime/autoload/netrw_gitignore.vim
new file mode 100644
index 0000000..1b55e24
--- /dev/null
+++ b/runtime/autoload/netrw_gitignore.vim
@@ -0,0 +1,22 @@
+" netrw_gitignore#Hide: gitignore-based hiding
+" Function returns a string of comma separated patterns convenient for
+" assignment to `g:netrw_list_hide` option.
+" Function can take additional filenames as arguments, example:
+" netrw_gitignore#Hide('custom_gitignore1', 'custom_gitignore2')
+"
+" Usage examples:
+" let g:netrw_list_hide = netrw_gitignore#Hide()
+" let g:netrw_list_hide = netrw_gitignore#Hide() . 'more,hide,patterns'
+"
+" Copyright: Copyright (C) 2013 Bruno Sutic {{{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,
+" netrw_gitignore.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.
+function! netrw_gitignore#Hide(...)
+ return substitute(substitute(system('git ls-files --other --ignored --exclude-standard --directory'), '\n', ',', 'g'), ',$', '', '')
+endfunction
diff --git a/runtime/autoload/paste.vim b/runtime/autoload/paste.vim
new file mode 100644
index 0000000..2d787e7
--- /dev/null
+++ b/runtime/autoload/paste.vim
@@ -0,0 +1,25 @@
+" Vim support file to help with paste mappings and menus
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last Change: 2019 Jan 27
+
+" 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.
+
+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'] = "\<c-\>\<c-o>\"+gP"
+
+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
diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
new file mode 100644
index 0000000..f9448cb
--- /dev/null
+++ b/runtime/autoload/phpcomplete.vim
@@ -0,0 +1,2988 @@
+" Vim completion script
+" Language: PHP
+" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
+" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
+" URL: https://github.com/shawncplus/phpcomplete.vim
+" Last Change: 2021 Feb 08
+"
+" OPTIONS:
+"
+" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
+" Enables completion for non-static methods when completing for static context (::).
+" This generates E_STRICT level warning, but php calls these methods nonetheless.
+"
+" let g:phpcomplete_complete_for_unknown_classes = 1/0 [default 0]
+" Enables completion of variables and functions in "everything under the sun" fashion
+" when completing for an instance or static class context but the code can't tell the class
+" or locate the file that it lives in.
+" The completion list generated this way is only filtered by the completion base
+" and generally not much more accurate then simple keyword completion.
+"
+" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
+" Enables use of tags when the plugin tries to find variables.
+" When enabled the plugin will search for the variables in the tag files with kind 'v',
+" lines like $some_var = new Foo; but these usually yield highly inaccurate results and
+" can be fairly slow.
+"
+" let g:phpcomplete_min_num_of_chars_for_namespace_completion = n [default 1]
+" This option controls the number of characters the user needs to type before
+" the tags will be searched for namespaces and classes in typed out namespaces in
+" "use ..." context. Setting this to 0 is not recommended because that means the code
+" have to scan every tag, and vim's taglist() function runs extremely slow with a
+" "match everything" pattern.
+"
+" let g:phpcomplete_parse_docblock_comments = 1/0 [default 0]
+" When enabled the preview window's content will include information
+" extracted from docblock comments of the completions.
+" Enabling this option will add return types to the completion menu for functions too.
+"
+" let g:phpcomplete_cache_taglists = 1/0 [default 1]
+" When enabled the taglist() lookups will be cached and subsequent searches
+" for the same pattern will not check the tagfiles any more, thus making the
+" lookups faster. Cache expiration is based on the mtimes of the tag files.
+"
+" TODO:
+" - Switching to HTML (XML?) completion (SQL) inside of phpStrings
+" - allow also for XML completion <- better do html_flavor for HTML
+" completion
+" - outside of <?php?> getting parent tag may cause problems. Heh, even in
+" perfect conditions GetLastOpenTag doesn't cooperate... Inside of
+" phpStrings this can be even a bonus but outside of <?php?> it is not the
+" best situation
+
+if !exists('g:phpcomplete_relax_static_constraint')
+ let g:phpcomplete_relax_static_constraint = 0
+endif
+
+if !exists('g:phpcomplete_complete_for_unknown_classes')
+ let g:phpcomplete_complete_for_unknown_classes = 0
+endif
+
+if !exists('g:phpcomplete_search_tags_for_variables')
+ let g:phpcomplete_search_tags_for_variables = 0
+endif
+
+if !exists('g:phpcomplete_min_num_of_chars_for_namespace_completion')
+ let g:phpcomplete_min_num_of_chars_for_namespace_completion = 1
+endif
+
+if !exists('g:phpcomplete_parse_docblock_comments')
+ let g:phpcomplete_parse_docblock_comments = 0
+endif
+
+if !exists('g:phpcomplete_cache_taglists')
+ let g:phpcomplete_cache_taglists = 1
+endif
+
+if !exists('s:cache_classstructures')
+ let s:cache_classstructures = {}
+endif
+
+if !exists('s:cache_tags')
+ let s:cache_tags = {}
+endif
+
+if !exists('s:cache_tags_checksum')
+ let s:cache_tags_checksum = ''
+endif
+
+let s:script_path = fnamemodify(resolve(expand('<sfile>:p')), ':h')
+
+function! phpcomplete#CompletePHP(findstart, base) " {{{
+ if a:findstart
+ unlet! b:php_menu
+ " Check if we are inside of PHP markup
+ let pos = getpos('.')
+ let phpbegin = searchpairpos('<?', '', '?>', 'bWn',
+ \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
+ let phpend = searchpairpos('<?', '', '?>', 'Wn',
+ \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
+
+ if phpbegin == [0,0] && phpend == [0,0]
+ " We are outside of any PHP markup. Complete HTML
+ let htmlbegin = htmlcomplete#CompleteTags(1, '')
+ let cursor_col = pos[2]
+ let base = getline('.')[htmlbegin : cursor_col]
+ let b:php_menu = htmlcomplete#CompleteTags(0, base)
+ return htmlbegin
+ else
+ " locate the start of the word
+ let line = getline('.')
+ let start = col('.') - 1
+ let compl_begin = col('.') - 2
+ while start >= 0 && line[start - 1] =~ '[\\a-zA-Z_0-9\x7f-\xff$]'
+ let start -= 1
+ endwhile
+ let b:phpbegin = phpbegin
+ let b:compl_context = phpcomplete#GetCurrentInstruction(line('.'), max([0, col('.') - 2]), phpbegin)
+
+ return start
+ " We can be also inside of phpString with HTML tags. Deal with
+ " it later (time, not lines).
+ endif
+ endif
+
+ " If exists b:php_menu it means completion was already constructed we
+ " don't need to do anything more
+ if exists("b:php_menu")
+ return b:php_menu
+ endif
+
+ if !exists('g:php_builtin_functions')
+ call phpcomplete#LoadData()
+ endif
+
+ " a:base is very short - we need context
+ if exists("b:compl_context")
+ let context = b:compl_context
+ unlet! b:compl_context
+ " chop of the "base" from the end of the current instruction
+ if a:base != ""
+ let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
+ end
+ else
+ let context = ''
+ end
+
+ try
+ let eventignore = &eventignore
+ let &eventignore = 'all'
+
+ let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
+
+ if context =~? '^use\s' || context ==? 'use'
+ return phpcomplete#CompleteUse(a:base)
+ endif
+
+ if context =~ '\(->\|::\)$'
+ " {{{
+ " Get name of the class
+ let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
+
+ " Get location of class definition, we have to iterate through all
+ if classname != ''
+ if classname =~ '\'
+ " split the last \ segment as a classname, everything else is the namespace
+ let classname_parts = split(classname, '\')
+ let namespace = join(classname_parts[0:-2], '\')
+ let classname = classname_parts[-1]
+ else
+ let namespace = '\'
+ endif
+ let classlocation = phpcomplete#GetClassLocation(classname, namespace)
+ else
+ let classlocation = ''
+ endif
+
+ if classlocation != ''
+ if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
+ return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
+ endif
+
+ if filereadable(classlocation)
+ let classcontent = ''
+ let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
+ let sccontent = split(classcontent, "\n")
+ let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
+
+ return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
+ endif
+ endif
+
+ return phpcomplete#CompleteUnknownClass(a:base, context)
+ " }}}
+ elseif context =~? 'implements'
+ return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
+ elseif context =~? 'instanceof'
+ return phpcomplete#CompleteClassName(a:base, ['c', 'n'], current_namespace, imports)
+ elseif context =~? 'extends\s\+.\+$' && a:base == ''
+ return ['implements']
+ elseif context =~? 'extends'
+ let kinds = context =~? 'class\s' ? ['c'] : ['i']
+ return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
+ elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
+ " special case when you've typed the class keyword and the name too, only extends and implements allowed there
+ return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
+ elseif context =~? 'new'
+ return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
+ endif
+
+ if a:base =~ '^\$'
+ return phpcomplete#CompleteVariable(a:base)
+ else
+ return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
+ endif
+ finally
+ let &eventignore = eventignore
+ endtry
+endfunction
+" }}}
+
+function! phpcomplete#CompleteUse(base) " {{{
+ " completes builtin class names regadless of g:phpcomplete_min_num_of_chars_for_namespace_completion
+ " completes namespaces from tags
+ " * requires patched ctags
+ " completes classnames from tags within the already typed out namespace using the "namespace" field of tags
+ " * requires patched ctags
+
+ let res = []
+
+ " class and namespace names are always considered absoltute in use ... expressions, leading slash is not recommended
+ " by the php manual, so we gonna get rid of that
+ if a:base =~? '^\'
+ let base = substitute(a:base, '^\', '', '')
+ else
+ let base = a:base
+ endif
+
+ let namespace_match_pattern = substitute(base, '\\', '\\\\', 'g')
+ let classname_match_pattern = matchstr(base, '[^\\]\+$')
+ let namespace_for_class = substitute(substitute(namespace_match_pattern, '\\\\', '\\', 'g'), '\\*'.classname_match_pattern.'$', '', '')
+
+ if len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
+ if len(classname_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
+ let tags = phpcomplete#GetTaglist('^\('.namespace_match_pattern.'\|'.classname_match_pattern.'\)')
+ else
+ let tags = phpcomplete#GetTaglist('^'.namespace_match_pattern)
+ endif
+
+ let patched_ctags_detected = 0
+ let namespaced_matches = []
+ let no_namespace_matches = []
+ for tag in tags
+ if has_key(tag, 'namespace')
+ let patched_ctags_detected = 1
+ endif
+
+ if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
+ let patched_ctags_detected = 1
+ call add(namespaced_matches, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename })
+ elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't') && tag.namespace ==? namespace_for_class
+ call add(namespaced_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
+ elseif (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't')
+ call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
+ endif
+ endfor
+ " if it seems that the tags file have namespace information we can safely throw
+ " away namespaceless tag matches since we can be sure they are invalid
+ if patched_ctags_detected
+ no_namespace_matches = []
+ endif
+ let res += namespaced_matches + no_namespace_matches
+ endif
+
+ if base !~ '\'
+ let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.classname_match_pattern.'"')
+ for classname in builtin_classnames
+ call add(res, {'word': g:php_builtin_classes[tolower(classname)].name, 'kind': 'c'})
+ endfor
+ let builtin_interfacenames = filter(keys(copy(g:php_builtin_interfacenames)), 'v:val =~? "^'.classname_match_pattern.'"')
+ for interfacename in builtin_interfacenames
+ call add(res, {'word': g:php_builtin_interfaces[tolower(interfacename)].name, 'kind': 'i'})
+ endfor
+ endif
+
+ for comp in res
+ let comp.word = substitute(comp.word, '^\\', '', '')
+ endfor
+
+ return res
+endfunction
+" }}}
+
+function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
+ " Complete everything
+ " + functions, DONE
+ " + keywords of language DONE
+ " + defines (constant definitions), DONE
+ " + extend keywords for predefined constants, DONE
+ " + classes (after new), DONE
+ " + limit choice after -> and :: to funcs and vars DONE
+
+ " Internal solution for finding functions in current file.
+
+ if a:base =~? '^\'
+ let leading_slash = '\'
+ else
+ let leading_slash = ''
+ endif
+
+ let file = getline(1, '$')
+ call filter(file,
+ \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
+ let jfile = join(file, ' ')
+ let int_values = split(jfile, 'function\s\+')
+ let int_functions = {}
+ for i in int_values
+ let f_name = matchstr(i,
+ \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
+ if f_name =~? '^'.substitute(a:base, '\\', '\\\\', 'g')
+ let f_args = matchstr(i,
+ \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
+ let int_functions[f_name.'('] = f_args.')'
+ endif
+ endfor
+
+ " Internal solution for finding constants in current file
+ let file = getline(1, '$')
+ call filter(file, 'v:val =~ "define\\s*("')
+ let jfile = join(file, ' ')
+ let int_values = split(jfile, 'define\s*(\s*')
+ let int_constants = {}
+ for i in int_values
+ let c_name = matchstr(i, '\(["'']\)\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze\1')
+ if c_name != '' && c_name =~# '^'.substitute(a:base, '\\', '\\\\', 'g')
+ let int_constants[leading_slash.c_name] = ''
+ endif
+ endfor
+
+ " Prepare list of functions from tags file
+ let ext_functions = {}
+ let ext_constants = {}
+ let ext_classes = {}
+ let ext_traits = {}
+ let ext_interfaces = {}
+ let ext_namespaces = {}
+
+ let base = substitute(a:base, '^\\', '', '')
+ let [tag_match_pattern, namespace_for_tag] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports)
+ let namespace_match_pattern = substitute((namespace_for_tag == '' ? '' : namespace_for_tag.'\').tag_match_pattern, '\\', '\\\\', 'g')
+
+ let tags = []
+ if len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion && len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion && tag_match_pattern != namespace_match_pattern
+ let tags = phpcomplete#GetTaglist('\c^\('.tag_match_pattern.'\|'.namespace_match_pattern.'\)')
+ elseif len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
+ let tags = phpcomplete#GetTaglist('\c^'.namespace_match_pattern)
+ elseif len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
+ let tags = phpcomplete#GetTaglist('\c^'.tag_match_pattern)
+ endif
+
+ for tag in tags
+ if !has_key(tag, 'namespace') || tag.namespace ==? a:current_namespace || tag.namespace ==? namespace_for_tag
+ if has_key(tag, 'namespace')
+ let full_name = tag.namespace.'\'.tag.name " absolute namespaced name (without leading '\')
+
+ let base_parts = split(a:base, '\')
+ if len(base_parts) > 1
+ let namespace_part = join(base_parts[0:-2], '\')
+ else
+ let namespace_part = ''
+ endif
+ let relative_name = (namespace_part == '' ? '' : namespace_part.'\').tag.name
+ endif
+
+ if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
+ let info = tag.name.' - '.tag.filename
+ " patched ctag provides absolute namespace names as tag name, namespace tags dont have namespace fields
+ let full_name = tag.name
+
+ let base_parts = split(a:base, '\')
+ let full_name_parts = split(full_name, '\')
+ if len(base_parts) > 1
+ " the first segment could be a renamed import, take the first segment from the user provided input
+ " so if it's a sub namespace of a renamed namespace, just use the typed in segments in place of the absolute path
+ " for example:
+ " you have a namespace NS1\SUBNS as SUB
+ " you have a sub-sub-namespace NS1\SUBNS\SUBSUB
+ " typed in SUB\SU
+ " the tags will return NS1\SUBNS\SUBSUB
+ " the completion should be: SUB\SUBSUB by replacing the NS1\SUBSN to SUB as in the import
+ if has_key(a:imports, base_parts[0]) && a:imports[base_parts[0]].kind == 'n'
+ let import = a:imports[base_parts[0]]
+ let relative_name = substitute(full_name, '^'.substitute(import.name, '\\', '\\\\', 'g'), base_parts[0], '')
+ else
+ let relative_name = strpart(full_name, stridx(full_name, a:base))
+ endif
+ else
+ let relative_name = strpart(full_name, stridx(full_name, a:base))
+ endif
+
+ if leading_slash == ''
+ let ext_namespaces[relative_name.'\'] = info
+ else
+ let ext_namespaces['\'.full_name.'\'] = info
+ endif
+ elseif tag.kind ==? 'f' && !has_key(tag, 'class') " class related functions (methods) completed elsewhere, only works with patched ctags
+ if has_key(tag, 'signature')
+ let prototype = tag.signature[1:-2] " drop the ()s around the string
+ else
+ let prototype = matchstr(tag.cmd,
+ \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
+ endif
+ let info = prototype.') - '.tag.filename
+
+ if !has_key(tag, 'namespace')
+ let ext_functions[tag.name.'('] = info
+ else
+ if tag.namespace ==? namespace_for_tag
+ if leading_slash == ''
+ let ext_functions[relative_name.'('] = info
+ else
+ let ext_functions['\'.full_name.'('] = info
+ endif
+ endif
+ endif
+ elseif tag.kind ==? 'd'
+ let info = ' - '.tag.filename
+ if !has_key(tag, 'namespace')
+ let ext_constants[tag.name] = info
+ else
+ if tag.namespace ==? namespace_for_tag
+ if leading_slash == ''
+ let ext_constants[relative_name] = info
+ else
+ let ext_constants['\'.full_name] = info
+ endif
+ endif
+ endif
+ elseif tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't'
+ let info = ' - '.tag.filename
+
+ let key = ''
+ if !has_key(tag, 'namespace')
+ let key = tag.name
+ else
+ if tag.namespace ==? namespace_for_tag
+ if leading_slash == ''
+ let key = relative_name
+ else
+ let key = '\'.full_name
+ endif
+ endif
+ endif
+
+ if key != ''
+ if tag.kind ==? 'c'
+ let ext_classes[key] = info
+ elseif tag.kind ==? 'i'
+ let ext_interfaces[key] = info
+ elseif tag.kind ==? 't'
+ let ext_traits[key] = info
+ endif
+ endif
+ endif
+ endif
+ endfor
+
+ let builtin_constants = {}
+ let builtin_classnames = {}
+ let builtin_interfaces = {}
+ let builtin_functions = {}
+ let builtin_keywords = {}
+ let base = substitute(a:base, '^\', '', '')
+ if a:current_namespace == '\' || (a:base =~ '^\\' && a:base =~ '^\\[^\\]*$')
+
+ " Add builtin class names
+ for [classname, info] in items(g:php_builtin_classnames)
+ if classname =~? '^'.base
+ let builtin_classnames[leading_slash.g:php_builtin_classes[tolower(classname)].name] = info
+ endif
+ endfor
+ for [interfacename, info] in items(g:php_builtin_interfacenames)
+ if interfacename =~? '^'.base
+ let builtin_interfaces[leading_slash.g:php_builtin_interfaces[tolower(interfacename)].name] = info
+ endif
+ endfor
+ endif
+
+ " Prepare list of constants from built-in constants
+ for [constant, info] in items(g:php_constants)
+ if constant =~# '^'.base
+ let builtin_constants[leading_slash.constant] = info
+ endif
+ endfor
+
+ if leading_slash == '' " keywords should not be completed when base starts with '\'
+ " Treat keywords as constants
+ for [constant, info] in items(g:php_keywords)
+ if constant =~? '^'.a:base
+ let builtin_keywords[constant] = info
+ endif
+ endfor
+ endif
+
+ for [function_name, info] in items(g:php_builtin_functions)
+ if function_name =~? '^'.base
+ let builtin_functions[leading_slash.function_name] = info
+ endif
+ endfor
+
+ " All constants
+ call extend(int_constants, ext_constants)
+
+ " All functions
+ call extend(int_functions, ext_functions)
+ call extend(int_functions, builtin_functions)
+
+ for [imported_name, import] in items(a:imports)
+ if imported_name =~? '^'.base
+ if import.kind ==? 'c'
+ if import.builtin
+ let builtin_classnames[imported_name] = ' '.import.name
+ else
+ let ext_classes[imported_name] = ' '.import.name.' - '.import.filename
+ endif
+ elseif import.kind ==? 'i'
+ if import.builtin
+ let builtin_interfaces[imported_name] = ' '.import.name
+ else
+ let ext_interfaces[imported_name] = ' '.import.name.' - '.import.filename
+ endif
+ elseif import.kind ==? 't'
+ let ext_traits[imported_name] = ' '.import.name.' - '.import.filename
+ endif
+
+ " no builtin interfaces
+ if import.kind == 'n'
+ let ext_namespaces[imported_name.'\'] = ' '.import.name.' - '.import.filename
+ endif
+ end
+ endfor
+
+ let all_values = {}
+
+ " Add functions found in this file
+ call extend(all_values, int_functions)
+
+ " Add namespaces from tags
+ call extend(all_values, ext_namespaces)
+
+ " Add constants from the current file
+ call extend(all_values, int_constants)
+
+ " Add built-in constants
+ call extend(all_values, builtin_constants)
+
+ " Add external classes
+ call extend(all_values, ext_classes)
+
+ " Add external interfaces
+ call extend(all_values, ext_interfaces)
+
+ " Add external traits
+ call extend(all_values, ext_traits)
+
+ " Add built-in classes
+ call extend(all_values, builtin_classnames)
+
+ " Add built-in interfaces
+ call extend(all_values, builtin_interfaces)
+
+ " Add php keywords
+ call extend(all_values, builtin_keywords)
+
+ let final_list = []
+ let int_list = sort(keys(all_values))
+ for i in int_list
+ if has_key(ext_namespaces, i)
+ let final_list += [{'word':i, 'kind':'n', 'menu': ext_namespaces[i], 'info': ext_namespaces[i]}]
+ elseif has_key(int_functions, i)
+ let final_list +=
+ \ [{'word':i,
+ \ 'info':i.int_functions[i],
+ \ 'menu':int_functions[i],
+ \ 'kind':'f'}]
+ elseif has_key(ext_classes, i) || has_key(builtin_classnames, i)
+ let info = has_key(ext_classes, i) ? ext_classes[i] : builtin_classnames[i].' - builtin'
+ let final_list += [{'word':i, 'kind': 'c', 'menu': info, 'info': i.info}]
+ elseif has_key(ext_interfaces, i) || has_key(builtin_interfaces, i)
+ let info = has_key(ext_interfaces, i) ? ext_interfaces[i] : builtin_interfaces[i].' - builtin'
+ let final_list += [{'word':i, 'kind': 'i', 'menu': info, 'info': i.info}]
+ elseif has_key(ext_traits, i)
+ let final_list += [{'word':i, 'kind': 't', 'menu': ext_traits[i], 'info': ext_traits[i]}]
+ elseif has_key(int_constants, i) || has_key(builtin_constants, i)
+ let info = has_key(int_constants, i) ? int_constants[i] : ' - builtin'
+ let final_list += [{'word':i, 'kind': 'd', 'menu': info, 'info': i.info}]
+ else
+ let final_list += [{'word':i}]
+ endif
+ endfor
+
+ return final_list
+endfunction
+" }}}
+
+function! phpcomplete#CompleteUnknownClass(base, context) " {{{
+ let res = []
+
+ if g:phpcomplete_complete_for_unknown_classes != 1
+ return []
+ endif
+
+ if a:base =~ '^\$'
+ let adddollar = '$'
+ else
+ let adddollar = ''
+ endif
+
+ let file = getline(1, '$')
+
+ " Internal solution for finding object properties in current file.
+ if a:context =~ '::'
+ let variables = filter(deepcopy(file),
+ \ 'v:val =~ "^\\s*\\(static\\|static\\s\\+\\(public\\|var\\)\\|\\(public\\|var\\)\\s\\+static\\)\\s\\+\\$"')
+ elseif a:context =~ '->'
+ let variables = filter(deepcopy(file),
+ \ 'v:val =~ "^\\s*\\(public\\|var\\)\\s\\+\\$"')
+ endif
+ let jvars = join(variables, ' ')
+ let svars = split(jvars, '\$')
+ let int_vars = {}
+ for i in svars
+ let c_var = matchstr(i,
+ \ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
+ if c_var != ''
+ let int_vars[adddollar.c_var] = ''
+ endif
+ endfor
+
+ " Internal solution for finding functions in current file.
+ call filter(deepcopy(file),
+ \ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
+ let jfile = join(file, ' ')
+ let int_values = split(jfile, 'function\s\+')
+ let int_functions = {}
+ for i in int_values
+ let f_name = matchstr(i,
+ \ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
+ let f_args = matchstr(i,
+ \ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
+
+ let int_functions[f_name.'('] = f_args.')'
+ endfor
+
+ " collect external functions from tags
+ let ext_functions = {}
+ let tags = phpcomplete#GetTaglist('^'.substitute(a:base, '^\$', '', ''))
+ for tag in tags
+ if tag.kind ==? 'f'
+ let item = tag.name
+ if has_key(tag, 'signature')
+ let prototype = tag.signature[1:-2]
+ else
+ let prototype = matchstr(tag.cmd,
+ \ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
+ endif
+ let ext_functions[item.'('] = prototype.') - '.tag['filename']
+ endif
+ endfor
+
+ " All functions to one hash for later reference when deciding kind
+ call extend(int_functions, ext_functions)
+
+ let all_values = {}
+ call extend(all_values, int_functions)
+ call extend(all_values, int_vars) " external variables are already in
+ call extend(all_values, g:php_builtin_object_functions)
+
+ for m in sort(keys(all_values))
+ if m =~ '\(^\|::\)'.a:base
+ call add(res, m)
+ endif
+ endfor
+
+ let start_list = res
+
+ let final_list = []
+ for i in start_list
+ if has_key(int_vars, i)
+ let class = ' '
+ if all_values[i] != ''
+ let class = i.' class '
+ endif
+ let final_list += [{'word':i, 'info':class.all_values[i], 'kind':'v'}]
+ else
+ let final_list +=
+ \ [{'word':substitute(i, '.*::', '', ''),
+ \ 'info':i.all_values[i],
+ \ 'menu':all_values[i],
+ \ 'kind':'f'}]
+ endif
+ endfor
+ return final_list
+endfunction
+" }}}
+
+function! phpcomplete#CompleteVariable(base) " {{{
+ let res = []
+
+ " Internal solution for current file.
+ let file = getline(1, '$')
+ let jfile = join(file, ' ')
+ let int_vals = split(jfile, '\ze\$')
+ let int_vars = {}
+ for i in int_vals
+ if i =~? '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new'
+ let val = matchstr(i,
+ \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
+ else
+ let val = matchstr(i,
+ \ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
+ endif
+ if val != ''
+ let int_vars[val] = ''
+ endif
+ endfor
+
+ call extend(int_vars, g:php_builtin_vars)
+
+ " ctags has support for PHP, use tags file for external variables
+ if g:phpcomplete_search_tags_for_variables
+ let ext_vars = {}
+ let tags = phpcomplete#GetTaglist('\C^'.substitute(a:base, '^\$', '', ''))
+ for tag in tags
+ if tag.kind ==? 'v'
+ let item = tag.name
+ let m_menu = ''
+ if tag.cmd =~? tag['name'].'\s*=\s*new\s\+'
+ let m_menu = matchstr(tag.cmd,
+ \ '\c=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
+ endif
+ let ext_vars['$'.item] = m_menu
+ endif
+ endfor
+ call extend(int_vars, ext_vars)
+ endif
+
+ for m in sort(keys(int_vars))
+ if m =~# '^\'.a:base
+ call add(res, m)
+ endif
+ endfor
+
+ let int_list = res
+
+ let int_dict = []
+ for i in int_list
+ if int_vars[i] != ''
+ let class = ' '
+ if int_vars[i] != ''
+ let class = i.' class '
+ endif
+ let int_dict += [{'word':i, 'info':class.int_vars[i], 'menu':int_vars[i], 'kind':'v'}]
+ else
+ let int_dict += [{'word':i, 'kind':'v'}]
+ endif
+ endfor
+
+ return int_dict
+endfunction
+" }}}
+
+function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports) " {{{
+ let kinds = sort(a:kinds)
+ " Complete class name
+ let res = []
+ if a:base =~? '^\'
+ let leading_slash = '\'
+ let base = substitute(a:base, '^\', '', '')
+ else
+ let leading_slash = ''
+ let base = a:base
+ endif
+
+ " Internal solution for finding classes in current file.
+ let file = getline(1, '$')
+ let filterstr = ''
+
+ if kinds == ['c', 'i']
+ let filterstr = 'v:val =~? "\\(class\\|interface\\)\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
+ elseif kinds == ['c', 'n']
+ let filterstr = 'v:val =~? "\\(class\\|namespace\\)\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
+ elseif kinds == ['c']
+ let filterstr = 'v:val =~? "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
+ elseif kinds == ['i']
+ let filterstr = 'v:val =~? "interface\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
+ endif
+
+ call filter(file, filterstr)
+
+ for line in file
+ let c_name = matchstr(line, '\c\(class\|interface\)\s*\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
+ let kind = (line =~? '^\s*class' ? 'c' : 'i')
+ if c_name != '' && c_name =~? '^'.base
+ call add(res, {'word': c_name, 'kind': kind})
+ endif
+ endfor
+
+ " resolve the typed in part with namespaces (if there's a \ in it)
+ let [tag_match_pattern, namespace_for_class] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports)
+
+ let tags = []
+ if len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
+ let tags = phpcomplete#GetTaglist('^\c'.tag_match_pattern)
+ endif
+
+ if len(tags)
+ let base_parts = split(a:base, '\')
+ if len(base_parts) > 1
+ let namespace_part = join(base_parts[0:-2], '\').'\'
+ else
+ let namespace_part = ''
+ endif
+ let no_namespace_matches = []
+ let namespaced_matches = []
+ let seen_namespaced_tag = 0
+ for tag in tags
+ if has_key(tag, 'namespace')
+ let seen_namespaced_tag = 1
+ endif
+ let relative_name = namespace_part.tag.name
+ " match base without the namespace part for namespaced base but not namespaced tags, for tagfiles with old ctags
+ if !has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && stridx(tolower(tag.name), tolower(base[len(namespace_part):])) == 0
+ call add(no_namespace_matches, {'word': leading_slash.relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
+ endif
+ if has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && tag.namespace ==? namespace_for_class
+ let full_name = tag.namespace.'\'.tag.name " absolute namespaced name (without leading '\')
+ call add(namespaced_matches, {'word': leading_slash == '\' ? leading_slash.full_name : relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
+ endif
+ endfor
+ " if there was a tag with namespace field, assume tag files with namespace support, so the matches
+ " without a namespace field are in the global namespace so if there were namespace in the base
+ " we should not add them to the matches
+ if seen_namespaced_tag && namespace_part != ''
+ let no_namespace_matches = []
+ endif
+ let res += no_namespace_matches + namespaced_matches
+ endif
+
+ " look for built in classnames and interfaces
+ let base_parts = split(base, '\')
+ if a:current_namespace == '\' || (leading_slash == '\' && len(base_parts) < 2)
+ if index(kinds, 'c') != -1
+ let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.substitute(a:base, '\\', '', 'g').'"')
+ for classname in builtin_classnames
+ let menu = ''
+ " if we have a constructor for this class, add parameters as to the info
+ if has_key(g:php_builtin_classes[tolower(classname)].methods, '__construct')
+ let menu = g:php_builtin_classes[tolower(classname)]['methods']['__construct']['signature']
+ endif
+ call add(res, {'word': leading_slash.g:php_builtin_classes[tolower(classname)].name, 'kind': 'c', 'menu': menu})
+ endfor
+ endif
+
+ if index(kinds, 'i') != -1
+ let builtin_interfaces = filter(keys(copy(g:php_builtin_interfaces)), 'v:val =~? "^'.substitute(a:base, '\\', '', 'g').'"')
+ for interfacename in builtin_interfaces
+ call add(res, {'word': leading_slash.g:php_builtin_interfaces[interfacename]['name'], 'kind': 'i', 'menu': ''})
+ endfor
+ endif
+ endif
+
+ " add matching imported things
+ for [imported_name, import] in items(a:imports)
+ if imported_name =~? '^'.base && index(kinds, import.kind) != -1
+ let menu = import.name.(import.builtin ? ' - builtin' : '')
+ call add(res, {'word': imported_name, 'kind': import.kind, 'menu': menu})
+ endif
+ endfor
+
+ let res = sort(res, 'phpcomplete#CompareCompletionRow')
+ return res
+endfunction
+" }}}
+
+function! phpcomplete#CompareCompletionRow(i1, i2) " {{{
+ return a:i1.word == a:i2.word ? 0 : a:i1.word > a:i2.word ? 1 : -1
+endfunction
+" }}}
+
+function! s:getNextCharWithPos(filelines, current_pos) " {{{
+ let line_no = a:current_pos[0]
+ let col_no = a:current_pos[1]
+ let last_line = a:filelines[len(a:filelines) - 1]
+ let end_pos = [len(a:filelines) - 1, strlen(last_line) - 1]
+ if line_no > end_pos[0] || line_no == end_pos[0] && col_no > end_pos[1]
+ return ['EOF', 'EOF']
+ endif
+
+ " we've not reached the end of the current line break
+ if col_no + 1 < strlen(a:filelines[line_no])
+ let col_no += 1
+ else
+ " we've reached the end of the current line, jump to the next
+ " non-blank line (blank lines have no position where we can read from,
+ " not even a whitespace. The newline char does not positionable by vim
+ let line_no += 1
+ while strlen(a:filelines[line_no]) == 0
+ let line_no += 1
+ endwhile
+
+ let col_no = 0
+ endif
+
+ " return 'EOF' string to signal end of file, normal results only one char
+ " in length
+ if line_no == end_pos[0] && col_no > end_pos[1]
+ return ['EOF', 'EOF']
+ endif
+
+ return [[line_no, col_no], a:filelines[line_no][col_no]]
+endfunction " }}}
+
+function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{
+ " if there's no modifier, and no modifier is allowed and no modifier is required
+ if len(a:modifiers) == 0 && len(a:required_modifiers) == 0
+ return 1
+ else
+ " check if every required modifier is present
+ for required_modifier in a:required_modifiers
+ if index(a:modifiers, required_modifier) == -1
+ return 0
+ endif
+ endfor
+
+ for modifier in a:modifiers
+ " if the modifier is prohibited it's a no match
+ if index(a:prohibited_modifiers, modifier) != -1
+ return 0
+ endif
+ endfor
+
+ " anything that is not explicitly required or prohibited is allowed
+ return 1
+ endif
+endfunction
+" }}}
+
+function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) " {{{
+ let final_list = []
+ let res = []
+
+ let required_modifiers = []
+ let prohibited_modifiers = []
+
+ if a:visibility == 'public'
+ let prohibited_modifiers += ['private', 'protected']
+ endif
+
+ " limit based on context to static or normal methods
+ let static_con = ''
+ if a:context =~ '::$' && a:context !~? 'parent::$'
+ if g:phpcomplete_relax_static_constraint != 1
+ let required_modifiers += ['static']
+ endif
+ elseif a:context =~ '->$'
+ let prohibited_modifiers += ['static']
+ endif
+
+ let all_function = filter(deepcopy(a:sccontent),
+ \ 'v:val =~ "^\\s*\\(public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)*function"')
+
+ let functions = []
+ for i in all_function
+ let modifiers = split(matchstr(tolower(i), '\zs.\+\zefunction'), '\s\+')
+ if phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) == 1
+ call add(functions, i)
+ endif
+ endfor
+
+ let c_functions = {}
+ let c_doc = {}
+ for i in functions
+ let f_name = matchstr(i,
+ \ 'function\s*&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
+ let f_args = matchstr(i,
+ \ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|\_$\)')
+ if f_name != '' && stridx(f_name, '__') != 0
+ let c_functions[f_name.'('] = f_args
+ if g:phpcomplete_parse_docblock_comments
+ let c_doc[f_name.'('] = phpcomplete#GetDocBlock(a:sccontent, 'function\s*&\?\<'.f_name.'\>')
+ endif
+ endif
+ endfor
+
+ " limit based on context to static or normal attributes
+ if a:context =~ '::$' && a:context !~? 'parent::$'
+ " variables must have static to be accessed as static unlike functions
+ let required_modifiers += ['static']
+ endif
+ let all_variable = filter(deepcopy(a:sccontent),
+ \ 'v:val =~ "\\(^\\s*\\(var\\s\\+\\|public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)\\+\\$\\|^\\s*\\(\\/\\|\\*\\)*\\s*@property\\s\\+\\S\\+\\s\\S\\{-}\\s*$\\)"')
+
+ let variables = []
+ for i in all_variable
+ let modifiers = split(matchstr(tolower(i), '\zs.\+\ze\$'), '\s\+')
+ if phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) == 1
+ call add(variables, i)
+ endif
+ endfor
+
+ let static_vars = split(join(variables, ' '), '\$')
+ let c_variables = {}
+
+ let var_index = 0
+ for i in static_vars
+ let c_var = matchstr(i,
+ \ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
+ if c_var != ''
+ if a:context =~ '::$'
+ let c_var = '$'.c_var
+ endif
+ let c_variables[c_var] = ''
+ if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index, '')) > 0
+ let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index])
+ endif
+ let var_index += 1
+ endif
+ endfor
+
+ let constants = filter(deepcopy(a:sccontent),
+ \ 'v:val =~ "^\\s*const\\s\\+"')
+
+ let jcons = join(constants, ' ')
+ let scons = split(jcons, 'const')
+
+ let c_constants = {}
+ let const_index = 0
+ for i in scons
+ let c_con = matchstr(i,
+ \ '^\s*\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
+ if c_con != ''
+ let c_constants[c_con] = ''
+ if g:phpcomplete_parse_docblock_comments && len(get(constants, const_index)) > 0
+ let c_doc[c_con] = phpcomplete#GetDocBlock(a:sccontent, constants[const_index])
+ endif
+ let const_index += 1
+ endif
+ endfor
+
+ let all_values = {}
+ call extend(all_values, c_functions)
+ call extend(all_values, c_variables)
+ call extend(all_values, c_constants)
+
+ for m in sort(keys(all_values))
+ if stridx(m, a:base) == 0
+ call add(res, m)
+ endif
+ endfor
+
+ let start_list = res
+
+ let final_list = []
+ for i in start_list
+ let docblock = phpcomplete#ParseDocBlock(get(c_doc, i, ''))
+ if has_key(c_variables, i)
+ let final_list +=
+ \ [{'word': i,
+ \ 'info':phpcomplete#FormatDocBlock(docblock),
+ \ 'menu':get(docblock.var, 'type', ''),
+ \ 'kind':'v'}]
+ elseif has_key(c_constants, i)
+ let info = phpcomplete#FormatDocBlock(docblock)
+ if info != ''
+ let info = "\n".info
+ endif
+ let final_list +=
+ \ [{'word':i,
+ \ 'info':i.info,
+ \ 'menu':all_values[i],
+ \ 'kind':'d'}]
+ else
+ let return_type = get(docblock.return, 'type', '')
+ if return_type != ''
+ let return_type = ' | '.return_type
+ endif
+ let info = phpcomplete#FormatDocBlock(docblock)
+ if info != ''
+ let info = "\n".info
+ endif
+ let final_list +=
+ \ [{'word':substitute(i, '.*::', '', ''),
+ \ 'info':i.all_values[i].')'.info,
+ \ 'menu':all_values[i].')'.return_type,
+ \ 'kind':'f'}]
+ endif
+ endfor
+
+ return final_list
+endfunction
+" }}}
+
+function! phpcomplete#CompleteBuiltInClass(context, classname, base) " {{{
+ let class_info = g:php_builtin_classes[tolower(a:classname)]
+ let res = []
+ if a:context =~ '->$' " complete for everything instance related
+ " methods
+ for [method_name, method_info] in items(class_info.methods)
+ if stridx(method_name, '__') != 0 && (a:base == '' || method_name =~? '^'.a:base)
+ call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature })
+ endif
+ endfor
+ " properties
+ for [property_name, property_info] in items(class_info.properties)
+ if a:base == '' || property_name =~? '^'.a:base
+ call add(res, {'word':property_name, 'kind': 'v', 'menu': property_info.type, 'info': property_info.type })
+ endif
+ endfor
+ elseif a:context =~ '::$' " complete for everything static
+ " methods
+ for [method_name, method_info] in items(class_info.static_methods)
+ if a:base == '' || method_name =~? '^'.a:base
+ call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature })
+ endif
+ endfor
+ " properties
+ for [property_name, property_info] in items(class_info.static_properties)
+ if a:base == '' || property_name =~? '^'.a:base
+ call add(res, {'word':property_name, 'kind': 'v', 'menu': property_info.type, 'info': property_info.type })
+ endif
+ endfor
+ " constants
+ for [constant_name, constant_info] in items(class_info.constants)
+ if a:base == '' || constant_name =~? '^'.a:base
+ call add(res, {'word':constant_name, 'kind': 'd', 'menu': constant_info, 'info': constant_info})
+ endif
+ endfor
+ endif
+ return res
+endfunction
+" }}}
+
+function! phpcomplete#GetTaglist(pattern) " {{{
+ let cache_checksum = ''
+ if g:phpcomplete_cache_taglists == 1
+ " build a string with format of "<tagfile>:<mtime>$<tagfile2>:<mtime2>..."
+ " to validate that the tags are not changed since the time we saved the results in cache
+ for tagfile in sort(tagfiles())
+ let cache_checksum .= fnamemodify(tagfile, ':p').':'.getftime(tagfile).'$'
+ endfor
+
+ if s:cache_tags_checksum != cache_checksum
+ " tag file(s) changed
+ " since we don't know where individual tags coming from when calling taglist() we zap the whole cache
+ " no way to clear only the entries originating from the changed tag file
+ let s:cache_tags = {}
+ endif
+
+ if has_key(s:cache_tags, a:pattern)
+ return s:cache_tags[a:pattern]
+ endif
+ endif
+
+ let tags = taglist(a:pattern)
+ for tag in tags
+ for prop in keys(tag)
+ if prop == 'cmd' || prop == 'static' || prop == 'kind' || prop == 'builtin'
+ continue
+ endif
+ let tag[prop] = substitute(tag[prop], '\\\\', '\\', 'g')
+ endfor
+ endfor
+ let s:cache_tags[a:pattern] = tags
+ let has_key = has_key(s:cache_tags, a:pattern)
+ let s:cache_tags_checksum = cache_checksum
+ return tags
+endfunction
+" }}}
+
+function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) " {{{
+ " locate the current instruction (up until the previous non comment or string ";" or php region start (<?php or <?) without newlines
+ let col_number = a:col_number
+ let line_number = a:line_number
+ let line = getline(a:line_number)
+ let current_char = -1
+ let instruction = ''
+ let parent_depth = 0
+ let bracket_depth = 0
+ let stop_chars = [
+ \ '!', '@', '%', '^', '&',
+ \ '*', '/', '-', '+', '=',
+ \ ':', '>', '<', '.', '?',
+ \ ';', '(', '|', '['
+ \ ]
+
+ let phpbegin_length = len(matchstr(getline(a:phpbegin[0]), '\zs<?\(php\)\?\ze'))
+ let phpbegin_end = [a:phpbegin[0], a:phpbegin[1] - 1 + phpbegin_length]
+
+ " will hold the first place where a coma could have ended the match
+ let first_coma_break_pos = -1
+ let next_char = len(line) < col_number ? line[col_number + 1] : ''
+
+ while !(line_number == 1 && col_number == 1)
+ if current_char != -1
+ let next_char = current_char
+ endif
+
+ let current_char = line[col_number]
+ let synIDName = synIDattr(synID(line_number, col_number + 1, 0), 'name')
+
+ if col_number - 1 == -1
+ let prev_line_number = line_number - 1
+ let prev_line = getline(line_number - 1)
+ let prev_col_number = strlen(prev_line)
+ else
+ let prev_line_number = line_number
+ let prev_col_number = col_number - 1
+ let prev_line = line
+ endif
+ let prev_char = prev_line[prev_col_number]
+
+ " skip comments
+ if synIDName =~? 'comment\|phpDocTags'
+ let current_char = ''
+ endif
+
+ " break on the last char of the "and" and "or" operators
+ if synIDName == 'phpOperator' && (current_char == 'r' || current_char == 'd')
+ break
+ endif
+
+ " break on statements as "return" or "throws"
+ if synIDName == 'phpStatement' || synIDName == 'phpException'
+ break
+ endif
+
+ " if the current char should be considered
+ if current_char != '' && parent_depth >= 0 && bracket_depth >= 0 && synIDName !~? 'comment\|string'
+ " break if we are on a "naked" stop_char (operators, colon, openparent...)
+ if index(stop_chars, current_char) != -1
+ let do_break = 1
+ " dont break if it does look like a "->"
+ if (prev_char == '-' && current_char == '>') || (current_char == '-' && next_char == '>')
+ let do_break = 0
+ endif
+ " dont break if it does look like a "::"
+ if (prev_char == ':' && current_char == ':') || (current_char == ':' && next_char == ':')
+ let do_break = 0
+ endif
+
+ if do_break
+ break
+ endif
+ endif
+
+ " save the coma position for later use if there's a "naked" , possibly separating a parameter and it is not in a parented part
+ if first_coma_break_pos == -1 && current_char == ','
+ let first_coma_break_pos = len(instruction)
+ endif
+ endif
+
+ " count nested darenthesis and brackets so we can tell if we need to break on a ';' or not (think of for (;;) loops)
+ if synIDName =~? 'phpBraceFunc\|phpParent\|Delimiter'
+ if current_char == '('
+ let parent_depth += 1
+ elseif current_char == ')'
+ let parent_depth -= 1
+
+ elseif current_char == '['
+ let bracket_depth += 1
+ elseif current_char == ']'
+ let bracket_depth -= 1
+ endif
+ endif
+
+ " stop collecting chars if we see a function start { (think of first line in a function)
+ if (current_char == '{' || current_char == '}') && synIDName =~? 'phpBraceFunc\|phpParent\|Delimiter'
+ break
+ endif
+
+ " break if we are reached the php block start (<?php or <?)
+ if [line_number, col_number] == phpbegin_end
+ break
+ endif
+
+ let instruction = current_char.instruction
+
+ " step a char or a line back if we are on the first column of the line already
+ let col_number -= 1
+ if col_number == -1
+ let line_number -= 1
+ let line = getline(line_number)
+ let col_number = strlen(line)
+ endif
+ endwhile
+
+ " strip leading whitespace
+ let instruction = substitute(instruction, '^\s\+', '', '')
+
+ " there were a "naked" coma in the instruction
+ if first_coma_break_pos != -1
+ if instruction !~? '^use' && instruction !~? '^class' " use ... statements and class declarations should not be broken up by comas
+ let pos = (-1 * first_coma_break_pos) + 1
+ let instruction = instruction[pos :]
+ endif
+ endif
+
+ " HACK to remove one line conditionals from code like "if ($foo) echo 'bar'"
+ " what the plugin really need is a proper php tokenizer
+ if instruction =~? '\c^\(if\|while\|foreach\|for\)\s*('
+ " clear everything up until the first (
+ let instruction = substitute(instruction, '^\(if\|while\|foreach\|for\)\s*(\s*', '', '')
+
+ " lets iterate through the instruction until we can find the pair for the opening (
+ let i = 0
+ let depth = 1
+ while i < len(instruction)
+ if instruction[i] == '('
+ let depth += 1
+ endif
+ if instruction[i] == ')'
+ let depth -= 1
+ endif
+ if depth == 0
+ break
+ end
+ let i += 1
+ endwhile
+ let instruction = instruction[i + 1 : len(instruction)]
+ endif
+
+ " trim whitespace from the ends
+ let instruction = substitute(instruction, '\v^(^\s+)|(\s+)$', '', 'g')
+
+ return instruction
+endfunction " }}}
+
+function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, imports, methodstack) " {{{
+ " Tries to get the classname and namespace for a chained method call like:
+ " $this->foo()->bar()->baz()->
+
+ let classname_candidate = a:classname_candidate
+ let class_candidate_namespace = a:class_candidate_namespace
+ let methodstack = a:methodstack
+ let unknown_result = ['', '']
+ let prev_method_is_array = (methodstack[0] =~ '\v^[^([]+\[' ? 1 : 0)
+ let classname_candidate_is_array = (classname_candidate =~ '\[\]$' ? 1 : 0)
+
+ if prev_method_is_array
+ if classname_candidate_is_array
+ let classname_candidate = substitute(classname_candidate, '\[\]$', '', '')
+ else
+ return unknown_result
+ endif
+ endif
+
+ if (len(methodstack) == 1)
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, a:imports)
+ return [classname_candidate, class_candidate_namespace]
+ else
+ call remove(methodstack, 0)
+ let method_is_array = (methodstack[0] =~ '\v^[^[]+\[' ? 1 : 0)
+ let method = matchstr(methodstack[0], '\v^\$*\zs[^[(]+\ze')
+
+ let classlocation = phpcomplete#GetClassLocation(classname_candidate, class_candidate_namespace)
+
+ if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname_candidate))
+ let class_info = g:php_builtin_classes[tolower(classname_candidate)]
+ if has_key(class_info['methods'], method)
+ return phpcomplete#GetCallChainReturnType(class_info['methods'][method].return_type, '\', a:imports, methodstack)
+ endif
+ if has_key(class_info['properties'], method)
+ return phpcomplete#GetCallChainReturnType(class_info['properties'][method].type, '\', a:imports, methodstack)
+ endif
+ if has_key(class_info['static_methods'], method)
+ return phpcomplete#GetCallChainReturnType(class_info['static_methods'][method].return_type, '\', a:imports, methodstack)
+ endif
+ if has_key(class_info['static_properties'], method)
+ return phpcomplete#GetCallChainReturnType(class_info['static_properties'][method].type, '\', a:imports, methodstack)
+ endif
+
+ return unknown_result
+
+ elseif classlocation != '' && filereadable(classlocation)
+ " Read the next method from the stack and extract only the name
+
+ let classcontents = phpcomplete#GetCachedClassContents(classlocation, classname_candidate)
+
+ " Get Structured information of all classes and subclasses including namespace and includes
+ " try to find the method's return type in docblock comment
+ for classstructure in classcontents
+ let docblock_target_pattern = 'function\s\+&\?'.method.'\>\|\(public\|private\|protected\|var\).\+\$'.method.'\>\|@property.\+\$'.method.'\>'
+ let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
+ let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(split(classstructure.content, '\n'), 'function\s\+&\?'.method.'\>')
+ if doc_str != '' || return_type_hint != ''
+ break
+ endif
+ endfor
+ if doc_str != '' || return_type_hint != ''
+ let docblock = phpcomplete#ParseDocBlock(doc_str)
+ if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0 || return_type_hint != ''
+ if return_type_hint == ''
+ let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
+
+ if type == ''
+ for property in docblock.properties
+ if property.description =~? method
+ let type = property.type
+ break
+ endif
+ endfor
+ endif
+ else
+ let type = return_type_hint
+ end
+
+ " there's a namespace in the type, threat the type as FQCN
+ if type =~ '\\'
+ let parts = split(substitute(type, '^\\', '', ''), '\')
+ let class_candidate_namespace = join(parts[0:-2], '\')
+ let classname_candidate = parts[-1]
+ " check for renamed namespace in imports
+ if has_key(classstructure.imports, class_candidate_namespace)
+ let class_candidate_namespace = classstructure.imports[class_candidate_namespace].name
+ endif
+ else
+ " no namespace in the type, threat it as a relative classname
+ let returnclass = type
+ if has_key(classstructure.imports, returnclass)
+ if has_key(classstructure.imports[returnclass], 'namespace')
+ let fullnamespace = classstructure.imports[returnclass].namespace
+ else
+ let fullnamespace = class_candidate_namespace
+ endif
+ else
+ let fullnamespace = class_candidate_namespace
+ endif
+ " make @return self, static, $this the same way
+ " (not exactly what php means by these)
+ if returnclass == 'self' || returnclass == 'static' || returnclass == '$this' || returnclass == 'self[]' || returnclass == 'static[]' || returnclass == '$this[]'
+ if returnclass =~ '\[\]$'
+ let classname_candidate = a:classname_candidate.'[]'
+ else
+ let classname_candidate = a:classname_candidate
+ endif
+ let class_candidate_namespace = a:class_candidate_namespace
+ else
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
+ endif
+ endif
+
+ return phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, a:imports, methodstack)
+ endif
+ endif
+
+ return unknown_result
+ else
+ return unknown_result
+ endif
+ endif
+endfunction " }}}
+
+function! phpcomplete#GetMethodStack(line) " {{{
+ let methodstack = []
+ let i = 0
+ let end = len(a:line)
+
+ let current_part = ''
+
+ let parent_depth = 0
+ let in_string = 0
+ let string_start = ''
+
+ let next_char = ''
+
+ while i < end
+ let current_char = a:line[i]
+ let next_char = i + 1 < end ? a:line[i + 1] : ''
+ let prev_char = i >= 1 ? a:line[i - 1] : ''
+ let prev_prev_char = i >= 2 ? a:line[i - 2] : ''
+
+ if in_string == 0 && parent_depth == 0 && ((current_char == '-' && next_char == '>') || (current_char == ':' && next_char == ':'))
+ call add(methodstack, current_part)
+ let current_part = ''
+ let i += 2
+ continue
+ endif
+
+ " if it looks like a string
+ if current_char == "'" || current_char == '"'
+ " and it is not escaped
+ if prev_char != '\' || (prev_char == '\' && prev_prev_char == '\')
+ " and we are in a string already
+ if in_string
+ " and that string started with this char too
+ if current_char == string_start
+ " clear the string mark
+ let in_string = 0
+ endif
+ else " ... and we are not in a string
+ " set the string mark
+ let in_string = 1
+ let string_start = current_char
+ endif
+ endif
+ endif
+
+ if !in_string && a:line[i] == '('
+ let parent_depth += 1
+ endif
+ if !in_string && a:line[i] == ')'
+ let parent_depth -= 1
+ endif
+
+ let current_part .= current_char
+ let i += 1
+ endwhile
+
+ " add the last remaining part, this can be an empty string and this is expected
+ " the empty string represents the completion base (which happen to be an empty string)
+ if current_part != ''
+ call add(methodstack, current_part)
+ endif
+
+ return methodstack
+endfunction
+" }}}
+
+function! phpcomplete#GetClassName(start_line, context, current_namespace, imports) " {{{
+ " Get class name
+ " Class name can be detected in few ways:
+ " @var $myVar class
+ " @var class $myVar
+ " in the same line (php 5.4 (new Class)-> syntax)
+ " line above
+ " or line in tags file
+
+ let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
+ let function_name_pattern = '[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*'
+ let function_invocation_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*('
+ let variable_name_pattern = '\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
+
+ let classname_candidate = ''
+ let class_candidate_namespace = a:current_namespace
+ let class_candidate_imports = a:imports
+ let methodstack = phpcomplete#GetMethodStack(a:context)
+
+ if a:context =~? '\$this->' || a:context =~? '\(self\|static\)::' || a:context =~? 'parent::'
+ let i = 1
+ while i < a:start_line
+ let line = getline(a:start_line - i)
+
+ " Don't complete self:: or $this if outside of a class
+ " (assumes correct indenting)
+ if line =~ '^}'
+ return ''
+ endif
+
+ if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class\s'
+ let class_name = matchstr(line, '\cclass\s\+\zs'.class_name_pattern.'\ze')
+ let extended_class = matchstr(line, '\cclass\s\+'.class_name_pattern.'\s\+extends\s\+\zs'.class_name_pattern.'\ze')
+
+ let classname_candidate = a:context =~? 'parent::' ? extended_class : class_name
+ if classname_candidate != ''
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
+ " return absolute classname, without leading \
+ return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
+ endif
+ endif
+
+ let i += 1
+ endwhile
+ elseif a:context =~? '(\s*new\s\+'.class_name_pattern.'\s*)->'
+ let classname_candidate = matchstr(a:context, '\cnew\s\+\zs'.class_name_pattern.'\ze')
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
+ " return absolute classname, without leading \
+ return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
+ elseif get(methodstack, 0) =~# function_invocation_pattern
+ let function_name = matchstr(methodstack[0], '^\s*\zs'.function_name_pattern)
+ let function_file = phpcomplete#GetFunctionLocation(function_name, a:current_namespace)
+ if function_file == ''
+ let function_file = phpcomplete#GetFunctionLocation(function_name, '\')
+ endif
+
+ if function_file == 'VIMPHP_BUILTINFUNCTION'
+ " built in function, grab the return type from the info string
+ let return_type = matchstr(g:php_builtin_functions[function_name.'('], '\v\|\s+\zs.+$')
+ let classname_candidate = return_type
+ let class_candidate_namespace = '\'
+ elseif function_file != '' && filereadable(function_file)
+ let file_lines = readfile(function_file)
+ let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
+ let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
+ let docblock = phpcomplete#ParseDocBlock(docblock_str)
+ let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
+ if type != ''
+ let classname_candidate = type
+ let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
+ " try to expand the classname of the returned type with the context got from the function's source file
+
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
+ endif
+ endif
+ if classname_candidate != ''
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
+ " return absolute classname, without leading \
+ return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
+ endif
+ else
+ " extract the variable name from the context
+ let object = methodstack[0]
+ let object_is_array = (object =~ '\v^[^[]+\[' ? 1 : 0)
+ let object = matchstr(object, variable_name_pattern)
+
+ let function_boundary = phpcomplete#GetCurrentFunctionBoundaries()
+ let search_end_line = max([1, function_boundary[0][0]])
+ " -1 makes us ignore the current line (where the completion was invoked
+ let lines = reverse(getline(search_end_line, a:start_line - 1))
+
+ " check Constant lookup
+ let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::')
+ if constant_object != ''
+ let classname_candidate = constant_object
+ endif
+
+ if classname_candidate == ''
+ " scan the file backwards from current line for explicit type declaration (@var $variable Classname)
+ for line in lines
+ " in file lookup for /* @var $foo Class */
+ if line =~# '@var\s\+'.object.'\s\+'.class_name_pattern
+ let classname_candidate = matchstr(line, '@var\s\+'.object.'\s\+\zs'.class_name_pattern.'\(\[\]\)\?')
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
+ break
+ endif
+ " in file lookup for /* @var Class $foo */
+ if line =~# '@var\s\+'.class_name_pattern.'\s\+'.object
+ let classname_candidate = matchstr(line, '@var\s\+\zs'.class_name_pattern.'\(\[\]\)\?\ze'.'\s\+'.object)
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
+ break
+ endif
+ endfor
+ endif
+
+ if classname_candidate != ''
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
+ " return absolute classname, without leading \
+ return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
+ endif
+ " scan the file backwards from the current line
+ let i = 1
+ for line in lines " {{{
+ " do in-file lookup of $var = new Class
+ if line =~# '^\s*'.object.'\s*=\s*new\s\+'.class_name_pattern && !object_is_array
+ let classname_candidate = matchstr(line, object.'\c\s*=\s*new\s*\zs'.class_name_pattern.'\ze')
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
+ break
+ endif
+
+ " in-file lookup for Class::getInstance()
+ if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*getInstance' && !object_is_array
+ let classname_candidate = matchstr(line, object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::\s*getInstance')
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
+ break
+ endif
+
+ " do in-file lookup for static method invocation of a built-in class, like: $d = DateTime::createFromFormat()
+ if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*$\?[a-zA-Z_0-9\x7f-\xff]\+'
+ let classname = matchstr(line, '^\s*'.object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::')
+ if has_key(a:imports, classname) && a:imports[classname].kind == 'c'
+ let classname = a:imports[classname].name
+ endif
+ if has_key(g:php_builtin_classes, tolower(classname))
+ let sub_methodstack = phpcomplete#GetMethodStack(matchstr(line, '^\s*'.object.'\s*=&\?\s*\s\+\zs.*'))
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname, '\', {}, sub_methodstack)
+ return classname_candidate
+ else
+ " try to get the class name from the static method's docblock
+ let [classname, namespace_for_class] = phpcomplete#ExpandClassName(classname, a:current_namespace, a:imports)
+ let sub_methodstack = phpcomplete#GetMethodStack(matchstr(line, '^\s*'.object.'\s*=&\?\s*\s\+\zs.*'))
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(
+ \ classname,
+ \ namespace_for_class,
+ \ a:imports,
+ \ sub_methodstack)
+
+ return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
+ endif
+ endif
+
+ " function declaration line
+ if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
+ let function_lines = join(reverse(copy(lines)), " ")
+ " search for type hinted arguments
+ if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
+ let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
+ let args = split(f_args, '\s*\zs,\ze\s*')
+ for arg in args
+ if arg =~# object.'\(,\|$\)'
+ let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
+ break
+ endif
+ endfor
+ if classname_candidate != ''
+ break
+ endif
+ endif
+
+ " search for docblock for the function
+ let match_line = substitute(line, '\\', '\\\\', 'g')
+ let sccontent = getline(0, a:start_line - i)
+ let doc_str = phpcomplete#GetDocBlock(sccontent, match_line)
+ if doc_str != ''
+ let docblock = phpcomplete#ParseDocBlock(doc_str)
+ for param in docblock.params
+ if param.name =~? object
+ let classname_candidate = matchstr(param.type, class_name_pattern.'\(\[\]\)\?')
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
+ break
+ endif
+ endfor
+ if classname_candidate != ''
+ break
+ endif
+ endif
+ endif
+
+ " assignment for the variable in question with a variable on the right hand side
+ if line =~# '^\s*'.object.'\s*=&\?\s\+\(clone\)\?\s*'.variable_name_pattern
+
+ " try to find the next non-comment or string ";" char
+ let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
+ let filelines = reverse(copy(lines))
+ let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
+ let chars_read = 1
+ let last_pos = pos
+ " function_boundary == 0 if we are not in a function
+ let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
+ " read while end of the file
+ while char != 'EOF' && chars_read < 1000
+ let last_pos = pos
+ let [pos, char] = s:getNextCharWithPos(filelines, pos)
+ let chars_read += 1
+ " we got a candidate
+ if char == ';'
+ " pos values is relative to the function's lines,
+ " line 0 need to be offsetted with the line number
+ " where te function was started to get the line number
+ " in real buffer terms
+ let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
+ " it's not a comment or string, end search
+ if synIDName !~? 'comment\|string'
+ break
+ endif
+ endif
+ endwhile
+
+ let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
+ if prev_context == ''
+ " cannot get previous context give up
+ return
+ endif
+ let prev_class = phpcomplete#GetClassName(a:start_line - i, prev_context, a:current_namespace, a:imports)
+
+ if stridx(prev_class, '\') != -1
+ let classname_parts = split(prev_class, '\\\+')
+ let classname_candidate = classname_parts[-1]
+ let class_candidate_namespace = join(classname_parts[0:-2], '\')
+ else
+ let classname_candidate = prev_class
+ let class_candidate_namespace = '\'
+ endif
+ break
+ endif
+
+ " assignment for the variable in question with a function on the right hand side
+ if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
+ " try to find the next non-comment or string ";" char
+ let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
+ let filelines = reverse(copy(lines))
+ let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
+ let chars_read = 1
+ let last_pos = pos
+ " function_boundary == 0 if we are not in a function
+ let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
+ " read while end of the file
+ while char != 'EOF' && chars_read < 1000
+ let last_pos = pos
+ let [pos, char] = s:getNextCharWithPos(filelines, pos)
+ let chars_read += 1
+ " we got a candidate
+ if char == ';'
+ " pos values is relative to the function's lines,
+ " line 0 need to be offsetted with the line number
+ " where te function was started to get the line number
+ " in real buffer terms
+ let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
+ " it's not a comment or string, end search
+ if synIDName !~? 'comment\|string'
+ break
+ endif
+ endif
+ endwhile
+
+ let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
+ if prev_context == ''
+ " cannot get previous context give up
+ return
+ endif
+
+ let function_name = matchstr(prev_context, '^'.function_invocation_pattern.'\ze')
+ let function_name = matchstr(function_name, '^\zs.\+\ze\s*($') " strip the trailing (
+ let [function_name, function_namespace] = phpcomplete#ExpandClassName(function_name, a:current_namespace, a:imports)
+
+ let function_file = phpcomplete#GetFunctionLocation(function_name, function_namespace)
+ if function_file == ''
+ let function_file = phpcomplete#GetFunctionLocation(function_name, '\')
+ endif
+
+ if function_file == 'VIMPHP_BUILTINFUNCTION'
+ " built in function, grab the return type from the info string
+ let return_type = matchstr(g:php_builtin_functions[function_name.'('], '\v\|\s+\zs.+$')
+ let classname_candidate = return_type
+ let class_candidate_namespace = '\'
+ break
+ elseif function_file != '' && filereadable(function_file)
+ let file_lines = readfile(function_file)
+ let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
+ let return_type_hint = phpcomplete#GetFunctionReturnTypeHint(file_lines, 'function\s*&\?'.function_name.'\>')
+ let docblock = phpcomplete#ParseDocBlock(docblock_str)
+ let type = has_key(docblock.return, 'type') ? docblock.return.type : return_type_hint
+ if type != ''
+ let classname_candidate = type
+ let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
+ " try to expand the classname of the returned type with the context got from the function's source file
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
+ break
+ endif
+ endif
+ endif
+
+ " foreach with the variable in question
+ if line =~? 'foreach\s*(.\{-}\s\+'.object.'\s*)'
+ let sub_context = matchstr(line, 'foreach\s*(\s*\zs.\{-}\ze\s\+as')
+ let prev_class = phpcomplete#GetClassName(a:start_line - i, sub_context, a:current_namespace, a:imports)
+
+ " the iterated expression should return an array type
+ if prev_class =~ '\[\]$'
+ let prev_class = matchstr(prev_class, '\v^[^[]+')
+ else
+ return
+ endif
+
+ if stridx(prev_class, '\') != -1
+ let classname_parts = split(prev_class, '\\\+')
+ let classname_candidate = classname_parts[-1]
+ let class_candidate_namespace = join(classname_parts[0:-2], '\')
+ else
+ let classname_candidate = prev_class
+ let class_candidate_namespace = '\'
+ endif
+ break
+ endif
+
+ " catch clause with the variable in question
+ if line =~? 'catch\s*(\zs'.class_name_pattern.'\ze\s\+'.object
+ let classname = matchstr(line, 'catch\s*(\zs'.class_name_pattern.'\ze\s\+'.object)
+ if stridx(classname, '\') != -1
+ let classname_parts = split(classname, '\\\+')
+ let classname_candidate = classname_parts[-1]
+ let class_candidate_namespace = join(classname_parts[0:-2], '\')
+ else
+ let classname_candidate = classname
+ let class_candidate_namespace = '\'
+ endif
+ break
+ endif
+
+ let i += 1
+ endfor " }}}
+
+ if classname_candidate != ''
+ let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
+ " return absolute classname, without leading \
+ return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
+ endif
+
+ " OK, first way failed, now check tags file(s)
+ " This method is useless when local variables are not indexed by ctags and
+ " pretty inaccurate even if it is
+ if g:phpcomplete_search_tags_for_variables
+ let tags = phpcomplete#GetTaglist('^'.substitute(object, '^\$', '', ''))
+ if len(tags) == 0
+ return
+ else
+ for tag in tags
+ if tag.kind ==? 'v' && tag.cmd =~? '=\s*new\s\+\zs'.class_name_pattern.'\ze'
+ let classname = matchstr(tag.cmd, '=\s*new\s\+\zs'.class_name_pattern.'\ze')
+ " unescape the classname, it would have "\" doubled since it is an ex command
+ let classname = substitute(classname, '\\\(\_.\)', '\1', 'g')
+ return classname
+ endif
+ endfor
+ endif
+ endif
+ endif
+endfunction
+" }}}
+
+function! phpcomplete#GetClassLocation(classname, namespace) " {{{
+ " Check classname may be name of built in object
+ if has_key(g:php_builtin_classes, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
+ return 'VIMPHP_BUILTINOBJECT'
+ endif
+ if has_key(g:php_builtin_interfaces, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
+ return 'VIMPHP_BUILTINOBJECT'
+ endif
+
+ if a:namespace == '' || a:namespace == '\'
+ let search_namespace = '\'
+ else
+ let search_namespace = tolower(a:namespace)
+ endif
+ let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
+
+ " do in-file lookup for class definition
+ let i = 1
+ while i < line('.')
+ let line = getline(line('.')-i)
+ if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\|{\)' && tolower(current_namespace) == search_namespace
+ return expand('%:p')
+ else
+ let i += 1
+ continue
+ endif
+ endwhile
+
+ " Get class location from tags
+ let no_namespace_candidate = ''
+ let tags = phpcomplete#GetTaglist('^'.a:classname.'$')
+ for tag in tags
+ " We'll allow interfaces and traits to be handled classes since you
+ " can't have colliding names with different kinds anyway
+ if tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't'
+ if !has_key(tag, 'namespace')
+ let no_namespace_candidate = tag.filename
+ else
+ if search_namespace == tolower(tag.namespace)
+ return tag.filename
+ endif
+ endif
+ endif
+ endfor
+ if no_namespace_candidate != ''
+ return no_namespace_candidate
+ endif
+
+ return ''
+endfunction
+" }}}
+
+function! phpcomplete#GetFunctionLocation(function_name, namespace) " {{{
+ " builtin functions doesn't need explicit \ in front of them even in namespaces,
+ " aliased built-in function names are not handled
+ if has_key(g:php_builtin_functions, a:function_name.'(')
+ return 'VIMPHP_BUILTINFUNCTION'
+ endif
+
+
+ " do in-file lookup for function definition
+ let i = 1
+ let buffer_lines = getline(1, line('$'))
+ for line in buffer_lines
+ if line =~? '^\s*function\s\+&\?'.a:function_name.'\s*('
+ return expand('%:p')
+ endif
+ endfor
+
+
+ if a:namespace == '' || a:namespace == '\'
+ let search_namespace = '\'
+ else
+ let search_namespace = tolower(a:namespace)
+ endif
+ let no_namespace_candidate = ''
+ let tags = phpcomplete#GetTaglist('\c^'.a:function_name.'$')
+
+ for tag in tags
+ if tag.kind == 'f'
+ if !has_key(tag, 'namespace')
+ let no_namespace_candidate = tag.filename
+ else
+ if search_namespace == tolower(tag.namespace)
+ return tag.filename
+ endif
+ endif
+ endif
+ endfor
+ if no_namespace_candidate != ''
+ return no_namespace_candidate
+ endif
+
+ return ''
+endfunction
+" }}}
+
+function! phpcomplete#GetCachedClassContents(classlocation, class_name) " {{{
+ let full_file_path = fnamemodify(a:classlocation, ':p')
+ let cache_key = full_file_path.'#'.a:class_name.'#'.getftime(full_file_path)
+
+ " try to read from the cache first
+ if has_key(s:cache_classstructures, cache_key)
+ let classcontents = s:cache_classstructures[cache_key]
+ " cached class contents can contain content from multiple files (superclasses) so we have to
+ " validate cached result's validness by the filemtimes used to create the cached value
+ let valid = 1
+ for classstructure in classcontents
+ if getftime(classstructure.file) != classstructure.mtime
+ let valid = 0
+ " we could break here, but the time required for checking probably worth
+ " the the memory we can free by checking every file in the cached hierarchy
+ call phpcomplete#ClearCachedClassContents(classstructure.file)
+ endif
+ endfor
+
+ if valid
+ " cache hit, we found an entry for this file + class pair and every
+ " file in the response is also valid
+ return classcontents
+ else
+ " clear the outdated cached value from the cache store
+ call remove(s:cache_classstructures, cache_key)
+ call phpcomplete#ClearCachedClassContents(full_file_path)
+
+ " fall through for the read from files path
+ endif
+ else
+ call phpcomplete#ClearCachedClassContents(full_file_path)
+ endif
+
+ " cache miss, fetch the content from the files itself
+ let classfile = readfile(a:classlocation)
+ let classcontents = phpcomplete#GetClassContentsStructure(full_file_path, classfile, a:class_name)
+ let s:cache_classstructures[cache_key] = classcontents
+
+ return classcontents
+endfunction " }}}
+
+function! phpcomplete#ClearCachedClassContents(full_file_path) " {{{
+ for [cache_key, cached_value] in items(s:cache_classstructures)
+ if stridx(cache_key, a:full_file_path.'#') == 0
+ call remove(s:cache_classstructures, cache_key)
+ endif
+ endfor
+endfunction " }}}
+
+function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_name) " {{{
+ " returns dictionary containing content, namespace and imports for the class and all parent classes.
+ " Example:
+ " [
+ " {
+ " class: 'foo',
+ " content: '... class foo extends bar ... ',
+ " namespace: 'NS\Foo',
+ " imports : { ... },
+ " file: '/foo.php',
+ " mtime: 42,
+ " },
+ " {
+ " class: 'bar',
+ " content: '... class bar extends baz ... ',
+ " namespace: 'NS\Bar',
+ " imports : { ... }
+ " file: '/bar.php',
+ " mtime: 42,
+ " },
+ " ...
+ " ]
+ "
+ let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
+ let full_file_path = fnamemodify(a:file_path, ':p')
+ let result = []
+ let popup_id = popup_create(a:file_lines, {'hidden': v:true})
+
+ call win_execute(popup_id, 'call search(''\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)'')')
+ call win_execute(popup_id, "let cfline = line('.')")
+ call win_execute(popup_id, "call search('{')")
+ call win_execute(popup_id, "let endline = line('.')")
+
+ call win_execute(popup_id, 'let content = join(getline('.cfline.', '.endline.'), "\n")')
+ " Catch extends
+ if content =~? 'extends'
+ let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
+ let extended_classes = map(split(extends_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
+ else
+ let extended_classes = ''
+ endif
+
+ " Catch implements
+ if content =~? 'implements'
+ let implements_string = matchstr(content, 'class\_s\+'.a:class_name.'\_.\+implements\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze')
+ let implemented_interfaces = map(split(implements_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
+ else
+ let implemented_interfaces = []
+ endif
+
+ call win_execute(popup_id, 'let [class_closing_bracket_line, class_closing_bracket_col] = searchpairpos("{", "", "}", "W")')
+
+ " Include class docblock
+ let doc_line = cfline - 1
+ call win_execute(popup_id, 'let l = getline('.doc_line.')')
+ if l =~? '^\s*\*/'
+ while doc_line != 0
+ call win_execute(popup_id, 'let l = getline('.doc_line.')')
+ if l =~? '^\s*/\*\*'
+ let cfline = doc_line
+ break
+ endif
+ let doc_line -= 1
+ endwhile
+ endif
+
+ call win_execute(popup_id, 'let classcontent = join(getline('.cfline.', '.class_closing_bracket_line.'), "\n")')
+
+ let used_traits = []
+ " move back to the line next to the class's definition
+ call win_execute(popup_id, 'call cursor('.(endline + 1).', 1)')
+ let keep_searching = 1
+ while keep_searching != 0
+ " try to grab "use..." keywords
+ call win_execute(popup_id, 'let [lnum, col] = searchpos(''\c^\s\+use\s\+'.class_name_pattern.''', "cW", '.class_closing_bracket_line.')')
+ call win_execute(popup_id, 'let syn_name = synIDattr(synID('.lnum.', '.col.', 0), "name")')
+ if syn_name =~? 'string\|comment'
+ call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
+ continue
+ endif
+
+ call win_execute(popup_id, 'let trait_line = getline('.lnum.')')
+ if trait_line !~? ';'
+ " try to find the next line containing ';'
+ let l = lnum
+ let search_line = trait_line
+
+ " add lines from the file until there's no ';' in them
+ while search_line !~? ';' && l > 0
+ " file lines are reversed so we need to go backwards
+ let l += 1
+ call win_execute(popup_id, 'let search_line = getline('.l.')')
+ let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
+ endwhile
+ endif
+ let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
+ let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
+ let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
+ call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
+
+ if [lnum, col] == [0, 0]
+ let keep_searching = 0
+ endif
+ endwhile
+
+ call popup_close(popup_id)
+
+ let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
+ call add(result, {
+ \ 'class': a:class_name,
+ \ 'content': classcontent,
+ \ 'namespace': current_namespace,
+ \ 'imports': imports,
+ \ 'file': full_file_path,
+ \ 'mtime': getftime(full_file_path),
+ \ })
+
+ let all_extends = used_traits
+ if len(extended_classes) > 0
+ call extend(all_extends, extended_classes)
+ endif
+ if len(implemented_interfaces) > 0
+ call extend(all_extends, implemented_interfaces)
+ endif
+ if len(all_extends) > 0
+ for class in all_extends
+ let [class, namespace] = phpcomplete#ExpandClassName(class, current_namespace, imports)
+ if namespace == ''
+ let namespace = '\'
+ endif
+ let classlocation = phpcomplete#GetClassLocation(class, namespace)
+ if classlocation == "VIMPHP_BUILTINOBJECT"
+ if has_key(g:php_builtin_classes, tolower(class))
+ let result += [phpcomplete#GenerateBuiltinClassStub('class', g:php_builtin_classes[tolower(class)])]
+ endif
+ if has_key(g:php_builtin_interfaces, tolower(class))
+ let result += [phpcomplete#GenerateBuiltinClassStub('interface', g:php_builtin_interfaces[tolower(class)])]
+ endif
+ elseif classlocation != '' && filereadable(classlocation)
+ let full_file_path = fnamemodify(classlocation, ':p')
+ let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
+ elseif tolower(current_namespace) == tolower(namespace) && match(join(a:file_lines, "\n"), '\c\(class\|interface\|trait\)\_s\+'.class.'\(\>\|$\)') != -1
+ " try to find the declaration in the same file.
+ let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
+ endif
+ endfor
+ endif
+
+ return result
+endfunction
+" }}}
+
+function! phpcomplete#GetClassContents(classlocation, class_name) " {{{
+ let classcontents = phpcomplete#GetCachedClassContents(a:classlocation, a:class_name)
+ let result = []
+ for classstructure in classcontents
+ call add(result, classstructure.content)
+ endfor
+ return join(result, "\n")
+endfunction
+" }}}
+
+function! phpcomplete#GenerateBuiltinClassStub(type, class_info) " {{{
+ let re = a:type.' '.a:class_info['name']." {"
+ if has_key(a:class_info, 'constants')
+ for [name, initializer] in items(a:class_info.constants)
+ let re .= "\n\tconst ".name." = ".initializer.";"
+ endfor
+ endif
+ if has_key(a:class_info, 'properties')
+ for [name, info] in items(a:class_info.properties)
+ let re .= "\n\t// @var $".name." ".info.type
+ let re .= "\n\tpublic $".name.";"
+ endfor
+ endif
+ if has_key(a:class_info, 'static_properties')
+ for [name, info] in items(a:class_info.static_properties)
+ let re .= "\n\t// @var ".name." ".info.type
+ let re .= "\n\tpublic static ".name." = ".info.initializer.";"
+ endfor
+ endif
+ if has_key(a:class_info, 'methods')
+ for [name, info] in items(a:class_info.methods)
+ if name =~ '^__'
+ continue
+ endif
+ let re .= "\n\t/**"
+ let re .= "\n\t * ".name
+ let re .= "\n\t *"
+ let re .= "\n\t * @return ".info.return_type
+ let re .= "\n\t */"
+ let re .= "\n\tpublic function ".name."(".info.signature."){"
+ let re .= "\n\t}"
+ endfor
+ endif
+ if has_key(a:class_info, 'static_methods')
+ for [name, info] in items(a:class_info.static_methods)
+ let re .= "\n\t/**"
+ let re .= "\n\t * ".name
+ let re .= "\n\t *"
+ let re .= "\n\t * @return ".info.return_type
+ let re .= "\n\t */"
+ let re .= "\n\tpublic static function ".name."(".info.signature."){"
+ let re .= "\n\t}"
+ endfor
+ endif
+ let re .= "\n}"
+
+ return { a:type : a:class_info['name'],
+ \ 'content': re,
+ \ 'namespace': '',
+ \ 'imports': {},
+ \ 'file': 'VIMPHP_BUILTINOBJECT',
+ \ 'mtime': 0,
+ \ }
+endfunction " }}}
+
+function! phpcomplete#GetDocBlock(sccontent, search) " {{{
+ let i = 0
+ let l = 0
+ let comment_start = -1
+ let comment_end = -1
+ let sccontent_len = len(a:sccontent)
+
+ while (i < sccontent_len)
+ let line = a:sccontent[i]
+ " search for a function declaration
+ if line =~? a:search
+ if line =~? '@property'
+ let doc_line = i
+ while doc_line != sccontent_len - 1
+ if a:sccontent[doc_line] =~? '^\s*\*/'
+ let l = doc_line
+ break
+ endif
+ let doc_line += 1
+ endwhile
+ else
+ let l = i - 1
+ endif
+ " start backward search for the comment block
+ while l != 0
+ let line = a:sccontent[l]
+ " if it's a one line docblock like comment and we can just return it right away
+ if line =~? '^\s*\/\*\*.\+\*\/\s*$'
+ return substitute(line, '\v^\s*(\/\*\*\s*)|(\s*\*\/)\s*$', '', 'g')
+ "... or if comment end found save line position and end search
+ elseif line =~? '^\s*\*/'
+ let comment_end = l
+ break
+ " ... or the line doesn't blank (only whitespace or nothing) end search
+ elseif line !~? '^\s*$'
+ break
+ endif
+ let l -= 1
+ endwhile
+ " no comment found
+ if comment_end == -1
+ return ''
+ end
+
+ while l >= 0
+ let line = a:sccontent[l]
+ if line =~? '^\s*/\*\*'
+ let comment_start = l
+ break
+ endif
+ let l -= 1
+ endwhile
+
+ " no docblock comment start found
+ if comment_start == -1
+ return ''
+ end
+
+ let comment_start += 1 " we dont need the /**
+ let comment_end -= 1 " we dont need the */
+
+ " remove leading whitespace and '*'s
+ let docblock = join(map(copy(a:sccontent[comment_start :comment_end]), 'substitute(v:val, "^\\s*\\*\\s*", "", "")'), "\n")
+ return docblock
+ endif
+ let i += 1
+ endwhile
+ return ''
+endfunction
+" }}}
+
+function! phpcomplete#ParseDocBlock(docblock) " {{{
+ let res = {
+ \ 'description': '',
+ \ 'params': [],
+ \ 'return': {},
+ \ 'throws': [],
+ \ 'var': {},
+ \ 'properties': [],
+ \ }
+
+ let res.description = substitute(matchstr(a:docblock, '\zs\_.\{-}\ze\(@type\|@var\|@param\|@return\|$\)'), '\(^\_s*\|\_s*$\)', '', 'g')
+ let docblock_lines = split(a:docblock, "\n")
+
+ let param_lines = filter(copy(docblock_lines), 'v:val =~? "^@param"')
+ for param_line in param_lines
+ let parts = matchlist(param_line, '@param\s\+\(\S\+\)\s\+\(\S\+\)\s*\(.*\)')
+ if len(parts) > 0
+ call add(res.params, {
+ \ 'line': parts[0],
+ \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 1, '')),
+ \ 'name': get(parts, 2, ''),
+ \ 'description': get(parts, 3, '')})
+ endif
+ endfor
+
+ let return_line = filter(copy(docblock_lines), 'v:val =~? "^@return"')
+ if len(return_line) > 0
+ let return_parts = matchlist(return_line[0], '@return\s\+\(\S\+\)\s*\(.*\)')
+ let res['return'] = {
+ \ 'line': return_parts[0],
+ \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(return_parts, 1, '')),
+ \ 'description': get(return_parts, 2, '')}
+ endif
+
+ let exception_lines = filter(copy(docblock_lines), 'v:val =~? "^\\(@throws\\|@exception\\)"')
+ for exception_line in exception_lines
+ let parts = matchlist(exception_line, '^\(@throws\|@exception\)\s\+\(\S\+\)\s*\(.*\)')
+ if len(parts) > 0
+ call add(res.throws, {
+ \ 'line': parts[0],
+ \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 2, '')),
+ \ 'description': get(parts, 3, '')})
+ endif
+ endfor
+
+ let var_line = filter(copy(docblock_lines), 'v:val =~? "^\\(@var\\|@type\\)"')
+ if len(var_line) > 0
+ let var_parts = matchlist(var_line[0], '\(@var\|@type\)\s\+\(\S\+\)\s*\(.*\)')
+ let res['var'] = {
+ \ 'line': var_parts[0],
+ \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(var_parts, 2, '')),
+ \ 'description': get(var_parts, 3, '')}
+ endif
+
+ let property_lines = filter(copy(docblock_lines), 'v:val =~? "^@property"')
+ for property_line in property_lines
+ let parts = matchlist(property_line, '\(@property\)\s\+\(\S\+\)\s*\(.*\)')
+ if len(parts) > 0
+ call add(res.properties, {
+ \ 'line': parts[0],
+ \ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 2, '')),
+ \ 'description': get(parts, 3, '')})
+ endif
+ endfor
+
+ return res
+endfunction
+" }}}
+
+function! phpcomplete#GetFunctionReturnTypeHint(sccontent, search)
+ let i = 0
+ let l = 0
+ let function_line_start = -1
+ let function_line_end = -1
+ let sccontent_len = len(a:sccontent)
+ let return_type = ''
+
+ while (i < sccontent_len)
+ let line = a:sccontent[i]
+ " search for a function declaration
+ if line =~? a:search
+ let l = i
+ let function_line_start = i
+ " now search for the first { where the function body starts
+ while l < sccontent_len
+ let line = a:sccontent[l]
+ if line =~? '\V{'
+ let function_line_end = l
+ break
+ endif
+ let l += 1
+ endwhile
+ break
+ endif
+ let i += 1
+ endwhile
+
+ " now grab the lines that holds the function declaration line
+ if function_line_start != -1 && function_line_end != -1
+ let function_line = join(a:sccontent[function_line_start :function_line_end], " ")
+ let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
+ let return_type = matchstr(function_line, '\c\s*:\s*\zs'.class_name_pattern.'\ze\s*{')
+ endif
+ return return_type
+
+endfunction
+
+function! phpcomplete#GetTypeFromDocBlockParam(docblock_type) " {{{
+ if a:docblock_type !~ '|'
+ return a:docblock_type
+ endif
+
+ let primitive_types = [
+ \ 'string', 'float', 'double', 'int',
+ \ 'scalar', 'array', 'bool', 'void', 'mixed',
+ \ 'null', 'callable', 'resource', 'object']
+
+ " add array of primitives to the list too, like string[]
+ let primitive_types += map(copy(primitive_types), 'v:val."[]"')
+ let types = split(a:docblock_type, '|')
+ for type in types
+ if index(primitive_types, type) == -1
+ return type
+ endif
+ endfor
+
+ " only primitive types found, return the first one
+ return types[0]
+
+endfunction
+" }}}
+
+function! phpcomplete#FormatDocBlock(info) " {{{
+ let res = ''
+ if len(a:info.description)
+ let res .= "Description:\n".join(map(split(a:info['description'], "\n"), '"\t".v:val'), "\n")."\n"
+ endif
+
+ if len(a:info.params)
+ let res .= "\nArguments:\n"
+ for arginfo in a:info.params
+ let res .= "\t".arginfo['name'].' '.arginfo['type']
+ if len(arginfo.description) > 0
+ let res .= ': '.arginfo['description']
+ endif
+ let res .= "\n"
+ endfor
+ endif
+
+ if has_key(a:info.return, 'type')
+ let res .= "\nReturn:\n\t".a:info['return']['type']
+ if len(a:info.return.description) > 0
+ let res .= ": ".a:info['return']['description']
+ endif
+ let res .= "\n"
+ endif
+
+ if len(a:info.throws)
+ let res .= "\nThrows:\n"
+ for excinfo in a:info.throws
+ let res .= "\t".excinfo['type']
+ if len(excinfo['description']) > 0
+ let res .= ": ".excinfo['description']
+ endif
+ let res .= "\n"
+ endfor
+ endif
+
+ if has_key(a:info.var, 'type')
+ let res .= "Type:\n\t".a:info['var']['type']."\n"
+ if len(a:info['var']['description']) > 0
+ let res .= ': '.a:info['var']['description']
+ endif
+ endif
+
+ return res
+endfunction
+" }}}
+
+function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
+ let popup_id = popup_create(a:file_lines, {'hidden': v:true})
+ call win_execute(popup_id, 'normal! G')
+
+ " clear out classes, functions and other blocks
+ while 1
+ call win_execute(popup_id, 'let block_start_pos = searchpos(''\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{'', "Web")')
+ if block_start_pos == [0, 0]
+ break
+ endif
+ call win_execute(popup_id, 'let block_end_pos = searchpairpos("{", "", ''}\|\%$'', "W", ''synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'')')
+
+ let popup_lines = winbufnr(popup_id)->getbufline(1, '$')
+ if block_end_pos != [0, 0]
+ " end of the block found, just delete it
+ call remove(popup_lines, block_start_pos[0] - 1, block_end_pos[0] - 1)
+ else
+ " block pair not found, use block start as beginning and the end
+ " of the buffer instead
+ call remove(popup_lines, block_start_pos[0] - 1, -1)
+ endif
+ call popup_settext(popup_id, popup_lines)
+ endwhile
+ call win_execute(popup_id, 'normal! G', 'silent!')
+
+ " grab the remains
+ call win_execute(popup_id, "let file_lines = reverse(getline(1, line('.')-1))")
+ call popup_close(popup_id)
+
+ let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
+ let i = 0
+ let file_length = len(file_lines)
+ let imports = {}
+ let current_namespace = '\'
+
+ while i < file_length
+ let line = file_lines[i]
+
+ if line =~? '^\(<?php\)\?\s*namespace\s*'.namespace_name_pattern
+ let current_namespace = matchstr(line, '\c^\(<?php\)\?\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
+ break
+ endif
+
+ if line =~? '^\s*use\>'
+ if line =~? ';'
+ let use_line = line
+ else
+ " try to find the next line containing ';'
+ let l = i
+ let search_line = line
+ let use_line = line
+
+ " add lines from the file until there's no ';' in them
+ while search_line !~? ';' && l > 0
+ " file lines are reversed so we need to go backwards
+ let l -= 1
+ let search_line = file_lines[l]
+ let use_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
+ endwhile
+ endif
+ let use_expression = matchstr(use_line, '^\c\s*use\s\+\zs.\{-}\ze;')
+ let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
+ for part in use_parts
+ if part =~? '\s\+as\s\+'
+ let [object, name] = split(part, '\s\+as\s\+\c')
+ let object = substitute(object, '^\\', '', '')
+ let name = substitute(name, '^\\', '', '')
+ else
+ let object = part
+ let name = part
+ let object = substitute(object, '^\\', '', '')
+ let name = substitute(name, '^\\', '', '')
+ if name =~? '\\'
+ let name = matchstr(name, '\\\zs[^\\]\+\ze$')
+ endif
+ endif
+
+ " leading slash is not required use imports are always absolute
+ let imports[name] = {'name': object, 'kind': ''}
+ endfor
+
+ " find kind flags from tags or built in methods for the objects we extracted
+ " they can be either classes, interfaces or namespaces, no other thing is importable in php
+ for [key, import] in items(imports)
+ " if there's a \ in the name we have it's definitely not a built in thing, look for tags
+ if import.name =~ '\\'
+ let patched_ctags_detected = 0
+ let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {})
+ let namespace_name_candidate = substitute(import.name, '\\', '\\\\', 'g')
+ " can be a namespace name as is, or can be a tagname at the end with a namespace
+ let tags = phpcomplete#GetTaglist('^\('.namespace_name_candidate.'\|'.classname.'\)$')
+ if len(tags) > 0
+ for tag in tags
+ " if there's a namespace with the name of the import
+ if tag.kind == 'n' && tag.name == import.name
+ call extend(import, tag)
+ let import['builtin'] = 0
+ let patched_ctags_detected = 1
+ break
+ endif
+ " if the name matches with the extracted classname and namespace
+ if (tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't') && tag.name == classname
+ if has_key(tag, 'namespace')
+ let patched_ctags_detected = 1
+ if tag.namespace == namespace_for_classes
+ call extend(import, tag)
+ let import['builtin'] = 0
+ break
+ endif
+ elseif !exists('no_namespace_candidate')
+ " save the first namespacless match to be used if no better
+ " candidate found later on
+ let tag.namespace = namespace_for_classes
+ let no_namespace_candidate = tag
+ endif
+ endif
+ endfor
+ " there were a namespacless class name match, if we think that the
+ " tags are not generated with patched ctags we will take it as a match
+ if exists('no_namespace_candidate') && !patched_ctags_detected
+ call extend(import, no_namespace_candidate)
+ let import['builtin'] = 0
+ endif
+ else
+ " if no tags are found, extract the namespace from the name
+ let ns = matchstr(import.name, '\c\zs[a-zA-Z0-9\\]\+\ze\\' . name)
+ if len(ns) > 0
+ let import['name'] = name
+ let import['namespace'] = ns
+ let import['builtin'] = 0
+ endif
+ endif
+ else
+ " if no \ in the name, it can be a built in class
+ if has_key(g:php_builtin_classnames, tolower(import.name))
+ let import['kind'] = 'c'
+ let import['builtin'] = 1
+ elseif has_key(g:php_builtin_interfacenames, tolower(import.name))
+ let import['kind'] = 'i'
+ let import['builtin'] = 1
+ else
+ " or can be a tag with exactly matching name
+ let tags = phpcomplete#GetTaglist('^'.import['name'].'$')
+ for tag in tags
+ " search for the first matching namespace, class, interface with no namespace
+ if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't')
+ call extend(import, tag)
+ let import['builtin'] = 0
+ break
+ endif
+ endfor
+ endif
+ endif
+ if exists('no_namespace_candidate')
+ unlet no_namespace_candidate
+ endif
+ endfor
+ endif
+ let i += 1
+ endwhile
+ let sorted_imports = {}
+ for name in sort(keys(imports))
+ let sorted_imports[name] = imports[name]
+ endfor
+ return [current_namespace, sorted_imports]
+endfunction
+" }}}
+
+function! phpcomplete#GetCurrentFunctionBoundaries() " {{{
+ let old_cursor_pos = [line('.'), col('.')]
+ let current_line_no = old_cursor_pos[0]
+ let function_pattern = '\c\(.*\%#\)\@!\_^\s*\zs\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\_.\{-}(\_.\{-})\_.\{-}{'
+
+ let func_start_pos = searchpos(function_pattern, 'Wbc')
+ if func_start_pos == [0, 0]
+ call cursor(old_cursor_pos[0], old_cursor_pos[1])
+ return 0
+ endif
+
+ " get the line where the function declaration actually started
+ call search('\cfunction\_.\{-}(\_.\{-})\_.\{-}{', 'Wce')
+
+ " get the position of the function block's closing "}"
+ let func_end_pos = searchpairpos('{', '', '}', 'W')
+ if func_end_pos == [0, 0]
+ " there is a function start but no end found, assume that we are in a
+ " function but the user did not typed the closing "}" yet and the
+ " function runs to the end of the file
+ let func_end_pos = [line('$'), len(getline(line('$')))]
+ endif
+
+ " Decho func_start_pos[0].' <= '.current_line_no.' && '.current_line_no.' <= '.func_end_pos[0]
+ if func_start_pos[0] <= current_line_no && current_line_no <= func_end_pos[0]
+ call cursor(old_cursor_pos[0], old_cursor_pos[1])
+ return [func_start_pos, func_end_pos]
+ endif
+
+ call cursor(old_cursor_pos[0], old_cursor_pos[1])
+ return 0
+endfunction
+" }}}
+
+function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
+ " if there's an imported class, just use that class's information
+ if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i' || a:imports[a:classname].kind == 't')
+ let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : ''
+ return [a:imports[a:classname].name, namespace]
+ endif
+
+ " try to find relative namespace in imports, imported names takes precedence over
+ " current namespace when resolving relative namespaced class names
+ if a:classname !~ '^\' && a:classname =~ '\\'
+ let classname_parts = split(a:classname, '\\\+')
+ if has_key(a:imports, classname_parts[0]) && a:imports[classname_parts[0]].kind == 'n'
+ let classname_parts[0] = a:imports[classname_parts[0]].name
+ let namespace = join(classname_parts[0:-2], '\')
+ let classname = classname_parts[-1]
+ return [classname, namespace]
+ endif
+ endif
+
+ " no imported class or namespace matched, expand with the current namespace
+ let namespace = ''
+ let classname = a:classname
+ " if the classname have namespaces in in or we are in a namespace
+ if a:classname =~ '\\' || (a:current_namespace != '\' && a:current_namespace != '')
+ " add current namespace to the a:classname
+ if a:classname !~ '^\'
+ let classname = a:current_namespace.'\'.substitute(a:classname, '^\\', '', '')
+ else
+ " remove leading \, tag files doesn't have those
+ let classname = substitute(a:classname, '^\\', '', '')
+ endif
+ " split classname to classname and namespace
+ let classname_parts = split(classname, '\\\+')
+ if len(classname_parts) > 1
+ let namespace = join(classname_parts[0:-2], '\')
+ let classname = classname_parts[-1]
+ endif
+ endif
+ return [classname, namespace]
+endfunction
+" }}}
+
+function! phpcomplete#LoadData() " {{{
+" Keywords/reserved words, all other special things
+" Later it is possible to add some help to values, or type of defined variable
+let g:php_keywords={'PHP_SELF':'','argv':'','argc':'','GATEWAY_INTERFACE':'','SERVER_ADDR':'','SERVER_NAME':'','SERVER_SOFTWARE':'','SERVER_PROTOCOL':'','REQUEST_METHOD':'','REQUEST_TIME':'','QUERY_STRING':'','DOCUMENT_ROOT':'','HTTP_ACCEPT':'','HTTP_ACCEPT_CHARSET':'','HTTP_ACCEPT_ENCODING':'','HTTP_ACCEPT_LANGUAGE':'','HTTP_CONNECTION':'','HTTP_POST':'','HTTP_REFERER':'','HTTP_USER_AGENT':'','HTTPS':'','REMOTE_ADDR':'','REMOTE_HOST':'','REMOTE_PORT':'','SCRIPT_FILENAME':'','SERVER_ADMIN':'','SERVER_PORT':'','SERVER_SIGNATURE':'','PATH_TRANSLATED':'','SCRIPT_NAME':'','REQUEST_URI':'','PHP_AUTH_DIGEST':'','PHP_AUTH_USER':'','PHP_AUTH_PW':'','AUTH_TYPE':'','and':'','or':'','xor':'','__FILE__':'','exception':'','__LINE__':'','as':'','break':'','case':'','class':'','const':'','continue':'','declare':'','default':'','do':'','echo':'','else':'','elseif':'','enddeclare':'','endfor':'','endforeach':'','endif':'','endswitch':'','endwhile':'','extends':'','for':'','foreach':'','function':'','global':'','if':'','new':'','static':'','switch':'','use':'','var':'','while':'','final':'','php_user_filter':'','interface':'','implements':'','public':'','private':'','protected':'','abstract':'','clone':'','try':'','catch':'','throw':'','cfunction':'','old_function':'','this':'','INI_USER': '','INI_PERDIR': '','INI_SYSTEM': '','INI_ALL': '','ABDAY_1': '','ABDAY_2': '','ABDAY_3': '','ABDAY_4': '','ABDAY_5': '','ABDAY_6': '','ABDAY_7': '','DAY_1': '','DAY_2': '','DAY_3': '','DAY_4': '','DAY_5': '','DAY_6': '','DAY_7': '','ABMON_1': '','ABMON_2': '','ABMON_3': '','ABMON_4': '','ABMON_5': '','ABMON_6': '','ABMON_7': '','ABMON_8': '','ABMON_9': '','ABMON_10': '','ABMON_11': '','ABMON_12': '','MON_1': '','MON_2': '','MON_3': '','MON_4': '','MON_5': '','MON_6': '','MON_7': '','MON_8': '','MON_9': '','MON_10': '','MON_11': '','MON_12': '','AM_STR': '','D_T_FMT': '','ALT_DIGITS': '',}
+" One giant hash of all built-in function, class, interface and constant grouped by extension
+let php_builtin = {'functions':{},'classes':{},'interfaces':{},'constants':{},}
+let php_builtin['functions']['math']={'abs(':'mixed $number | number','acos(':'float $arg | float','acosh(':'float $arg | float','asin(':'float $arg | float','asinh(':'float $arg | float','atan(':'float $arg | float','atan2(':'float $y, float $x | float','atanh(':'float $arg | float','base_convert(':'string $number, int $frombase, int $tobase | string','bindec(':'string $binary_string | number','ceil(':'float $value | float','cos(':'float $arg | float','cosh(':'float $arg | float','decbin(':'int $number | string','dechex(':'int $number | string','decoct(':'int $number | string','deg2rad(':'float $number | float','exp(':'float $arg | float','expm1(':'float $arg | float','floor(':'float $value | float','fmod(':'float $x, float $y | float','getrandmax(':'void | int','hexdec(':'string $hex_string | number','hypot(':'float $x, float $y | float','is_finite(':'float $val | bool','is_infinite(':'float $val | bool','is_nan(':'float $val | bool','lcg_value(':'void | float','log(':'float $arg [, float $base = M_E] | float','log10(':'float $arg | float','log1p(':'float $number | float','max(':'array $values | mixed','min(':'array $values | mixed','mt_getrandmax(':'void | int','mt_rand(':'void | int','mt_srand(':'[ int $seed] | void','octdec(':'string $octal_string | number','pi(':'void | float','pow(':'number $base, number $exp | number','rad2deg(':'float $number | float','rand(':'void | int','round(':'float $val [, int $precision = 0 [, int $mode = PHP_ROUND_HALF_UP]] | float','sin(':'float $arg | float','sinh(':'float $arg | float','sqrt(':'float $arg | float','srand(':'[ int $seed] | void','tan(':'float $arg | float','tanh(':'float $arg | float',}
+let php_builtin['functions']['strings']={'addcslashes(':'string $str, string $charlist | string','addslashes(':'string $str | string','bin2hex(':'string $str | string','chop(':'chop — Alias of rtrim()','chr(':'int $ascii | string','chunk_split(':'string $body [, int $chunklen = 76 [, string $end = "\r\n"]] | string','convert_cyr_string(':'string $str, string $from, string $to | string','convert_uudecode(':'string $data | string','convert_uuencode(':'string $data | string','count_chars(':'string $string [, int $mode = 0] | mixed','crc32(':'string $str | int','crypt(':'string $str [, string $salt] | string','echo(':'string $arg1 [, string $...] | void','explode(':'string $delimiter, string $string [, int $limit] | array','fprintf(':'resource $handle, string $format [, mixed $args [, mixed $...]] | int','get_html_translation_table(':'[ int $table = HTML_SPECIALCHARS [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'']]] | array','hebrev(':'string $hebrew_text [, int $max_chars_per_line = 0] | string','hebrevc(':'string $hebrew_text [, int $max_chars_per_line = 0] | string','hex2bin(':'string $data | string','html_entity_decode(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'']] | string','htmlentities(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'' [, bool $double_encode = true]]] | string','htmlspecialchars_decode(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401] | string','htmlspecialchars(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'' [, bool $double_encode = true]]] | string','implode(':'string $glue, array $pieces | string','join(':'join — Alias of implode()','lcfirst(':'string $str | string','levenshtein(':'string $str1, string $str2 | int','localeconv(':'void | array','ltrim(':'string $str [, string $character_mask] | string','md5_file(':'string $filename [, bool $raw_output = false] | string','md5(':'string $str [, bool $raw_output = false] | string','metaphone(':'string $str [, int $phonemes = 0] | string','money_format(':'string $format, float $number | string','nl_langinfo(':'int $item | string','nl2br(':'string $string [, bool $is_xhtml = true] | string','number_format(':'float $number [, int $decimals = 0] | string','ord(':'string $string | int','parse_str(':'string $str [, array &$arr] | void','print(':'string $arg | int','printf(':'string $format [, mixed $args [, mixed $...]] | int','quoted_printable_decode(':'string $str | string','quoted_printable_encode(':'string $str | string','quotemeta(':'string $str | string','rtrim(':'string $str [, string $character_mask] | string','setlocale(':'int $category, string $locale [, string $...] | string','sha1_file(':'string $filename [, bool $raw_output = false] | string','sha1(':'string $str [, bool $raw_output = false] | string','similar_text(':'string $first, string $second [, float &$percent] | int','soundex(':'string $str | string','sprintf(':'string $format [, mixed $args [, mixed $...]] | string','sscanf(':'string $str, string $format [, mixed &$...] | mixed','str_getcsv(':'string $input [, string $delimiter = '','' [, string $enclosure = ''"'' [, string $escape = ''\\'']]] | array','str_ireplace(':'mixed $search, mixed $replace, mixed $subject [, int &$count] | mixed','str_pad(':'string $input, int $pad_length [, string $pad_string = " " [, int $pad_type = STR_PAD_RIGHT]] | string','str_repeat(':'string $input, int $multiplier | string','str_replace(':'mixed $search, mixed $replace, mixed $subject [, int &$count] | mixed','str_rot13(':'string $str | string','str_shuffle(':'string $str | string','str_split(':'string $string [, int $split_length = 1] | array','str_word_count(':'string $string [, int $format = 0 [, string $charlist]] | mixed','strcasecmp(':'string $str1, string $str2 | int','strchr(':'strchr — Alias of strstr()','strcmp(':'string $str1, string $str2 | int','strcoll(':'string $str1, string $str2 | int','strcspn(':'string $str1, string $str2 [, int $start [, int $length]] | int','strip_tags(':'string $str [, string $allowable_tags] | string','stripcslashes(':'string $str | string','stripos(':'string $haystack, string $needle [, int $offset = 0] | int','stripslashes(':'string $str | string','stristr(':'string $haystack, mixed $needle [, bool $before_needle = false] | string','strlen(':'string $string | int','strnatcasecmp(':'string $str1, string $str2 | int','strnatcmp(':'string $str1, string $str2 | int','strncasecmp(':'string $str1, string $str2, int $len | int','strncmp(':'string $str1, string $str2, int $len | int','strpbrk(':'string $haystack, string $char_list | string','strpos(':'string $haystack, mixed $needle [, int $offset = 0] | mixed','strrchr(':'string $haystack, mixed $needle | string','strrev(':'string $string | string','strripos(':'string $haystack, string $needle [, int $offset = 0] | int','strrpos(':'string $haystack, string $needle [, int $offset = 0] | int','strspn(':'string $subject, string $mask [, int $start [, int $length]] | int','strstr(':'string $haystack, mixed $needle [, bool $before_needle = false] | string','strtok(':'string $str, string $token | string','strtolower(':'string $str | string','strtoupper(':'string $string | string','strtr(':'string $str, string $from, string $to | string','substr_compare(':'string $main_str, string $str, int $offset [, int $length [, bool $case_insensitivity = false]] | int','substr_count(':'string $haystack, string $needle [, int $offset = 0 [, int $length]] | int','substr_replace(':'mixed $string, mixed $replacement, mixed $start [, mixed $length] | mixed','substr(':'string $string, int $start [, int $length] | string','trim(':'string $str [, string $character_mask = " \t\n\r\0\x0B"] | string','ucfirst(':'string $str | string','ucwords(':'string $str | string','vfprintf(':'resource $handle, string $format, array $args | int','vprintf(':'string $format, array $args | int','vsprintf(':'string $format, array $args | string','wordwrap(':'string $str [, int $width = 75 [, string $break = "\n" [, bool $cut = false]]] | string',}
+let php_builtin['functions']['apache']={'apache_child_terminate(':'void | bool','apache_get_modules(':'void | array','apache_get_version(':'void | string','apache_getenv(':'string $variable [, bool $walk_to_top = false] | string','apache_lookup_uri(':'string $filename | object','apache_note(':'string $note_name [, string $note_value = ""] | string','apache_request_headers(':'void | array','apache_reset_timeout(':'void | bool','apache_response_headers(':'void | array','apache_setenv(':'string $variable, string $value [, bool $walk_to_top = false] | bool','getallheaders(':'void | array','virtual(':'string $filename | bool',}
+let php_builtin['functions']['arrays']={'array_change_key_case(':'array $array [, int $case = CASE_LOWER] | array','array_chunk(':'array $array, int $size [, bool $preserve_keys = false] | array','array_column(':'array $array, mixed $column_key [, mixed $index_key = null] | array','array_combine(':'array $keys, array $values | array','array_count_values(':'array $array | array','array_diff_assoc(':'array $array1, array $array2 [, array $...] | array','array_diff_key(':'array $array1, array $array2 [, array $...] | array','array_diff_uassoc(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff_ukey(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff(':'array $array1, array $array2 [, array $...] | array','array_fill_keys(':'array $keys, mixed $value | array','array_fill(':'int $start_index, int $num, mixed $value | array','array_filter(':'array $array [, callable $callback] | array','array_flip(':'array $array | array','array_intersect_assoc(':'array $array1, array $array2 [, array $...] | array','array_intersect_key(':'array $array1, array $array2 [, array $...] | array','array_intersect_uassoc(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_intersect_ukey(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_intersect(':'array $array1, array $array2 [, array $...] | array','array_key_exists(':'mixed $key, array $array | bool','array_keys(':'array $array [, mixed $search_value [, bool $strict = false]] | array','array_map(':'callable $callback, array $array1 [, array $...] | array','array_merge_recursive(':'array $array1 [, array $...] | array','array_merge(':'array $array1 [, array $...] | array','array_multisort(':'array &$array1 [, mixed $array1_sort_order = SORT_ASC [, mixed $array1_sort_flags = SORT_REGULAR [, mixed $...]]] | bool','array_pad(':'array $array, int $size, mixed $value | array','array_pop(':'array &$array | mixed','array_product(':'array $array | number','array_push(':'array &$array, mixed $value1 [, mixed $...] | int','array_rand(':'array $array [, int $num = 1] | mixed','array_reduce(':'array $array, callable $callback [, mixed $initial = NULL] | mixed','array_replace_recursive(':'array $array1, array $array2 [, array $...] | array','array_replace(':'array $array1, array $array2 [, array $...] | array','array_reverse(':'array $array [, bool $preserve_keys = false] | array','array_search(':'mixed $needle, array $haystack [, bool $strict = false] | mixed','array_shift(':'array &$array | mixed','array_slice(':'array $array, int $offset [, int $length = NULL [, bool $preserve_keys = false]] | array','array_splice(':'array &$input, int $offset [, int $length [, mixed $replacement = array()]] | array','array_sum(':'array $array | number','array_udiff_assoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_udiff_uassoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func [, callable $key_compare_func]]] | array','array_udiff(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_uintersect_assoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_uintersect_uassoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func [, callable $key_compare_func]]] | array','array_uintersect(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_unique(':'array $array [, int $sort_flags = SORT_STRING] | array','array_unshift(':'array &$array, mixed $value1 [, mixed $...] | int','array_values(':'array $array | array','array_walk_recursive(':'array &$array, callable $callback [, mixed $userdata = NULL] | bool','array_walk(':'array &$array, callable $callback [, mixed $userdata = NULL] | bool','array(':'[ mixed $...] | array','arsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','asort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','compact(':'mixed $varname1 [, mixed $...] | array','count(':'mixed $array_or_countable [, int $mode = COUNT_NORMAL] | int','current(':'array &$array | mixed','each(':'array &$array | array','end(':'array &$array | mixed','extract(':'array &$array [, int $flags = EXTR_OVERWRITE [, string $prefix = NULL]] | int','in_array(':'mixed $needle, array $haystack [, bool $strict = FALSE] | bool','key_exists(':'key_exists — Alias of array_key_exists()','key(':'array &$array | mixed','krsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','ksort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','list(':'mixed $var1 [, mixed $...] | array','natcasesort(':'array &$array | bool','natsort(':'array &$array | bool','next(':'array &$array | mixed','pos(':'pos — Alias of current()','prev(':'array &$array | mixed','range(':'mixed $start, mixed $end [, number $step = 1] | array','reset(':'array &$array | mixed','rsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','shuffle(':'array &$array | bool','sizeof(':'sizeof — Alias of count()','sort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','uasort(':'array &$array, callable $value_compare_func | bool','uksort(':'array &$array, callable $key_compare_func | bool','usort(':'array &$array, callable $value_compare_func | bool',}
+let php_builtin['functions']['php_options_info']={'assert_options(':'int $what [, mixed $value] | mixed','assert(':'mixed $assertion [, string $description] | bool','cli_get_process_title(':'void | string','cli_set_process_title(':'string $title | bool','dl(':'string $library | bool','extension_loaded(':'string $name | bool','gc_collect_cycles(':'void | int','gc_disable(':'void | void','gc_enable(':'void | void','gc_enabled(':'void | bool','get_cfg_var(':'string $option | string','get_current_user(':'void | string','get_defined_constants(':'[ bool $categorize = false] | array','get_extension_funcs(':'string $module_name | array','get_include_path(':'void | string','get_included_files(':'void | array','get_loaded_extensions(':'[ bool $zend_extensions = false] | array','get_magic_quotes_gpc(':'void | bool','get_magic_quotes_runtime(':'void | bool','get_required_files(':'get_required_files — Alias of get_included_files()','getenv(':'string $varname | string','getlastmod(':'void | int','getmygid(':'void | int','getmyinode(':'void | int','getmypid(':'void | int','getmyuid(':'void | int','getopt(':'string $options [, array $longopts] | array','getrusage(':'[ int $who = 0] | array','ini_alter(':'ini_alter — Alias of ini_set()','ini_get_all(':'[ string $extension [, bool $details = true]] | array','ini_get(':'string $varname | string','ini_restore(':'string $varname | void','ini_set(':'string $varname, string $newvalue | string','magic_quotes_runtime(':'magic_quotes_runtime — Alias of set_magic_quotes_runtime()','memory_get_peak_usage(':'[ bool $real_usage = false] | int','memory_get_usage(':'[ bool $real_usage = false] | int','php_ini_loaded_file(':'void | string','php_ini_scanned_files(':'void | string','php_logo_guid(':'void | string','php_sapi_name(':'void | string','php_uname(':'[ string $mode = "a"] | string','phpcredits(':'[ int $flag = CREDITS_ALL] | bool','phpinfo(':'[ int $what = INFO_ALL] | bool','phpversion(':'[ string $extension] | string','putenv(':'string $setting | bool','restore_include_path(':'void | void','set_include_path(':'string $new_include_path | string','set_magic_quotes_runtime(':'bool $new_setting | bool','set_time_limit(':'int $seconds | void','sys_get_temp_dir(':'void | string','version_compare(':'string $version1, string $version2 [, string $operator] | mixed','zend_logo_guid(':'void | string','zend_thread_id(':'void | int','zend_version(':'void | string',}
+let php_builtin['functions']['classes_objects']={'__autoload(':'string $class | void','call_user_method_array(':'string $method_name, object &$obj, array $params | mixed','call_user_method(':'string $method_name, object &$obj [, mixed $parameter [, mixed $...]] | mixed','class_alias(':'string $original, string $alias [, bool $autoload = TRUE] | bool','class_exists(':'string $class_name [, bool $autoload = true] | bool','get_called_class(':'void | string','get_class_methods(':'mixed $class_name | array','get_class_vars(':'string $class_name | array','get_class(':'[ object $object = NULL] | string','get_declared_classes(':'void | array','get_declared_interfaces(':'void | array','get_declared_traits(':'void | array','get_object_vars(':'object $object | array','get_parent_class(':'[ mixed $object] | string','interface_exists(':'string $interface_name [, bool $autoload = true] | bool','is_a(':'object $object, string $class_name [, bool $allow_string = FALSE] | bool','is_subclass_of(':'mixed $object, string $class_name [, bool $allow_string = TRUE] | bool','method_exists(':'mixed $object, string $method_name | bool','property_exists(':'mixed $class, string $property | bool','trait_exists(':'string $traitname [, bool $autoload] | bool',}
+let php_builtin['functions']['urls']={'base64_decode(':'string $data [, bool $strict = false] | string','base64_encode(':'string $data | string','get_headers(':'string $url [, int $format = 0] | array','get_meta_tags(':'string $filename [, bool $use_include_path = false] | array','http_build_query(':'mixed $query_data [, string $numeric_prefix [, string $arg_separator [, int $enc_type = PHP_QUERY_RFC1738]]] | string','parse_url(':'string $url [, int $component = -1] | mixed','rawurldecode(':'string $str | string','rawurlencode(':'string $str | string','urldecode(':'string $str | string','urlencode(':'string $str | string',}
+let php_builtin['functions']['filesystem']={'basename(':'string $path [, string $suffix] | string','chgrp(':'string $filename, mixed $group | bool','chmod(':'string $filename, int $mode | bool','chown(':'string $filename, mixed $user | bool','clearstatcache(':'[ bool $clear_realpath_cache = false [, string $filename]] | void','copy(':'string $source, string $dest [, resource $context] | bool','dirname(':'string $path | string','disk_free_space(':'string $directory | float','disk_total_space(':'string $directory | float','diskfreespace(':'diskfreespace — Alias of disk_free_space()','fclose(':'resource $handle | bool','feof(':'resource $handle | bool','fflush(':'resource $handle | bool','fgetc(':'resource $handle | string','fgetcsv(':'resource $handle [, int $length = 0 [, string $delimiter = '','' [, string $enclosure = ''"'' [, string $escape = ''\\'']]]] | array','fgets(':'resource $handle [, int $length] | string','fgetss(':'resource $handle [, int $length [, string $allowable_tags]] | string','file_exists(':'string $filename | bool','file_get_contents(':'string $filename [, bool $use_include_path = false [, resource $context [, int $offset = -1 [, int $maxlen]]]] | string','file_put_contents(':'string $filename, mixed $data [, int $flags = 0 [, resource $context]] | int','file(':'string $filename [, int $flags = 0 [, resource $context]] | array','fileatime(':'string $filename | int','filectime(':'string $filename | int','filegroup(':'string $filename | int','fileinode(':'string $filename | int','filemtime(':'string $filename | int','fileowner(':'string $filename | int','fileperms(':'string $filename | int','filesize(':'string $filename | int','filetype(':'string $filename | string','flock(':'resource $handle, int $operation [, int &$wouldblock] | bool','fnmatch(':'string $pattern, string $string [, int $flags = 0] | bool','fopen(':'string $filename, string $mode [, bool $use_include_path = false [, resource $context]] | resource','fpassthru(':'resource $handle | int','fputcsv(':'resource $handle, array $fields [, string $delimiter = '','' [, string $enclosure = ''"'']] | int','fputs(':'fputs — Alias of fwrite()','fread(':'resource $handle, int $length | string','fscanf(':'resource $handle, string $format [, mixed &$...] | mixed','fseek(':'resource $handle, int $offset [, int $whence = SEEK_SET] | int','fstat(':'resource $handle | array','ftell(':'resource $handle | int','ftruncate(':'resource $handle, int $size | bool','fwrite(':'resource $handle, string $string [, int $length] | int','glob(':'string $pattern [, int $flags = 0] | array','is_dir(':'string $filename | bool','is_executable(':'string $filename | bool','is_file(':'string $filename | bool','is_link(':'string $filename | bool','is_readable(':'string $filename | bool','is_uploaded_file(':'string $filename | bool','is_writable(':'string $filename | bool','is_writeable(':'is_writeable — Alias of is_writable()','lchgrp(':'string $filename, mixed $group | bool','lchown(':'string $filename, mixed $user | bool','link(':'string $target, string $link | bool','linkinfo(':'string $path | int','lstat(':'string $filename | array','mkdir(':'string $pathname [, int $mode = 0777 [, bool $recursive = false [, resource $context]]] | bool','move_uploaded_file(':'string $filename, string $destination | bool','parse_ini_file(':'string $filename [, bool $process_sections = false [, int $scanner_mode = INI_SCANNER_NORMAL]] | array','parse_ini_string(':'string $ini [, bool $process_sections = false [, int $scanner_mode = INI_SCANNER_NORMAL]] | array','pathinfo(':'string $path [, int $options = PATHINFO_DIRNAME | PATHINFO_BASENAME | PATHINFO_EXTENSION | PATHINFO_FILENAME] | mixed','pclose(':'resource $handle | int','popen(':'string $command, string $mode | resource','readfile(':'string $filename [, bool $use_include_path = false [, resource $context]] | int','readlink(':'string $path | string','realpath_cache_get(':'void | array','realpath_cache_size(':'void | int','realpath(':'string $path | string','rename(':'string $oldname, string $newname [, resource $context] | bool','rewind(':'resource $handle | bool','rmdir(':'string $dirname [, resource $context] | bool','set_file_buffer(':'set_file_buffer — Alias of stream_set_write_buffer()','stat(':'string $filename | array','symlink(':'string $target, string $link | bool','tempnam(':'string $dir, string $prefix | string','tmpfile(':'void | resource','touch(':'string $filename [, int $time = time() [, int $atime]] | bool','umask(':'[ int $mask] | int','unlink(':'string $filename [, resource $context] | bool',}
+let php_builtin['functions']['variable_handling']={'boolval(':'mixed $var | boolean','debug_zval_dump(':'mixed $variable [, mixed $...] | void','doubleval(':'doubleval — Alias of floatval()','empty(':'mixed $var | bool','floatval(':'mixed $var | float','get_defined_vars(':'void | array','get_resource_type(':'resource $handle | string','gettype(':'mixed $var | string','import_request_variables(':'string $types [, string $prefix] | bool','intval(':'mixed $var [, int $base = 10] | int','is_array(':'mixed $var | bool','is_bool(':'mixed $var | bool','is_callable(':'callable $name [, bool $syntax_only = false [, string &$callable_name]] | bool','is_double(':'is_double — Alias of is_float()','is_float(':'mixed $var | bool','is_int(':'mixed $var | bool','is_integer(':'is_integer — Alias of is_int()','is_long(':'is_long — Alias of is_int()','is_null(':'mixed $var | bool','is_numeric(':'mixed $var | bool','is_object(':'mixed $var | bool','is_real(':'is_real — Alias of is_float()','is_resource(':'mixed $var | bool','is_scalar(':'mixed $var | bool','is_string(':'mixed $var | bool','isset(':'mixed $var [, mixed $...] | bool','print_r(':'mixed $expression [, bool $return = false] | mixed','serialize(':'mixed $value | string','settype(':'mixed &$var, string $type | bool','strval(':'mixed $var | string','unserialize(':'string $str | mixed','unset(':'mixed $var [, mixed $...] | void','var_dump(':'mixed $expression [, mixed $...] | void','var_export(':'mixed $expression [, bool $return = false] | mixed',}
+let php_builtin['functions']['calendar']={'cal_days_in_month(':'int $calendar, int $month, int $year | int','cal_from_jd(':'int $jd, int $calendar | array','cal_info(':'[ int $calendar = -1] | array','cal_to_jd(':'int $calendar, int $month, int $day, int $year | int','easter_date(':'[ int $year] | int','easter_days(':'[ int $year [, int $method = CAL_EASTER_DEFAULT]] | int','frenchtojd(':'int $month, int $day, int $year | int','gregoriantojd(':'int $month, int $day, int $year | int','jddayofweek(':'int $julianday [, int $mode = CAL_DOW_DAYNO] | mixed','jdmonthname(':'int $julianday, int $mode | string','jdtofrench(':'int $juliandaycount | string','jdtogregorian(':'int $julianday | string','jdtojewish(':'int $juliandaycount [, bool $hebrew = false [, int $fl = 0]] | string','jdtojulian(':'int $julianday | string','jdtounix(':'int $jday | int','jewishtojd(':'int $month, int $day, int $year | int','juliantojd(':'int $month, int $day, int $year | int','unixtojd(':'[ int $timestamp = time()] | int',}
+let php_builtin['functions']['function_handling']={'call_user_func_array(':'callable $callback, array $param_arr | mixed','call_user_func(':'callable $callback [, mixed $parameter [, mixed $...]] | mixed','create_function(':'string $args, string $code | string','forward_static_call_array(':'callable $function, array $parameters | mixed','forward_static_call(':'callable $function [, mixed $parameter [, mixed $...]] | mixed','func_get_arg(':'int $arg_num | mixed','func_get_args(':'void | array','func_num_args(':'void | int','function_exists(':'string $function_name | bool','get_defined_functions(':'void | array','register_shutdown_function(':'callable $callback [, mixed $parameter [, mixed $...]] | void','register_tick_function(':'callable $function [, mixed $arg [, mixed $...]] | bool','unregister_tick_function(':'string $function_name | void',}
+let php_builtin['functions']['directories']={'chdir(':'string $directory | bool','chroot(':'string $directory | bool','closedir(':'[ resource $dir_handle] | void','dir(':'string $directory [, resource $context] | Directory','getcwd(':'void | string','opendir(':'string $path [, resource $context] | resource','readdir(':'[ resource $dir_handle] | string','rewinddir(':'[ resource $dir_handle] | void','scandir(':'string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context]] | array',}
+let php_builtin['functions']['date_time']={'checkdate(':'int $month, int $day, int $year | bool','date_default_timezone_get(':'void | string','date_default_timezone_set(':'string $timezone_identifier | bool','date_parse_from_format(':'string $format, string $date | array','date_parse(':'string $date | array','date_sun_info(':'int $time, float $latitude, float $longitude | array','date_sunrise(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunrise_zenith") [, float $gmt_offset = 0]]]]] | mixed','date_sunset(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunset_zenith") [, float $gmt_offset = 0]]]]] | mixed','date(':'string $format [, int $timestamp = time()] | string','getdate(':'[ int $timestamp = time()] | array','gettimeofday(':'[ bool $return_float = false] | mixed','gmdate(':'string $format [, int $timestamp = time()] | string','gmmktime(':'[ int $hour = gmdate("H") [, int $minute = gmdate("i") [, int $second = gmdate("s") [, int $month = gmdate("n") [, int $day = gmdate("j") [, int $year = gmdate("Y") [, int $is_dst = -1]]]]]]] | int','gmstrftime(':'string $format [, int $timestamp = time()] | string','idate(':'string $format [, int $timestamp = time()] | int','localtime(':'[ int $timestamp = time() [, bool $is_associative = false]] | array','microtime(':'[ bool $get_as_float = false] | mixed','mktime(':'[ int $hour = date("H") [, int $minute = date("i") [, int $second = date("s") [, int $month = date("n") [, int $day = date("j") [, int $year = date("Y") [, int $is_dst = -1]]]]]]] | int','strftime(':'string $format [, int $timestamp = time()] | string','strptime(':'string $date, string $format | array','strtotime(':'string $time [, int $now = time()] | int','time(':'void | int','timezone_name_from_abbr(':'string $abbr [, int $gmtOffset = -1 [, int $isdst = -1]] | string','timezone_version_get(':'void | string',}
+let php_builtin['functions']['network']={'checkdnsrr(':'string $host [, string $type = "MX"] | bool','closelog(':'void | bool','define_syslog_variables(':'void | void','dns_get_record(':'string $hostname [, int $type = DNS_ANY [, array &$authns [, array &$addtl [, bool &$raw = false]]]] | array','fsockopen(':'string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout")]]]] | resource','gethostbyaddr(':'string $ip_address | string','gethostbyname(':'string $hostname | string','gethostbynamel(':'string $hostname | array','gethostname(':'void | string','getmxrr(':'string $hostname, array &$mxhosts [, array &$weight] | bool','getprotobyname(':'string $name | int','getprotobynumber(':'int $number | string','getservbyname(':'string $service, string $protocol | int','getservbyport(':'int $port, string $protocol | string','header_register_callback(':'callable $callback | bool','header_remove(':'[ string $name] | void','header(':'string $string [, bool $replace = true [, int $http_response_code]] | void','headers_list(':'void | array','headers_sent(':'[ string &$file [, int &$line]] | bool','http_response_code(':'[ int $response_code] | int','inet_ntop(':'string $in_addr | string','inet_pton(':'string $address | string','ip2long(':'string $ip_address | int','long2ip(':'string $proper_address | string','openlog(':'string $ident, int $option, int $facility | bool','pfsockopen(':'string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout")]]]] | resource','setcookie(':'string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]]]] | bool','setrawcookie(':'string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]]]] | bool','socket_get_status(':'socket_get_status — Alias of stream_get_meta_data()','socket_set_blocking(':'socket_set_blocking — Alias of stream_set_blocking()','socket_set_timeout(':'socket_set_timeout — Alias of stream_set_timeout()','syslog(':'int $priority, string $message | bool',}
+let php_builtin['functions']['spl']={'class_implements(':'mixed $class [, bool $autoload = true] | array','class_parents(':'mixed $class [, bool $autoload = true] | array','class_uses(':'mixed $class [, bool $autoload = true] | array','iterator_apply(':'Traversable $iterator, callable $function [, array $args] | int','iterator_count(':'Traversable $iterator | int','iterator_to_array(':'Traversable $iterator [, bool $use_keys = true] | array','spl_autoload_call(':'string $class_name | void','spl_autoload_extensions(':'[ string $file_extensions] | string','spl_autoload_functions(':'void | array','spl_autoload_register(':'[ callable $autoload_function [, bool $throw = true [, bool $prepend = false]]] | bool','spl_autoload_unregister(':'mixed $autoload_function | bool','spl_autoload(':'string $class_name [, string $file_extensions = spl_autoload_extensions()] | void','spl_classes(':'void | array','spl_object_hash(':'object $obj | string',}
+let php_builtin['functions']['misc']={'connection_aborted(':'void | int','connection_status(':'void | int','connection_timeout(':'void | int','constant(':'string $name | mixed','define(':'string $name, mixed $value [, bool $case_insensitive = false] | bool','defined(':'string $name | bool','eval(':'string $code | mixed','exit(':'[ string $status] | void','get_browser(':'[ string $user_agent [, bool $return_array = false]] | mixed','__halt_compiler(':'void | void','highlight_file(':'string $filename [, bool $return = false] | mixed','highlight_string(':'string $str [, bool $return = false] | mixed','ignore_user_abort(':'[ string $value] | int','pack(':'string $format [, mixed $args [, mixed $...]] | string','php_check_syntax(':'string $filename [, string &$error_message] | bool','php_strip_whitespace(':'string $filename | string','show_source(':'show_source — Alias of highlight_file()','sleep(':'int $seconds | int','sys_getloadavg(':'void | array','time_nanosleep(':'int $seconds, int $nanoseconds | mixed','time_sleep_until(':'float $timestamp | bool','uniqid(':'[ string $prefix = "" [, bool $more_entropy = false]] | string','unpack(':'string $format, string $data | array','usleep(':'int $micro_seconds | void',}
+let php_builtin['functions']['curl']={'curl_close(':'resource $ch | void','curl_copy_handle(':'resource $ch | resource','curl_errno(':'resource $ch | int','curl_error(':'resource $ch | string','curl_escape(':'resource $ch, string $str | string','curl_exec(':'resource $ch | mixed','curl_getinfo(':'resource $ch [, int $opt = 0] | mixed','curl_init(':'[ string $url = NULL] | resource','curl_multi_add_handle(':'resource $mh, resource $ch | int','curl_multi_close(':'resource $mh | void','curl_multi_exec(':'resource $mh, int &$still_running | int','curl_multi_getcontent(':'resource $ch | string','curl_multi_info_read(':'resource $mh [, int &$msgs_in_queue = NULL] | array','curl_multi_init(':'void | resource','curl_multi_remove_handle(':'resource $mh, resource $ch | int','curl_multi_select(':'resource $mh [, float $timeout = 1.0] | int','curl_multi_setopt(':'resource $mh, int $option, mixed $value | bool','curl_multi_strerror(':'int $errornum | string','curl_pause(':'resource $ch, int $bitmask | int','curl_reset(':'resource $ch | void','curl_setopt_array(':'resource $ch, array $options | bool','curl_setopt(':'resource $ch, int $option, mixed $value | bool','curl_share_close(':'resource $sh | void','curl_share_init(':'void | resource','curl_share_setopt(':'resource $sh, int $option, string $value | bool','curl_strerror(':'int $errornum | string','curl_unescape(':'resource $ch, string $str | string','curl_version(':'[ int $age = CURLVERSION_NOW] | array',}
+let php_builtin['functions']['error_handling']={'debug_backtrace(':'[ int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT [, int $limit = 0]] | array','debug_print_backtrace(':'[ int $options = 0 [, int $limit = 0]] | void','error_get_last(':'void | array','error_log(':'string $message [, int $message_type = 0 [, string $destination [, string $extra_headers]]] | bool','error_reporting(':'[ int $level] | int','restore_error_handler(':'void | bool','restore_exception_handler(':'void | bool','set_error_handler(':'callable $error_handler [, int $error_types = E_ALL | E_STRICT] | mixed','set_exception_handler(':'callable $exception_handler | callable','trigger_error(':'string $error_msg [, int $error_type = E_USER_NOTICE] | bool',}
+let php_builtin['functions']['dom']={'dom_import_simplexml(':'SimpleXMLElement $node | DOMElement',}
+let php_builtin['functions']['program_execution']={'escapeshellarg(':'string $arg | string','escapeshellcmd(':'string $command | string','exec(':'string $command [, array &$output [, int &$return_var]] | string','passthru(':'string $command [, int &$return_var] | void','proc_close(':'resource $process | int','proc_get_status(':'resource $process | array','proc_nice(':'int $increment | bool','proc_open(':'string $cmd, array $descriptorspec, array &$pipes [, string $cwd [, array $env [, array $other_options]]] | resource','proc_terminate(':'resource $process [, int $signal = 15] | bool','shell_exec(':'string $cmd | string','system(':'string $command [, int &$return_var] | string',}
+let php_builtin['functions']['mail']={'ezmlm_hash(':'string $addr | int','mail(':'string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] | bool',}
+let php_builtin['functions']['fastcgi_process_manager']={'fastcgi_finish_request(':'void | boolean',}
+let php_builtin['functions']['filter']={'filter_has_var(':'int $type, string $variable_name | bool','filter_id(':'string $filtername | int','filter_input_array(':'int $type [, mixed $definition [, bool $add_empty = true]] | mixed','filter_input(':'int $type, string $variable_name [, int $filter = FILTER_DEFAULT [, mixed $options]] | mixed','filter_list(':'void | array','filter_var_array(':'array $data [, mixed $definition [, bool $add_empty = true]] | mixed','filter_var(':'mixed $variable [, int $filter = FILTER_DEFAULT [, mixed $options]] | mixed',}
+let php_builtin['functions']['fileinfo']={'finfo_buffer(':'resource $finfo [, string $string = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL]]] | string','finfo_close(':'resource $finfo | bool','finfo_file(':'resource $finfo [, string $file_name = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL]]] | string','finfo_open(':'[ int $options = FILEINFO_NONE [, string $magic_file = NULL]] | resource','finfo_set_flags(':'resource $finfo, int $options | bool','mime_content_type(':'string $filename | string',}
+let php_builtin['functions']['output_control']={'flush(':'void | void','ob_clean(':'void | void','ob_end_clean(':'void | bool','ob_end_flush(':'void | bool','ob_flush(':'void | void','ob_get_clean(':'void | string','ob_get_contents(':'void | string','ob_get_flush(':'void | string','ob_get_length(':'void | int','ob_get_level(':'void | int','ob_get_status(':'[ bool $full_status = FALSE] | array','ob_gzhandler(':'string $buffer, int $mode | string','ob_implicit_flush(':'[ int $flag = true] | void','ob_list_handlers(':'void | array','ob_start(':'[ callable $output_callback = NULL [, int $chunk_size = 0 [, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS]]] | bool','output_add_rewrite_var(':'string $name, string $value | bool','output_reset_rewrite_vars(':'void | bool',}
+let php_builtin['functions']['gd']={'gd_info(':'void | array','getimagesize(':'string $filename [, array &$imageinfo] | array','getimagesizefromstring(':'string $imagedata [, array &$imageinfo] | array','image_type_to_extension(':'int $imagetype [, bool $include_dot = TRUE] | string','image_type_to_mime_type(':'int $imagetype | string','image2wbmp(':'resource $image [, string $filename [, int $threshold]] | bool','imageaffine(':'resource $image, array $affine [, array $clip] | resource','imageaffinematrixconcat(':'array $m1, array $m2 | array','imageaffinematrixget(':'int $type [, mixed $options] | array','imagealphablending(':'resource $image, bool $blendmode | bool','imageantialias(':'resource $image, bool $enabled | bool','imagearc(':'resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color | bool','imagechar(':'resource $image, int $font, int $x, int $y, string $c, int $color | bool','imagecharup(':'resource $image, int $font, int $x, int $y, string $c, int $color | bool','imagecolorallocate(':'resource $image, int $red, int $green, int $blue | int','imagecolorallocatealpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolorat(':'resource $image, int $x, int $y | int','imagecolorclosest(':'resource $image, int $red, int $green, int $blue | int','imagecolorclosestalpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolorclosesthwb(':'resource $image, int $red, int $green, int $blue | int','imagecolordeallocate(':'resource $image, int $color | bool','imagecolorexact(':'resource $image, int $red, int $green, int $blue | int','imagecolorexactalpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolormatch(':'resource $image1, resource $image2 | bool','imagecolorresolve(':'resource $image, int $red, int $green, int $blue | int','imagecolorresolvealpha(':'resource $image, int $red, int $green, int $blue, int $alpha | int','imagecolorset(':'resource $image, int $index, int $red, int $green, int $blue [, int $alpha = 0] | void','imagecolorsforindex(':'resource $image, int $index | array','imagecolorstotal(':'resource $image | int','imagecolortransparent(':'resource $image [, int $color] | int','imageconvolution(':'resource $image, array $matrix, float $div, float $offset | bool','imagecopy(':'resource $dst_im, resource $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h | bool','imagecopymerge(':'resource $dst_im, resource $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct | bool','imagecopymergegray(':'resource $dst_im, resource $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct | bool','imagecopyresampled(':'resource $dst_image, resource $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h | bool','imagecopyresized(':'resource $dst_image, resource $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h | bool','imagecreate(':'int $width, int $height | resource','imagecreatefromgd(':'string $filename | resource','imagecreatefromgd2(':'string $filename | resource','imagecreatefromgd2part(':'string $filename, int $srcX, int $srcY, int $width, int $height | resource','imagecreatefromgif(':'string $filename | resource','imagecreatefromjpeg(':'string $filename | resource','imagecreatefrompng(':'string $filename | resource','imagecreatefromstring(':'string $image | resource','imagecreatefromwbmp(':'string $filename | resource','imagecreatefromwebp(':'string $filename | resource','imagecreatefromxbm(':'string $filename | resource','imagecreatefromxpm(':'string $filename | resource','imagecreatetruecolor(':'int $width, int $height | resource','imagecrop(':'resource $image, array $rect | resource','imagecropauto(':'resource $image [, int $mode = -1 [, float $threshold = .5 [, int $color = -1]]] | resource','imagedashedline(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imagedestroy(':'resource $image | bool','imageellipse(':'resource $image, int $cx, int $cy, int $width, int $height, int $color | bool','imagefill(':'resource $image, int $x, int $y, int $color | bool','imagefilledarc(':'resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color, int $style | bool','imagefilledellipse(':'resource $image, int $cx, int $cy, int $width, int $height, int $color | bool','imagefilledpolygon(':'resource $image, array $points, int $num_points, int $color | bool','imagefilledrectangle(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imagefilltoborder(':'resource $image, int $x, int $y, int $border, int $color | bool','imagefilter(':'resource $image, int $filtertype [, int $arg1 [, int $arg2 [, int $arg3 [, int $arg4]]]] | bool','imageflip(':'resource $image, int $mode | bool','imagefontheight(':'int $font | int','imagefontwidth(':'int $font | int','imageftbbox(':'float $size, float $angle, string $fontfile, string $text [, array $extrainfo] | array','imagefttext(':'resource $image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text [, array $extrainfo] | array','imagegammacorrect(':'resource $image, float $inputgamma, float $outputgamma | bool','imagegd(':'resource $image [, string $filename] | bool','imagegd2(':'resource $image [, string $filename [, int $chunk_size [, int $type = IMG_GD2_RAW]]] | bool','imagegif(':'resource $image [, string $filename] | bool','imagegrabscreen(':'void | resource','imagegrabwindow(':'int $window_handle [, int $client_area = 0] | resource','imageinterlace(':'resource $image [, int $interlace = 0] | int','imageistruecolor(':'resource $image | bool','imagejpeg(':'resource $image [, string $filename [, int $quality]] | bool','imagelayereffect(':'resource $image, int $effect | bool','imageline(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imageloadfont(':'string $file | int','imagepalettecopy(':'resource $destination, resource $source | void','imagepalettetotruecolor(':'resource $src | bool','imagepng(':'resource $image [, string $filename [, int $quality [, int $filters]]] | bool','imagepolygon(':'resource $image, array $points, int $num_points, int $color | bool','imagepsbbox(':'string $text, resource $font, int $size | array','imagepsencodefont(':'resource $font_index, string $encodingfile | bool','imagepsextendfont(':'resource $font_index, float $extend | bool','imagepsfreefont(':'resource $font_index | bool','imagepsloadfont(':'string $filename | resource','imagepsslantfont(':'resource $font_index, float $slant | bool','imagepstext(':'resource $image, string $text, resource $font_index, int $size, int $foreground, int $background, int $x, int $y [, int $space = 0 [, int $tightness = 0 [, float $angle = 0.0 [, int $antialias_steps = 4]]]] | array','imagerectangle(':'resource $image, int $x1, int $y1, int $x2, int $y2, int $color | bool','imagerotate(':'resource $image, float $angle, int $bgd_color [, int $ignore_transparent = 0] | resource','imagesavealpha(':'resource $image, bool $saveflag | bool','imagescale(':'resource $image, int $new_width [, int $new_height = -1 [, int $mode = IMG_BILINEAR_FIXED]] | resource','imagesetbrush(':'resource $image, resource $brush | bool','imagesetinterpolation(':'resource $image [, int $method = IMG_BILINEAR_FIXED] | bool','imagesetpixel(':'resource $image, int $x, int $y, int $color | bool','imagesetstyle(':'resource $image, array $style | bool','imagesetthickness(':'resource $image, int $thickness | bool','imagesettile(':'resource $image, resource $tile | bool','imagestring(':'resource $image, int $font, int $x, int $y, string $string, int $color | bool','imagestringup(':'resource $image, int $font, int $x, int $y, string $string, int $color | bool','imagesx(':'resource $image | int','imagesy(':'resource $image | int','imagetruecolortopalette(':'resource $image, bool $dither, int $ncolors | bool','imagettfbbox(':'float $size, float $angle, string $fontfile, string $text | array','imagettftext(':'resource $image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text | array','imagetypes(':'void | int','imagewbmp(':'resource $image [, string $filename [, int $foreground]] | bool','imagewebp(':'resource $image, string $filename | bool','imagexbm(':'resource $image, string $filename [, int $foreground] | bool','iptcembed(':'string $iptcdata, string $jpeg_file_name [, int $spool] | mixed','iptcparse(':'string $iptcblock | array','jpeg2wbmp(':'string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold | bool','png2wbmp(':'string $pngname, string $wbmpname, int $dest_height, int $dest_width, int $threshold | bool',}
+let php_builtin['functions']['iconv']={'iconv_get_encoding(':'[ string $type = "all"] | mixed','iconv_mime_decode_headers(':'string $encoded_headers [, int $mode = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | array','iconv_mime_decode(':'string $encoded_header [, int $mode = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | string','iconv_mime_encode(':'string $field_name, string $field_value [, array $preferences = NULL] | string','iconv_set_encoding(':'string $type, string $charset | bool','iconv_strlen(':'string $str [, string $charset = ini_get("iconv.internal_encoding")] | int','iconv_strpos(':'string $haystack, string $needle [, int $offset = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | int','iconv_strrpos(':'string $haystack, string $needle [, string $charset = ini_get("iconv.internal_encoding")] | int','iconv_substr(':'string $str, int $offset [, int $length = iconv_strlen($str, $charset) [, string $charset = ini_get("iconv.internal_encoding")]] | string','iconv(':'string $in_charset, string $out_charset, string $str | string','ob_iconv_handler(':'string $contents, int $status | string',}
+let php_builtin['functions']['json']={'json_decode(':'string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0]]] | mixed','json_encode(':'mixed $value [, int $options = 0 [, int $depth = 512]] | string','json_last_error_msg(':'void | string','json_last_error(':'void | int',}
+let php_builtin['functions']['libxml']={'libxml_clear_errors(':'void | void','libxml_disable_entity_loader(':'[ bool $disable = true] | bool','libxml_get_errors(':'void | array','libxml_get_last_error(':'void | LibXMLError','libxml_set_external_entity_loader(':'callable $resolver_function | void','libxml_set_streams_context(':'resource $streams_context | void','libxml_use_internal_errors(':'[ bool $use_errors = false] | bool',}
+let php_builtin['functions']['multibyte_string']={'mb_check_encoding(':'[ string $var = NULL [, string $encoding = mb_internal_encoding()]] | bool','mb_convert_case(':'string $str, int $mode [, string $encoding = mb_internal_encoding()] | string','mb_convert_encoding(':'string $str, string $to_encoding [, mixed $from_encoding = mb_internal_encoding()] | string','mb_convert_kana(':'string $str [, string $option = "KV" [, string $encoding = mb_internal_encoding()]] | string','mb_convert_variables(':'string $to_encoding, mixed $from_encoding, mixed &$vars [, mixed &$...] | string','mb_decode_mimeheader(':'string $str | string','mb_decode_numericentity(':'string $str, array $convmap [, string $encoding = mb_internal_encoding()] | string','mb_detect_encoding(':'string $str [, mixed $encoding_list = mb_detect_order() [, bool $strict = false]] | string','mb_detect_order(':'[ mixed $encoding_list = mb_detect_order()] | mixed','mb_encode_mimeheader(':'string $str [, string $charset = mb_internal_encoding() [, string $transfer_encoding = "B" [, string $linefeed = "\r\n" [, int $indent = 0]]]] | string','mb_encode_numericentity(':'string $str, array $convmap [, string $encoding = mb_internal_encoding() [, bool $is_hex = FALSE]] | string','mb_encoding_aliases(':'string $encoding | array','mb_ereg_match(':'string $pattern, string $string [, string $option = "msr"] | bool','mb_ereg_replace_callback(':'string $pattern, callable $callback, string $string [, string $option = "msr"] | string','mb_ereg_replace(':'string $pattern, string $replacement, string $string [, string $option = "msr"] | string','mb_ereg_search_getpos(':'void | int','mb_ereg_search_getregs(':'void | array','mb_ereg_search_init(':'string $string [, string $pattern [, string $option = "msr"]] | bool','mb_ereg_search_pos(':'[ string $pattern [, string $option = "ms"]] | array','mb_ereg_search_regs(':'[ string $pattern [, string $option = "ms"]] | array','mb_ereg_search_setpos(':'int $position | bool','mb_ereg_search(':'[ string $pattern [, string $option = "ms"]] | bool','mb_ereg(':'string $pattern, string $string [, array $regs] | int','mb_eregi_replace(':'string $pattern, string $replace, string $string [, string $option = "msri"] | string','mb_eregi(':'string $pattern, string $string [, array $regs] | int','mb_get_info(':'[ string $type = "all"] | mixed','mb_http_input(':'[ string $type = ""] | mixed','mb_http_output(':'[ string $encoding = mb_http_output()] | mixed','mb_internal_encoding(':'[ string $encoding = mb_internal_encoding()] | mixed','mb_language(':'[ string $language = mb_language()] | mixed','mb_list_encodings(':'void | array','mb_output_handler(':'string $contents, int $status | string','mb_parse_str(':'string $encoded_string [, array &$result] | bool','mb_preferred_mime_name(':'string $encoding | string','mb_regex_encoding(':'[ string $encoding = mb_regex_encoding()] | mixed','mb_regex_set_options(':'[ string $options = mb_regex_set_options()] | string','mb_send_mail(':'string $to, string $subject, string $message [, string $additional_headers = NULL [, string $additional_parameter = NULL]] | bool','mb_split(':'string $pattern, string $string [, int $limit = -1] | array','mb_strcut(':'string $str, int $start [, int $length = NULL [, string $encoding = mb_internal_encoding()]] | string','mb_strimwidth(':'string $str, int $start, int $width [, string $trimmarker = "" [, string $encoding = mb_internal_encoding()]] | string','mb_stripos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_stristr(':'string $haystack, string $needle [, bool $before_needle = false [, string $encoding = mb_internal_encoding()]] | string','mb_strlen(':'string $str [, string $encoding = mb_internal_encoding()] | mixed','mb_strpos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_strrchr(':'string $haystack, string $needle [, bool $part = false [, string $encoding = mb_internal_encoding()]] | string','mb_strrichr(':'string $haystack, string $needle [, bool $part = false [, string $encoding = mb_internal_encoding()]] | string','mb_strripos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_strrpos(':'string $haystack, string $needle [, int $offset = 0 [, string $encoding = mb_internal_encoding()]] | int','mb_strstr(':'string $haystack, string $needle [, bool $before_needle = false [, string $encoding = mb_internal_encoding()]] | string','mb_strtolower(':'string $str [, string $encoding = mb_internal_encoding()] | string','mb_strtoupper(':'string $str [, string $encoding = mb_internal_encoding()] | string','mb_strwidth(':'string $str [, string $encoding = mb_internal_encoding()] | int','mb_substitute_character(':'[ mixed $substrchar = mb_substitute_character()] | mixed','mb_substr_count(':'string $haystack, string $needle [, string $encoding = mb_internal_encoding()] | int','mb_substr(':'string $str, int $start [, int $length = NULL [, string $encoding = mb_internal_encoding()]] | string',}
+let php_builtin['functions']['mssql']={'mssql_bind(':'resource $stmt, string $param_name, mixed &$var, int $type [, bool $is_output = false [, bool $is_null = false [, int $maxlen = -1]]] | bool','mssql_close(':'[ resource $link_identifier] | bool','mssql_connect(':'[ string $servername [, string $username [, string $password [, bool $new_link = false]]]] | resource','mssql_data_seek(':'resource $result_identifier, int $row_number | bool','mssql_execute(':'resource $stmt [, bool $skip_results = false] | mixed','mssql_fetch_array(':'resource $result [, int $result_type = MSSQL_BOTH] | array','mssql_fetch_assoc(':'resource $result_id | array','mssql_fetch_batch(':'resource $result | int','mssql_fetch_field(':'resource $result [, int $field_offset = -1] | object','mssql_fetch_object(':'resource $result | object','mssql_fetch_row(':'resource $result | array','mssql_field_length(':'resource $result [, int $offset = -1] | int','mssql_field_name(':'resource $result [, int $offset = -1] | string','mssql_field_seek(':'resource $result, int $field_offset | bool','mssql_field_type(':'resource $result [, int $offset = -1] | string','mssql_free_result(':'resource $result | bool','mssql_free_statement(':'resource $stmt | bool','mssql_get_last_message(':'void | string','mssql_guid_string(':'string $binary [, bool $short_format = false] | string','mssql_init(':'string $sp_name [, resource $link_identifier] | resource','mssql_min_error_severity(':'int $severity | void','mssql_min_message_severity(':'int $severity | void','mssql_next_result(':'resource $result_id | bool','mssql_num_fields(':'resource $result | int','mssql_num_rows(':'resource $result | int','mssql_pconnect(':'[ string $servername [, string $username [, string $password [, bool $new_link = false]]]] | resource','mssql_query(':'string $query [, resource $link_identifier [, int $batch_size = 0]] | mixed','mssql_result(':'resource $result, int $row, mixed $field | string','mssql_rows_affected(':'resource $link_identifier | int','mssql_select_db(':'string $database_name [, resource $link_identifier] | bool',}
+let php_builtin['functions']['mysql']={'mysql_affected_rows(':'[ resource $link_identifier = NULL] | int','mysql_client_encoding(':'[ resource $link_identifier = NULL] | string','mysql_close(':'[ resource $link_identifier = NULL] | bool','mysql_connect(':'[ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, bool $new_link = false [, int $client_flags = 0]]]]] | resource','mysql_create_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_data_seek(':'resource $result, int $row_number | bool','mysql_db_name(':'resource $result, int $row [, mixed $field = NULL] | string','mysql_db_query(':'string $database, string $query [, resource $link_identifier = NULL] | resource','mysql_drop_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_errno(':'[ resource $link_identifier = NULL] | int','mysql_error(':'[ resource $link_identifier = NULL] | string','mysql_escape_string(':'string $unescaped_string | string','mysql_fetch_array(':'resource $result [, int $result_type = MYSQL_BOTH] | array','mysql_fetch_assoc(':'resource $result | array','mysql_fetch_field(':'resource $result [, int $field_offset = 0] | object','mysql_fetch_lengths(':'resource $result | array','mysql_fetch_object(':'resource $result [, string $class_name [, array $params]] | object','mysql_fetch_row(':'resource $result | array','mysql_field_flags(':'resource $result, int $field_offset | string','mysql_field_len(':'resource $result, int $field_offset | int','mysql_field_name(':'resource $result, int $field_offset | string','mysql_field_seek(':'resource $result, int $field_offset | bool','mysql_field_table(':'resource $result, int $field_offset | string','mysql_field_type(':'resource $result, int $field_offset | string','mysql_free_result(':'resource $result | bool','mysql_get_client_info(':'void | string','mysql_get_host_info(':'[ resource $link_identifier = NULL] | string','mysql_get_proto_info(':'[ resource $link_identifier = NULL] | int','mysql_get_server_info(':'[ resource $link_identifier = NULL] | string','mysql_info(':'[ resource $link_identifier = NULL] | string','mysql_insert_id(':'[ resource $link_identifier = NULL] | int','mysql_list_dbs(':'[ resource $link_identifier = NULL] | resource','mysql_list_fields(':'string $database_name, string $table_name [, resource $link_identifier = NULL] | resource','mysql_list_processes(':'[ resource $link_identifier = NULL] | resource','mysql_list_tables(':'string $database [, resource $link_identifier = NULL] | resource','mysql_num_fields(':'resource $result | int','mysql_num_rows(':'resource $result | int','mysql_pconnect(':'[ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, int $client_flags = 0]]]] | resource','mysql_ping(':'[ resource $link_identifier = NULL] | bool','mysql_query(':'string $query [, resource $link_identifier = NULL] | mixed','mysql_real_escape_string(':'string $unescaped_string [, resource $link_identifier = NULL] | string','mysql_result(':'resource $result, int $row [, mixed $field = 0] | string','mysql_select_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_set_charset(':'string $charset [, resource $link_identifier = NULL] | bool','mysql_stat(':'[ resource $link_identifier = NULL] | string','mysql_tablename(':'resource $result, int $i | string','mysql_thread_id(':'[ resource $link_identifier = NULL] | int','mysql_unbuffered_query(':'string $query [, resource $link_identifier = NULL] | resource',}
+let php_builtin['functions']['mysqli']={'mysqli_disable_reads_from_master(':'mysqli $link | bool','mysqli_disable_rpl_parse(':'mysqli $link | bool','mysqli_enable_reads_from_master(':'mysqli $link | bool','mysqli_enable_rpl_parse(':'mysqli $link | bool','mysqli_get_cache_stats(':'void | array','mysqli_master_query(':'mysqli $link, string $query | bool','mysqli_rpl_parse_enabled(':'mysqli $link | int','mysqli_rpl_probe(':'mysqli $link | bool','mysqli_slave_query(':'mysqli $link, string $query | bool',}
+let php_builtin['functions']['password_hashing']={'password_get_info(':'string $hash | array','password_hash(':'string $password, integer $algo [, array $options] | string','password_needs_rehash(':'string $hash, string $algo [, string $options] | boolean','password_verify(':'string $password, string $hash | boolean',}
+let php_builtin['functions']['postgresql']={'pg_affected_rows(':'resource $result | int','pg_cancel_query(':'resource $connection | bool','pg_client_encoding(':'[ resource $connection] | string','pg_close(':'[ resource $connection] | bool','pg_connect(':'string $connection_string [, int $connect_type] | resource','pg_connection_busy(':'resource $connection | bool','pg_connection_reset(':'resource $connection | bool','pg_connection_status(':'resource $connection | int','pg_convert(':'resource $connection, string $table_name, array $assoc_array [, int $options = 0] | array','pg_copy_from(':'resource $connection, string $table_name, array $rows [, string $delimiter [, string $null_as]] | bool','pg_copy_to(':'resource $connection, string $table_name [, string $delimiter [, string $null_as]] | array','pg_dbname(':'[ resource $connection] | string','pg_delete(':'resource $connection, string $table_name, array $assoc_array [, int $options = PGSQL_DML_EXEC] | mixed','pg_end_copy(':'[ resource $connection] | bool','pg_escape_bytea(':'[ resource $connection [, string $data]] | string','pg_escape_identifier(':'[ resource $connection [, string $data]] | string','pg_escape_literal(':'[ resource $connection [, string $data]] | string','pg_escape_string(':'[ resource $connection [, string $data]] | string','pg_execute(':'[ resource $connection [, string $stmtname [, array $params]]] | resource','pg_fetch_all_columns(':'resource $result [, int $column = 0] | array','pg_fetch_all(':'resource $result | array','pg_fetch_array(':'resource $result [, int $row [, int $result_type = PGSQL_BOTH]] | array','pg_fetch_assoc(':'resource $result [, int $row] | array','pg_fetch_object(':'resource $result [, int $row [, int $result_type = PGSQL_ASSOC]] | object','pg_fetch_result(':'resource $result, int $row, mixed $field | string','pg_fetch_row(':'resource $result [, int $row] | array','pg_field_is_null(':'resource $result, int $row, mixed $field | int','pg_field_name(':'resource $result, int $field_number | string','pg_field_num(':'resource $result, string $field_name | int','pg_field_prtlen(':'resource $result, int $row_number, mixed $field_name_or_number | int','pg_field_size(':'resource $result, int $field_number | int','pg_field_table(':'resource $result, int $field_number [, bool $oid_only = false] | mixed','pg_field_type_oid(':'resource $result, int $field_number | int','pg_field_type(':'resource $result, int $field_number | string','pg_free_result(':'resource $result | bool','pg_get_notify(':'resource $connection [, int $result_type] | array','pg_get_pid(':'resource $connection | int','pg_get_result(':'[ resource $connection] | resource','pg_host(':'[ resource $connection] | string','pg_insert(':'resource $connection, string $table_name, array $assoc_array [, int $options = PGSQL_DML_EXEC] | mixed','pg_last_error(':'[ resource $connection] | string','pg_last_notice(':'resource $connection | string','pg_last_oid(':'resource $result | string','pg_lo_close(':'resource $large_object | bool','pg_lo_create(':'[ resource $connection [, mixed $object_id]] | int','pg_lo_export(':'[ resource $connection [, int $oid [, string $pathname]]] | bool','pg_lo_import(':'[ resource $connection [, string $pathname [, mixed $object_id]]] | int','pg_lo_open(':'resource $connection, int $oid, string $mode | resource','pg_lo_read_all(':'resource $large_object | int','pg_lo_read(':'resource $large_object [, int $len = 8192] | string','pg_lo_seek(':'resource $large_object, int $offset [, int $whence = PGSQL_SEEK_CUR] | bool','pg_lo_tell(':'resource $large_object | int','pg_lo_truncate(':'resource $large_object, int $size | bool','pg_lo_unlink(':'resource $connection, int $oid | bool','pg_lo_write(':'resource $large_object, string $data [, int $len] | int','pg_meta_data(':'resource $connection, string $table_name [, bool $extended] | array','pg_num_fields(':'resource $result | int','pg_num_rows(':'resource $result | int','pg_options(':'[ resource $connection] | string','pg_parameter_status(':'[ resource $connection [, string $param_name]] | string','pg_pconnect(':'string $connection_string [, int $connect_type] | resource','pg_ping(':'[ resource $connection] | bool','pg_port(':'[ resource $connection] | int','pg_prepare(':'[ resource $connection [, string $stmtname [, string $query]]] | resource','pg_put_line(':'[ resource $connection [, string $data]] | bool','pg_query_params(':'[ resource $connection [, string $query [, array $params]]] | resource','pg_query(':'[ resource $connection [, string $query]] | resource','pg_result_error_field(':'resource $result, int $fieldcode | string','pg_result_error(':'resource $result | string','pg_result_seek(':'resource $result, int $offset | bool','pg_result_status(':'resource $result [, int $type = PGSQL_STATUS_LONG] | mixed','pg_select(':'resource $connection, string $table_name, array $assoc_array [, int $options = PGSQL_DML_EXEC] | mixed','pg_send_execute(':'resource $connection, string $stmtname, array $params | bool','pg_send_prepare(':'resource $connection, string $stmtname, string $query | bool','pg_send_query_params(':'resource $connection, string $query, array $params | bool','pg_send_query(':'resource $connection, string $query | bool','pg_set_client_encoding(':'[ resource $connection [, string $encoding]] | int','pg_set_error_verbosity(':'[ resource $connection [, int $verbosity]] | int','pg_trace(':'string $pathname [, string $mode = "w" [, resource $connection]] | bool','pg_transaction_status(':'resource $connection | int','pg_tty(':'[ resource $connection] | string','pg_unescape_bytea(':'string $data | string','pg_untrace(':'[ resource $connection] | bool','pg_update(':'resource $connection, string $table_name, array $data, array $condition [, int $options = PGSQL_DML_EXEC] | mixed','pg_version(':'[ resource $connection] | array',}
+let php_builtin['functions']['pcre']={'preg_filter(':'mixed $pattern, mixed $replacement, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_grep(':'string $pattern, array $input [, int $flags = 0] | array','preg_last_error(':'void | int','preg_match_all(':'string $pattern, string $subject [, array &$matches [, int $flags = PREG_PATTERN_ORDER [, int $offset = 0]]] | int','preg_match(':'string $pattern, string $subject [, array &$matches [, int $flags = 0 [, int $offset = 0]]] | int','preg_quote(':'string $str [, string $delimiter = NULL] | string','preg_replace_callback(':'mixed $pattern, callable $callback, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_replace(':'mixed $pattern, mixed $replacement, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_split(':'string $pattern, string $subject [, int $limit = -1 [, int $flags = 0]] | array',}
+let php_builtin['functions']['sessions']={'session_cache_expire(':'[ string $new_cache_expire] | int','session_cache_limiter(':'[ string $cache_limiter] | string','session_commit(':'session_commit — Alias of session_write_close()','session_decode(':'string $data | bool','session_destroy(':'void | bool','session_encode(':'void | string','session_get_cookie_params(':'void | array','session_id(':'[ string $id] | string','session_is_registered(':'string $name | bool','session_module_name(':'[ string $module] | string','session_name(':'[ string $name] | string','session_regenerate_id(':'[ bool $delete_old_session = false] | bool','session_register_shutdown(':'void | void','session_register(':'mixed $name [, mixed $...] | bool','session_save_path(':'[ string $path] | string','session_set_cookie_params(':'int $lifetime [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]] | void','session_set_save_handler(':'callable $open, callable $close, callable $read, callable $write, callable $destroy, callable $gc | bool','session_start(':'void | bool','session_status(':'void | int','session_unregister(':'string $name | bool','session_unset(':'void | void','session_write_close(':'void | void',}
+let php_builtin['functions']['streams']={'set_socket_blocking(':'set_socket_blocking — Alias of stream_set_blocking()','stream_bucket_append(':'resource $brigade, resource $bucket | void','stream_bucket_make_writeable(':'resource $brigade | object','stream_bucket_new(':'resource $stream, string $buffer | object','stream_bucket_prepend(':'resource $brigade, resource $bucket | void','stream_context_create(':'[ array $options [, array $params]] | resource','stream_context_get_default(':'[ array $options] | resource','stream_context_get_options(':'resource $stream_or_context | array','stream_context_get_params(':'resource $stream_or_context | array','stream_context_set_default(':'array $options | resource','stream_context_set_option(':'resource $stream_or_context, string $wrapper, string $option, mixed $value | bool','stream_context_set_params(':'resource $stream_or_context, array $params | bool','stream_copy_to_stream(':'resource $source, resource $dest [, int $maxlength = -1 [, int $offset = 0]] | int','stream_encoding(':'resource $stream [, string $encoding] | bool','stream_filter_append(':'resource $stream, string $filtername [, int $read_write [, mixed $params]] | resource','stream_filter_prepend(':'resource $stream, string $filtername [, int $read_write [, mixed $params]] | resource','stream_filter_register(':'string $filtername, string $classname | bool','stream_filter_remove(':'resource $stream_filter | bool','stream_get_contents(':'resource $handle [, int $maxlength = -1 [, int $offset = -1]] | string','stream_get_filters(':'void | array','stream_get_line(':'resource $handle, int $length [, string $ending] | string','stream_get_meta_data(':'resource $stream | array','stream_get_transports(':'void | array','stream_get_wrappers(':'void | array','stream_is_local(':'mixed $stream_or_url | bool','stream_notification_callback(':'int $notification_code, int $severity, string $message, int $message_code, int $bytes_transferred, int $bytes_max | void','stream_resolve_include_path(':'string $filename | string','stream_select(':'array &$read, array &$write, array &$except, int $tv_sec [, int $tv_usec = 0] | int','stream_set_blocking(':'resource $stream, int $mode | bool','stream_set_chunk_size(':'resource $fp, int $chunk_size | int','stream_set_read_buffer(':'resource $stream, int $buffer | int','stream_set_timeout(':'resource $stream, int $seconds [, int $microseconds = 0] | bool','stream_set_write_buffer(':'resource $stream, int $buffer | int','stream_socket_accept(':'resource $server_socket [, float $timeout = ini_get("default_socket_timeout") [, string &$peername]] | resource','stream_socket_client(':'string $remote_socket [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout") [, int $flags = STREAM_CLIENT_CONNECT [, resource $context]]]]] | resource','stream_socket_enable_crypto(':'resource $stream, bool $enable [, int $crypto_type [, resource $session_stream]] | mixed','stream_socket_get_name(':'resource $handle, bool $want_peer | string','stream_socket_pair(':'int $domain, int $type, int $protocol | array','stream_socket_recvfrom(':'resource $socket, int $length [, int $flags = 0 [, string &$address]] | string','stream_socket_sendto(':'resource $socket, string $data [, int $flags = 0 [, string $address]] | int','stream_socket_server(':'string $local_socket [, int &$errno [, string &$errstr [, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN [, resource $context]]]] | resource','stream_socket_shutdown(':'resource $stream, int $how | bool','stream_supports_lock(':'resource $stream | bool','stream_wrapper_register(':'string $protocol, string $classname [, int $flags = 0] | bool','stream_wrapper_restore(':'string $protocol | bool','stream_wrapper_unregister(':'string $protocol | bool',}
+let php_builtin['functions']['simplexml']={'simplexml_import_dom(':'DOMNode $node [, string $class_name = "SimpleXMLElement"] | SimpleXMLElement','simplexml_load_file(':'string $filename [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns = "" [, bool $is_prefix = false]]]] | SimpleXMLElement','simplexml_load_string(':'string $data [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns = "" [, bool $is_prefix = false]]]] | SimpleXMLElement',}
+let php_builtin['functions']['xmlwriter']={'xmlwriter_end_attribute(':'resource $xmlwriter | bool','xmlwriter_end_cdata(':'resource $xmlwriter | bool','xmlwriter_end_comment(':'resource $xmlwriter | bool','xmlwriter_end_document(':'resource $xmlwriter | bool','xmlwriter_end_dtd_attlist(':'resource $xmlwriter | bool','xmlwriter_end_dtd_element(':'resource $xmlwriter | bool','xmlwriter_end_dtd_entity(':'resource $xmlwriter | bool','xmlwriter_end_dtd(':'resource $xmlwriter | bool','xmlwriter_end_element(':'resource $xmlwriter | bool','xmlwriter_end_pi(':'resource $xmlwriter | bool','xmlwriter_flush(':'resource $xmlwriter [, bool $empty = true] | mixed','xmlwriter_full_end_element(':'resource $xmlwriter | bool','xmlwriter_open_memory(':'void | resource','xmlwriter_open_uri(':'string $uri | resource','xmlwriter_output_memory(':'resource $xmlwriter [, bool $flush = true] | string','xmlwriter_set_indent_string(':'resource $xmlwriter, string $indentString | bool','xmlwriter_set_indent(':'resource $xmlwriter, bool $indent | bool','xmlwriter_start_attribute_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri | bool','xmlwriter_start_attribute(':'resource $xmlwriter, string $name | bool','xmlwriter_start_cdata(':'resource $xmlwriter | bool','xmlwriter_start_comment(':'resource $xmlwriter | bool','xmlwriter_start_document(':'resource $xmlwriter [, string $version = 1.0 [, string $encoding = NULL [, string $standalone]]] | bool','xmlwriter_start_dtd_attlist(':'resource $xmlwriter, string $name | bool','xmlwriter_start_dtd_element(':'resource $xmlwriter, string $qualifiedName | bool','xmlwriter_start_dtd_entity(':'resource $xmlwriter, string $name, bool $isparam | bool','xmlwriter_start_dtd(':'resource $xmlwriter, string $qualifiedName [, string $publicId [, string $systemId]] | bool','xmlwriter_start_element_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri | bool','xmlwriter_start_element(':'resource $xmlwriter, string $name | bool','xmlwriter_start_pi(':'resource $xmlwriter, string $target | bool','xmlwriter_text(':'resource $xmlwriter, string $content | bool','xmlwriter_write_attribute_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri, string $content | bool','xmlwriter_write_attribute(':'resource $xmlwriter, string $name, string $value | bool','xmlwriter_write_cdata(':'resource $xmlwriter, string $content | bool','xmlwriter_write_comment(':'resource $xmlwriter, string $content | bool','xmlwriter_write_dtd_attlist(':'resource $xmlwriter, string $name, string $content | bool','xmlwriter_write_dtd_element(':'resource $xmlwriter, string $name, string $content | bool','xmlwriter_write_dtd_entity(':'resource $xmlwriter, string $name, string $content, bool $pe, string $pubid, string $sysid, string $ndataid | bool','xmlwriter_write_dtd(':'resource $xmlwriter, string $name [, string $publicId [, string $systemId [, string $subset]]] | bool','xmlwriter_write_element_ns(':'resource $xmlwriter, string $prefix, string $name, string $uri [, string $content] | bool','xmlwriter_write_element(':'resource $xmlwriter, string $name [, string $content] | bool','xmlwriter_write_pi(':'resource $xmlwriter, string $target, string $content | bool','xmlwriter_write_raw(':'resource $xmlwriter, string $content | bool',}
+let php_builtin['functions']['zip']={'zip_close(':'resource $zip | void','zip_entry_close(':'resource $zip_entry | bool','zip_entry_compressedsize(':'resource $zip_entry | int','zip_entry_compressionmethod(':'resource $zip_entry | string','zip_entry_filesize(':'resource $zip_entry | int','zip_entry_name(':'resource $zip_entry | string','zip_entry_open(':'resource $zip, resource $zip_entry [, string $mode] | bool','zip_entry_read(':'resource $zip_entry [, int $length = 1024] | string','zip_open(':'string $filename | resource','zip_read(':'resource $zip | resource',}
+let php_builtin['classes']['spl']={'appenditerator':{'name':'AppendIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'append':{'signature':'Iterator $iterator | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getArrayIterator':{'signature':'void | void','return_type':'void'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'getIteratorIndex':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'arrayiterator':{'name':'ArrayIterator','methods':{'append':{'signature':'mixed $value | void','return_type':'void'},'asort':{'signature':'void | void','return_type':'void'},'__construct':{'signature':'[ mixed $array = array() [, int $flags = 0]]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getArrayCopy':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | mixed','return_type':'mixed'},'ksort':{'signature':'void | void','return_type':'void'},'natcasesort':{'signature':'void | void','return_type':'void'},'natsort':{'signature':'void | void','return_type':'void'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'string $flags | void','return_type':'void'},'uasort':{'signature':'string $cmp_function | void','return_type':'void'},'uksort':{'signature':'string $cmp_function | void','return_type':'void'},'unserialize':{'signature':'string $serialized | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'arrayobject':{'name':'ArrayObject','constants':{'STD_PROP_LIST':'1','ARRAY_AS_PROPS':'2',},'methods':{'__construct':{'signature':'[ mixed $input = [] [, int $flags = 0 [, string $iterator_class = "ArrayIterator"]]]','return_type':''},'append':{'signature':'mixed $value | void','return_type':'void'},'asort':{'signature':'void | void','return_type':'void'},'count':{'signature':'void | int','return_type':'int'},'exchangeArray':{'signature':'mixed $input | array','return_type':'array'},'getArrayCopy':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | int','return_type':'int'},'getIterator':{'signature':'void | ArrayIterator','return_type':'ArrayIterator'},'getIteratorClass':{'signature':'void | string','return_type':'string'},'ksort':{'signature':'void | void','return_type':'void'},'natcasesort':{'signature':'void | void','return_type':'void'},'natsort':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'serialize':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setIteratorClass':{'signature':'string $iterator_class | void','return_type':'void'},'uasort':{'signature':'callable $cmp_function | void','return_type':'void'},'uksort':{'signature':'callable $cmp_function | void','return_type':'void'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},},},'badfunctioncallexception':{'name':'BadFunctionCallException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'badmethodcallexception':{'name':'BadMethodCallException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'cachingiterator':{'name':'CachingIterator','constants':{'CALL_TOSTRING':'1','CATCH_GET_CHILD':'16','TOSTRING_USE_KEY':'2','TOSTRING_USE_CURRENT':'4','TOSTRING_USE_INNER':'8','FULL_CACHE':'256',},'methods':{'__construct':{'signature':'Iterator $iterator [, string $flags = self::CALL_TOSTRING]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | void','return_type':'void'},'getCache':{'signature':'void | void','return_type':'void'},'getFlags':{'signature':'void | void','return_type':'void'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'hasNext':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | void','return_type':'void'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'bitmask $flags | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'callbackfilteriterator':{'name':'CallbackFilterIterator','methods':{'__construct':{'signature':'Iterator $iterator','return_type':''},'accept':{'signature':'void | bool','return_type':'bool'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'directoryiterator':{'name':'DirectoryIterator','methods':{'__construct':{'signature':'string $path','return_type':''},'current':{'signature':'void | DirectoryIterator','return_type':'DirectoryIterator'},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isDot':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | void','return_type':'void'},'__toString':{'signature':'void | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'domainexception':{'name':'DomainException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'emptyiterator':{'name':'EmptyIterator','methods':{'current':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | void','return_type':'void'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'filesystemiterator':{'name':'FilesystemIterator','constants':{'CURRENT_AS_PATHNAME':'32','CURRENT_AS_FILEINFO':'0','CURRENT_AS_SELF':'16','CURRENT_MODE_MASK':'240','KEY_AS_PATHNAME':'0','KEY_AS_FILENAME':'256','FOLLOW_SYMLINKS':'512','KEY_MODE_MASK':'3840','NEW_CURRENT_AND_KEY':'256','SKIP_DOTS':'4096','UNIX_PATHS':'8192',},'methods':{'__construct':{'signature':'string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS]','return_type':''},'current':{'signature':'void | DirectoryIterator','return_type':'DirectoryIterator'},'getFlags':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'[ int $flags] | void','return_type':'void'},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isDot':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'seek':{'signature':'int $position | void','return_type':'void'},'__toString':{'signature':'void | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'filteriterator':{'name':'FilterIterator','methods':{'accept':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'Iterator $iterator','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'globiterator':{'name':'GlobIterator','methods':{'__construct':{'signature':'string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getFlags':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'[ int $flags] | void','return_type':'void'},},},'infiniteiterator':{'name':'InfiniteIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'next':{'signature':'void | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'key':{'signature':'void | scalar','return_type':'scalar'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'invalidargumentexception':{'name':'InvalidArgumentException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'iteratoriterator':{'name':'IteratorIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'lengthexception':{'name':'LengthException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'limititerator':{'name':'LimitIterator','methods':{'__construct':{'signature':'Iterator $iterator [, int $offset = 0 [, int $count = -1]]','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'getPosition':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | int','return_type':'int'},'valid':{'signature':'void | bool','return_type':'bool'},},},'logicexception':{'name':'LogicException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'multipleiterator':{'name':'MultipleIterator','constants':{'MIT_NEED_ANY':'0','MIT_NEED_ALL':'1','MIT_KEYS_NUMERIC':'0','MIT_KEYS_ASSOC':'2',},'methods':{'__construct':{'signature':'[ int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC]','return_type':''},'attachIterator':{'signature':'Iterator $iterator [, string $infos] | void','return_type':'void'},'containsIterator':{'signature':'Iterator $iterator | void','return_type':'void'},'countIterators':{'signature':'void | void','return_type':'void'},'current':{'signature':'void | array','return_type':'array'},'detachIterator':{'signature':'Iterator $iterator | void','return_type':'void'},'getFlags':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | array','return_type':'array'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'norewinditerator':{'name':'NoRewindIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'outofboundsexception':{'name':'OutOfBoundsException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'outofrangeexception':{'name':'OutOfRangeException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'overflowexception':{'name':'OverflowException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'parentiterator':{'name':'ParentIterator','methods':{'accept':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'RecursiveIterator $iterator','return_type':''},'getChildren':{'signature':'void | ParentIterator','return_type':'ParentIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},},},'rangeexception':{'name':'RangeException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'recursivearrayiterator':{'name':'RecursiveArrayIterator','methods':{'getChildren':{'signature':'void | RecursiveArrayIterator','return_type':'RecursiveArrayIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'append':{'signature':'mixed $value | void','return_type':'void'},'asort':{'signature':'void | void','return_type':'void'},'__construct':{'signature':'[ mixed $array = array() [, int $flags = 0]]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getArrayCopy':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | mixed','return_type':'mixed'},'ksort':{'signature':'void | void','return_type':'void'},'natcasesort':{'signature':'void | void','return_type':'void'},'natsort':{'signature':'void | void','return_type':'void'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $position | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'string $flags | void','return_type':'void'},'uasort':{'signature':'string $cmp_function | void','return_type':'void'},'uksort':{'signature':'string $cmp_function | void','return_type':'void'},'unserialize':{'signature':'string $serialized | string','return_type':'string'},'valid':{'signature':'void | bool','return_type':'bool'},},},'recursivecachingiterator':{'name':'RecursiveCachingIterator','methods':{'__construct':{'signature':'Iterator $iterator [, string $flags = self::CALL_TOSTRING]','return_type':''},'getChildren':{'signature':'void | RecursiveCachingIterator','return_type':'RecursiveCachingIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | void','return_type':'void'},'getCache':{'signature':'void | void','return_type':'void'},'getFlags':{'signature':'void | void','return_type':'void'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'hasNext':{'signature':'void | void','return_type':'void'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'string $index | void','return_type':'void'},'offsetGet':{'signature':'string $index | void','return_type':'void'},'offsetSet':{'signature':'string $index, string $newval | void','return_type':'void'},'offsetUnset':{'signature':'string $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setFlags':{'signature':'bitmask $flags | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | void','return_type':'void'},},},'recursivecallbackfilteriterator':{'name':'RecursiveCallbackFilterIterator','methods':{'__construct':{'signature':'RecursiveIterator $iterator, string $callback','return_type':''},'getChildren':{'signature':'void | RecursiveCallbackFilterIterator','return_type':'RecursiveCallbackFilterIterator'},'hasChildren':{'signature':'void | void','return_type':'void'},'accept':{'signature':'void | string','return_type':'string'},},},'recursivedirectoryiterator':{'name':'RecursiveDirectoryIterator','methods':{'__construct':{'signature':'string $path [, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS]','return_type':''},'getChildren':{'signature':'void | mixed','return_type':'mixed'},'getSubPath':{'signature':'void | string','return_type':'string'},'getSubPathname':{'signature':'void | string','return_type':'string'},'hasChildren':{'signature':'[ bool $allow_links = false] | bool','return_type':'bool'},'key':{'signature':'void | string','return_type':'string'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getFlags':{'signature':'void | int','return_type':'int'},'setFlags':{'signature':'[ int $flags] | void','return_type':'void'},},},'recursivefilteriterator':{'name':'RecursiveFilterIterator','methods':{'__construct':{'signature':'Iterator $iterator','return_type':''},'getChildren':{'signature':'void | void','return_type':'void'},'hasChildren':{'signature':'void | void','return_type':'void'},'accept':{'signature':'void | bool','return_type':'bool'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'recursiveiteratoriterator':{'name':'RecursiveIteratorIterator','constants':{'LEAVES_ONLY':'0','SELF_FIRST':'1','CHILD_FIRST':'2','CATCH_GET_CHILD':'16',},'methods':{'beginChildren':{'signature':'void | void','return_type':'void'},'beginIteration':{'signature':'void | void','return_type':'void'},'callGetChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'callHasChildren':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'Traversable $iterator [, int $mode = RecursiveIteratorIterator::LEAVES_ONLY [, int $flags = 0]]','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'endChildren':{'signature':'void | void','return_type':'void'},'endIteration':{'signature':'void | void','return_type':'void'},'getDepth':{'signature':'void | int','return_type':'int'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'getMaxDepth':{'signature':'void | mixed','return_type':'mixed'},'getSubIterator':{'signature':'[ int $level] | RecursiveIterator','return_type':'RecursiveIterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'nextElement':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setMaxDepth':{'signature':'[ string $max_depth = -1] | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'recursiveregexiterator':{'name':'RecursiveRegexIterator','methods':{'__construct':{'signature':'RecursiveIterator $iterator, string $regex [, int $mode = self::MATCH [, int $flags = 0 [, int $preg_flags = 0]]]','return_type':''},'getChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'accept':{'signature':'void | bool','return_type':'bool'},'getFlags':{'signature':'void | int','return_type':'int'},'getMode':{'signature':'void | int','return_type':'int'},'getPregFlags':{'signature':'void | int','return_type':'int'},'getRegex':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMode':{'signature':'int $mode | void','return_type':'void'},'setPregFlags':{'signature':'int $preg_flags | void','return_type':'void'},},},'recursivetreeiterator':{'name':'RecursiveTreeIterator','constants':{'BYPASS_CURRENT':'4','BYPASS_KEY':'8','PREFIX_LEFT':'0','PREFIX_MID_HAS_NEXT':'1','PREFIX_MID_LAST':'2','PREFIX_END_HAS_NEXT':'3','PREFIX_END_LAST':'4','PREFIX_RIGHT':'5',},'methods':{'beginChildren':{'signature':'void | void','return_type':'void'},'beginIteration':{'signature':'void | void','return_type':'void'},'callGetChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'callHasChildren':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'Traversable $iterator [, int $mode = RecursiveIteratorIterator::LEAVES_ONLY [, int $flags = 0]]','return_type':''},'current':{'signature':'void | mixed','return_type':'mixed'},'endChildren':{'signature':'void | void','return_type':'void'},'endIteration':{'signature':'void | void','return_type':'void'},'getEntry':{'signature':'void | string','return_type':'string'},'getPostfix':{'signature':'void | void','return_type':'void'},'getPrefix':{'signature':'void | string','return_type':'string'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'nextElement':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setPrefixPart':{'signature':'int $part, string $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},'getDepth':{'signature':'void | int','return_type':'int'},'getInnerIterator':{'signature':'void | iterator','return_type':'iterator'},'getMaxDepth':{'signature':'void | mixed','return_type':'mixed'},'getSubIterator':{'signature':'[ int $level] | RecursiveIterator','return_type':'RecursiveIterator'},'setMaxDepth':{'signature':'[ string $max_depth = -1] | void','return_type':'void'},},},'regexiterator':{'name':'RegexIterator','constants':{'MATCH':'0','GET_MATCH':'1','ALL_MATCHES':'2','SPLIT':'3','REPLACE':'4','USE_KEY':'1',},'methods':{'__construct':{'signature':'Iterator $iterator','return_type':''},'accept':{'signature':'void | bool','return_type':'bool'},'getFlags':{'signature':'void | int','return_type':'int'},'getMode':{'signature':'void | int','return_type':'int'},'getPregFlags':{'signature':'void | int','return_type':'int'},'getRegex':{'signature':'void | string','return_type':'string'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMode':{'signature':'int $mode | void','return_type':'void'},'setPregFlags':{'signature':'int $preg_flags | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'runtimeexception':{'name':'RuntimeException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'spldoublylinkedlist':{'name':'SplDoublyLinkedList','methods':{'__construct':{'signature':'void','return_type':''},'bottom':{'signature':'void | mixed','return_type':'mixed'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getIteratorMode':{'signature':'void | int','return_type':'int'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'pop':{'signature':'void | mixed','return_type':'mixed'},'prev':{'signature':'void | void','return_type':'void'},'push':{'signature':'mixed $value | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setIteratorMode':{'signature':'int $mode | void','return_type':'void'},'shift':{'signature':'void | mixed','return_type':'mixed'},'top':{'signature':'void | mixed','return_type':'mixed'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'unshift':{'signature':'mixed $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splfileinfo':{'name':'SplFileInfo','methods':{'__construct':{'signature':'string $file_name','return_type':''},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFileInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getLinkTarget':{'signature':'void | string','return_type':'string'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getRealPath':{'signature':'void | string','return_type':'string'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'openFile':{'signature':'[ string $open_mode = r [, bool $use_include_path = false [, resource $context = NULL]]] | SplFileObject','return_type':'SplFileObject'},'setFileClass':{'signature':'[ string $class_name] | void','return_type':'void'},'setInfoClass':{'signature':'[ string $class_name] | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},},},'splfileobject':{'name':'SplFileObject','constants':{'DROP_NEW_LINE':'1','READ_AHEAD':'2','SKIP_EMPTY':'4','READ_CSV':'8',},'methods':{'__construct':{'signature':'string $file_name','return_type':''},'current':{'signature':'void | string|array','return_type':'string|array'},'eof':{'signature':'void | bool','return_type':'bool'},'fflush':{'signature':'void | bool','return_type':'bool'},'fgetc':{'signature':'void | string','return_type':'string'},'fgetcsv':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | array','return_type':'array'},'fgets':{'signature':'void | string','return_type':'string'},'fgetss':{'signature':'[ string $allowable_tags] | string','return_type':'string'},'flock':{'signature':'int $operation [, int &$wouldblock] | bool','return_type':'bool'},'fpassthru':{'signature':'void | int','return_type':'int'},'fputcsv':{'signature':'array $fields [, string $delimiter = '','' [, string $enclosure = ''"'']] | int','return_type':'int'},'fscanf':{'signature':'string $format [, mixed &$...] | mixed','return_type':'mixed'},'fseek':{'signature':'int $offset [, int $whence = SEEK_SET] | int','return_type':'int'},'fstat':{'signature':'void | array','return_type':'array'},'ftell':{'signature':'void | int','return_type':'int'},'ftruncate':{'signature':'int $size | bool','return_type':'bool'},'fwrite':{'signature':'string $str [, int $length] | int','return_type':'int'},'getChildren':{'signature':'void | void','return_type':'void'},'getCsvControl':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | int','return_type':'int'},'getMaxLineLen':{'signature':'void | int','return_type':'int'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $line_pos | void','return_type':'void'},'setCsvControl':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMaxLineLen':{'signature':'int $max_len | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},'getATime':{'signature':'void | int','return_type':'int'},'getBasename':{'signature':'[ string $suffix] | string','return_type':'string'},'getCTime':{'signature':'void | int','return_type':'int'},'getExtension':{'signature':'void | string','return_type':'string'},'getFileInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getFilename':{'signature':'void | string','return_type':'string'},'getGroup':{'signature':'void | int','return_type':'int'},'getInode':{'signature':'void | int','return_type':'int'},'getLinkTarget':{'signature':'void | string','return_type':'string'},'getMTime':{'signature':'void | int','return_type':'int'},'getOwner':{'signature':'void | int','return_type':'int'},'getPath':{'signature':'void | string','return_type':'string'},'getPathInfo':{'signature':'[ string $class_name] | SplFileInfo','return_type':'SplFileInfo'},'getPathname':{'signature':'void | string','return_type':'string'},'getPerms':{'signature':'void | int','return_type':'int'},'getRealPath':{'signature':'void | string','return_type':'string'},'getSize':{'signature':'void | int','return_type':'int'},'getType':{'signature':'void | string','return_type':'string'},'isDir':{'signature':'void | bool','return_type':'bool'},'isExecutable':{'signature':'void | bool','return_type':'bool'},'isFile':{'signature':'void | bool','return_type':'bool'},'isLink':{'signature':'void | bool','return_type':'bool'},'isReadable':{'signature':'void | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'openFile':{'signature':'[ string $open_mode = r [, bool $use_include_path = false [, resource $context = NULL]]] | SplFileObject','return_type':'SplFileObject'},'setFileClass':{'signature':'[ string $class_name] | void','return_type':'void'},'setInfoClass':{'signature':'[ string $class_name] | void','return_type':'void'},},},'splfixedarray':{'name':'SplFixedArray','methods':{'__construct':{'signature':'[ int $size = 0]','return_type':''},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getSize':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'int $index | bool','return_type':'bool'},'offsetGet':{'signature':'int $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'int $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'int $index | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setSize':{'signature':'int $size | int','return_type':'int'},'toArray':{'signature':'void | array','return_type':'array'},'valid':{'signature':'void | bool','return_type':'bool'},'__wakeup':{'signature':'void | void','return_type':'void'},},'static_methods':{'fromArray':{'signature':'array $array [, bool $save_indexes = true] | SplFixedArray','return_type':'SplFixedArray'},},},'splheap':{'name':'SplHeap','methods':{'__construct':{'signature':'void','return_type':''},'compare':{'signature':'mixed $value1, mixed $value2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splmaxheap':{'name':'SplMaxHeap','methods':{'compare':{'signature':'mixed $value1, mixed $value2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splminheap':{'name':'SplMinHeap','methods':{'compare':{'signature':'mixed $value1, mixed $value2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splobjectstorage':{'name':'SplObjectStorage','methods':{'addAll':{'signature':'SplObjectStorage $storage | void','return_type':'void'},'attach':{'signature':'object $object [, mixed $data = NULL] | void','return_type':'void'},'contains':{'signature':'object $object | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | object','return_type':'object'},'detach':{'signature':'object $object | void','return_type':'void'},'getHash':{'signature':'object $object | string','return_type':'string'},'getInfo':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'object $object | bool','return_type':'bool'},'offsetGet':{'signature':'object $object | mixed','return_type':'mixed'},'offsetSet':{'signature':'object $object [, mixed $data = NULL] | void','return_type':'void'},'offsetUnset':{'signature':'object $object | void','return_type':'void'},'removeAll':{'signature':'SplObjectStorage $storage | void','return_type':'void'},'removeAllExcept':{'signature':'SplObjectStorage $storage | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'setInfo':{'signature':'mixed $data | void','return_type':'void'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splpriorityqueue':{'name':'SplPriorityQueue','methods':{'__construct':{'signature':'void','return_type':''},'compare':{'signature':'mixed $priority1, mixed $priority2 | int','return_type':'int'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'extract':{'signature':'void | mixed','return_type':'mixed'},'insert':{'signature':'mixed $value, mixed $priority | void','return_type':'void'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'recoverFromCorruption':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'setExtractFlags':{'signature':'int $flags | void','return_type':'void'},'top':{'signature':'void | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splqueue':{'name':'SplQueue','methods':{'__construct':{'signature':'void','return_type':''},'dequeue':{'signature':'void | mixed','return_type':'mixed'},'enqueue':{'signature':'mixed $value | void','return_type':'void'},'setIteratorMode':{'signature':'int $mode | void','return_type':'void'},'bottom':{'signature':'void | mixed','return_type':'mixed'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getIteratorMode':{'signature':'void | int','return_type':'int'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'pop':{'signature':'void | mixed','return_type':'mixed'},'prev':{'signature':'void | void','return_type':'void'},'push':{'signature':'mixed $value | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'shift':{'signature':'void | mixed','return_type':'mixed'},'top':{'signature':'void | mixed','return_type':'mixed'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'unshift':{'signature':'mixed $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'splstack':{'name':'SplStack','methods':{'__construct':{'signature':'void','return_type':''},'setIteratorMode':{'signature':'int $mode | void','return_type':'void'},'bottom':{'signature':'void | mixed','return_type':'mixed'},'count':{'signature':'void | int','return_type':'int'},'current':{'signature':'void | mixed','return_type':'mixed'},'getIteratorMode':{'signature':'void | int','return_type':'int'},'isEmpty':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'offsetExists':{'signature':'mixed $index | bool','return_type':'bool'},'offsetGet':{'signature':'mixed $index | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $index, mixed $newval | void','return_type':'void'},'offsetUnset':{'signature':'mixed $index | void','return_type':'void'},'pop':{'signature':'void | mixed','return_type':'mixed'},'prev':{'signature':'void | void','return_type':'void'},'push':{'signature':'mixed $value | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'serialize':{'signature':'void | string','return_type':'string'},'shift':{'signature':'void | mixed','return_type':'mixed'},'top':{'signature':'void | mixed','return_type':'mixed'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},'unshift':{'signature':'mixed $value | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'spltempfileobject':{'name':'SplTempFileObject','methods':{'__construct':{'signature':'string $filename [, string $open_mode = "r" [, bool $use_include_path = false [, resource $context]]]','return_type':''},'current':{'signature':'void | string|array','return_type':'string|array'},'eof':{'signature':'void | bool','return_type':'bool'},'fflush':{'signature':'void | bool','return_type':'bool'},'fgetc':{'signature':'void | string','return_type':'string'},'fgetcsv':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | array','return_type':'array'},'fgets':{'signature':'void | string','return_type':'string'},'fgetss':{'signature':'[ string $allowable_tags] | string','return_type':'string'},'flock':{'signature':'int $operation [, int &$wouldblock] | bool','return_type':'bool'},'fpassthru':{'signature':'void | int','return_type':'int'},'fputcsv':{'signature':'array $fields [, string $delimiter = '','' [, string $enclosure = ''"'']] | int','return_type':'int'},'fscanf':{'signature':'string $format [, mixed &$...] | mixed','return_type':'mixed'},'fseek':{'signature':'int $offset [, int $whence = SEEK_SET] | int','return_type':'int'},'fstat':{'signature':'void | array','return_type':'array'},'ftell':{'signature':'void | int','return_type':'int'},'ftruncate':{'signature':'int $size | bool','return_type':'bool'},'fwrite':{'signature':'string $str [, int $length] | int','return_type':'int'},'getChildren':{'signature':'void | void','return_type':'void'},'getCsvControl':{'signature':'void | array','return_type':'array'},'getFlags':{'signature':'void | int','return_type':'int'},'getMaxLineLen':{'signature':'void | int','return_type':'int'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | int','return_type':'int'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'seek':{'signature':'int $line_pos | void','return_type':'void'},'setCsvControl':{'signature':'[ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\"]]] | void','return_type':'void'},'setFlags':{'signature':'int $flags | void','return_type':'void'},'setMaxLineLen':{'signature':'int $max_len | void','return_type':'void'},'__toString':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'underflowexception':{'name':'UnderflowException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'unexpectedvalueexception':{'name':'UnexpectedValueException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},}
+let php_builtin['classes']['predefined_interfaces_and_classes']={'closure':{'name':'Closure','methods':{'__construct':{'signature':'void','return_type':''},'bindTo':{'signature':'object $newthis [, mixed $newscope = ''static''] | Closure','return_type':'Closure'},},'static_methods':{'bind':{'signature':'Closure $closure, object $newthis [, mixed $newscope = ''static''] | Closure','return_type':'Closure'},},},'generator':{'name':'Generator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'send':{'signature':'mixed $value | mixed','return_type':'mixed'},'throw':{'signature':'Exception $exception | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},'__wakeup':{'signature':'void | void','return_type':'void'},},},}
+let php_builtin['classes']['curl']={'curlfile':{'name':'CURLFile','properties': {'name':{'initializer':'','type':''},'mime':{'initializer':'','type':''},'postname':{'initializer':'','type':''},},'methods':{'__construct':{'signature':'string $filename [, string $mimetype [, string $postname]]','return_type':''},'getFilename':{'signature':'void | string','return_type':'string'},'getMimeType':{'signature':'void | string','return_type':'string'},'getPostFilename':{'signature':'void | string','return_type':'string'},'setMimeType':{'signature':'string $mime | void','return_type':'void'},'setPostFilename':{'signature':'string $postname | void','return_type':'void'},'__wakeup':{'signature':'void | void','return_type':'void'},},},}
+let php_builtin['classes']['date_time']={'dateinterval':{'name':'DateInterval','properties': {'y':{'initializer':'','type':'integer'},'m':{'initializer':'','type':'integer'},'d':{'initializer':'','type':'integer'},'h':{'initializer':'','type':'integer'},'i':{'initializer':'','type':'integer'},'s':{'initializer':'','type':'integer'},'invert':{'initializer':'','type':'integer'},'days':{'initializer':'','type':'mixed'},},'methods':{'__construct':{'signature':'string $interval_spec','return_type':''},'format':{'signature':'string $format | string','return_type':'string'},},'static_methods':{'createFromDateString':{'signature':'string $time | DateInterval','return_type':'DateInterval'},},},'dateperiod':{'name':'DatePeriod','constants':{'EXCLUDE_START_DATE':'1',},'methods':{'__construct':{'signature':'string $isostr [, int $options]','return_type':''},},},'datetime':{'name':'DateTime','constants':{'ATOM':'"Y-m-d\TH:i:sP"','COOKIE':'"l, d-M-y H:i:s T"','ISO8601':'"Y-m-d\TH:i:sO"','RFC822':'"D, d M y H:i:s O"','RFC850':'"l, d-M-y H:i:s T"','RFC1036':'"D, d M y H:i:s O"','RFC1123':'"D, d M Y H:i:s O"','RFC2822':'"D, d M Y H:i:s O"','RFC3339':'"Y-m-d\TH:i:sP"','RSS':'"D, d M Y H:i:s O"','W3C':'"Y-m-d\TH:i:sP"',},'methods':{'__construct':{'signature':'[ string $time = "now" [, DateTimeZone $timezone = NULL]]','return_type':''},'add':{'signature':'DateInterval $interval | DateTime','return_type':'DateTime'},'modify':{'signature':'string $modify | DateTime','return_type':'DateTime'},'setDate':{'signature':'int $year, int $month, int $day | DateTime','return_type':'DateTime'},'setISODate':{'signature':'int $year, int $week [, int $day = 1] | DateTime','return_type':'DateTime'},'setTime':{'signature':'int $hour, int $minute [, int $second = 0] | DateTime','return_type':'DateTime'},'setTimestamp':{'signature':'int $unixtimestamp | DateTime','return_type':'DateTime'},'setTimezone':{'signature':'DateTimeZone $timezone | DateTime','return_type':'DateTime'},'sub':{'signature':'DateInterval $interval | DateTime','return_type':'DateTime'},'diff':{'signature':'DateTimeInterface $datetime2 [, bool $absolute = false] | DateInterval','return_type':'DateInterval'},'format':{'signature':'string $format | string','return_type':'string'},'getOffset':{'signature':'void | int','return_type':'int'},'getTimestamp':{'signature':'void | int','return_type':'int'},'getTimezone':{'signature':'void | DateTimeZone','return_type':'DateTimeZone'},'__wakeup':{'signature':'void','return_type':''},},'static_methods':{'createFromFormat':{'signature':'string $format, string $time [, DateTimeZone $timezone] | DateTime','return_type':'DateTime'},'getLastErrors':{'signature':'void | array','return_type':'array'},'__set_state':{'signature':'array $array | DateTime','return_type':'DateTime'},},},'datetimeimmutable':{'name':'DateTimeImmutable','methods':{'__construct':{'signature':'[ string $time = "now" [, DateTimeZone $timezone = NULL]]','return_type':''},'add':{'signature':'DateInterval $interval | DateTimeImmutable','return_type':'DateTimeImmutable'},'modify':{'signature':'string $modify | DateTimeImmutable','return_type':'DateTimeImmutable'},'setDate':{'signature':'int $year, int $month, int $day | DateTimeImmutable','return_type':'DateTimeImmutable'},'setISODate':{'signature':'int $year, int $week [, int $day = 1] | DateTimeImmutable','return_type':'DateTimeImmutable'},'setTime':{'signature':'int $hour, int $minute [, int $second = 0] | DateTimeImmutable','return_type':'DateTimeImmutable'},'setTimestamp':{'signature':'int $unixtimestamp | DateTimeImmutable','return_type':'DateTimeImmutable'},'setTimezone':{'signature':'DateTimeZone $timezone | DateTimeImmutable','return_type':'DateTimeImmutable'},'sub':{'signature':'DateInterval $interval | DateTimeImmutable','return_type':'DateTimeImmutable'},'diff':{'signature':'DateTimeInterface $datetime2 [, bool $absolute = false] | DateInterval','return_type':'DateInterval'},'format':{'signature':'string $format | string','return_type':'string'},'getOffset':{'signature':'void | int','return_type':'int'},'getTimestamp':{'signature':'void | int','return_type':'int'},'getTimezone':{'signature':'void | DateTimeZone','return_type':'DateTimeZone'},'__wakeup':{'signature':'void','return_type':''},},'static_methods':{'createFromFormat':{'signature':'string $format, string $time [, DateTimeZone $timezone] | DateTimeImmutable','return_type':'DateTimeImmutable'},'getLastErrors':{'signature':'void | array','return_type':'array'},'__set_state':{'signature':'array $array | DateTimeImmutable','return_type':'DateTimeImmutable'},},},'datetimezone':{'name':'DateTimeZone','constants':{'AFRICA':'1','AMERICA':'2','ANTARCTICA':'4','ARCTIC':'8','ASIA':'16','ATLANTIC':'32','AUSTRALIA':'64','EUROPE':'128','INDIAN':'256','PACIFIC':'512','UTC':'1024','ALL':'2047','ALL_WITH_BC':'4095','PER_COUNTRY':'4096',},'methods':{'__construct':{'signature':'string $timezone','return_type':''},'getLocation':{'signature':'void | array','return_type':'array'},'getName':{'signature':'void | string','return_type':'string'},'getOffset':{'signature':'DateTime $datetime | int','return_type':'int'},'getTransitions':{'signature':'[ int $timestamp_begin [, int $timestamp_end]] | array','return_type':'array'},},'static_methods':{'listAbbreviations':{'signature':'void | array','return_type':'array'},'listIdentifiers':{'signature':'[ int $what = DateTimeZone::ALL [, string $country = NULL]] | array','return_type':'array'},},},}
+let php_builtin['classes']['directories']={'directory':{'name':'Directory','properties': {'path':{'initializer':'','type':'string'},'handle':{'initializer':'','type':'resource'},},'methods':{'close':{'signature':'[ resource $dir_handle] | void','return_type':'void'},'read':{'signature':'[ resource $dir_handle] | string','return_type':'string'},'rewind':{'signature':'[ resource $dir_handle] | void','return_type':'void'},},},}
+let php_builtin['classes']['dom']={'domattr':{'name':'DOMAttr','properties': {'name':{'initializer':'','type':'string'},'ownerElement':{'initializer':'','type':'DOMElement'},'schemaTypeInfo':{'initializer':'','type':'bool'},'specified':{'initializer':'','type':'bool'},'value':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'string $name [, string $value]','return_type':''},'isId':{'signature':'void | bool','return_type':'bool'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domcdatasection':{'name':'DOMCdataSection','methods':{'__construct':{'signature':'string $value','return_type':''},'isWhitespaceInElementContent':{'signature':'void | bool','return_type':'bool'},'splitText':{'signature':'int $offset | DOMText','return_type':'DOMText'},},},'domcharacterdata':{'name':'DOMCharacterData','properties': {'data':{'initializer':'','type':'string'},'length':{'initializer':'','type':'int'},},'methods':{'appendData':{'signature':'string $data | void','return_type':'void'},'deleteData':{'signature':'int $offset, int $count | void','return_type':'void'},'insertData':{'signature':'int $offset, string $data | void','return_type':'void'},'replaceData':{'signature':'int $offset, int $count, string $data | void','return_type':'void'},'substringData':{'signature':'int $offset, int $count | string','return_type':'string'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domcomment':{'name':'DOMComment','methods':{'__construct':{'signature':'[ string $value]','return_type':''},'appendData':{'signature':'string $data | void','return_type':'void'},'deleteData':{'signature':'int $offset, int $count | void','return_type':'void'},'insertData':{'signature':'int $offset, string $data | void','return_type':'void'},'replaceData':{'signature':'int $offset, int $count, string $data | void','return_type':'void'},'substringData':{'signature':'int $offset, int $count | string','return_type':'string'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domdocument':{'name':'DOMDocument','properties': {'actualEncoding':{'initializer':'','type':'string'},'config':{'initializer':'','type':'DOMConfiguration'},'doctype':{'initializer':'','type':'DOMDocumentType'},'documentElement':{'initializer':'','type':'DOMElement'},'documentURI':{'initializer':'','type':'string'},'encoding':{'initializer':'','type':'string'},'formatOutput':{'initializer':'','type':'bool'},'implementation':{'initializer':'','type':'DOMImplementation'},'preserveWhiteSpace':{'initializer':'true','type':'bool'},'recover':{'initializer':'','type':'bool'},'resolveExternals':{'initializer':'','type':'bool'},'standalone':{'initializer':'','type':'bool'},'strictErrorChecking':{'initializer':'true','type':'bool'},'substituteEntities':{'initializer':'','type':'bool'},'validateOnParse':{'initializer':'false','type':'bool'},'version':{'initializer':'','type':'string'},'xmlEncoding':{'initializer':'','type':'string'},'xmlStandalone':{'initializer':'','type':'bool'},'xmlVersion':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'[ string $version [, string $encoding]]','return_type':''},'createAttribute':{'signature':'string $name | DOMAttr','return_type':'DOMAttr'},'createAttributeNS':{'signature':'string $namespaceURI, string $qualifiedName | DOMAttr','return_type':'DOMAttr'},'createCDATASection':{'signature':'string $data | DOMCDATASection','return_type':'DOMCDATASection'},'createComment':{'signature':'string $data | DOMComment','return_type':'DOMComment'},'createDocumentFragment':{'signature':'void | DOMDocumentFragment','return_type':'DOMDocumentFragment'},'createElement':{'signature':'string $name [, string $value] | DOMElement','return_type':'DOMElement'},'createElementNS':{'signature':'string $namespaceURI, string $qualifiedName [, string $value] | DOMElement','return_type':'DOMElement'},'createEntityReference':{'signature':'string $name | DOMEntityReference','return_type':'DOMEntityReference'},'createProcessingInstruction':{'signature':'string $target [, string $data] | DOMProcessingInstruction','return_type':'DOMProcessingInstruction'},'createTextNode':{'signature':'string $content | DOMText','return_type':'DOMText'},'getElementById':{'signature':'string $elementId | DOMElement','return_type':'DOMElement'},'getElementsByTagName':{'signature':'string $name | DOMNodeList','return_type':'DOMNodeList'},'getElementsByTagNameNS':{'signature':'string $namespaceURI, string $localName | DOMNodeList','return_type':'DOMNodeList'},'importNode':{'signature':'DOMNode $importedNode [, bool $deep] | DOMNode','return_type':'DOMNode'},'load':{'signature':'string $filename [, int $options = 0] | mixed','return_type':'mixed'},'loadHTML':{'signature':'string $source [, int $options = 0] | bool','return_type':'bool'},'loadHTMLFile':{'signature':'string $filename [, int $options = 0] | bool','return_type':'bool'},'loadXML':{'signature':'string $source [, int $options = 0] | mixed','return_type':'mixed'},'normalizeDocument':{'signature':'void | void','return_type':'void'},'registerNodeClass':{'signature':'string $baseclass, string $extendedclass | bool','return_type':'bool'},'relaxNGValidate':{'signature':'string $filename | bool','return_type':'bool'},'relaxNGValidateSource':{'signature':'string $source | bool','return_type':'bool'},'save':{'signature':'string $filename [, int $options] | int','return_type':'int'},'saveHTML':{'signature':'[ DOMNode $node = NULL] | string','return_type':'string'},'saveHTMLFile':{'signature':'string $filename | int','return_type':'int'},'saveXML':{'signature':'[ DOMNode $node [, int $options]] | string','return_type':'string'},'schemaValidate':{'signature':'string $filename [, int $flags] | bool','return_type':'bool'},'schemaValidateSource':{'signature':'string $source [, int $flags] | bool','return_type':'bool'},'validate':{'signature':'void | bool','return_type':'bool'},'xinclude':{'signature':'[ int $options] | int','return_type':'int'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domdocumentfragment':{'name':'DOMDocumentFragment','methods':{'appendXML':{'signature':'string $data | bool','return_type':'bool'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domdocumenttype':{'name':'DOMDocumentType','properties': {'publicId':{'initializer':'','type':'string'},'systemId':{'initializer':'','type':'string'},'name':{'initializer':'','type':'string'},'entities':{'initializer':'','type':'DOMNamedNodeMap'},'notations':{'initializer':'','type':'DOMNamedNodeMap'},'internalSubset':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domelement':{'name':'DOMElement','properties': {'schemaTypeInfo':{'initializer':'','type':'bool'},'tagName':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'string $name [, string $value [, string $namespaceURI]]','return_type':''},'getAttribute':{'signature':'string $name | string','return_type':'string'},'getAttributeNode':{'signature':'string $name | DOMAttr','return_type':'DOMAttr'},'getAttributeNodeNS':{'signature':'string $namespaceURI, string $localName | DOMAttr','return_type':'DOMAttr'},'getAttributeNS':{'signature':'string $namespaceURI, string $localName | string','return_type':'string'},'getElementsByTagName':{'signature':'string $name | DOMNodeList','return_type':'DOMNodeList'},'getElementsByTagNameNS':{'signature':'string $namespaceURI, string $localName | DOMNodeList','return_type':'DOMNodeList'},'hasAttribute':{'signature':'string $name | bool','return_type':'bool'},'hasAttributeNS':{'signature':'string $namespaceURI, string $localName | bool','return_type':'bool'},'removeAttribute':{'signature':'string $name | bool','return_type':'bool'},'removeAttributeNode':{'signature':'DOMAttr $oldnode | bool','return_type':'bool'},'removeAttributeNS':{'signature':'string $namespaceURI, string $localName | bool','return_type':'bool'},'setAttribute':{'signature':'string $name, string $value | DOMAttr','return_type':'DOMAttr'},'setAttributeNode':{'signature':'DOMAttr $attr | DOMAttr','return_type':'DOMAttr'},'setAttributeNodeNS':{'signature':'DOMAttr $attr | DOMAttr','return_type':'DOMAttr'},'setAttributeNS':{'signature':'string $namespaceURI, string $qualifiedName, string $value | void','return_type':'void'},'setIdAttribute':{'signature':'string $name, bool $isId | void','return_type':'void'},'setIdAttributeNode':{'signature':'DOMAttr $attr, bool $isId | void','return_type':'void'},'setIdAttributeNS':{'signature':'string $namespaceURI, string $localName, bool $isId | void','return_type':'void'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domentity':{'name':'DOMEntity','properties': {'publicId':{'initializer':'','type':'string'},'systemId':{'initializer':'','type':'string'},'notationName':{'initializer':'','type':'string'},'actualEncoding':{'initializer':'','type':'string'},'encoding':{'initializer':'','type':'string'},'version':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domentityreference':{'name':'DOMEntityReference','methods':{'__construct':{'signature':'string $name','return_type':''},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domexception':{'name':'DOMException','properties': {'code':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'domimplementation':{'name':'DOMImplementation','methods':{'__construct':{'signature':'void','return_type':''},'createDocument':{'signature':'[ string $namespaceURI = NULL [, string $qualifiedName = NULL [, DOMDocumentType $doctype = NULL]]] | DOMDocument','return_type':'DOMDocument'},'createDocumentType':{'signature':'[ string $qualifiedName = NULL [, string $publicId = NULL [, string $systemId = NULL]]] | DOMDocumentType','return_type':'DOMDocumentType'},'hasFeature':{'signature':'string $feature, string $version | bool','return_type':'bool'},},},'domnamednodemap':{'name':'DOMNamedNodeMap','properties': {'length':{'initializer':'','type':'int'},},'methods':{'getNamedItem':{'signature':'string $name | DOMNode','return_type':'DOMNode'},'getNamedItemNS':{'signature':'string $namespaceURI, string $localName | DOMNode','return_type':'DOMNode'},'item':{'signature':'int $index | DOMNode','return_type':'DOMNode'},},},'domnode':{'name':'DOMNode','properties': {'nodeName':{'initializer':'','type':'string'},'nodeValue':{'initializer':'','type':'string'},'nodeType':{'initializer':'','type':'int'},'parentNode':{'initializer':'','type':'DOMNode'},'childNodes':{'initializer':'','type':'DOMNodeList'},'firstChild':{'initializer':'','type':'DOMNode'},'lastChild':{'initializer':'','type':'DOMNode'},'previousSibling':{'initializer':'','type':'DOMNode'},'nextSibling':{'initializer':'','type':'DOMNode'},'attributes':{'initializer':'','type':'DOMNamedNodeMap'},'ownerDocument':{'initializer':'','type':'DOMDocument'},'namespaceURI':{'initializer':'','type':'string'},'prefix':{'initializer':'','type':'string'},'localName':{'initializer':'','type':'string'},'baseURI':{'initializer':'','type':'string'},'textContent':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domnodelist':{'name':'DOMNodeList','properties': {'length':{'initializer':'','type':'int'},},'methods':{'item':{'signature':'int $index | DOMNode','return_type':'DOMNode'},},},'domnotation':{'name':'DOMNotation','properties': {'publicId':{'initializer':'','type':'string'},'systemId':{'initializer':'','type':'string'},},'methods':{'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domprocessinginstruction':{'name':'DOMProcessingInstruction','properties': {'target':{'initializer':'','type':'string'},'data':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'string $name [, string $value]','return_type':''},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domtext':{'name':'DOMText','properties': {'wholeText':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'[ string $value]','return_type':''},'isWhitespaceInElementContent':{'signature':'void | bool','return_type':'bool'},'splitText':{'signature':'int $offset | DOMText','return_type':'DOMText'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'string'},'hasAttributes':{'signature':'void | bool','return_type':'bool'},'hasChildNodes':{'signature':'void | bool','return_type':'bool'},'insertBefore':{'signature':'DOMNode $newnode [, DOMNode $refnode] | DOMNode','return_type':'DOMNode'},'isDefaultNamespace':{'signature':'string $namespaceURI | bool','return_type':'bool'},'isSameNode':{'signature':'DOMNode $node | bool','return_type':'bool'},'isSupported':{'signature':'string $feature, string $version | bool','return_type':'bool'},'lookupNamespaceURI':{'signature':'string $prefix | string','return_type':'string'},'lookupPrefix':{'signature':'string $namespaceURI | string','return_type':'string'},'normalize':{'signature':'void | void','return_type':'void'},'removeChild':{'signature':'DOMNode $oldnode | DOMNode','return_type':'DOMNode'},'replaceChild':{'signature':'DOMNode $newnode, DOMNode $oldnode | DOMNode','return_type':'DOMNode'},},},'domxpath':{'name':'DOMXPath','properties': {'document':{'initializer':'','type':'DOMDocument'},},'methods':{'__construct':{'signature':'DOMDocument $doc','return_type':''},'evaluate':{'signature':'string $expression [, DOMNode $contextnode [, bool $registerNodeNS = true]] | mixed','return_type':'mixed'},'query':{'signature':'string $expression [, DOMNode $contextnode [, bool $registerNodeNS = true]] | DOMNodeList','return_type':'DOMNodeList'},'registerNamespace':{'signature':'string $prefix, string $namespaceURI | bool','return_type':'bool'},'registerPhpFunctions':{'signature':'[ mixed $restrict] | void','return_type':'void'},},},}
+let php_builtin['classes']['predefined_exceptions']={'errorexception':{'name':'ErrorException','properties': {'severity':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'__construct':{'signature':'[ string $message = "" [, int $code = 0 [, int $severity = 1 [, string $filename = __FILE__ [, int $lineno = __LINE__ [, Exception $previous = NULL]]]]]]','return_type':''},'getSeverity':{'signature':'void | int','return_type':'int'},'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'exception':{'name':'Exception','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'__construct':{'signature':'[ string $message = "" [, int $code = 0 [, Exception $previous = NULL]]]','return_type':''},'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},}
+let php_builtin['classes']['libxml']={'libxmlerror':{'name':'libXMLError','properties': {'level':{'initializer':'','type':'int'},'code':{'initializer':'','type':'int'},'column':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},},}
+let php_builtin['classes']['mysqli']={'mysqli_driver':{'name':'mysqli_driver','properties': {'client_info':{'initializer':'','type':'string'},'client_version':{'initializer':'','type':'string'},'driver_version':{'initializer':'','type':'string'},'embedded':{'initializer':'','type':'string'},'reconnect':{'initializer':'','type':'bool'},'report_mode':{'initializer':'','type':'int'},},'methods':{'embedded_server_end':{'signature':'void | void','return_type':'void'},'embedded_server_start':{'signature':'bool $start, array $arguments, array $groups | bool','return_type':'bool'},},},'mysqli_result':{'name':'mysqli_result','properties': {'current_field':{'initializer':'','type':'int'},'field_count':{'initializer':'','type':'int'},'lengths':{'initializer':'','type':'array'},'num_rows':{'initializer':'','type':'int'},},'methods':{'data_seek':{'signature':'int $offset | bool','return_type':'bool'},'fetch_all':{'signature':'[ int $resulttype = MYSQLI_NUM] | mixed','return_type':'mixed'},'fetch_array':{'signature':'[ int $resulttype = MYSQLI_BOTH] | mixed','return_type':'mixed'},'fetch_assoc':{'signature':'void | array','return_type':'array'},'fetch_field_direct':{'signature':'int $fieldnr | object','return_type':'object'},'fetch_field':{'signature':'void | object','return_type':'object'},'fetch_fields':{'signature':'void | array','return_type':'array'},'fetch_object':{'signature':'[ string $class_name [, array $params]] | object','return_type':'object'},'fetch_row':{'signature':'void | mixed','return_type':'mixed'},'field_seek':{'signature':'int $fieldnr | bool','return_type':'bool'},'free':{'signature':'void | void','return_type':'void'},},},'mysqli_sql_exception':{'name':'mysqli_sql_exception','properties': {'sqlstate':{'initializer':'','type':'string'},'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},},'mysqli_stmt':{'name':'mysqli_stmt','properties': {'affected_rows':{'initializer':'','type':'int'},'errno':{'initializer':'','type':'int'},'error_list':{'initializer':'','type':'array'},'error':{'initializer':'','type':'string'},'field_count':{'initializer':'','type':'int'},'insert_id':{'initializer':'','type':'int'},'num_rows':{'initializer':'','type':'int'},'param_count':{'initializer':'','type':'int'},'sqlstate':{'initializer':'','type':'string'},},'methods':{'attr_get':{'signature':'int $attr | int','return_type':'int'},'attr_set':{'signature':'int $attr, int $mode | bool','return_type':'bool'},'bind_param':{'signature':'string $types, mixed &$var1 [, mixed &$...] | bool','return_type':'bool'},'bind_result':{'signature':'mixed &$var1 [, mixed &$...] | bool','return_type':'bool'},'close':{'signature':'void | bool','return_type':'bool'},'data_seek':{'signature':'int $offset | void','return_type':'void'},'execute':{'signature':'void | bool','return_type':'bool'},'fetch':{'signature':'void | bool','return_type':'bool'},'free_result':{'signature':'void | void','return_type':'void'},'get_result':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'get_warnings':{'signature':'mysqli_stmt $stmt | object','return_type':'object'},'prepare':{'signature':'string $query | mixed','return_type':'mixed'},'reset':{'signature':'void | bool','return_type':'bool'},'result_metadata':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'send_long_data':{'signature':'int $param_nr, string $data | bool','return_type':'bool'},'store_result':{'signature':'void | bool','return_type':'bool'},},},'mysqli_warning':{'name':'mysqli_warning','properties': {'message':{'initializer':'','type':''},'sqlstate':{'initializer':'','type':''},'errno':{'initializer':'','type':''},},'methods':{'__construct':{'signature':'void','return_type':''},'next':{'signature':'void | void','return_type':'void'},},},'mysqli':{'name':'mysqli','properties': {'affected_rows':{'initializer':'','type':'int'},'client_info':{'initializer':'','type':'string'},'client_version':{'initializer':'','type':'int'},'connect_errno':{'initializer':'','type':'string'},'connect_error':{'initializer':'','type':'string'},'errno':{'initializer':'','type':'int'},'error_list':{'initializer':'','type':'array'},'error':{'initializer':'','type':'string'},'field_count':{'initializer':'','type':'int'},'host_info':{'initializer':'','type':'string'},'protocol_version':{'initializer':'','type':'string'},'server_info':{'initializer':'','type':'string'},'server_version':{'initializer':'','type':'int'},'info':{'initializer':'','type':'string'},'insert_id':{'initializer':'','type':'mixed'},'sqlstate':{'initializer':'','type':'string'},'thread_id':{'initializer':'','type':'int'},'warning_count':{'initializer':'','type':'int'},},'methods':{'__construct':{'signature':'[ string $host = ini_get("mysqli.default_host") [, string $username = ini_get("mysqli.default_user") [, string $passwd = ini_get("mysqli.default_pw") [, string $dbname = "" [, int $port = ini_get("mysqli.default_port") [, string $socket = ini_get("mysqli.default_socket")]]]]]]','return_type':''},'autocommit':{'signature':'bool $mode | bool','return_type':'bool'},'change_user':{'signature':'string $user, string $password, string $database | bool','return_type':'bool'},'character_set_name':{'signature':'void | string','return_type':'string'},'close':{'signature':'void | bool','return_type':'bool'},'commit':{'signature':'[ int $flags [, string $name]] | bool','return_type':'bool'},'debug':{'signature':'string $message | bool','return_type':'bool'},'dump_debug_info':{'signature':'void | bool','return_type':'bool'},'get_charset':{'signature':'void | object','return_type':'object'},'get_client_info':{'signature':'void | string','return_type':'string'},'get_connection_stats':{'signature':'void | bool','return_type':'bool'},'get_warnings':{'signature':'void | mysqli_warning','return_type':'mysqli_warning'},'init':{'signature':'void | mysqli','return_type':'mysqli'},'kill':{'signature':'int $processid | bool','return_type':'bool'},'more_results':{'signature':'void | bool','return_type':'bool'},'multi_query':{'signature':'string $query | bool','return_type':'bool'},'next_result':{'signature':'void | bool','return_type':'bool'},'options':{'signature':'int $option, mixed $value | bool','return_type':'bool'},'ping':{'signature':'void | bool','return_type':'bool'},'prepare':{'signature':'string $query | mysqli_stmt','return_type':'mysqli_stmt'},'query':{'signature':'string $query [, int $resultmode = MYSQLI_STORE_RESULT] | mixed','return_type':'mixed'},'real_connect':{'signature':'[ string $host [, string $username [, string $passwd [, string $dbname [, int $port [, string $socket [, int $flags]]]]]]] | bool','return_type':'bool'},'escape_string':{'signature':'string $escapestr | string','return_type':'string'},'real_query':{'signature':'string $query | bool','return_type':'bool'},'reap_async_query':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'refresh':{'signature':'int $options | bool','return_type':'bool'},'rollback':{'signature':'[ int $flags [, string $name]] | bool','return_type':'bool'},'rpl_query_type':{'signature':'string $query | int','return_type':'int'},'select_db':{'signature':'string $dbname | bool','return_type':'bool'},'send_query':{'signature':'string $query | bool','return_type':'bool'},'set_charset':{'signature':'string $charset | bool','return_type':'bool'},'set_local_infile_handler':{'signature':'mysqli $link, callable $read_func | bool','return_type':'bool'},'ssl_set':{'signature':'string $key, string $cert, string $ca, string $capath, string $cipher | bool','return_type':'bool'},'stat':{'signature':'void | string','return_type':'string'},'stmt_init':{'signature':'void | mysqli_stmt','return_type':'mysqli_stmt'},'store_result':{'signature':'void | mysqli_result','return_type':'mysqli_result'},'use_result':{'signature':'void | mysqli_result','return_type':'mysqli_result'},},'static_methods':{'poll':{'signature':'array &$read, array &$error, array &$reject, int $sec [, int $usec] | int','return_type':'int'},},},}
+let php_builtin['classes']['pdo']={'pdo':{'name':'PDO','constants':{'FETCH_ORI_ABS':'','ATTR_PERSISTENT':'','CLASS_CONSTANT':'','ATTR_DEFAULT_FETCH_MODE':'','FETCH_PROPS_LATE':'','FETCH_KEY_PAIR':'','FB_ATTR_DATE_FORMAT':'','FB_ATTR_TIME_FORMAT':'','FB_ATTR_TIMESTAMP_FORMAT':'','MYSQL_ATTR_READ_DEFAULT_FILE':'','MYSQL_ATTR_READ_DEFAULT_GROUP':'','ATTR_AUTOCOMMIT':'','FOURD_ATTR_CHARSET':'','FOURD_ATTR_PREFERRED_IMAGE_TYPES':'','PARAM_LOB':'','PARAM_BOOL':'','PARAM_NULL':'','PARAM_INT':'','PARAM_STR':'','PARAM_STMT':'','PARAM_INPUT_OUTPUT':'','FETCH_LAZY':'','FETCH_ASSOC':'','FETCH_NAMED':'','FETCH_NUM':'','FETCH_BOTH':'','FETCH_OBJ':'','FETCH_BOUND':'','FETCH_COLUMN':'','FETCH_CLASS':'','FETCH_INTO':'','FETCH_FUNC':'','FETCH_GROUP':'','FETCH_UNIQUE':'','FETCH_CLASSTYPE':'','FETCH_SERIALIZE':'','ATTR_PREFETCH':'','ATTR_TIMEOUT':'','ATTR_ERRMODE':'','ATTR_SERVER_VERSION':'','ATTR_CLIENT_VERSION':'','ATTR_SERVER_INFO':'','ATTR_CONNECTION_STATUS':'','ATTR_CASE':'','ATTR_CURSOR_NAME':'','ATTR_CURSOR':'','CURSOR_FWDONLY':'','CURSOR_SCROLL':'','ATTR_DRIVER_NAME':'','ATTR_ORACLE_NULLS':'','ATTR_STATEMENT_CLASS':'','ATTR_FETCH_CATALOG_NAMES':'','ATTR_FETCH_TABLE_NAMES':'','ATTR_STRINGIFY_FETCHES':'','ATTR_MAX_COLUMN_LEN':'','ATTR_EMULATE_PREPARES':'','ERRMODE_SILENT':'','ERRMODE_WARNING':'','ERRMODE_EXCEPTION':'','CASE_NATURAL':'','CASE_LOWER':'','CASE_UPPER':'','NULL_NATURAL':'','NULL_EMPTY_STRING':'','NULL_TO_STRING':'','FETCH_ORI_NEXT':'','FETCH_ORI_PRIOR':'','FETCH_ORI_FIRST':'','FETCH_ORI_LAST':'','FETCH_ORI_REL':'','ERR_NONE':'','PARAM_EVT_ALLOC':'','PARAM_EVT_FREE':'','PARAM_EVT_EXEC_PRE':'','PARAM_EVT_EXEC_POST':'','PARAM_EVT_FETCH_PRE':'','PARAM_EVT_FETCH_POST':'','PARAM_EVT_NORMALIZE':'','MYSQL_ATTR_INIT_COMMAND':'','MYSQL_ATTR_USE_BUFFERED_QUERY':'','MYSQL_ATTR_LOCAL_INFILE':'','MYSQL_ATTR_MAX_BUFFER_SIZE':'','MYSQL_ATTR_DIRECT_QUERY':'','MYSQL_ATTR_FOUND_ROWS':'','MYSQL_ATTR_IGNORE_SPACE':'','MYSQL_ATTR_COMPRESS':'','MYSQL_ATTR_SSL_CA':'','MYSQL_ATTR_SSL_CAPATH':'','MYSQL_ATTR_SSL_CERT':'','MYSQL_ATTR_SSL_CIPHER':'','MYSQL_ATTR_SSL_KEY':'','SQLSRV_TXN_READ_UNCOMMITTED':'','SQLSRV_TXN_READ_COMMITTED':'','SQLSRV_TXN_REPEATABLE_READ':'','SQLSRV_TXN_SNAPSHOT':'','SQLSRV_TXN_SERIALIZABLE':'','SQLSRV_ENCODING_BINARY':'','SQLSRV_ENCODING_SYSTEM':'','SQLSRV_ENCODING_UTF8':'','SQLSRV_ENCODING_DEFAULT':'','SQLSRV_ATTR_QUERY_TIMEOUT':'','SQLSRV_ATTR_DIRECT_QUERY':'',},'methods':{'__construct':{'signature':'string $dsn [, string $username [, string $password [, array $driver_options]]]','return_type':''},'beginTransaction':{'signature':'void | bool','return_type':'bool'},'commit':{'signature':'void | bool','return_type':'bool'},'errorCode':{'signature':'void | mixed','return_type':'mixed'},'errorInfo':{'signature':'void | array','return_type':'array'},'exec':{'signature':'string $statement | int','return_type':'int'},'getAttribute':{'signature':'int $attribute | mixed','return_type':'mixed'},'inTransaction':{'signature':'void | bool','return_type':'bool'},'lastInsertId':{'signature':'[ string $name = NULL] | string','return_type':'string'},'prepare':{'signature':'string $statement [, array $driver_options = array()] | PDOStatement','return_type':'PDOStatement'},'query':{'signature':'string $statement | PDOStatement','return_type':'PDOStatement'},'quote':{'signature':'string $string [, int $parameter_type = PDO::PARAM_STR] | string','return_type':'string'},'rollBack':{'signature':'void | bool','return_type':'bool'},'setAttribute':{'signature':'int $attribute, mixed $value | bool','return_type':'bool'},},'static_methods':{'getAvailableDrivers':{'signature':'void | array','return_type':'array'},},},'pdoexception':{'name':'PDOException','properties': {'errorInfo':{'initializer':'','type':'array'},'code':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'pdostatement':{'name':'PDOStatement','properties': {'queryString':{'initializer':'','type':'string'},},'methods':{'bindColumn':{'signature':'mixed $column, mixed &$param [, int $type [, int $maxlen [, mixed $driverdata]]] | bool','return_type':'bool'},'bindParam':{'signature':'mixed $parameter, mixed &$variable [, int $data_type = PDO::PARAM_STR [, int $length [, mixed $driver_options]]] | bool','return_type':'bool'},'bindValue':{'signature':'mixed $parameter, mixed $value [, int $data_type = PDO::PARAM_STR] | bool','return_type':'bool'},'closeCursor':{'signature':'void | bool','return_type':'bool'},'columnCount':{'signature':'void | int','return_type':'int'},'debugDumpParams':{'signature':'void | void','return_type':'void'},'errorCode':{'signature':'void | string','return_type':'string'},'errorInfo':{'signature':'void | array','return_type':'array'},'execute':{'signature':'[ array $input_parameters] | bool','return_type':'bool'},'fetch':{'signature':'[ int $fetch_style [, int $cursor_orientation = PDO::FETCH_ORI_NEXT [, int $cursor_offset = 0]]] | mixed','return_type':'mixed'},'fetchAll':{'signature':'[ int $fetch_style [, mixed $fetch_argument [, array $ctor_args = array()]]] | array','return_type':'array'},'fetchColumn':{'signature':'[ int $column_number = 0] | string','return_type':'string'},'fetchObject':{'signature':'[ string $class_name = "stdClass" [, array $ctor_args]] | mixed','return_type':'mixed'},'getAttribute':{'signature':'int $attribute | mixed','return_type':'mixed'},'getColumnMeta':{'signature':'int $column | array','return_type':'array'},'nextRowset':{'signature':'void | bool','return_type':'bool'},'rowCount':{'signature':'void | int','return_type':'int'},'setAttribute':{'signature':'int $attribute, mixed $value | bool','return_type':'bool'},'setFetchMode':{'signature':'int $mode | bool','return_type':'bool'},},},}
+let php_builtin['classes']['phar']={'phar':{'name':'Phar','methods':{'addEmptyDir':{'signature':'string $dirname | void','return_type':'void'},'addFile':{'signature':'string $file [, string $localname] | void','return_type':'void'},'addFromString':{'signature':'string $localname, string $contents | void','return_type':'void'},'buildFromDirectory':{'signature':'string $base_dir [, string $regex] | array','return_type':'array'},'buildFromIterator':{'signature':'Iterator $iter [, string $base_directory] | array','return_type':'array'},'compress':{'signature':'int $compression [, string $extension] | object','return_type':'object'},'compressAllFilesBZIP2':{'signature':'void | bool','return_type':'bool'},'compressAllFilesGZ':{'signature':'void | bool','return_type':'bool'},'compressFiles':{'signature':'int $compression | void','return_type':'void'},'__construct':{'signature':'string $fname [, int $flags [, string $alias]]','return_type':''},'convertToData':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | PharData','return_type':'PharData'},'convertToExecutable':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | Phar','return_type':'Phar'},'copy':{'signature':'string $oldfile, string $newfile | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'decompress':{'signature':'[ string $extension] | object','return_type':'object'},'decompressFiles':{'signature':'void | bool','return_type':'bool'},'delMetadata':{'signature':'void | bool','return_type':'bool'},'delete':{'signature':'string $entry | bool','return_type':'bool'},'extractTo':{'signature':'string $pathto [, string|array $files [, bool $overwrite = false]] | bool','return_type':'bool'},'getMetadata':{'signature':'void | mixed','return_type':'mixed'},'getModified':{'signature':'void | bool','return_type':'bool'},'getSignature':{'signature':'void | array','return_type':'array'},'getStub':{'signature':'void | string','return_type':'string'},'getVersion':{'signature':'void | string','return_type':'string'},'hasMetadata':{'signature':'void | bool','return_type':'bool'},'isBuffering':{'signature':'void | bool','return_type':'bool'},'isCompressed':{'signature':'void | mixed','return_type':'mixed'},'isFileFormat':{'signature':'int $format | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'offsetExists':{'signature':'string $offset | bool','return_type':'bool'},'offsetGet':{'signature':'string $offset | int','return_type':'int'},'offsetSet':{'signature':'string $offset, string $value | void','return_type':'void'},'offsetUnset':{'signature':'string $offset | bool','return_type':'bool'},'setAlias':{'signature':'string $alias | bool','return_type':'bool'},'setDefaultStub':{'signature':'[ string $index [, string $webindex]] | bool','return_type':'bool'},'setMetadata':{'signature':'mixed $metadata | void','return_type':'void'},'setSignatureAlgorithm':{'signature':'int $sigtype [, string $privatekey] | void','return_type':'void'},'setStub':{'signature':'string $stub [, int $len = -1] | bool','return_type':'bool'},'startBuffering':{'signature':'void | void','return_type':'void'},'stopBuffering':{'signature':'void | void','return_type':'void'},'uncompressAllFiles':{'signature':'void | bool','return_type':'bool'},},'static_methods':{'apiVersion':{'signature':'void | string','return_type':'string'},'canCompress':{'signature':'[ int $type = 0] | bool','return_type':'bool'},'canWrite':{'signature':'void | bool','return_type':'bool'},'createDefaultStub':{'signature':'[ string $indexfile [, string $webindexfile]] | string','return_type':'string'},'getSupportedCompression':{'signature':'void | array','return_type':'array'},'getSupportedSignatures':{'signature':'void | array','return_type':'array'},'interceptFileFuncs':{'signature':'void | void','return_type':'void'},'isValidPharFilename':{'signature':'string $filename [, bool $executable = true] | bool','return_type':'bool'},'loadPhar':{'signature':'string $filename [, string $alias] | bool','return_type':'bool'},'mapPhar':{'signature':'[ string $alias [, int $dataoffset = 0]] | bool','return_type':'bool'},'mount':{'signature':'string $pharpath, string $externalpath | void','return_type':'void'},'mungServer':{'signature':'array $munglist | void','return_type':'void'},'running':{'signature':'[ bool $retphar = true] | string','return_type':'string'},'unlinkArchive':{'signature':'string $archive | bool','return_type':'bool'},'webPhar':{'signature':'[ string $alias [, string $index = "index.php" [, string $f404 [, array $mimetypes [, callable $rewrites]]]]] | void','return_type':'void'},},},'phardata':{'name':'PharData','methods':{'addEmptyDir':{'signature':'string $dirname | void','return_type':'void'},'addFile':{'signature':'string $file [, string $localname] | void','return_type':'void'},'addFromString':{'signature':'string $localname, string $contents | void','return_type':'void'},'buildFromDirectory':{'signature':'string $base_dir [, string $regex] | array','return_type':'array'},'buildFromIterator':{'signature':'Iterator $iter [, string $base_directory] | array','return_type':'array'},'compress':{'signature':'int $compression [, string $extension] | object','return_type':'object'},'compressFiles':{'signature':'int $compression | void','return_type':'void'},'__construct':{'signature':'string $fname [, int $flags [, string $alias]]','return_type':''},'convertToData':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | PharData','return_type':'PharData'},'convertToExecutable':{'signature':'[ int $format = 9021976 [, int $compression = 9021976 [, string $extension]]] | Phar','return_type':'Phar'},'copy':{'signature':'string $oldfile, string $newfile | bool','return_type':'bool'},'decompress':{'signature':'[ string $extension] | object','return_type':'object'},'decompressFiles':{'signature':'void | bool','return_type':'bool'},'delMetadata':{'signature':'void | bool','return_type':'bool'},'delete':{'signature':'string $entry | bool','return_type':'bool'},'extractTo':{'signature':'string $pathto [, string|array $files [, bool $overwrite = false]] | bool','return_type':'bool'},'isWritable':{'signature':'void | bool','return_type':'bool'},'offsetSet':{'signature':'string $offset, string $value | void','return_type':'void'},'offsetUnset':{'signature':'string $offset | bool','return_type':'bool'},'setAlias':{'signature':'string $alias | bool','return_type':'bool'},'setDefaultStub':{'signature':'[ string $index [, string $webindex]] | bool','return_type':'bool'},'setMetadata':{'signature':'mixed $metadata | void','return_type':'void'},'setSignatureAlgorithm':{'signature':'int $sigtype [, string $privatekey] | void','return_type':'void'},'setStub':{'signature':'string $stub [, int $len = -1] | bool','return_type':'bool'},'compressAllFilesBZIP2':{'signature':'void | bool','return_type':'bool'},'compressAllFilesGZ':{'signature':'void | bool','return_type':'bool'},'count':{'signature':'void | int','return_type':'int'},'getMetadata':{'signature':'void | mixed','return_type':'mixed'},'getModified':{'signature':'void | bool','return_type':'bool'},'getSignature':{'signature':'void | array','return_type':'array'},'getStub':{'signature':'void | string','return_type':'string'},'getVersion':{'signature':'void | string','return_type':'string'},'hasMetadata':{'signature':'void | bool','return_type':'bool'},'isBuffering':{'signature':'void | bool','return_type':'bool'},'isCompressed':{'signature':'void | mixed','return_type':'mixed'},'isFileFormat':{'signature':'int $format | bool','return_type':'bool'},'offsetExists':{'signature':'string $offset | bool','return_type':'bool'},'offsetGet':{'signature':'string $offset | int','return_type':'int'},'startBuffering':{'signature':'void | void','return_type':'void'},'stopBuffering':{'signature':'void | void','return_type':'void'},'uncompressAllFiles':{'signature':'void | bool','return_type':'bool'},},'static_methods':{'apiVersion':{'signature':'void | string','return_type':'string'},'canCompress':{'signature':'[ int $type = 0] | bool','return_type':'bool'},'canWrite':{'signature':'void | bool','return_type':'bool'},'createDefaultStub':{'signature':'[ string $indexfile [, string $webindexfile]] | string','return_type':'string'},'getSupportedCompression':{'signature':'void | array','return_type':'array'},'getSupportedSignatures':{'signature':'void | array','return_type':'array'},'interceptFileFuncs':{'signature':'void | void','return_type':'void'},'isValidPharFilename':{'signature':'string $filename [, bool $executable = true] | bool','return_type':'bool'},'loadPhar':{'signature':'string $filename [, string $alias] | bool','return_type':'bool'},'mapPhar':{'signature':'[ string $alias [, int $dataoffset = 0]] | bool','return_type':'bool'},'mount':{'signature':'string $pharpath, string $externalpath | void','return_type':'void'},'mungServer':{'signature':'array $munglist | void','return_type':'void'},'running':{'signature':'[ bool $retphar = true] | string','return_type':'string'},'unlinkArchive':{'signature':'string $archive | bool','return_type':'bool'},'webPhar':{'signature':'[ string $alias [, string $index = "index.php" [, string $f404 [, array $mimetypes [, callable $rewrites]]]]] | void','return_type':'void'},},},'pharexception':{'name':'PharException','properties': {'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string','return_type':'string'},'__toString':{'signature':'void | string','return_type':'string'},'__clone':{'signature':'void | void','return_type':'void'},},},'pharfileinfo':{'name':'PharFileInfo','methods':{'chmod':{'signature':'int $permissions | void','return_type':'void'},'compress':{'signature':'int $compression | bool','return_type':'bool'},'__construct':{'signature':'string $entry','return_type':''},'decompress':{'signature':'void | bool','return_type':'bool'},'delMetadata':{'signature':'void | bool','return_type':'bool'},'getCRC32':{'signature':'void | int','return_type':'int'},'getCompressedSize':{'signature':'void | int','return_type':'int'},'getMetadata':{'signature':'void | mixed','return_type':'mixed'},'getPharFlags':{'signature':'void | int','return_type':'int'},'hasMetadata':{'signature':'void | bool','return_type':'bool'},'isCRCChecked':{'signature':'void | bool','return_type':'bool'},'isCompressed':{'signature':'[ int $compression_type = 9021976] | bool','return_type':'bool'},'isCompressedBZIP2':{'signature':'void | bool','return_type':'bool'},'isCompressedGZ':{'signature':'void | bool','return_type':'bool'},'setCompressedBZIP2':{'signature':'void | bool','return_type':'bool'},'setCompressedGZ':{'signature':'void | bool','return_type':'bool'},'setMetadata':{'signature':'mixed $metadata | void','return_type':'void'},'setUncompressed':{'signature':'void | bool','return_type':'bool'},},},}
+let php_builtin['classes']['streams']={'php_user_filter':{'name':'php_user_filter','properties': {'filtername':{'initializer':'','type':''},'params':{'initializer':'','type':''},},'methods':{'filter':{'signature':'resource $in, resource $out, int &$consumed, bool $closing | int','return_type':'int'},'onClose':{'signature':'void | void','return_type':'void'},'onCreate':{'signature':'void | bool','return_type':'bool'},},},}
+let php_builtin['classes']['sessions']={'sessionhandler':{'name':'SessionHandler','methods':{'close':{'signature':'void | bool','return_type':'bool'},'destroy':{'signature':'string $session_id | bool','return_type':'bool'},'gc':{'signature':'int $maxlifetime | bool','return_type':'bool'},'open':{'signature':'string $save_path, string $session_id | bool','return_type':'bool'},'read':{'signature':'string $session_id | string','return_type':'string'},'write':{'signature':'string $session_id, string $session_data | bool','return_type':'bool'},},},'sessionhandlerinterface':{'name':'SessionHandlerInterface','methods':{'close':{'signature':'void | bool','return_type':'bool'},'destroy':{'signature':'string $session_id | bool','return_type':'bool'},'gc':{'signature':'string $maxlifetime | bool','return_type':'bool'},'open':{'signature':'string $save_path, string $name | bool','return_type':'bool'},'read':{'signature':'string $session_id | string','return_type':'string'},'write':{'signature':'string $session_id, string $session_data | bool','return_type':'bool'},},},}
+let php_builtin['classes']['simplexml']={'simplexmlelement':{'name':'SimpleXMLElement','methods':{'__construct':{'signature':'string $data [, int $options = 0 [, bool $data_is_url = false [, string $ns = "" [, bool $is_prefix = false]]]]','return_type':''},'addAttribute':{'signature':'string $name [, string $value [, string $namespace]] | void','return_type':'void'},'addChild':{'signature':'string $name [, string $value [, string $namespace]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'asXML':{'signature':'[ string $filename] | mixed','return_type':'mixed'},'attributes':{'signature':'[ string $ns = NULL [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'children':{'signature':'[ string $ns [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'count':{'signature':'void | int','return_type':'int'},'getDocNamespaces':{'signature':'[ bool $recursive = false [, bool $from_root = true]] | array','return_type':'array'},'getName':{'signature':'void | string','return_type':'string'},'getNamespaces':{'signature':'[ bool $recursive = false] | array','return_type':'array'},'registerXPathNamespace':{'signature':'string $prefix, string $ns | bool','return_type':'bool'},'__toString':{'signature':'void | string','return_type':'string'},'xpath':{'signature':'string $path | array','return_type':'array'},},},'simplexmliterator':{'name':'SimpleXMLIterator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'getChildren':{'signature':'void | SimpleXMLIterator','return_type':'SimpleXMLIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},'__construct':{'signature':'string $data [, int $options = 0 [, bool $data_is_url = false [, string $ns = "" [, bool $is_prefix = false]]]]','return_type':''},'addAttribute':{'signature':'string $name [, string $value [, string $namespace]] | void','return_type':'void'},'addChild':{'signature':'string $name [, string $value [, string $namespace]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'asXML':{'signature':'[ string $filename] | mixed','return_type':'mixed'},'attributes':{'signature':'[ string $ns = NULL [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'children':{'signature':'[ string $ns [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'count':{'signature':'void | int','return_type':'int'},'getDocNamespaces':{'signature':'[ bool $recursive = false [, bool $from_root = true]] | array','return_type':'array'},'getName':{'signature':'void | string','return_type':'string'},'getNamespaces':{'signature':'[ bool $recursive = false] | array','return_type':'array'},'registerXPathNamespace':{'signature':'string $prefix, string $ns | bool','return_type':'bool'},'__toString':{'signature':'void | string','return_type':'string'},'xpath':{'signature':'string $path | array','return_type':'array'},},},}
+let php_builtin['classes']['spl_types']={'splbool':{'name':'SplBool','constants':{'__default':'false','false':'false','true':'true',},'methods':{'getConstList':{'signature':'[ bool $include_default = false] | array','return_type':'array'},},},'splenum':{'name':'SplEnum','constants':{'__default':'null',},'methods':{'getConstList':{'signature':'[ bool $include_default = false] | array','return_type':'array'},'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splfloat':{'name':'SplFloat','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splint':{'name':'SplInt','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splstring':{'name':'SplString','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'spltype':{'name':'SplType','constants':{'__default':'null',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},}
+let php_builtin['classes']['xmlreader']={'xmlreader':{'name':'XMLReader','constants':{'NONE':'0','ELEMENT':'1','ATTRIBUTE':'2','TEXT':'3','CDATA':'4','ENTITY_REF':'5','ENTITY':'6','PI':'7','COMMENT':'8','DOC':'9','DOC_TYPE':'10','DOC_FRAGMENT':'11','NOTATION':'12','WHITESPACE':'13','SIGNIFICANT_WHITESPACE':'14','END_ELEMENT':'15','END_ENTITY':'16','XML_DECLARATION':'17','LOADDTD':'1','DEFAULTATTRS':'2','VALIDATE':'3','SUBST_ENTITIES':'4',},'properties': {'attributeCount':{'initializer':'','type':'int'},'baseURI':{'initializer':'','type':'string'},'depth':{'initializer':'','type':'int'},'hasAttributes':{'initializer':'','type':'bool'},'hasValue':{'initializer':'','type':'bool'},'isDefault':{'initializer':'','type':'bool'},'isEmptyElement':{'initializer':'','type':'bool'},'localName':{'initializer':'','type':'string'},'name':{'initializer':'','type':'string'},'namespaceURI':{'initializer':'','type':'string'},'nodeType':{'initializer':'','type':'int'},'prefix':{'initializer':'','type':'string'},'value':{'initializer':'','type':'string'},'xmlLang':{'initializer':'','type':'string'},},'methods':{'close':{'signature':'void | bool','return_type':'bool'},'expand':{'signature':'[ DOMNode $basenode] | DOMNode','return_type':'DOMNode'},'getAttribute':{'signature':'string $name | string','return_type':'string'},'getAttributeNo':{'signature':'int $index | string','return_type':'string'},'getAttributeNs':{'signature':'string $localName, string $namespaceURI | string','return_type':'string'},'getParserProperty':{'signature':'int $property | bool','return_type':'bool'},'isValid':{'signature':'void | bool','return_type':'bool'},'lookupNamespace':{'signature':'string $prefix | bool','return_type':'bool'},'moveToAttribute':{'signature':'string $name | bool','return_type':'bool'},'moveToAttributeNo':{'signature':'int $index | bool','return_type':'bool'},'moveToAttributeNs':{'signature':'string $localName, string $namespaceURI | bool','return_type':'bool'},'moveToElement':{'signature':'void | bool','return_type':'bool'},'moveToFirstAttribute':{'signature':'void | bool','return_type':'bool'},'moveToNextAttribute':{'signature':'void | bool','return_type':'bool'},'next':{'signature':'[ string $localname] | bool','return_type':'bool'},'open':{'signature':'string $URI [, string $encoding [, int $options = 0]] | bool','return_type':'bool'},'read':{'signature':'void | bool','return_type':'bool'},'readInnerXML':{'signature':'void | string','return_type':'string'},'readOuterXML':{'signature':'void | string','return_type':'string'},'readString':{'signature':'void | string','return_type':'string'},'setParserProperty':{'signature':'int $property, bool $value | bool','return_type':'bool'},'setRelaxNGSchema':{'signature':'string $filename | bool','return_type':'bool'},'setRelaxNGSchemaSource':{'signature':'string $source | bool','return_type':'bool'},'setSchema':{'signature':'string $filename | bool','return_type':'bool'},'xml':{'signature':'string $source [, string $encoding [, int $options = 0]] | bool','return_type':'bool'},},},}
+let php_builtin['classes']['xmlwriter'] = {'xmlwriter':{'name':'XMLWriter','methods':{'endAttribute':{'signature':'void | bool','return_type':'bool'},'endCData':{'signature':'void | bool','return_type':'bool'},'endComment':{'signature':'void | bool','return_type':'bool'},'endDocument':{'signature':'void | bool','return_type':'bool'},'endDTDAttlist':{'signature':'void | bool','return_type':'bool'},'endDTDElement':{'signature':'void | bool','return_type':'bool'},'endDTDEntity':{'signature':'void | bool','return_type':'bool'},'endDTD':{'signature':'void | bool','return_type':'bool'},'endElement':{'signature':'void | bool','return_type':'bool'},'endPI':{'signature':'void | bool','return_type':'bool'},'flush':{'signature':'[bool $empty = true] | bool','return_type':'bool'},'fullEndElement':{'signature':'void | bool','return_type':'bool'},'openMemory':{'signature':'void | bool','return_type':'bool'},'openURI':{'signature':'string $uri | bool','return_type':'bool'},'outputMemory':{'signature':'[bool $flush = true] | bool','return_type':'bool'},'setIndentString':{'signature':'string $indentString | bool','return_type':'bool'},'setIndent':{'signature':'bool $indent | bool','return_type':'bool'},'startAttributeNS':{'signature':'string $prefix, string $name, string $uri | bool','return_type':'bool'},'startAttribute':{'signature':'string $name | bool','return_type':'bool'},'startCData':{'signature':'void | bool','return_type':'bool'},'startComment':{'signature':'void | bool','return_type':'bool'},'startDocument':{'signature':'[string $version = 1.0 [, string $encoding = NULL [, string $standalone ]]] | bool','return_type':'bool'},'startDTDAttlist':{'signature':'string $name | bool','return_type':'bool'},'startDTDElement':{'signature':'string $qualifiedName | bool','return_type':'bool'},'startDTDEntity':{'signature':'string $name, bool $isparam | bool','return_type':'bool'},'startDTD':{'signature':'string $qualifiedName [, string $publicId [, string $systemId ]] | bool','return_type':'bool'},'startElementNS':{'signature':'string $prefix, string $name, string $uri | bool','return_type':'bool'},'startElement':{'signature':'string $name | bool','return_type':'bool'},'startPI':{'signature':'string $target | bool','return_type':'bool'},'text':{'signature':'string $content | bool','return_type':'bool'},'writeAttributeNS':{'signature':'string $prefix, string $name, string $uri, string $content | bool','return_type':'bool'},'writeAttribute':{'signature':'string $name, string $value | bool','return_type':'bool'},'writeCData':{'signature':'string $content | bool','return_type':'bool'},'writeComment':{'signature':'string $content | bool','return_type':'bool'},'writeDTDAttlist':{'signature':'string $name, string $content | bool','return_type':'bool'},'writeDTDElement':{'signature':'string $name, string $content | bool','return_type':'bool'},'writeDTDEntity':{'signature':'string $name, string $content, bool $pe, string $pubid, string $sysid, string $ndataid | bool','return_type':'bool'},'writeDTD':{'signature':'string $name [, string $publicId [, string $systemId [, string $subset ]]] | bool','return_type':'bool'},'writeElementNS':{'signature':'string $prefix, string $name, string $uri [, string $content ] | bool','return_type':'bool'},'writeElement':{'signature':'string $name [, string $content ] | bool','return_type':'bool'},'writePI':{'signature':'string $target, string $content | bool','return_type':'bool'},'writeRaw':{'signature':'string $content | bool','return_type':'bool'},},},}
+let php_builtin['classes']['zip']={'ziparchive':{'name':'ZipArchive','properties': {'status':{'initializer':'','type':'int'},'statusSys':{'initializer':'','type':'int'},'numFiles':{'initializer':'','type':'int'},'filename':{'initializer':'','type':'string'},'comment':{'initializer':'','type':'string'},},'methods':{'addEmptyDir':{'signature':'string $dirname | bool','return_type':'bool'},'addFile':{'signature':'string $filename [, string $localname = NULL [, int $start = 0 [, int $length = 0]]] | bool','return_type':'bool'},'addFromString':{'signature':'string $localname, string $contents | bool','return_type':'bool'},'addGlob':{'signature':'string $pattern [, int $flags = 0 [, array $options = array()]] | bool','return_type':'bool'},'addPattern':{'signature':'string $pattern [, string $path = ''.'' [, array $options = array()]] | bool','return_type':'bool'},'close':{'signature':'void | bool','return_type':'bool'},'deleteIndex':{'signature':'int $index | bool','return_type':'bool'},'deleteName':{'signature':'string $name | bool','return_type':'bool'},'extractTo':{'signature':'string $destination [, mixed $entries] | bool','return_type':'bool'},'getArchiveComment':{'signature':'[ int $flags] | string','return_type':'string'},'getCommentIndex':{'signature':'int $index [, int $flags] | string','return_type':'string'},'getCommentName':{'signature':'string $name [, int $flags] | string','return_type':'string'},'getFromIndex':{'signature':'int $index [, int $length = 0 [, int $flags]] | string','return_type':'string'},'getFromName':{'signature':'string $name [, int $length = 0 [, int $flags]] | string','return_type':'string'},'getNameIndex':{'signature':'int $index [, int $flags] | string','return_type':'string'},'getStatusString':{'signature':'void | string','return_type':'string'},'getStream':{'signature':'string $name | resource','return_type':'resource'},'locateName':{'signature':'string $name [, int $flags] | int','return_type':'int'},'open':{'signature':'string $filename [, int $flags] | mixed','return_type':'mixed'},'renameIndex':{'signature':'int $index, string $newname | bool','return_type':'bool'},'renameName':{'signature':'string $name, string $newname | bool','return_type':'bool'},'setArchiveComment':{'signature':'string $comment | bool','return_type':'bool'},'setCommentIndex':{'signature':'int $index, string $comment | bool','return_type':'bool'},'setCommentName':{'signature':'string $name, string $comment | bool','return_type':'bool'},'statIndex':{'signature':'int $index [, int $flags] | array','return_type':'array'},'statName':{'signature':'string $name [, int $flags] | array','return_type':'array'},'unchangeAll':{'signature':'void | bool','return_type':'bool'},'unchangeArchive':{'signature':'void | bool','return_type':'bool'},'unchangeIndex':{'signature':'int $index | bool','return_type':'bool'},'unchangeName':{'signature':'string $name | bool','return_type':'bool'},},},}
+let php_builtin['interfaces']['predefined_interfaces_and_classes']={'arrayaccess':{'name':'ArrayAccess','methods':{'offsetExists':{'signature':'mixed $offset | boolean','return_type':'boolean'},'offsetGet':{'signature':'mixed $offset | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $offset, mixed $value | void','return_type':'void'},'offsetUnset':{'signature':'mixed $offset | void','return_type':'void'},},},'iterator':{'name':'Iterator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'iteratoraggregate':{'name':'IteratorAggregate','methods':{'getIterator':{'signature':'void | Traversable','return_type':'Traversable'},},},'serializable':{'name':'Serializable','methods':{'serialize':{'signature':'void | string','return_type':'string'},'unserialize':{'signature':'string $serialized | void','return_type':'void'},},},'traversable':{'name':'Traversable',},}
+let php_builtin['interfaces']['spl']={'countable':{'name':'Countable','methods':{'count':{'signature':'void | int','return_type':'int'},},},'outeriterator':{'name':'OuterIterator','methods':{'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'recursiveiterator':{'name':'RecursiveIterator','methods':{'getChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'seekableiterator':{'name':'SeekableIterator','methods':{'seek':{'signature':'int $position | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'splobserver':{'name':'SplObserver','methods':{'update':{'signature':'SplSubject $subject | void','return_type':'void'},},},'splsubject':{'name':'SplSubject','methods':{'attach':{'signature':'SplObserver $observer | void','return_type':'void'},'detach':{'signature':'SplObserver $observer | void','return_type':'void'},'notify':{'signature':'void | void','return_type':'void'},},},}
+let php_builtin['interfaces']['date_time']={'datetimeinterface':{'name':'DateTimeInterface','methods':{'diff':{'signature':'DateTimeInterface $datetime2 [, bool $absolute = false] | DateInterval','return_type':'DateInterval'},'format':{'signature':'string $format | string','return_type':'string'},'getOffset':{'signature':'void | int','return_type':'int'},'getTimestamp':{'signature':'void | int','return_type':'int'},'getTimezone':{'signature':'void | DateTimeZone','return_type':'DateTimeZone'},'__wakeup':{'signature':'void','return_type':''},},},}
+let php_builtin['interfaces']['json']={'jsonserializable':{'name':'JsonSerializable','methods':{'jsonSerialize':{'signature':'void | mixed','return_type':'mixed'},},},}
+let php_builtin['constants']['common']={'TRUE':'','FALSE':'','NULL':'','E_NOTICE':'','E_DEPRECATED':'','E_RECOVERABLE_ERROR':'','E_ALL':'','E_STRICT':'','E_WARNING':'','E_ERROR':'','E_PARSE':'','E_CORE_ERROR':'','E_CORE_WARNING':'','E_COMPILE_ERROR':'','E_COMPILE_WARNING':'','E_USER_ERROR':'','E_USER_WARNING':'','E_USER_NOTICE':'','E_USER_DEPRECATED':'','__COMPILER_HALT_OFFSET__':'','__FILE__':'','__LINE__':'','__DIR__':'','__FUNCTION__':'','__CLASS__':'','__TRAIT__':'','__METHOD__':'','__NAMESPACE__':'',}
+let php_builtin['constants']['arrays']={'CASE_LOWER':'','CASE_UPPER':'','SORT_ASC':'','SORT_DESC':'','SORT_REGULAR':'','SORT_NUMERIC':'','SORT_STRING':'','SORT_LOCALE_STRING':'','SORT_NATURAL':'','SORT_FLAG_CASE':'','COUNT_NORMAL':'','COUNT_RECURSIVE':'','EXTR_OVERWRITE':'','EXTR_SKIP':'','EXTR_PREFIX_SAME':'','EXTR_PREFIX_ALL':'','EXTR_PREFIX_INVALID':'','EXTR_PREFIX_IF_EXISTS':'','EXTR_IF_EXISTS':'','EXTR_REFS':'',}
+let php_builtin['constants']['calendar']={'CAL_GREGORIAN':'','CAL_JULIAN':'','CAL_JEWISH':'','CAL_FRENCH':'','CAL_NUM_CALS':'','CAL_DOW_DAYNO':'','CAL_DOW_SHORT':'','CAL_DOW_LONG':'','CAL_MONTH_GREGORIAN_SHORT':'','CAL_MONTH_GREGORIAN_LONG':'','CAL_MONTH_JULIAN_SHORT':'','CAL_MONTH_JULIAN_LONG':'','CAL_MONTH_JEWISH':'','CAL_MONTH_FRENCH':'','CAL_EASTER_DEFAULT':'','CAL_EASTER_ROMAN':'','CAL_EASTER_ALWAYS_GREGORIAN':'','CAL_EASTER_ALWAYS_JULIAN':'','CAL_JEWISH_ADD_ALAFIM_GERESH':'','CAL_JEWISH_ADD_ALAFIM':'','CAL_JEWISH_ADD_GERESHAYIM':'',}
+let php_builtin['constants']['curl']={'CURLOPT_POSTFIELDS':'','CURLOPT_CAINFO':'','CURLOPT_AUTOREFERER':'','CURLOPT_COOKIESESSION':'','CURLOPT_DNS_USE_GLOBAL_CACHE':'','CURLOPT_DNS_CACHE_TIMEOUT':'','CURLOPT_FTP_SSL':'','CURLFTPSSL_TRY':'','CURLFTPSSL_ALL':'','CURLFTPSSL_CONTROL':'','CURLFTPSSL_NONE':'','CURLOPT_PRIVATE':'','CURLOPT_FTPSSLAUTH':'','CURLOPT_PORT':'','CURLOPT_FILE':'','CURLOPT_INFILE':'','CURLOPT_INFILESIZE':'','CURLOPT_URL':'','CURLOPT_PROXY':'','CURLOPT_VERBOSE':'','CURLOPT_HEADER':'','CURLOPT_HTTPHEADER':'','CURLOPT_NOPROGRESS':'','CURLOPT_NOBODY':'','CURLOPT_FAILONERROR':'','CURLOPT_UPLOAD':'','CURLOPT_POST':'','CURLOPT_FTPLISTONLY':'','CURLOPT_FTPAPPEND':'','CURLOPT_FTP_CREATE_MISSING_DIRS':'','CURLOPT_NETRC':'','CURLOPT_FOLLOWLOCATION':'','CURLOPT_FTPASCII':'','CURLOPT_PUT':'','CURLOPT_MUTE':'','CURLOPT_USERPWD':'','CURLOPT_PROXYUSERPWD':'','CURLOPT_RANGE':'','CURLOPT_TIMEOUT':'','CURLOPT_TIMEOUT_MS':'','CURLOPT_TCP_NODELAY':'','CURLOPT_PROGRESSFUNCTION':'','CURLOPT_REFERER':'','CURLOPT_USERAGENT':'','CURLOPT_FTPPORT':'','CURLOPT_FTP_USE_EPSV':'','CURLOPT_LOW_SPEED_LIMIT':'','CURLOPT_LOW_SPEED_TIME':'','CURLOPT_RESUME_FROM':'','CURLOPT_COOKIE':'','CURLOPT_SSLCERT':'','CURLOPT_SSLCERTPASSWD':'','CURLOPT_WRITEHEADER':'','CURLOPT_SSL_VERIFYHOST':'','CURLOPT_COOKIEFILE':'','CURLOPT_SSLVERSION':'','CURLOPT_TIMECONDITION':'','CURLOPT_TIMEVALUE':'','CURLOPT_CUSTOMREQUEST':'','CURLOPT_STDERR':'','CURLOPT_TRANSFERTEXT':'','CURLOPT_RETURNTRANSFER':'','CURLOPT_QUOTE':'','CURLOPT_POSTQUOTE':'','CURLOPT_INTERFACE':'','CURLOPT_KRB4LEVEL':'','CURLOPT_HTTPPROXYTUNNEL':'','CURLOPT_FILETIME':'','CURLOPT_WRITEFUNCTION':'','CURLOPT_READFUNCTION':'','CURLOPT_PASSWDFUNCTION':'','CURLOPT_HEADERFUNCTION':'','CURLOPT_MAXREDIRS':'','CURLOPT_MAXCONNECTS':'','CURLOPT_CLOSEPOLICY':'','CURLOPT_FRESH_CONNECT':'','CURLOPT_FORBID_REUSE':'','CURLOPT_RANDOM_FILE':'','CURLOPT_EGDSOCKET':'','CURLOPT_CONNECTTIMEOUT':'','CURLOPT_CONNECTTIMEOUT_MS':'','CURLOPT_SSL_VERIFYPEER':'','CURLOPT_CAPATH':'','CURLOPT_COOKIEJAR':'','CURLOPT_SSL_CIPHER_LIST':'','CURLOPT_BINARYTRANSFER':'','CURLOPT_NOSIGNAL':'','CURLOPT_PROXYTYPE':'','CURLOPT_BUFFERSIZE':'','CURLOPT_HTTPGET':'','CURLOPT_HTTP_VERSION':'','CURLOPT_SSLKEY':'','CURLOPT_SSLKEYTYPE':'','CURLOPT_SSLKEYPASSWD':'','CURLOPT_SSLENGINE':'','CURLOPT_SSLENGINE_DEFAULT':'','CURLOPT_SSLCERTTYPE':'','CURLOPT_CRLF':'','CURLOPT_ENCODING':'','CURLOPT_PROXYPORT':'','CURLOPT_UNRESTRICTED_AUTH':'','CURLOPT_FTP_USE_EPRT':'','CURLOPT_HTTP200ALIASES':'','CURLOPT_HTTPAUTH':'','CURLAUTH_BASIC':'','CURLAUTH_DIGEST':'','CURLAUTH_GSSNEGOTIATE':'','CURLAUTH_NTLM':'','CURLAUTH_ANY':'','CURLAUTH_ANYSAFE':'','CURLOPT_PROXYAUTH':'','CURLOPT_MAX_RECV_SPEED_LARGE':'','CURLOPT_MAX_SEND_SPEED_LARGE':'','CURLCLOSEPOLICY_LEAST_RECENTLY_USED':'','CURLCLOSEPOLICY_LEAST_TRAFFIC':'','CURLCLOSEPOLICY_SLOWEST':'','CURLCLOSEPOLICY_CALLBACK':'','CURLCLOSEPOLICY_OLDEST':'','CURLINFO_PRIVATE':'','CURLINFO_EFFECTIVE_URL':'','CURLINFO_HTTP_CODE':'','CURLINFO_HEADER_OUT':'','CURLINFO_HEADER_SIZE':'','CURLINFO_REQUEST_SIZE':'','CURLINFO_TOTAL_TIME':'','CURLINFO_NAMELOOKUP_TIME':'','CURLINFO_CONNECT_TIME':'','CURLINFO_PRETRANSFER_TIME':'','CURLINFO_SIZE_UPLOAD':'','CURLINFO_SIZE_DOWNLOAD':'','CURLINFO_SPEED_DOWNLOAD':'','CURLINFO_SPEED_UPLOAD':'','CURLINFO_FILETIME':'','CURLINFO_SSL_VERIFYRESULT':'','CURLINFO_CONTENT_LENGTH_DOWNLOAD':'','CURLINFO_CONTENT_LENGTH_UPLOAD':'','CURLINFO_STARTTRANSFER_TIME':'','CURLINFO_CONTENT_TYPE':'','CURLINFO_REDIRECT_TIME':'','CURLINFO_REDIRECT_COUNT':'','CURL_TIMECOND_IFMODSINCE':'','CURL_TIMECOND_IFUNMODSINCE':'','CURL_TIMECOND_LASTMOD':'','CURL_VERSION_IPV6':'','CURL_VERSION_KERBEROS4':'','CURL_VERSION_SSL':'','CURL_VERSION_LIBZ':'','CURLVERSION_NOW':'','CURLE_OK':'','CURLE_UNSUPPORTED_PROTOCOL':'','CURLE_FAILED_INIT':'','CURLE_URL_MALFORMAT':'','CURLE_URL_MALFORMAT_USER':'','CURLE_COULDNT_RESOLVE_PROXY':'','CURLE_COULDNT_RESOLVE_HOST':'','CURLE_COULDNT_CONNECT':'','CURLE_FTP_WEIRD_SERVER_REPLY':'','CURLE_FTP_ACCESS_DENIED':'','CURLE_FTP_USER_PASSWORD_INCORRECT':'','CURLE_FTP_WEIRD_PASS_REPLY':'','CURLE_FTP_WEIRD_USER_REPLY':'','CURLE_FTP_WEIRD_PASV_REPLY':'','CURLE_FTP_WEIRD_227_FORMAT':'','CURLE_FTP_CANT_GET_HOST':'','CURLE_FTP_CANT_RECONNECT':'','CURLE_FTP_COULDNT_SET_BINARY':'','CURLE_PARTIAL_FILE':'','CURLE_FTP_COULDNT_RETR_FILE':'','CURLE_FTP_WRITE_ERROR':'','CURLE_FTP_QUOTE_ERROR':'','CURLE_HTTP_NOT_FOUND':'','CURLE_WRITE_ERROR':'','CURLE_MALFORMAT_USER':'','CURLE_FTP_COULDNT_STOR_FILE':'','CURLE_READ_ERROR':'','CURLE_OUT_OF_MEMORY':'','CURLE_OPERATION_TIMEOUTED':'','CURLE_FTP_COULDNT_SET_ASCII':'','CURLE_FTP_PORT_FAILED':'','CURLE_FTP_COULDNT_USE_REST':'','CURLE_FTP_COULDNT_GET_SIZE':'','CURLE_HTTP_RANGE_ERROR':'','CURLE_HTTP_POST_ERROR':'','CURLE_SSL_CONNECT_ERROR':'','CURLE_FTP_BAD_DOWNLOAD_RESUME':'','CURLE_FILE_COULDNT_READ_FILE':'','CURLE_LDAP_CANNOT_BIND':'','CURLE_LDAP_SEARCH_FAILED':'','CURLE_LIBRARY_NOT_FOUND':'','CURLE_FUNCTION_NOT_FOUND':'','CURLE_ABORTED_BY_CALLBACK':'','CURLE_BAD_FUNCTION_ARGUMENT':'','CURLE_BAD_CALLING_ORDER':'','CURLE_HTTP_PORT_FAILED':'','CURLE_BAD_PASSWORD_ENTERED':'','CURLE_TOO_MANY_REDIRECTS':'','CURLE_UNKNOWN_TELNET_OPTION':'','CURLE_TELNET_OPTION_SYNTAX':'','CURLE_OBSOLETE':'','CURLE_SSL_PEER_CERTIFICATE':'','CURLE_GOT_NOTHING':'','CURLE_SSL_ENGINE_NOTFOUND':'','CURLE_SSL_ENGINE_SETFAILED':'','CURLE_SEND_ERROR':'','CURLE_RECV_ERROR':'','CURLE_SHARE_IN_USE':'','CURLE_SSL_CERTPROBLEM':'','CURLE_SSL_CIPHER':'','CURLE_SSL_CACERT':'','CURLE_BAD_CONTENT_ENCODING':'','CURLE_LDAP_INVALID_URL':'','CURLE_FILESIZE_EXCEEDED':'','CURLE_FTP_SSL_FAILED':'','CURLFTPAUTH_DEFAULT':'','CURLFTPAUTH_SSL':'','CURLFTPAUTH_TLS':'','CURLPROXY_HTTP':'','CURLPROXY_SOCKS5':'','CURL_NETRC_OPTIONAL':'','CURL_NETRC_IGNORED':'','CURL_NETRC_REQUIRED':'','CURL_HTTP_VERSION_NONE':'','CURL_HTTP_VERSION_1_0':'','CURL_HTTP_VERSION_1_1':'','CURLM_CALL_MULTI_PERFORM':'','CURLM_OK':'','CURLM_BAD_HANDLE':'','CURLM_BAD_EASY_HANDLE':'','CURLM_OUT_OF_MEMORY':'','CURLM_INTERNAL_ERROR':'','CURLMSG_DONE':'','CURLOPT_KEYPASSWD':'','CURLOPT_SSH_AUTH_TYPES':'','CURLOPT_SSH_HOST_PUBLIC_KEY_MD5':'','CURLOPT_SSH_PRIVATE_KEYFILE':'','CURLOPT_SSH_PUBLIC_KEYFILE':'','CURLMOPT_PIPELINING':'','CURLMOPT_MAXCONNECTS':'','CURLSSH_AUTH_ANY':'','CURLSSH_AUTH_DEFAULT':'','CURLSSH_AUTH_HOST':'','CURLSSH_AUTH_KEYBOARD':'','CURLSSH_AUTH_NONE':'','CURLSSH_AUTH_PASSWORD':'','CURLSSH_AUTH_PUBLICKEY':'','CURL_WRAPPERS_ENABLED':'','CURLPAUSE_ALL':'','CURLPAUSE_CONT':'','CURLPAUSE_RECV':'','CURLPAUSE_RECV_CONT':'','CURLPAUSE_SEND':'','CURLPAUSE_SEND_CONT':'','CURLM_XXX':'','CURLOPT_CERTINFO':'','CURLOPT_CONNECT_ONLY':'','CURLINFO_':'','CURLOPT_PROTOCOLS':'','CURLOPT_REDIR_PROTOCOLS':'','CURLOPT_IPRESOLVE':'','CURL_IPRESOLVE_WHATEVER':'','CURL_IPRESOLVE_V4':'','CURL_IPRESOLVE_V6':'','CURLOPT_SHARE':'','CURLSHOPT_SHARE':'','CURLSHOPT_UNSHARE':'','CURL_LOCK_DATA_COOKIE':'','CURL_LOCK_DATA_DNS':'','CURL_LOCK_DATA_SSL_SESSION':'',}
+let php_builtin['constants']['date_time']={'DATE_ATOM':'','DATE_COOKIE':'','DATE_ISO8601':'','DATE_RFC822':'','DATE_RFC850':'','DATE_RFC1036':'','DATE_RFC1123':'','DATE_RFC2822':'','DATE_RFC3339':'','DATE_RSS':'','DATE_W3C':'','SUNFUNCS_RET_TIMESTAMP':'','SUNFUNCS_RET_STRING':'','SUNFUNCS_RET_DOUBLE':'','LC_TIME':'',}
+let php_builtin['constants']['libxml']={'LIBXML_ERR_WARNING':'','LIBXML_ERR_ERROR':'','LIBXML_ERR_FATAL':'','LIBXML_NONET':'','LIBXML_COMPACT':'','LIBXML_DTDATTR':'','LIBXML_DTDLOAD':'','LIBXML_DTDVALID':'','LIBXML_HTML_NOIMPLIED':'','LIBXML_HTML_NODEFDTD':'','LIBXML_NOBLANKS':'','LIBXML_NOCDATA':'','LIBXML_NOEMPTYTAG':'','LIBXML_NOENT':'','LIBXML_NOERROR':'','LIBXML_NOWARNING':'','LIBXML_NOXMLDECL':'','LIBXML_NSCLEAN':'','LIBXML_PARSEHUGE':'','LIBXML_PEDANTIC':'','LIBXML_XINCLUDE':'','LIBXML_ERR_NONE':'','LIBXML_VERSION':'','LIBXML_DOTTED_VERSION':'','LIBXML_SCHEMA_CREATE':'',}
+let php_builtin['constants']['mysqli']={'MYSQLI_REPORT_OFF':'','MYSQLI_REPORT_ALL':'','MYSQLI_REPORT_STRICT':'','MYSQLI_REPORT_ERROR':'','MYSQLI_REPORT_INDEX':'','MYSQLI_ASSOC':'','MYSQLI_NUM':'','MYSQLI_BOTH':'','PHP_INT_MAX':'','MYSQLI_READ_DEFAULT_GROUP':'','MYSQLI_READ_DEFAULT_FILE':'','MYSQLI_OPT_CONNECT_TIMEOUT':'','MYSQLI_OPT_LOCAL_INFILE':'','MYSQLI_INIT_COMMAND':'','MYSQLI_CLIENT_SSL':'','MYSQLI_CLIENT_COMPRESS':'','MYSQLI_CLIENT_INTERACTIVE':'','MYSQLI_CLIENT_IGNORE_SPACE':'','MYSQLI_CLIENT_NO_SCHEMA':'','MYSQLI_CLIENT_MULTI_QUERIES':'','MYSQLI_STORE_RESULT':'','MYSQLI_USE_RESULT':'','MYSQLI_NOT_NULL_FLAG':'','MYSQLI_PRI_KEY_FLAG':'','MYSQLI_UNIQUE_KEY_FLAG':'','MYSQLI_MULTIPLE_KEY_FLAG':'','MYSQLI_BLOB_FLAG':'','MYSQLI_UNSIGNED_FLAG':'','MYSQLI_ZEROFILL_FLAG':'','MYSQLI_AUTO_INCREMENT_FLAG':'','MYSQLI_TIMESTAMP_FLAG':'','MYSQLI_SET_FLAG':'','MYSQLI_NUM_FLAG':'','MYSQLI_PART_KEY_FLAG':'','MYSQLI_GROUP_FLAG':'','MYSQLI_TYPE_DECIMAL':'','MYSQLI_TYPE_NEWDECIMAL':'','MYSQLI_TYPE_BIT':'','MYSQLI_TYPE_TINY':'','MYSQLI_TYPE_SHORT':'','MYSQLI_TYPE_LONG':'','MYSQLI_TYPE_FLOAT':'','MYSQLI_TYPE_DOUBLE':'','MYSQLI_TYPE_NULL':'','MYSQLI_TYPE_TIMESTAMP':'','MYSQLI_TYPE_LONGLONG':'','MYSQLI_TYPE_INT24':'','MYSQLI_TYPE_DATE':'','MYSQLI_TYPE_TIME':'','MYSQLI_TYPE_DATETIME':'','MYSQLI_TYPE_YEAR':'','MYSQLI_TYPE_NEWDATE':'','MYSQLI_TYPE_INTERVAL':'','MYSQLI_TYPE_ENUM':'','MYSQLI_TYPE_SET':'','MYSQLI_TYPE_TINY_BLOB':'','MYSQLI_TYPE_MEDIUM_BLOB':'','MYSQLI_TYPE_LONG_BLOB':'','MYSQLI_TYPE_BLOB':'','MYSQLI_TYPE_VAR_STRING':'','MYSQLI_TYPE_STRING':'','MYSQLI_TYPE_CHAR':'','MYSQLI_TYPE_GEOMETRY':'','MYSQLI_NEED_DATA':'','MYSQLI_NO_DATA':'','MYSQLI_DATA_TRUNCATED':'','MYSQLI_ENUM_FLAG':'','MYSQLI_BINARY_FLAG':'','MYSQLI_CURSOR_TYPE_FOR_UPDATE':'','MYSQLI_CURSOR_TYPE_NO_CURSOR':'','MYSQLI_CURSOR_TYPE_READ_ONLY':'','MYSQLI_CURSOR_TYPE_SCROLLABLE':'','MYSQLI_STMT_ATTR_CURSOR_TYPE':'','MYSQLI_STMT_ATTR_PREFETCH_ROWS':'','MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH':'','MYSQLI_SET_CHARSET_NAME':'','MYSQLI_DEBUG_TRACE_ENABLED':'','MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED':'','MYSQLI_SERVER_QUERY_NO_INDEX_USED':'','MYSQLI_REFRESH_GRANT':'','MYSQLI_REFRESH_LOG':'','MYSQLI_REFRESH_TABLES':'','MYSQLI_REFRESH_HOSTS':'','MYSQLI_REFRESH_STATUS':'','MYSQLI_REFRESH_THREADS':'','MYSQLI_REFRESH_SLAVE':'','MYSQLI_REFRESH_MASTER':'','MYSQLI_TRANS_COR_AND_CHAIN':'','MYSQLI_TRANS_COR_AND_NO_CHAIN':'','MYSQLI_TRANS_COR_RELEASE':'','MYSQLI_TRANS_COR_NO_RELEASE':'','MYSQL_READ_DEFAULT_FILE':'','MYSQLI_SERVER_PUBLIC_KEY':'','MYSQLI_NO_CHANGE_USER_ON_PCONNECT':'','MYSQLI_ASYNC':'','MYSQLI_OPT_INT_AND_FLOAT_NATIVE':'','MYSQLI_CLIENT_FOUND_ROWS':'','MULTI_STATEMENT':'','MYSQLI_RPL_MASTER':'','MYSQLI_RPL_SLAVE':'','MYSQLI_RPL_ADMIN':'',}
+let php_builtin['constants']['spl']={'READ_AHEAD':'','MIT_NEED_ALL':'','MIT_KEYS_ASSOC':'','CALL_TOSTRING':'','CATCH_GET_CHILD':'','RIT_LEAVES_ONLY':'','LOCK_SH':'','LOCK_EX':'','LOCK_UN':'','LOCK_NB':'','SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','PHP_INT_MAX':'',}
+let php_builtin['constants']['unknow']={'PHP_INI_ALL':'','PHP_INI_PERDIR':'','PHP_INI_SYSTEM':'','PHP_INI_USER':'','COUNTER_FLAG_PERSIST':'','COUNTER_FLAG_SAVE':'','COUNTER_FLAG_NO_OVERWRITE':'','COUNTER_META_NAME':'','COUNTER_META_IS_PERISTENT':'','COUNTER_RESET_NEVER':'','COUNTER_RESET_PER_LOAD':'','COUNTER_RESET_PER_REQUEST':'','PDO_PLACEHOLDER_NAMED':'','PDO_PLACEHOLDER_POSITIONAL':'','PDO_PLACEHOLDER_NONE':'','PDO_CASE_NATURAL':'','PDO_CASE_UPPER':'','PDO_CASE_LOWER':'','PDO_ATTR_CASE':'','PHP_COUNTER_API':'','PHPAPI':'','COMPILE_DL_COUNTER':'','ZEND_GET_MODULE':'','HAVE_COUNTER':'','COUNTER_G':'','TSRMLS_DC':'','TSRMLS_FETCH':'','STANDARD_MODULE_HEADER':'','STANDARD_MODULE_HEADER_EX':'','STANDARD_MODULE_PROPERTIES':'','STANDARD_MODULE_PROPERTIES_EX':'','ZEND_MODULE_API_NO':'','ZEND_DEBUG':'','USING_ZTS':'','NO_VERSION_YET':'','NO_MODULE_GLOBALS':'','PHP_MODULE_GLOBALS':'','IGNORE_PATH':'','USE_PATH':'','IGNORE_URL':'','IGNORE_URL_WIN':'','ENFORCE_SAFE_MODE':'','REPORT_ERRORS':'','STREAM_MUST_SEEK':'','STREAM_WILL_CAST':'',}
+let php_builtin['constants']['directories']={'DIRECTORY_SEPARATOR':'','PATH_SEPARATOR':'','SCANDIR_SORT_ASCENDING':'','SCANDIR_SORT_DESCENDING':'','SCANDIR_SORT_NONE':'',}
+let php_builtin['constants']['dom']={'XML_ELEMENT_NODE':'','XML_ATTRIBUTE_NODE':'','XML_TEXT_NODE':'','XML_CDATA_SECTION_NODE':'','XML_ENTITY_REF_NODE':'','XML_ENTITY_NODE':'','XML_PI_NODE':'','XML_COMMENT_NODE':'','XML_DOCUMENT_NODE':'','XML_DOCUMENT_TYPE_NODE':'','XML_DOCUMENT_FRAG_NODE':'','XML_NOTATION_NODE':'','XML_HTML_DOCUMENT_NODE':'','XML_DTD_NODE':'','XML_ELEMENT_DECL_NODE':'','XML_ATTRIBUTE_DECL_NODE':'','XML_ENTITY_DECL_NODE':'','XML_NAMESPACE_DECL_NODE':'','XML_ATTRIBUTE_CDATA':'','XML_ATTRIBUTE_ID':'','XML_ATTRIBUTE_IDREF':'','XML_ATTRIBUTE_IDREFS':'','XML_ATTRIBUTE_ENTITY':'','XML_ATTRIBUTE_NMTOKEN':'','XML_ATTRIBUTE_NMTOKENS':'','XML_ATTRIBUTE_ENUMERATION':'','XML_ATTRIBUTE_NOTATION':'','DOM_PHP_ERR':'','DOM_INDEX_SIZE_ERR':'','DOMSTRING_SIZE_ERR':'','DOM_HIERARCHY_REQUEST_ERR':'','DOM_WRONG_DOCUMENT_ERR':'','DOM_INVALID_CHARACTER_ERR':'','DOM_NO_DATA_ALLOWED_ERR':'','DOM_NO_MODIFICATION_ALLOWED_ERR':'','DOM_NOT_FOUND_ERR':'','DOM_NOT_SUPPORTED_ERR':'','DOM_INUSE_ATTRIBUTE_ERR':'','DOM_INVALID_STATE_ERR':'','DOM_SYNTAX_ERR':'','DOM_INVALID_MODIFICATION_ERR':'','DOM_NAMESPACE_ERR':'','DOM_INVALID_ACCESS_ERR':'','DOM_VALIDATION_ERR':'','DOM_NOT_FOUND_ERROR':'','DOM_NOT_FOUND':'',}
+let php_builtin['constants']['command_line_usage']={'PHP_SAPI':'','STDIN':'','STDOUT':'','STDERR':'',}
+let php_builtin['constants']['handling_file_uploads']={'UPLOAD_ERR_OK':'','UPLOAD_ERR_INI_SIZE':'','UPLOAD_ERR_FORM_SIZE':'','UPLOAD_ERR_PARTIAL':'','UPLOAD_ERR_NO_FILE':'','UPLOAD_ERR_NO_TMP_DIR':'','UPLOAD_ERR_CANT_WRITE':'','UPLOAD_ERR_EXTENSION':'',}
+let php_builtin['constants']['fileinfo']={'FILEINFO_NONE':'','FILEINFO_SYMLINK':'','FILEINFO_MIME_TYPE':'','FILEINFO_MIME_ENCODING':'','FILEINFO_MIME':'','FILEINFO_COMPRESS':'','FILEINFO_DEVICES':'','FILEINFO_CONTINUE':'','FILEINFO_PRESERVE_ATIME':'','FILEINFO_RAW':'',}
+let php_builtin['constants']['filesystem']={'SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','LOCK_SH':'','LOCK_EX':'','LOCK_UN':'','LOCK_NB':'','GLOB_BRACE':'','GLOB_ONLYDIR':'','GLOB_MARK':'','GLOB_NOSORT':'','GLOB_NOCHECK':'','GLOB_NOESCAPE':'','GLOB_AVAILABLE_FLAGS':'','PATHINFO_DIRNAME':'','PATHINFO_BASENAME':'','PATHINFO_EXTENSION':'','PATHINFO_FILENAME':'','FILE_USE_INCLUDE_PATH':'','FILE_NO_DEFAULT_CONTEXT':'','FILE_APPEND':'','FILE_IGNORE_NEW_LINES':'','FILE_SKIP_EMPTY_LINES':'','FILE_BINARY':'','FILE_TEXT':'','INI_SCANNER_NORMAL':'','INI_SCANNER_RAW':'','FNM_NOESCAPE':'','FNM_PATHNAME':'','FNM_PERIOD':'','FNM_CASEFOLD':'','GLOB_ERR':'',}
+let php_builtin['constants']['filter']={'FILTER_FLAG_NO_ENCODE_QUOTES':'','INPUT_POST':'','INPUT_GET':'','INPUT_COOKIE':'','INPUT_ENV':'','INPUT_SERVER':'','INPUT_SESSION':'','INPUT_REQUEST':'','FILTER_FLAG_NONE':'','FILTER_REQUIRE_SCALAR':'','FILTER_REQUIRE_ARRAY':'','FILTER_FORCE_ARRAY':'','FILTER_NULL_ON_FAILURE':'','FILTER_VALIDATE_INT':'','FILTER_VALIDATE_BOOLEAN':'','FILTER_VALIDATE_FLOAT':'','FILTER_VALIDATE_REGEXP':'','FILTER_VALIDATE_URL':'','FILTER_VALIDATE_EMAIL':'','FILTER_VALIDATE_IP':'','FILTER_DEFAULT':'','FILTER_UNSAFE_RAW':'','FILTER_SANITIZE_STRING':'','FILTER_SANITIZE_STRIPPED':'','FILTER_SANITIZE_ENCODED':'','FILTER_SANITIZE_SPECIAL_CHARS':'','FILTER_SANITIZE_EMAIL':'','FILTER_SANITIZE_URL':'','FILTER_SANITIZE_NUMBER_INT':'','FILTER_SANITIZE_NUMBER_FLOAT':'','FILTER_SANITIZE_MAGIC_QUOTES':'','FILTER_CALLBACK':'','FILTER_FLAG_ALLOW_OCTAL':'','FILTER_FLAG_ALLOW_HEX':'','FILTER_FLAG_STRIP_LOW':'','FILTER_FLAG_STRIP_HIGH':'','FILTER_FLAG_ENCODE_LOW':'','FILTER_FLAG_ENCODE_HIGH':'','FILTER_FLAG_ENCODE_AMP':'','FILTER_FLAG_EMPTY_STRING_NULL':'','FILTER_FLAG_ALLOW_FRACTION':'','FILTER_FLAG_ALLOW_THOUSAND':'','FILTER_FLAG_ALLOW_SCIENTIFIC':'','FILTER_FLAG_PATH_REQUIRED':'','FILTER_FLAG_QUERY_REQUIRED':'','FILTER_FLAG_IPV4':'','FILTER_FLAG_IPV6':'','FILTER_FLAG_NO_RES_RANGE':'','FILTER_FLAG_NO_PRIV_RANGE':'','FILTER_SANITIZE_RAW':'','FILTER_SANITIZE_FULL_SPECIAL_CHARS':'','ENT_QUOTES':'',}
+let php_builtin['constants']['php_options_info']={'ASSERT_CALLBACK':'','RUSAGE_CHILDREN':'','PHP_SAPI':'','PHP_OS':'','CREDITS_DOCS':'','CREDITS_GENERAL':'','CREDITS_GROUP':'','CREDITS_MODULES':'','CREDITS_FULLPAGE':'','PHP_VERSION_ID':'','PHP_VERSION':'','PATH_SEPARATOR':'','CREDITS_SAPI':'','CREDITS_QA':'','CREDITS_ALL':'','INFO_GENERAL':'','INFO_CREDITS':'','INFO_CONFIGURATION':'','INFO_MODULES':'','INFO_ENVIRONMENT':'','INFO_VARIABLES':'','INFO_LICENSE':'','INFO_ALL':'','ASSERT_ACTIVE':'','ASSERT_BAIL':'','ASSERT_WARNING':'','ASSERT_QUIET_EVAL':'','PHP_WINDOWS_VERSION_MAJOR':'','PHP_WINDOWS_VERSION_MINOR':'','PHP_WINDOWS_VERSION_BUILD':'','PHP_WINDOWS_VERSION_PLATFORM':'','PHP_WINDOWS_VERSION_SP_MAJOR':'','PHP_WINDOWS_VERSION_SP_MINOR':'','PHP_WINDOWS_VERSION_SUITEMASK':'','PHP_WINDOWS_VERSION_PRODUCTTYPE':'','PHP_WINDOWS_NT_DOMAIN_CONTROLLER':'','PHP_WINDOWS_NT_SERVER':'','PHP_WINDOWS_NT_WORKSTATION':'',}
+let php_builtin['constants']['strings']={'CRYPT_SALT_LENGTH':'','CRYPT_STD_DES':'','CRYPT_EXT_DES':'','CRYPT_MD5':'','CRYPT_BLOWFISH':'','CRYPT_SHA256':'','CRYPT_SHA512':'','HTML_ENTITIES':'','HTML_SPECIALCHARS':'','ENT_COMPAT':'','ENT_QUOTES':'','ENT_NOQUOTES':'','ENT_HTML401':'','ENT_XML1':'','ENT_XHTML':'','ENT_HTML5':'','ENT_IGNORE':'','ENT_SUBSTITUTE':'','ENT_DISALLOWED':'','CHAR_MAX':'','LC_MONETARY':'','AM_STR':'','PM_STR':'','D_T_FMT':'','D_FMT':'','T_FMT':'','T_FMT_AMPM':'','ERA':'','ERA_YEAR':'','ERA_D_T_FMT':'','ERA_D_FMT':'','ERA_T_FMT':'','INT_CURR_SYMBOL':'','CURRENCY_SYMBOL':'','CRNCYSTR':'','MON_DECIMAL_POINT':'','MON_THOUSANDS_SEP':'','MON_GROUPING':'','POSITIVE_SIGN':'','NEGATIVE_SIGN':'','INT_FRAC_DIGITS':'','FRAC_DIGITS':'','P_CS_PRECEDES':'','P_SEP_BY_SPACE':'','N_CS_PRECEDES':'','N_SEP_BY_SPACE':'','P_SIGN_POSN':'','N_SIGN_POSN':'','DECIMAL_POINT':'','RADIXCHAR':'','THOUSANDS_SEP':'','THOUSEP':'','GROUPING':'','YESEXPR':'','NOEXPR':'','YESSTR':'','NOSTR':'','CODESET':'','LC_ALL':'','LC_COLLATE':'','LC_CTYPE':'','LC_NUMERIC':'','LC_TIME':'','LC_MESSAGES':'','PHP_INT_MAX':'','STR_PAD_RIGHT':'','STR_PAD_LEFT':'','STR_PAD_BOTH':'',}
+let php_builtin['constants']['error_handling']={'DEBUG_BACKTRACE_PROVIDE_OBJECT':'','DEBUG_BACKTRACE_IGNORE_ARGS':'',}
+let php_builtin['constants']['math']={'PHP_INT_MAX':'','M_PI':'','PHP_ROUND_HALF_UP':'','PHP_ROUND_HALF_DOWN':'','PHP_ROUND_HALF_EVEN':'','PHP_ROUND_HALF_ODD':'','M_E':'','M_LOG2E':'','M_LOG10E':'','M_LN2':'','M_LN10':'','M_PI_2':'','M_PI_4':'','M_1_PI':'','M_2_PI':'','M_SQRTPI':'','M_2_SQRTPI':'','M_SQRT2':'','M_SQRT3':'','M_SQRT1_2':'','M_LNPI':'','M_EULER':'','NAN':'','INF':'',}
+let php_builtin['constants']['network']={'LOG_EMERG':'','LOG_ALERT':'','LOG_CRIT':'','LOG_ERR':'','LOG_WARNING':'','LOG_NOTICE':'','LOG_INFO':'','LOG_DEBUG':'','LOG_KERN':'','LOG_USER':'','LOG_MAIL':'','LOG_DAEMON':'','LOG_AUTH':'','LOG_SYSLOG':'','LOG_LPR':'','LOG_NEWS':'','LOG_CRON':'','LOG_AUTHPRIV':'','LOG_LOCAL0':'','LOG_LOCAL1':'','LOG_LOCAL2':'','LOG_LOCAL3':'','LOG_LOCAL4':'','LOG_LOCAL5':'','LOG_LOCAL6':'','LOG_LOCAL7':'','LOG_PID':'','LOG_CONS':'','LOG_ODELAY':'','LOG_NDELAY':'','LOG_NOWAIT':'','LOG_PERROR':'','DNS_A':'','DNS_CNAME':'','DNS_HINFO':'','DNS_MX':'','DNS_NS':'','DNS_PTR':'','DNS_SOA':'','DNS_TXT':'','DNS_AAAA':'','DNS_SRV':'','DNS_NAPTR':'','DNS_A6':'','DNS_ALL':'','DNS_ANY':'','SID':'','LOG_UUCP':'',}
+let php_builtin['constants']['urls']={'PHP_QUERY_RFC1738':'','PHP_QUERY_RFC3986':'','PHP_URL_SCHEME':'','PHP_URL_HOST':'','PHP_URL_PORT':'','PHP_URL_USER':'','PHP_URL_PASS':'','PHP_URL_PATH':'','PHP_URL_QUERY':'','PHP_URL_FRAGMENT':'',}
+let php_builtin['constants']['gd']={'IMAGETYPE_GIF':'','IMAGETYPE_JPEG':'','IMAGETYPE_PNG':'','IMAGETYPE_SWF':'','IMAGETYPE_PSD':'','IMAGETYPE_BMP':'','IMAGETYPE_TIFF_II':'','IMAGETYPE_TIFF_MM':'','IMAGETYPE_JPC':'','IMAGETYPE_JP2':'','IMAGETYPE_JPX':'','IMAGETYPE_JB2':'','IMAGETYPE_SWC':'','IMAGETYPE_IFF':'','IMAGETYPE_WBMP':'','IMAGETYPE_XBM':'','IMAGETYPE_ICO':'','IMG_CROP_THRESHOLD':'','IMG_ARC_PIE':'','IMG_ARC_CHORD':'','IMG_ARC_NOFILL':'','IMG_ARC_EDGED':'','IMG_FILTER_NEGATE':'','IMG_FILTER_GRAYSCALE':'','IMG_FILTER_BRIGHTNESS':'','IMG_FILTER_CONTRAST':'','IMG_FILTER_COLORIZE':'','IMG_FILTER_EDGEDETECT':'','IMG_FILTER_EMBOSS':'','IMG_FILTER_GAUSSIAN_BLUR':'','IMG_FILTER_SELECTIVE_BLUR':'','IMG_FILTER_MEAN_REMOVAL':'','IMG_FILTER_SMOOTH':'','IMG_FILTER_PIXELATE':'','IMG_FLIP_HORIZONTAL':'','IMG_FLIP_VERTICAL':'','IMG_FLIP_BOTH':'','IMG_GD2_RAW':'','IMG_GD2_COMPRESSED':'','IMG_EFFECT_REPLACE':'','IMG_EFFECT_ALPHABLEND':'','IMG_EFFECT_NORMAL':'','IMG_EFFECT_OVERLAY':'','PNG_NO_FILTER':'','PNG_ALL_FILTERS':'','IMG_NEAREST_NEIGHBOUR':'','IMG_BILINEAR_FIXED':'','IMG_BICUBIC':'','IMG_BICUBIC_FIXED':'','IMG_COLOR_BRUSHED':'','IMG_COLOR_STYLEDBRUSHED':'','IMG_BELL':'','IMG_BESSEL':'','IMG_BLACKMAN':'','IMG_BOX':'','IMG_BSPLINE':'','IMG_CATMULLROM':'','IMG_GAUSSIAN':'','IMG_GENERALIZED_CUBIC':'','IMG_HERMITE':'','IMG_HAMMING':'','IMG_HANNING':'','IMG_MITCHELL':'','IMG_POWER':'','IMG_QUADRATIC':'','IMG_SINC':'','IMG_WEIGHTED4':'','IMG_TRIANGLE':'','IMG_COLOR_STYLED':'','IMG_COLOR_TRANSPARENT':'','IMG_COLOR_TILED':'','IMG_GIF':'','IMG_JPG':'','IMG_PNG':'','IMG_WBMP':'','IMG_XPM':'','GD_VERSION':'','GD_MAJOR_VERSION':'','GD_MINOR_VERSION':'','GD_RELEASE_VERSION':'','GD_EXTRA_VERSION':'','GD_BUNDLED':'','IMG_JPEG':'','IMG_ARC_ROUNDED':'','IMAGETYPE_JPEG2000':'','PNG_FILTER_NONE':'','PNG_FILTER_SUB':'','PNG_FILTER_UP':'','PNG_FILTER_AVG':'','PNG_FILTER_PAETH':'',}
+let php_builtin['constants']['json']={'JSON_BIGINT_AS_STRING':'','JSON_HEX_QUOT':'','JSON_HEX_TAG':'','JSON_HEX_AMP':'','JSON_HEX_APOS':'','JSON_NUMERIC_CHECK':'','JSON_PRETTY_PRINT':'','JSON_UNESCAPED_SLASHES':'','JSON_FORCE_OBJECT':'','JSON_UNESCAPED_UNICODE':'','JSON_ERROR_NONE':'','JSON_ERROR_DEPTH':'','JSON_ERROR_STATE_MISMATCH':'','JSON_ERROR_CTRL_CHAR':'','JSON_ERROR_SYNTAX':'','JSON_ERROR_UTF8':'','JSON_ERROR_RECURSION':'','JSON_ERROR_INF_OR_NAN':'','NAN':'','INF':'','JSON_ERROR_UNSUPPORTED_TYPE':'','JSON_PARTIAL_OUTPUT_ON_ERROR':'',}
+let php_builtin['constants']['multibyte_string']={'MB_CASE_UPPER':'','MB_CASE_LOWER':'','MB_CASE_TITLE':'','MB_OVERLOAD_MAIL':'','MB_OVERLOAD_STRING':'','MB_OVERLOAD_REGEX':'',}
+let php_builtin['constants']['mssql']={'SQLTEXT':'','SQLVARCHAR':'','SQLCHAR':'','SQLINT1':'','SQLINT2':'','SQLINT4':'','SQLBIT':'','SQLFLT4':'','SQLFLT8':'','SQLFLTN':'','MSSQL_ASSOC':'','MSSQL_NUM':'','MSSQL_BOTH':'',}
+let php_builtin['constants']['mysql']={'MYSQL_CLIENT_SSL':'','MYSQL_CLIENT_COMPRESS':'','MYSQL_CLIENT_IGNORE_SPACE':'','MYSQL_CLIENT_INTERACTIVE':'','MYSQL_ASSOC':'','MYSQL_NUM':'','MYSQL_BOTH':'','MYSQL_PORT':'',}
+let php_builtin['constants']['output_control']={'PHP_OUTPUT_HANDLER_STDFLAGS':'','PHP_OUTPUT_HANDLER_CLEANABLE':'','PHP_OUTPUT_HANDLER_FLUSHABLE':'','PHP_OUTPUT_HANDLER_REMOVABLE':'','PHP_OUTPUT_HANDLER_START':'','PHP_OUTPUT_HANDLER_WRITE':'','PHP_OUTPUT_HANDLER_FLUSH':'','PHP_OUTPUT_HANDLER_CLEAN':'','PHP_OUTPUT_HANDLER_FINAL':'','PHP_OUTPUT_HANDLER_CONT':'','PHP_OUTPUT_HANDLER_END':'',}
+let php_builtin['constants']['password_hashing']={'PASSWORD_DEFAULT':'','PASSWORD_BCRYPT':'','CRYPT_BLOWFISH':'',}
+let php_builtin['constants']['postgresql']={'PGSQL_CONNECT_FORCE_NEW':'','PGSQL_CONNECTION_OK':'','PGSQL_CONNECTION_BAD':'','PGSQL_CONV_IGNORE_DEFAULT':'','PGSQL_CONV_FORCE_NULL':'','PGSQL_CONV_IGNORE_NOT_NULL':'','PGSQL_DML_NO_CONV':'','PGSQL_DML_ESCAPE':'','PGSQL_DML_EXEC':'','PGSQL_DML_ASYNC':'','PGSQL_DML_STRING':'','PGSQL_ASSOC':'','PGSQL_NUM':'','PGSQL_BOTH':'','PGSQL_CONV_OPTS':'','INV_READ':'','INV_WRITE':'','INV_ARCHIVE':'','PGSQL_SEEK_SET':'','PGSQL_SEEK_CUR':'','PGSQL_SEEK_END':'','PGSQL_DIAG_SEVERITY':'','PGSQL_DIAG_SQLSTATE':'','PGSQL_DIAG_MESSAGE_PRIMARY':'','PGSQL_DIAG_MESSAGE_DETAIL':'','PGSQL_DIAG_MESSAGE_HINT':'','PGSQL_DIAG_STATEMENT_POSITION':'','PGSQL_DIAG_INTERNAL_POSITION':'','PGSQL_DIAG_INTERNAL_QUERY':'','PGSQL_DIAG_CONTEXT':'','PGSQL_DIAG_SOURCE_FILE':'','PGSQL_DIAG_SOURCE_LINE':'','PGSQL_DIAG_SOURCE_FUNCTION':'','PGSQL_STATUS_LONG':'','PGSQL_STATUS_STRING':'','PGSQL_EMPTY_QUERY':'','PGSQL_COMMAND_OK':'','PGSQL_TUPLES_OK':'','PGSQL_COPY_OUT':'','PGSQL_COPY_IN':'','PGSQL_BAD_RESPONSE':'','PGSQL_NONFATAL_ERROR':'','PGSQL_FATAL_ERROR':'','PGSQL_ERRORS_TERSE':'','PGSQL_ERRORS_DEFAULT':'','PGSQL_ERRORS_VERBOSE':'','PGSQL_TRANSACTION_IDLE':'','PGSQL_TRANSACTION_ACTIVE':'','PGSQL_TRANSACTION_INTRANS':'','PGSQL_TRANSACTION_INERROR':'','PGSQL_TRANSACTION_UNKNOWN':'','PG_DIAG_STATEMENT_POSITION':'','PG_DIAG_INTERNAL_QUERY':'',}
+let php_builtin['constants']['pcre']={'PREG_GREP_INVERT':'','PREG_NO_ERROR':'','PREG_INTERNAL_ERROR':'','PREG_BACKTRACK_LIMIT_ERROR':'','PREG_RECURSION_LIMIT_ERROR':'','PREG_BAD_UTF8_ERROR':'','PREG_BAD_UTF8_OFFSET_ERROR':'','PREG_PATTERN_ORDER':'','PREG_SET_ORDER':'','PREG_OFFSET_CAPTURE':'','PREG_SPLIT_NO_EMPTY':'','PREG_SPLIT_DELIM_CAPTURE':'','PREG_SPLIT_OFFSET_CAPTURE':'','PCRE_VERSION':'',}
+let php_builtin['constants']['program_execution']={'STDIN':'',}
+let php_builtin['constants']['sessions']={'SID':'','PHP_SESSION_DISABLED':'','PHP_SESSION_NONE':'','PHP_SESSION_ACTIVE':'','UPLOAD_ERR_EXTENSION':'',}
+let php_builtin['constants']['variable_handling']={'PHP_INT_MAX':'',}
+let php_builtin['constants']['misc']={'WAIT_IO_COMPLETION':'','CONNECTION_ABORTED':'','CONNECTION_NORMAL':'','CONNECTION_TIMEOUT':'',}
+let php_builtin['constants']['streams']={'STREAM_FILTER_READ':'','STREAM_FILTER_WRITE':'','STREAM_FILTER_ALL':'','PHP_INT_MAX':'','STREAM_CLIENT_CONNECT':'','STREAM_CLIENT_ASYNC_CONNECT':'','STREAM_CLIENT_PERSISTENT':'','STREAM_CRYPTO_METHOD_TLS_CLIENT':'','STREAM_CRYPTO_METHOD_TLS_SERVER':'','STREAM_PF_INET':'','STREAM_PF_INET6':'','STREAM_PF_UNIX':'','STREAM_SOCK_DGRAM':'','STREAM_SOCK_RAW':'','STREAM_SOCK_RDM':'','STREAM_SOCK_SEQPACKET':'','STREAM_SOCK_STREAM':'','STREAM_IPPROTO_ICMP':'','STREAM_IPPROTO_IP':'','STREAM_IPPROTO_RAW':'','STREAM_IPPROTO_TCP':'','STREAM_IPPROTO_UDP':'','STREAM_OOB':'','STREAM_PEEK':'','AF_INET':'','STREAM_SERVER_BIND':'','STREAM_SHUT_RD':'','STREAM_SHUT_WR':'','STREAM_SHUT_RDWR':'','STREAM_IS_URL':'','PSFS_PASS_ON':'','PSFS_FEED_ME':'','PSFS_ERR_FATAL':'','PSFS_FLAG_NORMAL':'','PSFS_FLAG_FLUSH_INC':'','PSFS_FLAG_FLUSH_CLOSE':'','STREAM_USE_PATH':'','STREAM_REPORT_ERRORS':'','STREAM_SERVER_LISTEN':'','STREAM_NOTIFY_RESOLVE':'','STREAM_NOTIFY_CONNECT':'','STREAM_NOTIFY_AUTH_REQUIRED':'','STREAM_NOTIFY_SEVERITY_ERR':'','STREAM_NOTIFY_MIME_TYPE_IS':'','STREAM_NOTIFY_FILE_SIZE_IS':'','STREAM_NOTIFY_REDIRECTED':'','STREAM_NOTIFY_PROGRESS':'','STREAM_NOTIFY_COMPLETED':'','STREAM_NOTIFY_FAILURE':'','STREAM_NOTIFY_AUTH_RESULT':'','STREAM_NOTIFY_SEVERITY_INFO':'','STREAM_NOTIFY_SEVERITY_WARN':'','STREAM_CAST_FOR_SELECT':'','STREAM_CAST_AS_STREAM':'','STREAM_META_TOUCH':'','STREAM_META_OWNER':'','STREAM_META_OWNER_NAME':'','STREAM_META_GROUP':'','STREAM_META_GROUP_NAME':'','STREAM_META_ACCESS':'','STREAM_MKDIR_RECURSIVE':'','LOCK_EX':'','LOCK_UN':'','LOCK_SH':'','LOCK_NB':'','SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','STREAM_OPTION_BLOCKING':'','STREAM_OPTION_READ_TIMEOUT':'','STREAM_OPTION_WRITE_BUFFER':'','STREAM_BUFFER_NONE':'','STREAM_BUFFER_FULL':'',}
+let php_builtin['constants']['iconv']={'ICONV_IMPL':'','ICONV_VERSION':'','ICONV_MIME_DECODE_STRICT':'','ICONV_MIME_DECODE_CONTINUE_ON_ERROR':'',}
+let php_builtin['constants']['phpini_directives']={'PATH_SEPARATOR':'','PHP_INI_SYSTEM':'',}
+let php_builtin['constants']['types']={'NAN':'','PHP_INT_SIZE':'','PHP_INT_MAX':'',}
+let php_builtin['constants']['pdo']={'PDO_PARAM_BOOL':'',}
+let php_builtin['constants']['list_of_reserved_words']={'PHP_VERSION':'','PHP_MAJOR_VERSION':'','PHP_MINOR_VERSION':'','PHP_RELEASE_VERSION':'','PHP_VERSION_ID':'','PHP_EXTRA_VERSION':'','PHP_ZTS':'','PHP_DEBUG':'','PHP_MAXPATHLEN':'','PHP_OS':'','PHP_SAPI':'','PHP_EOL':'','PHP_INT_MAX':'','PHP_INT_SIZE':'','DEFAULT_INCLUDE_PATH':'','PEAR_INSTALL_DIR':'','PEAR_EXTENSION_DIR':'','PHP_EXTENSION_DIR':'','PHP_PREFIX':'','PHP_BINDIR':'','PHP_BINARY':'','PHP_MANDIR':'','PHP_LIBDIR':'','PHP_DATADIR':'','PHP_SYSCONFDIR':'','PHP_LOCALSTATEDIR':'','PHP_CONFIG_FILE_PATH':'','PHP_CONFIG_FILE_SCAN_DIR':'','PHP_SHLIB_SUFFIX':'',}
+let php_builtin['constants']['php_type_comparison_tables']={'NAN':'',}
+
+" Built in functions
+let g:php_builtin_functions = {}
+for [ext, data] in items(php_builtin['functions'])
+ call extend(g:php_builtin_functions, data)
+endfor
+
+" Built in class
+let g:php_builtin_classes = {}
+for [ext, data] in items(php_builtin['classes'])
+ call extend(g:php_builtin_classes, data)
+endfor
+
+" Built in interfaces
+let g:php_builtin_interfaces = {}
+for [ext, data] in items(php_builtin['interfaces'])
+ call extend(g:php_builtin_interfaces, data)
+endfor
+
+" Built in constants
+let g:php_constants = {}
+for [ext, data] in items(php_builtin['constants'])
+ call extend(g:php_constants, data)
+endfor
+
+" When the classname not found or found but the tags doesn't contain that
+" class we will try to complete any method of any builtin class. To speed up
+" that lookup we compile a 'ClassName::MethodName':'info' dictionary from the
+" builtin class information
+let g:php_builtin_object_functions = {}
+
+" When completing for 'everyting imaginable' (no class context, not a
+" variable) we need a list of built-in classes in a format of {'classname':''}
+" for performance reasons we precompile this too
+let g:php_builtin_classnames = {}
+
+" In order to reduce file size, empty keys are omitted from class structures.
+" To make the structure of in-memory hashes normalized we will add them in runtime
+let required_class_hash_keys = ['constants', 'properties', 'static_properties', 'methods', 'static_methods']
+
+for [classname, class_info] in items(g:php_builtin_classes)
+ for property_name in required_class_hash_keys
+ if !has_key(class_info, property_name)
+ let class_info[property_name] = {}
+ endif
+ endfor
+
+ let g:php_builtin_classnames[classname] = ''
+ for [method_name, method_info] in items(class_info.methods)
+ let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature
+ endfor
+ for [method_name, method_info] in items(class_info.static_methods)
+ let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature
+ endfor
+endfor
+
+let g:php_builtin_interfacenames = {}
+for [interfacename, info] in items(g:php_builtin_interfaces)
+ for property_name in required_class_hash_keys
+ if !has_key(class_info, property_name)
+ let class_info[property_name] = {}
+ endif
+ endfor
+
+ let g:php_builtin_interfacenames[interfacename] = ''
+ for [method_name, method_info] in items(class_info.methods)
+ let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature
+ endfor
+ for [method_name, method_info] in items(class_info.static_methods)
+ let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature
+ endfor
+endfor
+
+
+" Add control structures (they are outside regular pattern of PHP functions)
+let php_control = {
+ \ 'include(': 'string filename | resource',
+ \ 'include_once(': 'string filename | resource',
+ \ 'require(': 'string filename | resource',
+ \ 'require_once(': 'string filename | resource',
+ \ }
+call extend(g:php_builtin_functions, php_control)
+
+
+" Built-in variables " {{{
+let g:php_builtin_vars ={
+ \ '$GLOBALS':'',
+ \ '$_SERVER':'',
+ \ '$_GET':'',
+ \ '$_POST':'',
+ \ '$_COOKIE':'',
+ \ '$_FILES':'',
+ \ '$_ENV':'',
+ \ '$_REQUEST':'',
+ \ '$_SESSION':'',
+ \ '$HTTP_SERVER_VARS':'',
+ \ '$HTTP_ENV_VARS':'',
+ \ '$HTTP_COOKIE_VARS':'',
+ \ '$HTTP_GET_VARS':'',
+ \ '$HTTP_POST_VARS':'',
+ \ '$HTTP_POST_FILES':'',
+ \ '$HTTP_SESSION_VARS':'',
+ \ '$php_errormsg':'',
+ \ '$this':'',
+ \ }
+" }}}
+endfunction
+" }}}
+
+" vim: foldmethod=marker:noexpandtab:ts=8:sts=4
diff --git a/runtime/autoload/python.vim b/runtime/autoload/python.vim
new file mode 100644
index 0000000..d5f4862
--- /dev/null
+++ b/runtime/autoload/python.vim
@@ -0,0 +1,249 @@
+" Support for Python indenting, see runtime/indent/python.vim
+
+let s:keepcpo= &cpo
+set cpo&vim
+
+" need to inspect some old g:pyindent_* variables to be backward compatible
+let g:python_indent = extend(get(g:, 'python_indent', {}), #{
+ \ closed_paren_align_last_line: v:true,
+ \ open_paren: get(g:, 'pyindent_open_paren', 'shiftwidth() * 2'),
+ \ nested_paren: get(g:, 'pyindent_nested_paren', 'shiftwidth()'),
+ \ continue: get(g:, 'pyindent_continue', 'shiftwidth() * 2'),
+ "\ searchpair() can be slow, limit the time to 150 msec or what is put in
+ "\ g:python_indent.searchpair_timeout
+ \ searchpair_timeout: get(g:, 'pyindent_searchpair_timeout', 150),
+ "\ Identing inside parentheses can be very slow, regardless of the searchpair()
+ "\ timeout, so let the user disable this feature if he doesn't need it
+ \ disable_parentheses_indenting: get(g:, 'pyindent_disable_parentheses_indenting', v:false),
+ \ }, 'keep')
+
+let s:maxoff = 50 " maximum number of lines to look backwards for ()
+
+function s:SearchBracket(fromlnum, flags)
+ return searchpairpos('[[({]', '', '[])}]', a:flags,
+ \ {-> synstack('.', col('.'))
+ \ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
+ \ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
+endfunction
+
+" See if the specified line is already user-dedented from the expected value.
+function s:Dedented(lnum, expected)
+ return indent(a:lnum) <= a:expected - shiftwidth()
+endfunction
+
+" Some other filetypes which embed Python have slightly different indent
+" rules (e.g. bitbake). Those filetypes can pass an extra funcref to this
+" function which is evaluated below.
+function python#GetIndent(lnum, ...)
+ let ExtraFunc = a:0 > 0 ? a:1 : 0
+
+ " If this line is explicitly joined: If the previous line was also joined,
+ " line it up with that one, otherwise add two 'shiftwidth'
+ if getline(a:lnum - 1) =~ '\\$'
+ if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
+ return indent(a:lnum - 1)
+ endif
+ return indent(a:lnum - 1) + get(g:, 'pyindent_continue', g:python_indent.continue)->eval()
+ endif
+
+ " If the start of the line is in a string don't change the indent.
+ if has('syntax_items')
+ \ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$"
+ return -1
+ endif
+
+ " Search backwards for the previous non-empty line.
+ let plnum = prevnonblank(v:lnum - 1)
+
+ if plnum == 0
+ " This is the first non-empty line, use zero indent.
+ return 0
+ endif
+
+ if g:python_indent.disable_parentheses_indenting == 1
+ let plindent = indent(plnum)
+ let plnumstart = plnum
+ else
+ " Indent inside parens.
+ " Align with the open paren unless it is at the end of the line.
+ " E.g.
+ " open_paren_not_at_EOL(100,
+ " (200,
+ " 300),
+ " 400)
+ " open_paren_at_EOL(
+ " 100, 200, 300, 400)
+ call cursor(a:lnum, 1)
+ let [parlnum, parcol] = s:SearchBracket(a:lnum, 'nbW')
+ if parlnum > 0
+ if parcol != col([parlnum, '$']) - 1
+ return parcol
+ elseif getline(a:lnum) =~ '^\s*[])}]' && !g:python_indent.closed_paren_align_last_line
+ return indent(parlnum)
+ endif
+ endif
+
+ call cursor(plnum, 1)
+
+ " If the previous line is inside parenthesis, use the indent of the starting
+ " line.
+ let [parlnum, _] = s:SearchBracket(plnum, 'nbW')
+ if parlnum > 0
+ if a:0 > 0 && ExtraFunc(parlnum)
+ " We may have found the opening brace of a bitbake Python task, e.g. 'python do_task {'
+ " If so, ignore it here - it will be handled later.
+ let parlnum = 0
+ let plindent = indent(plnum)
+ let plnumstart = plnum
+ else
+ let plindent = indent(parlnum)
+ let plnumstart = parlnum
+ endif
+ else
+ let plindent = indent(plnum)
+ let plnumstart = plnum
+ endif
+
+ " When inside parenthesis: If at the first line below the parenthesis add
+ " two 'shiftwidth', otherwise same as previous line.
+ " i = (a
+ " + b
+ " + c)
+ call cursor(a:lnum, 1)
+ let [p, _] = s:SearchBracket(a:lnum, 'bW')
+ if p > 0
+ if a:0 > 0 && ExtraFunc(p)
+ " Currently only used by bitbake
+ " Handle first non-empty line inside a bitbake Python task
+ if p == plnum
+ return shiftwidth()
+ endif
+
+ " Handle the user actually trying to close a bitbake Python task
+ let line = getline(a:lnum)
+ if line =~ '^\s*}'
+ return -2
+ endif
+
+ " Otherwise ignore the brace
+ let p = 0
+ else
+ if p == plnum
+ " When the start is inside parenthesis, only indent one 'shiftwidth'.
+ let [pp, _] = s:SearchBracket(a:lnum, 'bW')
+ if pp > 0
+ return indent(plnum)
+ \ + get(g:, 'pyindent_nested_paren', g:python_indent.nested_paren)->eval()
+ endif
+ return indent(plnum)
+ \ + get(g:, 'pyindent_open_paren', g:python_indent.open_paren)->eval()
+ endif
+ if plnumstart == p
+ return indent(plnum)
+ endif
+ return plindent
+ endif
+ endif
+ endif
+
+
+ " Get the line and remove a trailing comment.
+ " Use syntax highlighting attributes when possible.
+ let pline = getline(plnum)
+ let pline_len = strlen(pline)
+ if has('syntax_items')
+ " If the last character in the line is a comment, do a binary search for
+ " the start of the comment. synID() is slow, a linear search would take
+ " too long on a long line.
+ if synstack(plnum, pline_len)
+ \ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
+ let min = 1
+ let max = pline_len
+ while min < max
+ let col = (min + max) / 2
+ if synstack(plnum, col)
+ \ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
+ let max = col
+ else
+ let min = col + 1
+ endif
+ endwhile
+ let pline = strpart(pline, 0, min - 1)
+ endif
+ else
+ let col = 0
+ while col < pline_len
+ if pline[col] == '#'
+ let pline = strpart(pline, 0, col)
+ break
+ endif
+ let col = col + 1
+ endwhile
+ endif
+
+ " If the previous line ended with a colon, indent this line
+ if pline =~ ':\s*$'
+ return plindent + shiftwidth()
+ endif
+
+ " If the previous line was a stop-execution statement...
+ if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
+ " See if the user has already dedented
+ if s:Dedented(a:lnum, indent(plnum))
+ " If so, trust the user
+ return -1
+ endif
+ " If not, recommend one dedent
+ return indent(plnum) - shiftwidth()
+ endif
+
+ " If the current line begins with a keyword that lines up with "try"
+ if getline(a:lnum) =~ '^\s*\(except\|finally\)\>'
+ let lnum = a:lnum - 1
+ while lnum >= 1
+ if getline(lnum) =~ '^\s*\(try\|except\)\>'
+ let ind = indent(lnum)
+ if ind >= indent(a:lnum)
+ return -1 " indent is already less than this
+ endif
+ return ind " line up with previous try or except
+ endif
+ let lnum = lnum - 1
+ endwhile
+ return -1 " no matching "try"!
+ endif
+
+ " If the current line begins with a header keyword, dedent
+ if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
+
+ " Unless the previous line was a one-liner
+ if getline(plnumstart) =~ '^\s*\(for\|if\|elif\|try\)\>'
+ return plindent
+ endif
+
+ " Or the user has already dedented
+ if s:Dedented(a:lnum, plindent)
+ return -1
+ endif
+
+ return plindent - shiftwidth()
+ endif
+
+ " When after a () construct we probably want to go back to the start line.
+ " a = (b
+ " + c)
+ " here
+ if parlnum > 0
+ " ...unless the user has already dedented
+ if s:Dedented(a:lnum, plindent)
+ return -1
+ else
+ return plindent
+ endif
+ endif
+
+ return -1
+endfunction
+
+let &cpo = s:keepcpo
+unlet s:keepcpo
diff --git a/runtime/autoload/python3complete.vim b/runtime/autoload/python3complete.vim
new file mode 100644
index 0000000..ea0a331
--- /dev/null
+++ b/runtime/autoload/python3complete.vim
@@ -0,0 +1,611 @@
+"python3complete.vim - Omni Completion for python
+" Maintainer: <vacancy>
+" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
+" Version: 0.9
+" Last Updated: 2022 Mar 30
+"
+" 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('" . escape(cword, "'") . "', '" . escape(a:base, "'") . "')"
+ return g:python3complete_completions
+ endif
+endfunction
+
+function! s:DefPython()
+py3 << PYTHONEOF
+import warnings
+warnings.simplefilter(action='ignore', category=FutureWarning)
+
+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 a lot 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
+ self.parserline = 0
+
+ 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()
diff --git a/runtime/autoload/pythoncomplete.vim b/runtime/autoload/pythoncomplete.vim
new file mode 100644
index 0000000..aa28bb7
--- /dev/null
+++ b/runtime/autoload/pythoncomplete.vim
@@ -0,0 +1,627 @@
+"pythoncomplete.vim - Omni Completion for python
+" Maintainer: <vacancy>
+" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
+" Version: 0.9
+" Last Updated: 2020 Oct 9
+"
+" 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('" . escape(cword, "'") . "', '" . escape(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 a lot 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
+ self.parserline = 0
+
+ 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:
diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim
new file mode 100644
index 0000000..3677b25
--- /dev/null
+++ b/runtime/autoload/rubycomplete.vim
@@ -0,0 +1,872 @@
+" 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>
+" Last Change: 2020 Apr 12
+" ----------------------------------------------------------------------------
+"
+" 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
+
+" {{{ regex patterns
+
+" Regex that defines the start-match for the 'end' keyword.
+let s:end_start_regex =
+ \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
+ \ '\<\%(module\|class\|if\|for\|while\|until\|case\|unless\|begin' .
+ \ '\|\%(\K\k*[!?]\?\s\+\)\=def\):\@!\>' .
+ \ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
+
+" Regex that defines the middle-match for the 'end' keyword.
+let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|elsif\):\@!\>'
+
+" Regex that defines the end-match for the 'end' keyword.
+let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>'
+
+" }}} regex patterns
+
+" {{{ 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*\<' . escape(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( s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'W' )
+ 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:IsInComment(pos)
+ let stack = synstack(a:pos[0], a:pos[1])
+ if !empty(stack)
+ return synIDattr(stack[0], 'name') =~ 'ruby\%(.*Comment\|Documentation\)'
+ else
+ return 0
+ endif
+endfunction
+
+function! s:GetRubyVarType(v)
+ let stopline = 1
+ let vtp = ''
+ let curpos = 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('.',curpos)
+ let str = getline(lnum)
+ let vtp = substitute(str,sstr,'\1','')
+ return vtp
+ endif
+ call setpos('.',curpos)
+ 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 = ''.escape(a:v, '*').'\>\s*[+\-*/]*'.fstr
+ let pos = searchpos(sstr,'bW')
+ while pos != [0,0] && s:IsInComment(pos)
+ let pos = searchpos(sstr,'bW')
+ endwhile
+ if pos != [0,0]
+ let [lnum, col] = pos
+ let str = matchstr(getline(lnum),fstr,col)
+ 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('.',curpos)
+ 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 =~ '\.'
+ let 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
+
+ custom_paths = VIM::evaluate("get(g:, 'rubycomplete_load_paths', [])")
+
+ if !custom_paths.empty?
+ $LOAD_PATH.concat(custom_paths).uniq!
+ end
+
+ buf = VIM::Buffer.current
+ enum = buf.line_number
+ nums = Range.new( 1, enum )
+ nums.each do |x|
+
+ ln = buf[x]
+ begin
+ if /.*require_relative\s*(.*)$/.match( ln )
+ eval( "require %s" % File.expand_path($1) )
+ elsif /.*require\s*(["'].*?["'])/.match( ln )
+ eval( "require %s" % $1 )
+ end
+ rescue Exception => e
+ dprint e.inspect
+ end
+ end
+ end
+
+ def load_gems
+ fpath = VIM::evaluate("get(g:, 'rubycomplete_gemfile_path', 'Gemfile')")
+ return unless File.file?(fpath) && File.readable?(fpath)
+ want_bundler = VIM::evaluate("get(g:, 'rubycomplete_use_bundler')")
+ parse_file = !want_bundler
+ begin
+ require 'bundler'
+ Bundler.setup
+ Bundler.require
+ rescue Exception
+ parse_file = true
+ end
+ if parse_file
+ File.new(fpath).each_line do |line|
+ begin
+ require $1 if /\s*gem\s*['"]([^'"]+)/.match(line)
+ rescue Exception
+ end
+ 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]
+ is_const = false
+ if /^\s*(module|class|def|include)\s+/.match(ln) || is_const = /^\s*?[A-Z]([A-z]|[1-9])*\s*?[|]{0,2}=\s*?.+\s*?/.match(ln)
+ clscnt += 1 if /class|module/.match($1)
+ # We must make sure to load each constant only once to avoid errors
+ if is_const
+ ln.gsub!(/\s*?[|]{0,2}=\s*?/, '||=')
+ end
+ #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 )
+
+ bootfile = rails_base + "config/boot.rb"
+ envfile = rails_base + "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
+ if VIM::evaluate("has('nvim')") == 0
+ require 'thread'
+ Thread.new(a) do |b|
+ begin
+ b.load_rails
+ rescue
+ end
+ 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
+
+ want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')")
+ load_gems unless want_gems.to_i.zero?
+
+ 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.collect{ |c| c.to_s }.grep(/^#{receiver}/)
+
+ 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 )
+ load_buffer_module( receiver )
+ begin
+ constants = eval("#{receiver}.constants").collect{ |c| c.to_s }.grep(/^#{message}/)
+ methods = eval("#{receiver}.methods").collect{ |m| m.to_s }.grep(/^#{message}/)
+ rescue Exception
+ dprint "exception: %s" % $!
+ constants = []
+ methods = []
+ end
+
+ 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
+
+ invalid_vartype = ['', "gets"]
+ if !invalid_vartype.include?(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 && !invalid_vartype.include?(vartype)
+
+ 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:
diff --git a/runtime/autoload/rust.vim b/runtime/autoload/rust.vim
new file mode 100644
index 0000000..34a3b41
--- /dev/null
+++ b/runtime/autoload/rust.vim
@@ -0,0 +1,415 @@
+" Author: Kevin Ballard
+" Description: Helper functions for Rust commands/mappings
+" Last Modified: May 27, 2014
+" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
+
+" Jump {{{1
+
+function! rust#Jump(mode, function) range
+ let cnt = v:count1
+ normal! m'
+ if a:mode ==# 'v'
+ norm! gv
+ endif
+ let foldenable = &foldenable
+ set nofoldenable
+ while cnt > 0
+ execute "call <SID>Jump_" . a:function . "()"
+ let cnt = cnt - 1
+ endwhile
+ let &foldenable = foldenable
+endfunction
+
+function! s:Jump_Back()
+ call search('{', 'b')
+ keepjumps normal! w99[{
+endfunction
+
+function! s:Jump_Forward()
+ normal! j0
+ call search('{', 'b')
+ keepjumps normal! w99[{%
+ call search('{')
+endfunction
+
+" Run {{{1
+
+function! rust#Run(bang, args)
+ let args = s:ShellTokenize(a:args)
+ if a:bang
+ let idx = index(l:args, '--')
+ if idx != -1
+ let rustc_args = idx == 0 ? [] : l:args[:idx-1]
+ let args = l:args[idx+1:]
+ else
+ let rustc_args = l:args
+ let args = []
+ endif
+ else
+ let rustc_args = []
+ endif
+
+ let b:rust_last_rustc_args = l:rustc_args
+ let b:rust_last_args = l:args
+
+ call s:WithPath(function("s:Run"), rustc_args, args)
+endfunction
+
+function! s:Run(dict, rustc_args, args)
+ let exepath = a:dict.tmpdir.'/'.fnamemodify(a:dict.path, ':t:r')
+ if has('win32')
+ let exepath .= '.exe'
+ endif
+
+ let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
+ let rustc_args = [relpath, '-o', exepath] + a:rustc_args
+
+ let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
+
+ let pwd = a:dict.istemp ? a:dict.tmpdir : ''
+ let output = s:system(pwd, shellescape(rustc) . " " . join(map(rustc_args, 'shellescape(v:val)')))
+ if output != ''
+ echohl WarningMsg
+ echo output
+ echohl None
+ endif
+ if !v:shell_error
+ exe '!' . shellescape(exepath) . " " . join(map(a:args, 'shellescape(v:val)'))
+ endif
+endfunction
+
+" Expand {{{1
+
+function! rust#Expand(bang, args)
+ let args = s:ShellTokenize(a:args)
+ if a:bang && !empty(l:args)
+ let pretty = remove(l:args, 0)
+ else
+ let pretty = "expanded"
+ endif
+ call s:WithPath(function("s:Expand"), pretty, args)
+endfunction
+
+function! s:Expand(dict, pretty, args)
+ try
+ let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
+
+ if a:pretty =~? '^\%(everybody_loops$\|flowgraph=\)'
+ let flag = '--xpretty'
+ else
+ let flag = '--pretty'
+ endif
+ let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
+ let args = [relpath, '-Z', 'unstable-options', l:flag, a:pretty] + a:args
+ let pwd = a:dict.istemp ? a:dict.tmpdir : ''
+ let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)')))
+ if v:shell_error
+ echohl WarningMsg
+ echo output
+ echohl None
+ else
+ new
+ silent put =output
+ 1
+ d
+ setl filetype=rust
+ setl buftype=nofile
+ setl bufhidden=hide
+ setl noswapfile
+ " give the buffer a nice name
+ let suffix = 1
+ let basename = fnamemodify(a:dict.path, ':t:r')
+ while 1
+ let bufname = basename
+ if suffix > 1 | let bufname .= ' ('.suffix.')' | endif
+ let bufname .= '.pretty.rs'
+ if bufexists(bufname)
+ let suffix += 1
+ continue
+ endif
+ exe 'silent noautocmd keepalt file' fnameescape(bufname)
+ break
+ endwhile
+ endif
+ endtry
+endfunction
+
+function! rust#CompleteExpand(lead, line, pos)
+ if a:line[: a:pos-1] =~ '^RustExpand!\s*\S*$'
+ " first argument and it has a !
+ let list = ["normal", "expanded", "typed", "expanded,identified", "flowgraph=", "everybody_loops"]
+ if !empty(a:lead)
+ call filter(list, "v:val[:len(a:lead)-1] == a:lead")
+ endif
+ return list
+ endif
+
+ return glob(escape(a:lead, "*?[") . '*', 0, 1)
+endfunction
+
+" Emit {{{1
+
+function! rust#Emit(type, args)
+ let args = s:ShellTokenize(a:args)
+ call s:WithPath(function("s:Emit"), a:type, args)
+endfunction
+
+function! s:Emit(dict, type, args)
+ try
+ let output_path = a:dict.tmpdir.'/output'
+
+ let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc"
+
+ let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path)
+ let args = [relpath, '--emit', a:type, '-o', output_path] + a:args
+ let pwd = a:dict.istemp ? a:dict.tmpdir : ''
+ let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)')))
+ if output != ''
+ echohl WarningMsg
+ echo output
+ echohl None
+ endif
+ if !v:shell_error
+ new
+ exe 'silent keepalt read' fnameescape(output_path)
+ 1
+ d
+ if a:type == "llvm-ir"
+ setl filetype=llvm
+ let extension = 'll'
+ elseif a:type == "asm"
+ setl filetype=asm
+ let extension = 's'
+ endif
+ setl buftype=nofile
+ setl bufhidden=hide
+ setl noswapfile
+ if exists('l:extension')
+ " give the buffer a nice name
+ let suffix = 1
+ let basename = fnamemodify(a:dict.path, ':t:r')
+ while 1
+ let bufname = basename
+ if suffix > 1 | let bufname .= ' ('.suffix.')' | endif
+ let bufname .= '.'.extension
+ if bufexists(bufname)
+ let suffix += 1
+ continue
+ endif
+ exe 'silent noautocmd keepalt file' fnameescape(bufname)
+ break
+ endwhile
+ endif
+ endif
+ endtry
+endfunction
+
+" Utility functions {{{1
+
+" Invokes func(dict, ...)
+" Where {dict} is a dictionary with the following keys:
+" 'path' - The path to the file
+" 'tmpdir' - The path to a temporary directory that will be deleted when the
+" function returns.
+" 'istemp' - 1 if the path is a file inside of {dict.tmpdir} or 0 otherwise.
+" If {istemp} is 1 then an additional key is provided:
+" 'tmpdir_relpath' - The {path} relative to the {tmpdir}.
+"
+" {dict.path} may be a path to a file inside of {dict.tmpdir} or it may be the
+" existing path of the current buffer. If the path is inside of {dict.tmpdir}
+" then it is guaranteed to have a '.rs' extension.
+function! s:WithPath(func, ...)
+ let buf = bufnr('')
+ let saved = {}
+ let dict = {}
+ try
+ let saved.write = &write
+ set write
+ let dict.path = expand('%')
+ let pathisempty = empty(dict.path)
+
+ " Always create a tmpdir in case the wrapped command wants it
+ let dict.tmpdir = tempname()
+ call mkdir(dict.tmpdir)
+
+ if pathisempty || !saved.write
+ let dict.istemp = 1
+ " if we're doing this because of nowrite, preserve the filename
+ if !pathisempty
+ let filename = expand('%:t:r').".rs"
+ else
+ let filename = 'unnamed.rs'
+ endif
+ let dict.tmpdir_relpath = filename
+ let dict.path = dict.tmpdir.'/'.filename
+
+ let saved.mod = &mod
+ set nomod
+
+ silent exe 'keepalt write! ' . fnameescape(dict.path)
+ if pathisempty
+ silent keepalt 0file
+ endif
+ else
+ let dict.istemp = 0
+ update
+ endif
+
+ call call(a:func, [dict] + a:000)
+ finally
+ if bufexists(buf)
+ for [opt, value] in items(saved)
+ silent call setbufvar(buf, '&'.opt, value)
+ unlet value " avoid variable type mismatches
+ endfor
+ endif
+ if has_key(dict, 'tmpdir') | silent call s:RmDir(dict.tmpdir) | endif
+ endtry
+endfunction
+
+function! rust#AppendCmdLine(text)
+ call setcmdpos(getcmdpos())
+ let cmd = getcmdline() . a:text
+ return cmd
+endfunction
+
+" Tokenize the string according to sh parsing rules
+function! s:ShellTokenize(text)
+ " states:
+ " 0: start of word
+ " 1: unquoted
+ " 2: unquoted backslash
+ " 3: double-quote
+ " 4: double-quoted backslash
+ " 5: single-quote
+ let l:state = 0
+ let l:current = ''
+ let l:args = []
+ for c in split(a:text, '\zs')
+ if l:state == 0 || l:state == 1 " unquoted
+ if l:c ==# ' '
+ if l:state == 0 | continue | endif
+ call add(l:args, l:current)
+ let l:current = ''
+ let l:state = 0
+ elseif l:c ==# '\'
+ let l:state = 2
+ elseif l:c ==# '"'
+ let l:state = 3
+ elseif l:c ==# "'"
+ let l:state = 5
+ else
+ let l:current .= l:c
+ let l:state = 1
+ endif
+ elseif l:state == 2 " unquoted backslash
+ if l:c !=# "\n" " can it even be \n?
+ let l:current .= l:c
+ endif
+ let l:state = 1
+ elseif l:state == 3 " double-quote
+ if l:c ==# '\'
+ let l:state = 4
+ elseif l:c ==# '"'
+ let l:state = 1
+ else
+ let l:current .= l:c
+ endif
+ elseif l:state == 4 " double-quoted backslash
+ if stridx('$`"\', l:c) >= 0
+ let l:current .= l:c
+ elseif l:c ==# "\n" " is this even possible?
+ " skip it
+ else
+ let l:current .= '\'.l:c
+ endif
+ let l:state = 3
+ elseif l:state == 5 " single-quoted
+ if l:c == "'"
+ let l:state = 1
+ else
+ let l:current .= l:c
+ endif
+ endif
+ endfor
+ if l:state != 0
+ call add(l:args, l:current)
+ endif
+ return l:args
+endfunction
+
+function! s:RmDir(path)
+ " sanity check; make sure it's not empty, /, or $HOME
+ if empty(a:path)
+ echoerr 'Attempted to delete empty path'
+ return 0
+ elseif a:path == '/' || a:path == $HOME
+ echoerr 'Attempted to delete protected path: ' . a:path
+ return 0
+ endif
+ return system("rm -rf " . shellescape(a:path))
+endfunction
+
+" Executes {cmd} with the cwd set to {pwd}, without changing Vim's cwd.
+" If {pwd} is the empty string then it doesn't change the cwd.
+function! s:system(pwd, cmd)
+ let cmd = a:cmd
+ if !empty(a:pwd)
+ let cmd = 'cd ' . shellescape(a:pwd) . ' && ' . cmd
+ endif
+ return system(cmd)
+endfunction
+
+" Playpen Support {{{1
+" Parts of gist.vim by Yasuhiro Matsumoto <mattn.jp@gmail.com> reused
+" gist.vim available under the BSD license, available at
+" http://github.com/mattn/gist-vim
+function! s:has_webapi()
+ if !exists("*webapi#http#post")
+ try
+ call webapi#http#post()
+ catch
+ endtry
+ endif
+ return exists("*webapi#http#post")
+endfunction
+
+function! rust#Play(count, line1, line2, ...) abort
+ redraw
+
+ let l:rust_playpen_url = get(g:, 'rust_playpen_url', 'https://play.rust-lang.org/')
+ let l:rust_shortener_url = get(g:, 'rust_shortener_url', 'https://is.gd/')
+
+ if !s:has_webapi()
+ echohl ErrorMsg | echomsg ':RustPlay depends on webapi.vim (https://github.com/mattn/webapi-vim)' | echohl None
+ return
+ endif
+
+ let bufname = bufname('%')
+ 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
+
+ let body = l:rust_playpen_url."?code=".webapi#http#encodeURI(content)
+
+ if strlen(body) > 5000
+ echohl ErrorMsg | echomsg 'Buffer too large, max 5000 encoded characters ('.strlen(body).')' | echohl None
+ return
+ endif
+
+ let payload = "format=simple&url=".webapi#http#encodeURI(body)
+ let res = webapi#http#post(l:rust_shortener_url.'create.php', payload, {})
+ let url = res.content
+
+ redraw | echomsg 'Done: '.url
+endfunction
+
+" }}}1
+
+" vim: set noet sw=8 ts=8:
diff --git a/runtime/autoload/rustfmt.vim b/runtime/autoload/rustfmt.vim
new file mode 100644
index 0000000..a689b5e
--- /dev/null
+++ b/runtime/autoload/rustfmt.vim
@@ -0,0 +1,107 @@
+" Author: Stephen Sugden <stephen@stephensugden.com>
+"
+" Adapted from https://github.com/fatih/vim-go
+" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
+
+if !exists("g:rustfmt_autosave")
+ let g:rustfmt_autosave = 0
+endif
+
+if !exists("g:rustfmt_command")
+ let g:rustfmt_command = "rustfmt"
+endif
+
+if !exists("g:rustfmt_options")
+ let g:rustfmt_options = ""
+endif
+
+if !exists("g:rustfmt_fail_silently")
+ let g:rustfmt_fail_silently = 0
+endif
+
+let s:got_fmt_error = 0
+
+function! s:RustfmtCommandRange(filename, line1, line2)
+ let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]}
+ return printf("%s %s --write-mode=overwrite --file-lines '[%s]'", g:rustfmt_command, g:rustfmt_options, json_encode(l:arg))
+endfunction
+
+function! s:RustfmtCommand(filename)
+ return g:rustfmt_command . " --write-mode=overwrite " . g:rustfmt_options . " " . shellescape(a:filename)
+endfunction
+
+function! s:RunRustfmt(command, curw, tmpname)
+ if exists("*systemlist")
+ let out = systemlist(a:command)
+ else
+ let out = split(system(a:command), '\r\?\n')
+ endif
+
+ if v:shell_error == 0 || v:shell_error == 3
+ " remove undo point caused via BufWritePre
+ try | silent undojoin | catch | endtry
+
+ " Replace current file with temp file, then reload buffer
+ call rename(a:tmpname, expand('%'))
+ silent edit!
+ let &syntax = &syntax
+
+ " only clear location list if it was previously filled to prevent
+ " clobbering other additions
+ if s:got_fmt_error
+ let s:got_fmt_error = 0
+ call setloclist(0, [])
+ lwindow
+ endif
+ elseif g:rustfmt_fail_silently == 0
+ " otherwise get the errors and put them in the location list
+ let errors = []
+
+ for line in out
+ " src/lib.rs:13:5: 13:10 error: expected `,`, or `}`, found `value`
+ let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\):\s*\(\d\+:\d\+\s*\)\?\s*error: \(.*\)')
+ if !empty(tokens)
+ call add(errors, {"filename": @%,
+ \"lnum": tokens[2],
+ \"col": tokens[3],
+ \"text": tokens[5]})
+ endif
+ endfor
+
+ if empty(errors)
+ % | " Couldn't detect rustfmt error format, output errors
+ endif
+
+ if !empty(errors)
+ call setloclist(0, errors, 'r')
+ echohl Error | echomsg "rustfmt returned error" | echohl None
+ endif
+
+ let s:got_fmt_error = 1
+ lwindow
+ " We didn't use the temp file, so clean up
+ call delete(a:tmpname)
+ endif
+
+ call winrestview(a:curw)
+endfunction
+
+function! rustfmt#FormatRange(line1, line2)
+ let l:curw = winsaveview()
+ let l:tmpname = expand("%:p:h") . "/." . expand("%:p:t") . ".rustfmt"
+ call writefile(getline(1, '$'), l:tmpname)
+
+ let command = s:RustfmtCommandRange(l:tmpname, a:line1, a:line2)
+
+ call s:RunRustfmt(command, l:curw, l:tmpname)
+endfunction
+
+function! rustfmt#Format()
+ let l:curw = winsaveview()
+ let l:tmpname = expand("%:p:h") . "/." . expand("%:p:t") . ".rustfmt"
+ call writefile(getline(1, '$'), l:tmpname)
+
+ let command = s:RustfmtCommand(l:tmpname)
+
+ call s:RunRustfmt(command, l:curw, l:tmpname)
+endfunction
diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim
new file mode 100644
index 0000000..6f9b1e0
--- /dev/null
+++ b/runtime/autoload/spellfile.vim
@@ -0,0 +1,206 @@
+" Vim script to download a missing spell file
+" Maintainer: Bram Moolenaar <Bram@vim.org>
+" Last Change: 2020 Jul 10
+
+if !exists('g:spellfile_URL')
+ " Always use https:// because it's secure. The certificate is for nluug.nl,
+ " thus we can't use the alias ftp.vim.org here.
+ let g:spellfile_URL = 'https://ftp.nluug.nl/pub/vim/runtime/spell'
+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
+ let lang = tolower(a:lang)
+
+ " 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, lang . &enc)
+ if &verbose
+ echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
+ endif
+ return
+ endif
+ let s:donedict[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 "' . 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 = 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 = 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
diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim
new file mode 100644
index 0000000..adbdbab
--- /dev/null
+++ b/runtime/autoload/sqlcomplete.vim
@@ -0,0 +1,996 @@
+" Vim OMNI completion script for SQL
+" Language: SQL
+" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
+" Version: 16.0
+" Last Change: 2017 Oct 15
+" 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 16.0 (Dec 2015)
+" - NF: If resetting the cache and table, procedure or view completion
+" had been used via dbext, have dbext delete or recreate the
+" dictionary so that new objects are picked up for the
+" next completion.
+"
+" 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 = 160
+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 = []
+
+ if s:sql_file_table != ""
+ if g:loaded_dbext >= 2300
+ call DB_DictionaryDelete("table")
+ else
+ DBCompleteTables!
+ endif
+ endif
+ if s:sql_file_procedure != ""
+ if g:loaded_dbext >= 2300
+ call DB_DictionaryDelete("procedure")
+ else
+ DBCompleteProcedures!
+ endif
+ endif
+ if s:sql_file_view != ""
+ if g:loaded_dbext >= 2300
+ call DB_DictionaryDelete("view")
+ else
+ DBCompleteViews!
+ endif
+ endif
+
+ 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 syntax 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 syntax 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 the key must be preceded 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 the key must be preceded 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 searches 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 forward 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 (in case 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
diff --git a/runtime/autoload/syntaxcomplete.vim b/runtime/autoload/syntaxcomplete.vim
new file mode 100644
index 0000000..396193d
--- /dev/null
+++ b/runtime/autoload/syntaxcomplete.vim
@@ -0,0 +1,810 @@
+" Vim completion script
+" Language: All languages, uses existing syntax highlighting rules
+" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
+" Version: 15.0
+" Last Change: 2021 Apr 27
+" Usage: For detailed help, ":help ft-syntax-omni"
+
+" History
+"
+" Version 15.0
+" - SyntaxComplete ignored all buffer specific overrides, always used global
+" https://github.com/vim/vim/issues/8153
+"
+" Version 14.0
+" - Fixed issue with single quotes and is_keyword
+" https://github.com/vim/vim/issues/7463
+"
+" 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 character 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 = 150
+
+" 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)
+
+ " Allow user to override ignorecase per buffer
+ let l:omni_syntax_ignorecase = g:omni_syntax_ignorecase
+ if exists('b:omni_syntax_ignorecase')
+ let l:omni_syntax_ignorecase = b:omni_syntax_ignorecase
+ 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 = substitute(s:prepended, "'", "''", 'g')
+
+ 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 = (l: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 '.(l: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! syntaxcomplete#OmniSyntaxClearCache()
+ let s:cache_name = []
+ let s:cache_list = []
+endfunction
+
+" To retrieve all syntax items regardless of syntax group:
+" echo OmniSyntaxList( [] )
+"
+" To retrieve only the syntax items for the sqlOperator syntax group:
+" echo OmniSyntaxList( ['sqlOperator'] )
+"
+" To retrieve all syntax items for both the sqlOperator and sqlType groups:
+" echo OmniSyntaxList( ['sqlOperator', 'sqlType'] )
+"
+" A regular expression can also be used:
+" echo OmniSyntaxList( ['sql\w\+'] )
+"
+" From within a plugin, you would typically assign the output to a List: >
+" let myKeywords = []
+" let myKeywords = OmniSyntaxList( ['sqlKeyword'] )
+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
+
+ let saveL = @l
+ let filetype = substitute(&filetype, '\.', '_', 'g')
+
+ if empty(list_parms)
+ " Allow user to override per buffer
+ if exists('g:omni_syntax_group_include_'.filetype)
+ let l:omni_syntax_group_include_{filetype} = g:omni_syntax_group_include_{filetype}
+ endif
+ if exists('b:omni_syntax_group_include_'.filetype)
+ let l:omni_syntax_group_include_{filetype} = b:omni_syntax_group_include_{filetype}
+ endif
+
+ " 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('l:omni_syntax_group_include_'.filetype)
+ let syntax_group_include_{filetype} =
+ \ substitute( l:omni_syntax_group_include_{filetype},'\s\+','','g')
+ let list_parms = split(l: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} = ''
+
+ " Allow user to override per buffer
+ if exists('g:omni_syntax_group_exclude_'.filetype)
+ let l:omni_syntax_group_exclude_{filetype} = g:omni_syntax_group_exclude_{filetype}
+ endif
+ if exists('b:omni_syntax_group_exclude_'.filetype)
+ let l:omni_syntax_group_exclude_{filetype} = b:omni_syntax_group_exclude_{filetype}
+ endif
+
+ " Check if there are any overrides specified for this filetype
+ if exists('l:omni_syntax_group_exclude_'.filetype)
+ let syntax_group_exclude_{filetype} =
+ \ substitute( l:omni_syntax_group_exclude_{filetype},'\s\+','','g')
+ let list_exclude_groups = split(l: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 )
+
+ " Allow user to override iskeyword per buffer
+ let l:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
+ if exists('b:omni_syntax_use_iskeyword')
+ let l:omni_syntax_use_iskeyword = b:omni_syntax_use_iskeyword
+ endif
+
+ " Allow user to override iskeyword_numeric per buffer
+ let l:omni_syntax_use_iskeyword_numeric = g:omni_syntax_use_iskeyword_numeric
+ if exists('b:omni_syntax_use_iskeyword_numeric')
+ let l:omni_syntax_use_iskeyword_numeric = b:omni_syntax_use_iskeyword_numeric
+ endif
+
+ " Allow user to override iskeyword_numeric per buffer
+ let l:omni_syntax_use_single_byte = g:omni_syntax_use_single_byte
+ if exists('b:omni_syntax_use_single_byte')
+ let l:omni_syntax_use_single_byte = b:omni_syntax_use_single_byte
+ endif
+
+ " Allow user to override minimum_length per buffer
+ let l:omni_syntax_minimum_length = g:omni_syntax_minimum_length
+ if exists('b:omni_syntax_minimum_length')
+ let l:omni_syntax_minimum_length = b:omni_syntax_minimum_length
+ endif
+
+ 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 beginning 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 substitute() 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 l: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.
+ " setlocal filetype=forth
+ " let g:omni_syntax_use_iskeyword = 1
+ " let g:omni_syntax_use_iskeyword_numeric = 1
+ " You will see entries like
+ " #>>
+ " (.local)
+ " These were found doing a grep in vim82\syntax
+ " grep iskeyword *
+ " forth.vim:setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
+ let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
+ else
+ if l: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 || l: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 || l:omni_syntax_use_single_byte == 0
+ if nr2char(item) =~ '\p'
+ let accepted_chars = accepted_chars . nr2char(item)
+ endif
+ endif
+ else
+ if char2nr(item) < 127 || l: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 l:omni_syntax_minimum_length > 0
+ " If the user specified a minimum length, enforce it
+ let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.l: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
diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim
new file mode 100644
index 0000000..e495e82
--- /dev/null
+++ b/runtime/autoload/tar.vim
@@ -0,0 +1,818 @@
+" tar.vim: Handles browsing tarfiles
+" AUTOLOAD PORTION
+" Date: Jan 07, 2020
+" Version: 32
+" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" License: Vim License (see vim's :help license)
+"
+" Contains many ideas from Michael Toren's <tar.vim>
+"
+" Copyright: Copyright (C) 2005-2017 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= "v32"
+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:tar_delfile")
+ let g:tar_delfile="--delete -f"
+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!
+" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
+ 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 it's an url, don't complain, let url-handlers such as vim do its thing
+ redraw!
+" call Decho("***error*** (tar#Browse) File not readable<".a:tarfile.">")
+ 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\)$'
+" 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 =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' || tarfile =~# '\.\(tzs\)$'
+ if has("unix") && executable("file")
+ let filekind= system("file ".shellescape(tarfile,1)) =~ "bzip2"
+ else
+ let filekind= ""
+ endif
+
+ if filekind =~ "bzip2"
+ exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
+ elseif filekind =~ "XZ"
+ exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
+ elseif filekind =~ "Zstandard"
+ exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
+ else
+ exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
+ endif
+
+ 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." - "
+ elseif tarfile =~# '\.\(zst\|tzs\)$'
+ exe "sil! r! zstd --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
+
+ " set up maps supported for tar
+ setlocal noma nomod ro
+ noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
+ noremap <silent> <buffer> x :call tar#Extract()<cr>
+ if &mouse != ""
+ noremap <silent> <buffer> <leftmouse> <leftmouse>:call <SID>TarBrowseSelect()<cr>
+ endif
+
+ 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
+
+ " open a new window (tar#Read will read a file into it)
+ noswapfile 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 =~ '\.t\=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
+ elseif fname =~ '\.zst$' && executable("zstdcat")
+ let decmp= "|zstdcat"
+ 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$'
+ exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ elseif tarfile =~# '\.\(gz\)$'
+ exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+
+ elseif tarfile =~# '\(\.tgz\|\.tbz\|\.txz\)'
+ if has("unix") && executable("file")
+ let filekind= system("file ".shellescape(tarfile,1))
+ else
+ let filekind= ""
+ endif
+ if filekind =~ "bzip2"
+ exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ elseif filekind =~ "XZ"
+ exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ elseif filekind =~ "Zstandard"
+ exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ else
+ exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
+ endif
+
+ elseif tarfile =~# '\.lrp$'
+ 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$'
+ 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\)$'
+ 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!
+" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
+ let &report= repkeep
+" call Dret("tar#Write")
+ return
+ endif
+ if !exists("*mkdir")
+ redraw!
+" call Decho("***error*** (tar#Write) sorry, mkdir() doesn't work on your system")
+ 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!
+" call Decho("***error*** (tar#Write) cannot cd to temporary directory")
+ 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 =~# '\.zst'
+ call system("zstd --decompress -- ".shellescape(tarfile,0))
+ let tarfile = substitute(tarfile,'\.zst','','e')
+ let compress= "zstd -- ".shellescape(tarfile,0)
+ 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!
+" call Decho("***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname)
+ 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." ".g:tar_delfile." ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
+ call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
+ if v:shell_error != 0
+ redraw!
+" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
+ 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!
+" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
+ 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|noswapfile enew
+ let binkeep= &l:binary
+ let eikeep = &ei
+ set binary ei=all
+ exe "noswapfile 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 "noswapfile e ".fnameescape(fname)
+ diffthis
+ else
+ redraw!
+ echo "***warning*** unable to read file<".fname.">"
+ endif
+" call Dret("tar#Diff")
+endfun
+
+" ---------------------------------------------------------------------
+" tar#Extract: extract a file from a (possibly compressed) tar archive {{{2
+fun! tar#Extract()
+" call Dfunc("tar#Extract()")
+
+ 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
+
+ let tarball = expand("%")
+" call Decho("tarball<".tarball.">")
+ let tarbase = substitute(tarball,'\..*$','','')
+" call Decho("tarbase<".tarbase.">")
+
+ let extractcmd= netrw#WinPath(g:tar_extractcmd)
+ if filereadable(tarbase.".tar")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".tgz")
+ let extractcmd= substitute(extractcmd,"-","-z","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tgz ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd."t ".tarbase.".tgz ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".tar.gz")
+ let extractcmd= substitute(extractcmd,"-","-z","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".tbz")
+ let extractcmd= substitute(extractcmd,"-","-j","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".tar.bz2")
+ let extractcmd= substitute(extractcmd,"-","-j","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".txz")
+ let extractcmd= substitute(extractcmd,"-","-J","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".tar.xz")
+ let extractcmd= substitute(extractcmd,"-","-J","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".tzs")
+ let extractcmd= substitute(extractcmd,"-","--zstd","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tzs ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzs ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd." ".tarbase.".tzs ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ elseif filereadable(tarbase.".tar.zst")
+ let extractcmd= substitute(extractcmd,"-","--zstd","")
+" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname).")")
+ call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
+" call Decho("***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!")
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+ endif
+
+ " restore option
+ let &report= repkeep
+
+" call Dret("tar#Extract")
+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 system"
+ 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
diff --git a/runtime/autoload/tohtml.vim b/runtime/autoload/tohtml.vim
new file mode 100644
index 0000000..1086347
--- /dev/null
+++ b/runtime/autoload/tohtml.vim
@@ -0,0 +1,950 @@
+" Vim autoload file for the tohtml plugin.
+" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
+" Last Change: 2023 Jan 01
+"
+" 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
+
+ let html = []
+ if !s:settings.no_doc
+ 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 s:html5 = 0
+ 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>")
+ call add(html, '<html>')
+ let s:html5 = 1
+ 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
+ if s:html5
+ call add(html, '<meta charset="' . s:settings.encoding . '"' . tag_close)
+ else
+ call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
+ endif
+ 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.
+ \ ',use_input_for_pc='.s:settings.use_input_for_pc.
+ \ '"'.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)
+ call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
+ endif
+ call add(html, "<table ".(s:settings.use_css? "" : "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 !s:settings.no_doc
+ 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_
+ elseif !s:settings.no_modeline
+ " remove modeline from source files if it is included and we haven't deleted
+ " due to removing html footer already
+ $d
+ endif
+ 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?
+ if !s:settings.no_doc
+ normal! 2u
+ elseif !s:settings.no_modeline
+ normal! u
+ endif
+ if s:settings.use_css
+ call add(html, '<td><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
+
+ if !s:settings.no_doc
+ let html[body_line_num] = body_line
+ endif
+
+ call add(html, '</tr>')
+ call add(html, '</table>')
+ if !s:settings.no_doc
+ call add(html, s:body_end_line)
+ call add(html, '</html>')
+ endif
+
+ " 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.
+ if !s:settings.no_modeline
+ call add(html, '<!-- vim: set foldmethod=manual : -->')
+ endif
+
+ 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
+
+ let s:ei_sav = &eventignore
+ set eventignore+=FileType
+ exe "topleft new " . name
+ let &eventignore=s:ei_sav
+ unlet s:ei_sav
+
+ 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 !s:settings.no_doc
+ 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 {{{
+
+ let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids
+
+ " insert script closing tag if needed
+ if s:uses_script
+ call append(style_start, [
+ \ '',
+ \ s:settings.use_xhtml ? '//]]>' : '-->',
+ \ "</script>"
+ \ ])
+ endif
+
+ " insert javascript to get IDs from line numbers, and to open a fold before
+ " jumping to any lines contained therein
+ if s:settings.line_ids
+ 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
+ endif
+
+ if s:settings.line_ids
+ 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;",
+ \ " }",
+ \ " var lineElem = document.getElementById(lineNum);"
+ \ ])
+ endif
+
+ " 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
+
+ if s:uses_script
+ " insert script tag if needed
+ call append(style_start, [
+ \ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
+ \ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
+ endif
+
+ " 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' . (s:html5 ? '' : 'type="text/css"') . '>']+
+ \ style+
+ \ [ s:settings.use_xhtml ? '' : '<!--',
+ \ 'table { table-layout: fixed; }',
+ \ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
+ \ 'table, td, th { border: 1px solid; }',
+ \ 'td { vertical-align: top; }',
+ \ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
+ \ 'td div { overflow: auto; }',
+ \ s:settings.use_xhtml ? '' : '-->',
+ \ '</style>'
+ \])
+ endif "}}}
+ 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 warning 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_doc', 0 )
+ call tohtml#GetOption(user_settings, 'no_links', 0 )
+ call tohtml#GetOption(user_settings, 'no_modeline', 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 )
+ call tohtml#GetOption(user_settings, 'use_input_for_pc', 'fallback')
+ " }}}
+
+ " 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 || &vts != '' || 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
+
+ " enforce valid values for use_input_for_pc
+ if user_settings.use_input_for_pc !~# 'fallback\|none\|all'
+ let user_settings.use_input_for_pc = 'fallback'
+ echohl WarningMsg
+ echomsg '2html: "' . g:html_use_input_for_pc . '" is not valid for g:html_use_input_for_pc'
+ echomsg '2html: defaulting to "' . user_settings.use_input_for_pc . '"'
+ echohl None
+ sleep 3
+ 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
diff --git a/runtime/autoload/typeset.vim b/runtime/autoload/typeset.vim
new file mode 100644
index 0000000..35cf17b
--- /dev/null
+++ b/runtime/autoload/typeset.vim
@@ -0,0 +1,233 @@
+vim9script
+
+# Language: Generic TeX typesetting engine
+# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
+# Latest Revision: 2022 Aug 12
+
+# Constants and helpers {{{
+const SLASH = !exists("+shellslash") || &shellslash ? '/' : '\'
+
+def Echo(msg: string, mode: string, label: string)
+ redraw
+ echo "\r"
+ execute 'echohl' mode
+ echomsg printf('[%s] %s', label, msg)
+ echohl None
+enddef
+
+def EchoMsg(msg: string, label = 'Notice')
+ Echo(msg, 'ModeMsg', label)
+enddef
+
+def EchoWarn(msg: string, label = 'Warning')
+ Echo(msg, 'WarningMsg', label)
+enddef
+
+def EchoErr(msg: string, label = 'Error')
+ Echo(msg, 'ErrorMsg', label)
+enddef
+# }}}
+
+# Track jobs {{{
+var running_jobs = {} # Dictionary of job IDs of jobs currently executing
+
+def AddJob(label: string, j: job)
+ if !has_key(running_jobs, label)
+ running_jobs[label] = []
+ endif
+
+ add(running_jobs[label], j)
+enddef
+
+def RemoveJob(label: string, j: job)
+ if has_key(running_jobs, label) && index(running_jobs[label], j) != -1
+ remove(running_jobs[label], index(running_jobs[label], j))
+ endif
+enddef
+
+def GetRunningJobs(label: string): list<job>
+ return has_key(running_jobs, label) ? running_jobs[label] : []
+enddef
+# }}}
+
+# Callbacks {{{
+def ProcessOutput(qfid: number, wd: string, efm: string, ch: channel, msg: string)
+ # Make sure the quickfix list still exists
+ if getqflist({'id': qfid}).id != qfid
+ EchoErr("Quickfix list not found, stopping the job")
+ call job_stop(ch_getjob(ch))
+ return
+ endif
+
+ # Make sure the working directory is correct
+ silent execute "lcd" wd
+ setqflist([], 'a', {'id': qfid, 'lines': [msg], 'efm': efm})
+ silent lcd -
+enddef
+
+def CloseCb(ch: channel)
+ job_status(ch_getjob(ch)) # Trigger exit_cb's callback
+enddef
+
+def ExitCb(label: string, jobid: job, exitStatus: number)
+ RemoveJob(label, jobid)
+
+ if exitStatus == 0
+ botright cwindow
+ EchoMsg('Success!', label)
+ elseif exitStatus < 0
+ EchoWarn('Job terminated', label)
+ else
+ botright copen
+ wincmd p
+ EchoWarn('There are errors.', label)
+ endif
+enddef
+# }}}
+
+# Create a new empty quickfix list at the end of the stack and return its id {{{
+def NewQuickfixList(path: string): number
+ if setqflist([], ' ', {'nr': '$', 'title': path}) == -1
+ return -1
+ endif
+
+ return getqflist({'nr': '$', 'id': 0}).id
+enddef
+# }}}
+
+# Public interface {{{
+# When a TeX document is split into several source files, each source file
+# may contain a "magic line" specifiying the "root" file, e.g.:
+#
+# % !TEX root = main.tex
+#
+# Using this line, Vim can know which file to typeset even if the current
+# buffer is different from main.tex.
+#
+# This function searches for the magic line in the first ten lines of the
+# given buffer, and returns the full path of the root document.
+#
+# NOTE: the value of "% !TEX root" *must* be a relative path.
+export def FindRootDocument(bufname: string = bufname("%")): string
+ const bufnr = bufnr(bufname)
+
+ if !bufexists(bufnr)
+ return bufname
+ endif
+
+ var rootpath = fnamemodify(bufname(bufnr), ':p')
+
+ # Search for magic line `% !TEX root = ...` in the first ten lines
+ const header = getbufline(bufnr, 1, 10)
+ const idx = match(header, '^\s*%\s\+!TEX\s\+root\s*=\s*\S')
+ if idx > -1
+ const main = matchstr(header[idx], '!TEX\s\+root\s*=\s*\zs.*$')
+ rootpath = simplify(fnamemodify(rootpath, ":h") .. SLASH .. main)
+ endif
+
+ return rootpath
+enddef
+
+export def LogPath(bufname: string): string
+ const logfile = FindRootDocument(bufname)
+ return fnamemodify(logfile, ":r") .. ".log"
+enddef
+
+# Typeset the specified path
+#
+# Parameters:
+# label: a descriptive string used in messages to identify the kind of job
+# Cmd: a function that takes the path of a document and returns the typesetting command
+# path: the path of the document to be typeset. To avoid ambiguities, pass a *full* path.
+# efm: the error format string to parse the output of the command.
+# env: environment variables for the process (passed to job_start())
+#
+# Returns:
+# true if the job is started successfully;
+# false otherwise.
+export def Typeset(
+ label: string,
+ Cmd: func(string): list<string>,
+ path: string,
+ efm: string,
+ env: dict<string> = {}
+): bool
+ var fp = fnamemodify(path, ":p")
+ var wd = fnamemodify(fp, ":h")
+ var qfid = NewQuickfixList(fp)
+
+ if qfid == -1
+ EchoErr('Could not create quickfix list', label)
+ return false
+ endif
+
+ if !filereadable(fp)
+ EchoErr(printf('File not readable: %s', fp), label)
+ return false
+ endif
+
+ var jobid = job_start(Cmd(path), {
+ env: env,
+ cwd: wd,
+ in_io: "null",
+ callback: (c, m) => ProcessOutput(qfid, wd, efm, c, m),
+ close_cb: CloseCb,
+ exit_cb: (j, e) => ExitCb(label, j, e),
+ })
+
+ if job_status(jobid) ==# "fail"
+ EchoErr("Failed to start job", label)
+ return false
+ endif
+
+ AddJob(label, jobid)
+
+ EchoMsg('Typesetting...', label)
+
+ return true
+enddef
+
+export def JobStatus(label: string)
+ EchoMsg('Jobs still running: ' .. string(len(GetRunningJobs(label))), label)
+enddef
+
+export def StopJobs(label: string)
+ for job in GetRunningJobs(label)
+ job_stop(job)
+ endfor
+
+ EchoMsg('Done.', label)
+enddef
+
+# Typeset the specified buffer
+#
+# Parameters:
+# name: a buffer's name. this may be empty to indicate the current buffer.
+# cmd: a function that takes the path of a document and returns the typesetting command
+# label: a descriptive string used in messages to identify the kind of job
+# env: environment variables for the process (passed to job_start())
+#
+# Returns:
+# true if the job is started successfully;
+# false otherwise.
+export def TypesetBuffer(
+ name: string,
+ Cmd: func(string): list<string>,
+ env = {},
+ label = 'Typeset'
+): bool
+ const bufname = bufname(name)
+
+ if empty(bufname)
+ EchoErr('Please save the buffer first.', label)
+ return false
+ endif
+
+ const efm = getbufvar(bufnr(bufname), "&efm")
+ const rootpath = FindRootDocument(bufname)
+
+ return Typeset('ConTeXt', Cmd, rootpath, efm, env)
+enddef
+# }}}
+
+# vim: sw=2 fdm=marker
diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim
new file mode 100644
index 0000000..9c7dcbd
--- /dev/null
+++ b/runtime/autoload/vimball.vim
@@ -0,0 +1,775 @@
+" vimball.vim : construct a file containing both paths and files
+" Author: Charles E. Campbell
+" Date: Apr 11, 2016
+" Version: 37
+" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
+" Copyright: (c) 2004-2011 by Charles E. Campbell
+" 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 = "v37"
+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')
+ 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 it's 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 "sil! tabn ".vbtabnr
+ setlocal nomod bh=wipe
+ exe "sil! tabn ".curtabnr
+ exe "sil! 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
diff --git a/runtime/autoload/xml/html32.vim b/runtime/autoload/xml/html32.vim
new file mode 100644
index 0000000..242f52b
--- /dev/null
+++ b/runtime/autoload/xml/html32.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/html401f.vim b/runtime/autoload/xml/html401f.vim
new file mode 100644
index 0000000..1797a5a
--- /dev/null
+++ b/runtime/autoload/xml/html401f.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/html401s.vim b/runtime/autoload/xml/html401s.vim
new file mode 100644
index 0000000..37f581b
--- /dev/null
+++ b/runtime/autoload/xml/html401s.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/html401t.vim b/runtime/autoload/xml/html401t.vim
new file mode 100644
index 0000000..ae6c63f
--- /dev/null
+++ b/runtime/autoload/xml/html401t.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/html40f.vim b/runtime/autoload/xml/html40f.vim
new file mode 100644
index 0000000..b5ba99f
--- /dev/null
+++ b/runtime/autoload/xml/html40f.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/html40s.vim b/runtime/autoload/xml/html40s.vim
new file mode 100644
index 0000000..bb3a45b
--- /dev/null
+++ b/runtime/autoload/xml/html40s.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/html40t.vim b/runtime/autoload/xml/html40t.vim
new file mode 100644
index 0000000..2d73246
--- /dev/null
+++ b/runtime/autoload/xml/html40t.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/xhtml10f.vim b/runtime/autoload/xml/xhtml10f.vim
new file mode 100644
index 0000000..0bfa30c
--- /dev/null
+++ b/runtime/autoload/xml/xhtml10f.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/xhtml10s.vim b/runtime/autoload/xml/xhtml10s.vim
new file mode 100644
index 0000000..3fb7cf8
--- /dev/null
+++ b/runtime/autoload/xml/xhtml10s.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/xhtml10t.vim b/runtime/autoload/xml/xhtml10t.vim
new file mode 100644
index 0000000..0e857ac
--- /dev/null
+++ b/runtime/autoload/xml/xhtml10t.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/xhtml11.vim b/runtime/autoload/xml/xhtml11.vim
new file mode 100644
index 0000000..ef79fd7
--- /dev/null
+++ b/runtime/autoload/xml/xhtml11.vim
@@ -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': ['/>', ''],
+\ }
+\ }
diff --git a/runtime/autoload/xml/xsd.vim b/runtime/autoload/xml/xsd.vim
new file mode 100644
index 0000000..8a673ea
--- /dev/null
+++ b/runtime/autoload/xml/xsd.vim
@@ -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' : []} ]
+ \ }
diff --git a/runtime/autoload/xml/xsl.vim b/runtime/autoload/xml/xsl.vim
new file mode 100644
index 0000000..b8aa29d
--- /dev/null
+++ b/runtime/autoload/xml/xsl.vim
@@ -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' : []}]}
diff --git a/runtime/autoload/xmlcomplete.vim b/runtime/autoload/xmlcomplete.vim
new file mode 100644
index 0000000..55fb031
--- /dev/null
+++ b/runtime/autoload/xmlcomplete.vim
@@ -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 catch 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:
diff --git a/runtime/autoload/xmlformat.vim b/runtime/autoload/xmlformat.vim
new file mode 100644
index 0000000..c89c878
--- /dev/null
+++ b/runtime/autoload/xmlformat.vim
@@ -0,0 +1,203 @@
+" Vim plugin for formatting XML
+" Last Change: 2020 Jan 06
+" Version: 0.3
+" Author: Christian Brabandt <cb@256bit.org>
+" Repository: https://github.com/chrisbra/vim-xml-ftplugin
+" License: VIM License
+" Documentation: see :h xmlformat.txt (TODO!)
+" ---------------------------------------------------------------------
+" Load Once: {{{1
+if exists("g:loaded_xmlformat") || &cp
+ finish
+endif
+let g:loaded_xmlformat = 1
+let s:keepcpo = &cpo
+set cpo&vim
+
+" Main function: Format the input {{{1
+func! xmlformat#Format() abort
+ " only allow reformatting through the gq command
+ " (e.g. Vim is in normal mode)
+ if mode() != 'n'
+ " do not fall back to internal formatting
+ return 0
+ endif
+ let count_orig = v:count
+ let sw = shiftwidth()
+ let prev = prevnonblank(v:lnum-1)
+ let s:indent = indent(prev)/sw
+ let result = []
+ let lastitem = prev ? getline(prev) : ''
+ let is_xml_decl = 0
+ " go through every line, but don't join all content together and join it
+ " back. We might lose empty lines
+ let list = getline(v:lnum, (v:lnum + count_orig - 1))
+ let current = 0
+ for line in list
+ " Keep empty input lines?
+ if empty(line)
+ call add(result, '')
+ continue
+ elseif line !~# '<[/]\?[^>]*>'
+ let nextmatch = match(list, '<[/]\?[^>]*>', current)
+ if nextmatch > -1
+ let line .= ' '. join(list[(current + 1):(nextmatch-1)], " ")
+ call remove(list, current+1, nextmatch-1)
+ endif
+ endif
+ " split on `>`, but don't split on very first opening <
+ " this means, items can be like ['<tag>', 'tag content</tag>']
+ for item in split(line, '.\@<=[>]\zs')
+ if s:EndTag(item)
+ call s:DecreaseIndent()
+ call add(result, s:Indent(item))
+ elseif s:EmptyTag(lastitem)
+ call add(result, s:Indent(item))
+ elseif s:StartTag(lastitem) && s:IsTag(item)
+ let s:indent += 1
+ call add(result, s:Indent(item))
+ else
+ if !s:IsTag(item)
+ " Simply split on '<', if there is one,
+ " but reformat according to &textwidth
+ let t=split(item, '.<\@=\zs')
+
+ " if the content fits well within a single line, add it there
+ " so that the output looks like this:
+ "
+ " <foobar>1</foobar>
+ if s:TagContent(lastitem) is# s:TagContent(t[1]) && strlen(result[-1]) + strlen(item) <= s:Textwidth()
+ let result[-1] .= item
+ let lastitem = t[1]
+ continue
+ endif
+ " t should only contain 2 items, but just be safe here
+ if s:IsTag(lastitem)
+ let s:indent+=1
+ endif
+ let result+=s:FormatContent([t[0]])
+ if s:EndTag(t[1])
+ call s:DecreaseIndent()
+ endif
+ "for y in t[1:]
+ let result+=s:FormatContent(t[1:])
+ "endfor
+ else
+ call add(result, s:Indent(item))
+ endif
+ endif
+ let lastitem = item
+ endfor
+ let current += 1
+ endfor
+
+ if !empty(result)
+ let lastprevline = getline(v:lnum + count_orig)
+ let delete_lastline = v:lnum + count_orig - 1 == line('$')
+ exe v:lnum. ",". (v:lnum + count_orig - 1). 'd'
+ call append(v:lnum - 1, result)
+ " Might need to remove the last line, if it became empty because of the
+ " append() call
+ let last = v:lnum + len(result)
+ " do not use empty(), it returns true for `empty(0)`
+ if getline(last) is '' && lastprevline is '' && delete_lastline
+ exe last. 'd'
+ endif
+ endif
+
+ " do not run internal formatter!
+ return 0
+endfunc
+" Check if given tag is XML Declaration header {{{1
+func! s:IsXMLDecl(tag) abort
+ return a:tag =~? '^\s*<?xml\s\?\%(version="[^"]*"\)\?\s\?\%(encoding="[^"]*"\)\? ?>\s*$'
+endfunc
+" Return tag indented by current level {{{1
+func! s:Indent(item) abort
+ return repeat(' ', shiftwidth()*s:indent). s:Trim(a:item)
+endfu
+" Return item trimmed from leading whitespace {{{1
+func! s:Trim(item) abort
+ if exists('*trim')
+ return trim(a:item)
+ else
+ return matchstr(a:item, '\S\+.*')
+ endif
+endfunc
+" Check if tag is a new opening tag <tag> {{{1
+func! s:StartTag(tag) abort
+ let is_comment = s:IsComment(a:tag)
+ return a:tag =~? '^\s*<[^/?]' && !is_comment
+endfunc
+" Check if tag is a Comment start {{{1
+func! s:IsComment(tag) abort
+ return a:tag =~? '<!--'
+endfunc
+" Remove one level of indentation {{{1
+func! s:DecreaseIndent() abort
+ let s:indent = (s:indent > 0 ? s:indent - 1 : 0)
+endfunc
+" Check if tag is a closing tag </tag> {{{1
+func! s:EndTag(tag) abort
+ return a:tag =~? '^\s*</'
+endfunc
+" Check that the tag is actually a tag and not {{{1
+" something like "foobar</foobar>"
+func! s:IsTag(tag) abort
+ return s:Trim(a:tag)[0] == '<'
+endfunc
+" Check if tag is empty <tag/> {{{1
+func! s:EmptyTag(tag) abort
+ return a:tag =~ '/>\s*$'
+endfunc
+func! s:TagContent(tag) abort "{{{1
+ " Return content of a tag
+ return substitute(a:tag, '^\s*<[/]\?\([^>]*\)>\s*$', '\1', '')
+endfunc
+func! s:Textwidth() abort "{{{1
+ " return textwidth (or 80 if not set)
+ return &textwidth == 0 ? 80 : &textwidth
+endfunc
+" Format input line according to textwidth {{{1
+func! s:FormatContent(list) abort
+ let result=[]
+ let limit = s:Textwidth()
+ let column=0
+ let idx = -1
+ let add_indent = 0
+ let cnt = 0
+ for item in a:list
+ for word in split(item, '\s\+\S\+\zs')
+ if match(word, '^\s\+$') > -1
+ " skip empty words
+ continue
+ endif
+ let column += strdisplaywidth(word, column)
+ if match(word, "^\\s*\n\\+\\s*$") > -1
+ call add(result, '')
+ let idx += 1
+ let column = 0
+ let add_indent = 1
+ elseif column > limit || cnt == 0
+ let add = s:Indent(s:Trim(word))
+ call add(result, add)
+ let column = strdisplaywidth(add)
+ let idx += 1
+ else
+ if add_indent
+ let result[idx] = s:Indent(s:Trim(word))
+ else
+ let result[idx] .= ' '. s:Trim(word)
+ endif
+ let add_indent = 0
+ endif
+ let cnt += 1
+ endfor
+ endfor
+ return result
+endfunc
+" Restoration And Modelines: {{{1
+let &cpo= s:keepcpo
+unlet s:keepcpo
+" Modeline {{{1
+" vim: fdm=marker fdl=0 ts=2 et sw=0 sts=-1
diff --git a/runtime/autoload/zig/fmt.vim b/runtime/autoload/zig/fmt.vim
new file mode 100644
index 0000000..b78c199
--- /dev/null
+++ b/runtime/autoload/zig/fmt.vim
@@ -0,0 +1,100 @@
+" Adapted from fatih/vim-go: autoload/go/fmt.vim
+"
+" Copyright 2011 The Go Authors. All rights reserved.
+" Use of this source code is governed by a BSD-style
+" license that can be found in the LICENSE file.
+"
+" Upstream: https://github.com/ziglang/zig.vim
+
+function! zig#fmt#Format() abort
+ " Save cursor position and many other things.
+ let view = winsaveview()
+
+ if !executable('zig')
+ echohl Error | echomsg "no zig binary found in PATH" | echohl None
+ return
+ endif
+
+ let cmdline = 'zig fmt --stdin --ast-check'
+ let current_buf = bufnr('')
+
+ " The formatted code is output on stdout, the errors go on stderr.
+ if exists('*systemlist')
+ silent let out = systemlist(cmdline, current_buf)
+ else
+ silent let out = split(system(cmdline, current_buf))
+ endif
+ if len(out) == 1
+ if out[0] == "error: unrecognized parameter: '--ast-check'"
+ let cmdline = 'zig fmt --stdin'
+ if exists('*systemlist')
+ silent let out = systemlist(cmdline, current_buf)
+ else
+ silent let out = split(system(cmdline, current_buf))
+ endif
+ endif
+ endif
+ let err = v:shell_error
+
+
+ if err == 0
+ " remove undo point caused via BufWritePre.
+ try | silent undojoin | catch | endtry
+
+ " Replace the file content with the formatted version.
+ if exists('*deletebufline')
+ call deletebufline(current_buf, len(out), line('$'))
+ else
+ silent execute ':' . len(out) . ',' . line('$') . ' delete _'
+ endif
+ call setline(1, out)
+
+ " No errors detected, close the loclist.
+ call setloclist(0, [], 'r')
+ lclose
+ elseif get(g:, 'zig_fmt_parse_errors', 1)
+ let errors = s:parse_errors(expand('%'), out)
+
+ call setloclist(0, [], 'r', {
+ \ 'title': 'Errors',
+ \ 'items': errors,
+ \ })
+
+ let max_win_height = get(g:, 'zig_fmt_max_window_height', 5)
+ " Prevent the loclist from becoming too long.
+ let win_height = min([max_win_height, len(errors)])
+ " Open the loclist, but only if there's at least one error to show.
+ execute 'silent! lwindow ' . win_height
+ endif
+
+ call winrestview(view)
+
+ if err != 0
+ echohl Error | echomsg "zig fmt returned error" | echohl None
+ return
+ endif
+
+ " Run the syntax highlighter on the updated content and recompute the folds if
+ " needed.
+ syntax sync fromstart
+endfunction
+
+" parse_errors parses the given errors and returns a list of parsed errors
+function! s:parse_errors(filename, lines) abort
+ " list of errors to be put into location list
+ let errors = []
+ for line in a:lines
+ let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)')
+ if !empty(tokens)
+ call add(errors,{
+ \"filename": a:filename,
+ \"lnum": tokens[2],
+ \"col": tokens[3],
+ \"text": tokens[4],
+ \ })
+ endif
+ endfor
+
+ return errors
+endfunction
+" vim: sw=2 ts=2 et
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
new file mode 100644
index 0000000..bc9b62d
--- /dev/null
+++ b/runtime/autoload/zip.vim
@@ -0,0 +1,470 @@
+" zip.vim: Handles browsing zipfiles
+" AUTOLOAD PORTION
+" Date: Nov 08, 2021
+" Version: 32
+" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" License: Vim License (see vim's :help license)
+" Copyright: Copyright (C) 2005-2019 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= "v32"
+if v:version < 702
+ echohl WarningMsg
+ echo "***warning*** this version of zip needs vim 7.2 or later"
+ 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
+if !exists("g:zip_extractcmd")
+ let g:zip_extractcmd= g:zip_unzipcmd
+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 "noswapfile noautocmd noswapfile 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 - it's 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 doesn'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 it's 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
+
+ " Oct 12, 2021: need to re-use Bram's syntax/tar.vim.
+ " Setting the filetype to zip doesn't do anything (currently),
+ " but it is perhaps less confusing to curious perusers who do
+ " a :echo &ft
+ setf zip
+ run! syntax/tar.vim
+
+ " 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
+
+ " Maps associated with zip plugin
+ setlocal noma nomod ro
+ noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
+ noremap <silent> <buffer> x :call zip#Extract()<cr>
+ if &mouse != ""
+ noremap <silent> <buffer> <leftmouse> <leftmouse>:call <SID>ZipBrowseSelect()<cr>
+ endif
+
+ 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.">")
+
+ noswapfile 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 "noswapfile 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.">")
+ " sanity check
+ if !executable(substitute(g:zip_unzipcmd,'\s\+.*$','',''))
+ redraw!
+ echohl Error | echo "***error*** (zip#Read) sorry, your system doesn't appear to have the ".g:zip_unzipcmd." program" | echohl None
+" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+ let &report= repkeep
+" call Dret("zip#Write")
+ return
+ endif
+
+ " 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(substitute(g:zip_zipcmd,'\s\+.*$','',''))
+ redraw!
+ echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program" | 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 "noswapfile 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
+
+" ---------------------------------------------------------------------
+" zip#Extract: extract a file from a zip archive {{{2
+fun! zip#Extract()
+" call Dfunc("zip#Extract()")
+
+ let repkeep= &report
+ set report=10
+ let fname= getline(".")
+" call Decho("fname<".fname.">")
+
+ " sanity check
+ if fname =~ '^"'
+ let &report= repkeep
+" call Dret("zip#Extract")
+ return
+ endif
+ if fname =~ '/$'
+ redraw!
+ echohl Error | echo "***error*** (zip#Extract) Please specify a file, not a directory" | echohl None
+ let &report= repkeep
+" call Dret("zip#Extract")
+ return
+ endif
+
+ " extract the file mentioned under the cursor
+" call Decho("system(".g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell).")")
+ call system(g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell))
+" call Decho("zipfile<".b:zipfile.">")
+ if v:shell_error != 0
+ echohl Error | echo "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!" | echohl NONE
+ elseif !filereadable(fname)
+ echohl Error | echo "***error*** attempted to extract ".fname." but it doesn't appear to be present!"
+ else
+ echo "***note*** successfully extracted ".fname
+ endif
+
+ " restore option
+ let &report= repkeep
+
+" call Dret("zip#Extract")
+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