Browse Source

vim: update tcl omni completion plug-in

Maxim Likhachev 5 years ago
parent
commit
cb1052e30c
  1. 3
      etc/soft/vim/vim/+ftplugin/tcl.vim
  2. 155
      etc/soft/vim/vim/+omnicompletion/tcl/Base.vim
  3. 1412
      etc/soft/vim/vim/+omnicompletion/tcl/Packages.vim
  4. 591
      etc/soft/vim/vim/+omnicompletion/tcl/Tcl.vim
  5. 5183
      etc/soft/vim/vim/+omnicompletion/tcl/TclCompletion.vim
  6. 1126
      etc/soft/vim/vim/+omnicompletion/tcl/Tk.vim
  7. 108
      etc/soft/vim/vim/+omnicompletion/tcl/tcl_completion.vim

3
etc/soft/vim/vim/+ftplugin/tcl.vim

@ -9,9 +9,8 @@ set keywordprg=man\ n " Просмотр страниц руководства
set makeprg=nagelfar\ % " Проверка на ошибки и синтаксис set makeprg=nagelfar\ % " Проверка на ошибки и синтаксис
set errorformat=%f:\ Line\ %l:\ %t\ %m " Формат строки с информацией set errorformat=%f:\ Line\ %l:\ %t\ %m " Формат строки с информацией
" TODO: переименовать Tcl.vim (<- tags.tcl)
if !has("win32unix") if !has("win32unix")
source $HOME/.vim/+omnicompletion/tcl/tcl_completion.vim source $HOME/.vim/+omnicompletion/tcl/TclCompletion.vim
endif endif
setlocal omnifunc=TclComplete setlocal omnifunc=TclComplete

155
etc/soft/vim/vim/+omnicompletion/tcl/Base.vim

@ -1,155 +0,0 @@
let b:default = [
\ {'word': 'bell', 'menu': '[Tk] Ring a displays bell'},
\ {'word': 'bind', 'menu': '[Tk] Arrange for X events to invoke Tcl scripts'},
\ {'word': 'bindtags', 'menu': '[Tk] Determine which bindings apply to a window, and order of evaluation'},
\ {'word': 'bitmap', 'menu': '[Tk] Images that display two colors'},
\ {'word': 'button', 'menu': '[Tk] Create and manipulate button widgets'},
\ {'word': 'canvas', 'menu': '[Tk] Create and manipulate canvas widgets'},
\ {'word': 'checkbutton', 'menu': '[Tk] Create and manipulate checkbutton widgets'},
\ {'word': 'clipboard', 'menu': '[Tk] Manipulate Tk clipboard'},
\ {'word': 'colors', 'menu': '[Tk] symbolic color names recognized by Tk'},
\ {'word': 'console', 'menu': '[Tk] Control the console on systems without a real console'},
\ {'word': 'cursors', 'menu': '[Tk] mouse cursors available in Tk'},
\ {'word': 'destroy', 'menu': '[Tk] Destroy one or more windows'},
\ {'word': 'entry', 'menu': '[Tk] Create and manipulate entry widgets'},
\ {'word': 'event', 'menu': '[Tk] Miscellaneous event facilities: define virtual events and generate events'},
\ {'word': 'focus', 'menu': '[Tk] Manage the input focus'},
\ {'word': 'font', 'menu': '[Tk] Create and inspect fonts.'},
\ {'word': 'frame', 'menu': '[Tk] Create and manipulate frame widgets'},
\ {'word': 'grab', 'menu': '[Tk] Confine pointer and keyboard events to a window sub-tree'},
\ {'word': 'grid', 'menu': '[Tk] Geometry manager that arranges widgets in a grid'},
\ {'word': 'image', 'menu': '[Tk] Create and manipulate images'},
\ {'word': 'keysyms', 'menu': '[Tk] keysyms recognized by Tk'},
\ {'word': 'label', 'menu': '[Tk] Create and manipulate label widgets'},
\ {'word': 'labelframe', 'menu': '[Tk] Create and manipulate labelframe widgets'},
\ {'word': 'listbox', 'menu': '[Tk] Create and manipulate listbox widgets'},
\ {'word': 'loadTk', 'menu': '[Tk] Load Tk into a safe interpreter.'},
\ {'word': 'lower', 'menu': '[Tk] Change a windows position in the stacking order'},
\ {'word': 'menubutton', 'menu': '[Tk] Create and manipulate menubutton widgets'},
\ {'word': 'message', 'menu': '[Tk] Create and manipulate message widgets'},
\ {'word': 'option', 'menu': '[Tk] Add/retrieve window options to/from the option database'},
\ {'word': 'options', 'menu': '[Tk] Standard options supported by widgets'},
\ {'word': 'pack', 'menu': '[Tk] Geometry manager that packs around edges of cavity'},
\ {'word': 'panedwindow', 'menu': '[Tk] Create and manipulate panedwindow widgets'},
\ {'word': 'photo', 'menu': '[Tk] Full-color images'},
\ {'word': 'place', 'menu': '[Tk] Geometry manager for fixed or rubber-sheet placement'},
\ {'word': 'radiobutton', 'menu': '[Tk] Create and manipulate radiobutton widgets'},
\ {'word': 'raise', 'menu': '[Tk] Change a windows position in the stacking order'},
\ {'word': 'scale', 'menu': '[Tk] Create and manipulate scale widgets'},
\ {'word': 'scrollbar', 'menu': '[Tk] Create and manipulate scrollbar widgets'},
\ {'word': 'selection', 'menu': '[Tk] Manipulate the X selection'},
\ {'word': 'send', 'menu': '[Tk] Execute a command in a different application'},
\ {'word': 'spinbox', 'menu': '[Tk] Create and manipulate spinbox widgets'},
\ {'word': 'tk', 'menu': '[Tk] Manipulate Tk internal state'},
\ {'word': 'tkerror', 'menu': '[Tk] Command invoked to process background errors'},
\ {'word': 'tkvars', 'menu': '[Tk] Variables used or set by Tk'},
\ {'word': 'tkwait', 'menu': '[Tk] Wait for variable to change or window to be destroyed'},
\ {'word': 'toplevel', 'menu': '[Tk] Create and manipulate toplevel widgets'},
\ {'word': 'ttk_image', 'menu': '[Tk] Define an element based on an image'},
\ {'word': 'ttk_vsapi', 'menu': '[Tk] Define a Microsoft Visual Styles element'},
\ {'word': 'winfo', 'menu': '[Tk] Return window-related information'},
\ {'word': 'wm', 'menu': '[Tk] Communicate with window manager'},
\ {'word': 'after', 'menu': '[Tcl] Execute a command after a time delay'},
\ {'word': 'append', 'menu': '[Tcl] Append to variable'},
\ {'word': 'apply', 'menu': '[Tcl] Apply an anonymous function'},
\ {'word': 'array', 'menu': '[Tcl] Manipulate array variables'},
\ {'word': 'bgerror', 'menu': '[Tcl] Command invoked to process background errors'},
\ {'word': 'binary', 'menu': '[Tcl] Insert and extract fields from binary strings'},
\ {'word': 'break', 'menu': '[Tcl] Abort looping command'},
\ {'word': 'catch', 'menu': '[Tcl] Evaluate script and trap exceptional returns'},
\ {'word': 'cd', 'menu': '[Tcl] Change working directory'},
\ {'word': 'chan', 'menu': '[Tcl] Read, write and manipulate channels'},
\ {'word': 'clock', 'menu': '[Tcl] Obtain and manipulate dates and times'},
\ {'word': 'close', 'menu': '[Tcl] Close an open channel'},
\ {'word': 'concat', 'menu': '[Tcl] Join lists together'},
\ {'word': 'continue', 'menu': '[Tcl] Skip to the next iteration of a loop'},
\ {'word': 'dde', 'menu': '[Tcl] Execute a Dynamic Data Exchange command'},
\ {'word': 'dict', 'menu': '[Tcl] Manipulate dictionaries'},
\ {'word': 'encoding', 'menu': '[Tcl] Manipulate encodings'},
\ {'word': 'eof', 'menu': '[Tcl] Check for end of file condition on channel'},
\ {'word': 'error', 'menu': '[Tcl] Generate an error'},
\ {'word': 'eval', 'menu': '[Tcl] Evaluate a Tcl script'},
\ {'word': 'exec', 'menu': '[Tcl] Invoke subprocesses'},
\ {'word': 'exit', 'menu': '[Tcl] End the application'},
\ {'word': 'expr', 'menu': '[Tcl] Evaluate an expression'},
\ {'word': 'fblocked', 'menu': '[Tcl] Test whether the last input operation exhausted all available input'},
\ {'word': 'fconfigure', 'menu': '[Tcl] Set and get options on a channel'},
\ {'word': 'fcopy', 'menu': '[Tcl] Copy data from one channel to another'},
\ {'word': 'file', 'menu': '[Tcl] Manipulate file names and attributes'},
\ {'word': 'fileevent', 'menu': '[Tcl] Execute a script when a channel becomes readable or writable'},
\ {'word': 'filename', 'menu': '[Tcl] File name conventions supported by Tcl commands'},
\ {'word': 'flush', 'menu': '[Tcl] Flush buffered output for a channel'},
\ {'word': 'for', 'menu': '[Tcl] For loop'},
\ {'word': 'foreach', 'menu': '[Tcl] Iterate over all elements in one or more lists'},
\ {'word': 'format', 'menu': '[Tcl] Format a string in the style of sprintf'},
\ {'word': 'gets', 'menu': '[Tcl] Read a line from a channel'},
\ {'word': 'glob', 'menu': '[Tcl] Return names of files that match patterns'},
\ {'word': 'global', 'menu': '[Tcl] Access global variables'},
\ {'word': 'history', 'menu': '[Tcl] Manipulate the history list'},
\ {'word': 'http', 'menu': '[Tcl] Client-side implementation of the HTTP/1.1 protocol'},
\ {'word': 'if', 'menu': '[Tcl] Execute scripts conditionally'},
\ {'word': 'incr', 'menu': '[Tcl] Increment the value of a variable'},
\ {'word': 'info', 'menu': '[Tcl] Return information about the state of the Tcl interpreter'},
\ {'word': 'interp', 'menu': '[Tcl] Create and manipulate Tcl interpreters'},
\ {'word': 'join', 'menu': '[Tcl] Create a string by joining together list elements'},
\ {'word': 'lappend', 'menu': '[Tcl] Append list elements onto a variable'},
\ {'word': 'lassign', 'menu': '[Tcl] Assign list elements to variables'},
\ {'word': 'lindex', 'menu': '[Tcl] Retrieve an element from a list'},
\ {'word': 'linsert', 'menu': '[Tcl] Insert elements into a list'},
\ {'word': 'list', 'menu': '[Tcl] Create a list'},
\ {'word': 'llength', 'menu': '[Tcl] Count the number of elements in a list'},
\ {'word': 'load', 'menu': '[Tcl] Load machine code and initialize new commands'},
\ {'word': 'lrange', 'menu': '[Tcl] Return one or more adjacent elements from a list'},
\ {'word': 'lrepeat', 'menu': '[Tcl] Build a list by repeating elements'},
\ {'word': 'lreplace', 'menu': '[Tcl] Replace elements in a list with new elements'},
\ {'word': 'lreverse', 'menu': '[Tcl] Reverse the order of a list'},
\ {'word': 'lsearch', 'menu': '[Tcl] See if a list contains a particular element'},
\ {'word': 'lset', 'menu': '[Tcl] Change an element in a list'},
\ {'word': 'lsort', 'menu': '[Tcl] Sort the elements of a list'},
\ {'word': 'mathfunc', 'menu': '[Tcl] Mathematical functions for Tcl expressions'},
\ {'word': 'mathop', 'menu': '[Tcl] Mathematical operators as Tcl commands'},
\ {'word': 'memory', 'menu': '[Tcl] Control Tcl memory debugging capabilities'},
\ {'word': 'msgcat', 'menu': '[Tcl] Tcl message catalog'},
\ {'word': 'namespace', 'menu': '[Tcl] create and manipulate contexts for commands and variables'},
\ {'word': 'open', 'menu': '[Tcl] Open a file-based or command pipeline channel'},
\ {'word': 'package', 'menu': '[Tcl] Facilities for package loading and version control'},
\ {'word': 'pid', 'menu': '[Tcl] Retrieve process identifiers'},
\ {'word': 'platform', 'menu': '[Tcl] System identification support code and utilities'},
\ {'word': 'proc', 'menu': '[Tcl] Create a Tcl procedure'},
\ {'word': 'puts', 'menu': '[Tcl] Write to a channel'},
\ {'word': 'pwd', 'menu': '[Tcl] Return the absolute path of the current working directory'},
\ {'word': 're_syntax', 'menu': '[Tcl] Syntax of Tcl regular expressions'},
\ {'word': 'read', 'menu': '[Tcl] Read from a channel'},
\ {'word': 'refchan', 'menu': '[Tcl] Command handler API of reflected channels, version 1'},
\ {'word': 'regexp', 'menu': '[Tcl] Match a regular expression against a string'},
\ {'word': 'registry', 'menu': '[Tcl] Manipulate the Windows registry'},
\ {'word': 'regsub', 'menu': '[Tcl] Perform substitutions based on regular expression pattern matching'},
\ {'word': 'rename', 'menu': '[Tcl] Rename or delete a command'},
\ {'word': 'return', 'menu': '[Tcl] Return from a procedure, or set return code of a script'},
\ {'word': 'scan', 'menu': '[Tcl] Parse string using conversion specifiers in the style of sscanf'},
\ {'word': 'seek', 'menu': '[Tcl] Change the access position for an open channel'},
\ {'word': 'set', 'menu': '[Tcl] Read and write variables'},
\ {'word': 'socket', 'menu': '[Tcl] Open a TCP network connection'},
\ {'word': 'source', 'menu': '[Tcl] Evaluate a file or resource as a Tcl script'},
\ {'word': 'split', 'menu': '[Tcl] Split a string into a proper Tcl list'},
\ {'word': 'string', 'menu': '[Tcl] Manipulate strings'},
\ {'word': 'subst', 'menu': '[Tcl] Perform backslash, command, and variable substitutions'},
\ {'word': 'switch', 'menu': '[Tcl] Evaluate one of several scripts, depending on a given value'},
\ {'word': 'Tcl', 'menu': '[Tcl] Tool Command Language'},
\ {'word': 'tcltest', 'menu': '[Tcl] Test harness support code and utilities'},
\ {'word': 'tclvars', 'menu': '[Tcl] Variables used by Tcl'},
\ {'word': 'tell', 'menu': '[Tcl] Return current access position for an open channel'},
\ {'word': 'time', 'menu': '[Tcl] Time the execution of a script'},
\ {'word': 'tm', 'menu': '[Tcl] Facilities for locating and loading of Tcl Modules'},
\ {'word': 'trace', 'menu': '[Tcl] Monitor variable accesses, command usages and command executions'},
\ {'word': 'unknown', 'menu': '[Tcl] Handle attempts to use non-existent commands'},
\ {'word': 'unload', 'menu': '[Tcl] Unload machine code'},
\ {'word': 'unset', 'menu': '[Tcl] Delete variables'},
\ {'word': 'update', 'menu': '[Tcl] Process pending events and idle callbacks'},
\ {'word': 'uplevel', 'menu': '[Tcl] Execute a script in a different stack frame'},
\ {'word': 'upvar', 'menu': '[Tcl] Create link to variable in a different stack frame'},
\ {'word': 'variable', 'menu': '[Tcl] create and initialize a namespace variable'},
\ {'word': 'vwait', 'menu': '[Tcl] Process events until a variable is written'},
\ {'word': 'while', 'menu': '[Tcl] Execute script repeatedly as long as a condition is met'},
\ ]

1412
etc/soft/vim/vim/+omnicompletion/tcl/Packages.vim

File diff suppressed because it is too large Load Diff

591
etc/soft/vim/vim/+omnicompletion/tcl/Tcl.vim

@ -1,591 +0,0 @@
let b:after = [
\ {'word': 'cancel', 'menu': 'script script script ...'},
\ {'word': 'idle', 'menu': 'script script script ...'},
\ {'word': 'info', 'menu': 'id'},
\ ]
let b:array = [
\ {'word': 'anymore', 'menu': 'arrayName searchId'},
\ {'word': 'donesearch', 'menu': 'arrayName searchId'},
\ {'word': 'exists', 'menu': 'arrayName'},
\ {'word': 'get', 'menu': 'arrayName pattern'},
\ {'word': 'names', 'menu': 'arrayName mode pattern'},
\ {'word': 'nextelement', 'menu': 'arrayName searchId'},
\ {'word': 'set', 'menu': 'arrayName list'},
\ {'word': 'size', 'menu': 'arrayName'},
\ {'word': 'startsearch', 'menu': 'arrayName'},
\ {'word': 'statistics', 'menu': 'arrayName'},
\ {'word': 'unset', 'menu': 'arrayName pattern'},
\ ]
let b:binary = [
\ {'word': 'format', 'menu': 'formatString arg arg ...'},
\ {'word': 'scan', 'menu': 'string formatString varName varName ...'},
\ ]
let b:chan = [
\ {'word': 'blocked', 'menu': 'channelId'},
\ {'word': 'close', 'menu': 'channelId'},
\ {'word': 'configure', 'menu': 'channelId optionName value optionName value...'},
\ {'word': 'copy', 'menu': 'inputChan outputChan -size size -command callback'},
\ {'word': 'create', 'menu': 'mode cmdPrefix'},
\ {'word': 'eof', 'menu': 'channelId'},
\ {'word': 'event', 'menu': 'channelId event script'},
\ {'word': 'flush', 'menu': 'channelId'},
\ {'word': 'gets', 'menu': 'channelId varName'},
\ {'word': 'names', 'menu': 'pattern'},
\ {'word': 'pending', 'menu': 'mode channelId'},
\ {'word': 'postevent', 'menu': 'channelId eventSpec'},
\ {'word': 'puts', 'menu': '-nonewline channelId string'},
\ {'word': 'read', 'menu': 'channelId'},
\ {'word': 'seek', 'menu': 'channelId offset origin'},
\ {'word': 'tell', 'menu': 'channelId'},
\ {'word': 'truncate', 'menu': 'channelId length'},
\ ]
let b:chan_sp_configure = [
\ {'word': '-blocking', 'menu': 'boolean'},
\ {'word': '-buffering', 'menu': 'newValue'},
\ {'word': '-buffersize', 'menu': 'newSize'},
\ {'word': '-encoding', 'menu': 'name'},
\ {'word': '-eofchar', 'menu': '{inChar outChar}'},
\ {'word': '-translation', 'menu': '{inMode outMode}'},
\ ]
let b:clock = [
\ {'word': 'add', 'menu': 'timeVal count unit... -option value'},
\ {'word': 'clicks', 'menu': '-option'},
\ {'word': 'format', 'menu': 'timeVal -option value...'},
\ {'word': 'microseconds', 'menu': ''},
\ {'word': 'milliseconds', 'menu': ''},
\ {'word': 'scan', 'menu': 'inputString -option value...'},
\ {'word': 'seconds', 'menu': ''},
\ ]
let b:clock_sp_seconds = [
\ {'word': '-base', 'menu': 'time'},
\ {'word': '-format', 'menu': 'format'},
\ {'word': '-gmt', 'menu': 'boolean'},
\ {'word': '-locale', 'menu': 'localeName'},
\ {'word': '-timezone', 'menu': 'zoneName'},
\ ]
let b:dde = [
\ {'word': 'servername', 'menu': '-force -handler proc -- topic'},
\ {'word': 'execute', 'menu': '-async service topic data'},
\ {'word': 'poke', 'menu': 'service topic item data'},
\ {'word': 'request', 'menu': '-binary service topic item'},
\ {'word': 'services', 'menu': 'service topic'},
\ {'word': 'eval', 'menu': '-async topic cmd arg arg ...'},
\ ]
let b:dict = [
\ {'word': 'append', 'menu': 'dictionaryVariable key string ...'},
\ {'word': 'create', 'menu': 'key value ...'},
\ {'word': 'exists', 'menu': 'dictionaryValue key key ...'},
\ {'word': 'filter', 'menu': 'dictionaryValue value globPattern'},
\ {'word': 'for', 'menu': '{keyVar valueVar} dictionaryValue body'},
\ {'word': 'get', 'menu': 'dictionaryValue key ...'},
\ {'word': 'incr', 'menu': 'dictionaryVariable key increment'},
\ {'word': 'info', 'menu': 'dictionaryValue'},
\ {'word': 'keys', 'menu': 'dictionaryValue globPattern'},
\ {'word': 'lappend', 'menu': 'dictionaryVariable key value ...'},
\ {'word': 'merge', 'menu': 'dictionaryValue ...'},
\ {'word': 'remove', 'menu': 'dictionaryValue key ...'},
\ {'word': 'replace', 'menu': 'dictionaryValue key value ...'},
\ {'word': 'set', 'menu': 'dictionaryVariable key key ... value'},
\ {'word': 'size', 'menu': 'dictionaryValue'},
\ {'word': 'unset', 'menu': 'dictionaryVariable key key ...'},
\ {'word': 'update', 'menu': 'dictionaryVariable key varName key varName ... body'},
\ {'word': 'values', 'menu': 'dictionaryValue globPattern'},
\ {'word': 'with', 'menu': 'dictionaryVariable key ... body'},
\ ]
let b:encoding = [
\ {'word': 'convertfrom', 'menu': 'encoding data'},
\ {'word': 'convertto', 'menu': 'encoding string'},
\ {'word': 'dirs', 'menu': 'directoryList'},
\ {'word': 'names', 'menu': ''},
\ {'word': 'system', 'menu': 'encoding'},
\ ]
let b:exec = [
\ {'word': '-ignorestderr', 'menu': ''},
\ {'word': '-keepnewline', 'menu': ''},
\ ]
let b:fconfigure = [
\ {'word': '-blocking', 'menu': 'boolean'},
\ {'word': '-buffering', 'menu': 'newValue'},
\ {'word': '-buffersize', 'menu': 'newSize'},
\ {'word': '-encoding', 'menu': 'name'},
\ {'word': '-eofchar', 'menu': '{inChar outChar}'},
\ {'word': '-translation', 'menu': '{inMode outMode}'},
\ ]
let b:file = [
\ {'word': 'atime', 'menu': 'name time'},
\ {'word': 'attributes', 'menu': 'name option value option value...'},
\ {'word': 'channels', 'menu': 'pattern'},
\ {'word': 'copy', 'menu': '-force -- source source ... targetDir'},
\ {'word': 'delete', 'menu': '-force -- pathname pathname ... '},
\ {'word': 'dirname', 'menu': 'name'},
\ {'word': 'executable', 'menu': 'name'},
\ {'word': 'exists', 'menu': 'name'},
\ {'word': 'extension', 'menu': 'name'},
\ {'word': 'isdirectory', 'menu': 'name'},
\ {'word': 'isfile', 'menu': 'name'},
\ {'word': 'join', 'menu': 'name name ...'},
\ {'word': 'link', 'menu': '-linktype linkName target'},
\ {'word': 'lstat', 'menu': 'name varName'},
\ {'word': 'mkdir', 'menu': 'dir dir ...'},
\ {'word': 'mtime', 'menu': 'name time'},
\ {'word': 'nativename', 'menu': 'name'},
\ {'word': 'normalize', 'menu': 'name'},
\ {'word': 'owned', 'menu': 'name'},
\ {'word': 'pathtype', 'menu': 'name'},
\ {'word': 'readable', 'menu': 'name'},
\ {'word': 'readlink', 'menu': 'name'},
\ {'word': 'rename', 'menu': '-force -- source source ... targetDir'},
\ {'word': 'rootname', 'menu': 'name'},
\ {'word': 'separator', 'menu': 'name'},
\ {'word': 'size', 'menu': 'name'},
\ {'word': 'split', 'menu': 'name'},
\ {'word': 'stat', 'menu': 'name varName'},
\ {'word': 'system', 'menu': 'name'},
\ {'word': 'tail', 'menu': 'name'},
\ {'word': 'type', 'menu': 'name'},
\ {'word': 'volumes', 'menu': ''},
\ {'word': 'writable', 'menu': 'name'},
\ ]
let b:glob = [
\ {'word': '-directory', 'menu': 'directory'},
\ {'word': '-join', 'menu': ''},
\ {'word': '-nocomplain', 'menu': ''},
\ {'word': '-path', 'menu': 'pathPrefix'},
\ {'word': '-tails', 'menu': ''},
\ {'word': '-types', 'menu': 'typeList'},
\ ]
let b:history = [
\ {'word': 'add', 'menu': 'command exec'},
\ {'word': 'change', 'menu': 'newValue event'},
\ {'word': 'clear', 'menu': ''},
\ {'word': 'event', 'menu': 'event'},
\ {'word': 'info', 'menu': 'count'},
\ {'word': 'keep', 'menu': 'count'},
\ {'word': 'nextid', 'menu': ''},
\ {'word': 'redo', 'menu': 'event'},
\ ]
let b:http = [
\ {'word': 'config', 'menu': 'options'},
\ {'word': 'geturl', 'menu': 'url options'},
\ {'word': 'formatQuery', 'menu': 'key value key value ...'},
\ {'word': 'reset', 'menu': 'token why'},
\ {'word': 'wait', 'menu': 'token'},
\ {'word': 'data', 'menu': 'token'},
\ {'word': 'error', 'menu': 'token'},
\ {'word': 'status', 'menu': 'token'},
\ {'word': 'code', 'menu': 'token'},
\ {'word': 'ncode', 'menu': 'token'},
\ {'word': 'size', 'menu': 'token'},
\ {'word': 'meta', 'menu': 'token'},
\ {'word': 'cleanup', 'menu': 'token'},
\ {'word': 'register', 'menu': 'proto port command'},
\ {'word': 'unregister', 'menu': 'proto'},
\ ]
let b:http_ns_config = [
\ {'word': '-accept', 'menu': 'mimetypes'},
\ {'word': '-proxyhost', 'menu': 'hostname'},
\ {'word': '-proxyport', 'menu': 'number'},
\ {'word': '-proxyfilter', 'menu': 'command'},
\ {'word': '-urlencoding', 'menu': 'encoding'},
\ {'word': '-useragent', 'menu': 'string'},
\ ]
let b:http_ns_geturl = [
\ {'word': '-binary', 'menu': 'boolean'},
\ {'word': '-blocksize', 'menu': 'size'},
\ {'word': '-channel', 'menu': 'name'},
\ {'word': '-command', 'menu': 'callback'},
\ {'word': '-handler', 'menu': 'callback'},
\ {'word': '-headers', 'menu': 'keyvaluelist'},
\ {'word': '-keepalive', 'menu': 'boolean'},
\ {'word': '-method', 'menu': 'type'},
\ {'word': '-myaddr', 'menu': 'address'},
\ {'word': '-progress', 'menu': 'callback'},
\ {'word': '-protocol', 'menu': 'version'},
\ {'word': '-query', 'menu': 'query'},
\ {'word': '-queryblocksize', 'menu': 'size'},
\ {'word': '-querychannel', 'menu': 'channelID'},
\ {'word': '-queryprogress', 'menu': 'callback'},
\ {'word': '-strict', 'menu': 'boolean'},
\ {'word': '-timeout', 'menu': 'milliseconds'},
\ {'word': '-type', 'menu': 'mime-type'},
\ {'word': '-validate', 'menu': 'boolean'},
\ ]
let b:info = [
\ {'word': 'args', 'menu': 'procname'},
\ {'word': 'body', 'menu': 'procname'},
\ {'word': 'cmdcount', 'menu': ''},
\ {'word': 'commands', 'menu': 'pattern'},
\ {'word': 'complete', 'menu': 'command'},
\ {'word': 'default', 'menu': 'procname arg varname'},
\ {'word': 'exists', 'menu': 'varName'},
\ {'word': 'frame', 'menu': 'number'},
\ {'word': 'functions', 'menu': 'pattern'},
\ {'word': 'globals', 'menu': 'pattern'},
\ {'word': 'hostname', 'menu': ''},
\ {'word': 'level', 'menu': 'number'},
\ {'word': 'library', 'menu': ''},
\ {'word': 'loaded', 'menu': 'interp'},
\ {'word': 'locals', 'menu': 'pattern'},
\ {'word': 'nameofexecutable', 'menu': ''},
\ {'word': 'patchlevel', 'menu': ''},
\ {'word': 'procs', 'menu': 'pattern'},
\ {'word': 'script', 'menu': 'filename'},
\ {'word': 'sharedlibextension', 'menu': ''},
\ {'word': 'tclversion', 'menu': ''},
\ {'word': 'vars', 'menu': 'pattern'},
\ ]
let b:interp = [
\ {'word': 'bgerror', 'menu': 'path cmdPrefix'},
\ {'word': 'exists', 'menu': 'path'},
\ {'word': 'expose', 'menu': 'path hiddenName exposedCmdName'},
\ {'word': 'issafe', 'menu': 'path'},
\ {'word': 'marktrusted', 'menu': 'path'},
\ ]
let b:interp_sp_bgerror = [
\ {'word': '-safe', 'menu': '-- path'},
\ ]
let b:interp_sp_marktrusted = [
\ {'word': '-command', 'menu': ''},
\ {'word': '-granularity', 'menu': ''},
\ {'word': '-milliseconds', 'menu': ''},
\ {'word': '-seconds', 'menu': ''},
\ {'word': '-value', 'menu': ''},
\ ]
let b:lsearch = [
\ {'word': '-exact', 'menu': ''},
\ {'word': '-glob', 'menu': ''},
\ {'word': '-regexp', 'menu': ''},
\ {'word': '-sorted', 'menu': ''},
\ {'word': '-all', 'menu': ''},
\ {'word': '-inline', 'menu': ''},
\ {'word': '-not', 'menu': ''},
\ {'word': '-start', 'menu': 'index'},
\ {'word': '-ascii', 'menu': ''},
\ {'word': '-dictionary', 'menu': ''},
\ {'word': '-integer', 'menu': ''},
\ {'word': '-nocase', 'menu': ''},
\ {'word': '-real', 'menu': ''},
\ {'word': '-decreasing', 'menu': ''},
\ {'word': '-increasing', 'menu': ''},
\ {'word': '-index', 'menu': 'indexList'},
\ {'word': '-subindices', 'menu': ''},
\ ]
let b:lsort = [
\ {'word': '-ascii', 'menu': ''},
\ {'word': '-dictionary', 'menu': ''},
\ {'word': '-integer', 'menu': ''},
\ {'word': '-real', 'menu': ''},
\ {'word': '-command', 'menu': 'command'},
\ {'word': '-increasing', 'menu': ''},
\ {'word': '-decreasing', 'menu': ''},
\ {'word': '-indices', 'menu': ''},
\ {'word': '-index', 'menu': 'indexList'},
\ {'word': '-nocase', 'menu': ''},
\ {'word': '-unique', 'menu': ''},
\ ]
let b:memory = [
\ {'word': 'active', 'menu': 'file'},
\ {'word': 'break_on_malloc', 'menu': 'count'},
\ {'word': 'info', 'menu': ''},
\ {'word': 'init', 'menu': '[on|off]'},
\ {'word': 'objs', 'menu': 'file'},
\ {'word': 'onexit', 'menu': 'file'},
\ {'word': 'tag', 'menu': 'string'},
\ {'word': 'trace', 'menu': '[on|off]'},
\ {'word': 'trace_on_at_malloc', 'menu': 'count'},
\ {'word': 'validate', 'menu': '[on|off]'},
\ ]
let b:msgcat = [
\ {'word': 'mc', 'menu': 'src-string arg arg ...'},
\ {'word': 'mcmax', 'menu': 'src-string src-string ...'},
\ {'word': 'mclocale', 'menu': 'newLocale'},
\ {'word': 'mcpreferences', 'menu': ''},
\ {'word': 'mcload', 'menu': 'dirname'},
\ {'word': 'mcset', 'menu': 'locale src-string translate-string'},
\ {'word': 'mcmset', 'menu': 'locale src-trans-list'},
\ {'word': 'mcunknown', 'menu': 'locale src-string'},
\ ]
let b:namespace = [
\ {'word': 'children', 'menu': 'namespace pattern'},
\ {'word': 'code', 'menu': 'script'},
\ {'word': 'current', 'menu': ''},
\ {'word': 'delete', 'menu': 'namespace namespace ...'},
\ {'word': 'ensemble', 'menu': 'exists command'},
\ {'word': 'eval', 'menu': 'namespace arg arg ...'},
\ {'word': 'exists', 'menu': 'namespace'},
\ {'word': 'export', 'menu': '-clear pattern pattern ...'},
\ {'word': 'forget', 'menu': 'pattern pattern ...'},
\ {'word': 'import', 'menu': '-force pattern pattern ...'},
\ {'word': 'inscope', 'menu': 'namespace script arg ...'},
\ {'word': 'origin', 'menu': 'command'},
\ {'word': 'parent', 'menu': 'namespace'},
\ {'word': 'path', 'menu': 'namespaceList'},
\ {'word': 'qualifiers', 'menu': 'string'},
\ {'word': 'tail', 'menu': 'string'},
\ {'word': 'upvar', 'menu': 'namespace otherVar myVar otherVar myVar ...'},
\ {'word': 'unknown', 'menu': 'script'},
\ {'word': 'which', 'menu': '-command -variable name'},
\ ]
let b:namespace_sp_ensemble = [
\ {'word': '-map', 'menu': ''},
\ {'word': '-prefixes', 'menu': ''},
\ {'word': '-subcommands', 'menu': ''},
\ {'word': '-unknown', 'menu': ''},
\ {'word': '-command', 'menu': ''},
\ {'word': '-namespace', 'menu': ''},
\ ]
let b:open = [
\ {'word': '-mode', 'menu': 'baud,parity,data,stop'},
\ {'word': '-handshake', 'menu': 'type'},
\ {'word': '-queue', 'menu': ''},
\ {'word': '-timeout', 'menu': 'msec'},
\ {'word': '-ttycontrol', 'menu': '{signal boolean signal boolean ...}'},
\ {'word': '-ttystatus', 'menu': ''},
\ {'word': '-xchar', 'menu': '{xonChar xoffChar}'},
\ {'word': '-pollinterval', 'menu': 'msec'},
\ {'word': '-sysbuffer', 'menu': '{inSize outSize}'},
\ {'word': '-lasterror', 'menu': ''},
\ ]
let b:package = [
\ {'word': 'forget', 'menu': 'package package ...'},
\ {'word': 'ifneeded', 'menu': 'package version script'},
\ {'word': 'names', 'menu': ''},
\ {'word': 'present', 'menu': '-exact package version'},
\ {'word': 'provide', 'menu': 'package version'},
\ {'word': 'require', 'menu': '-exact package version'},
\ {'word': 'unknown', 'menu': 'command'},
\ {'word': 'vcompare', 'menu': 'version1 version2'},
\ {'word': 'versions', 'menu': 'package'},
\ {'word': 'vsatisfies', 'menu': 'version requirement...'},
\ {'word': 'prefer', 'menu': 'latest|stable'},
\ ]
let b:packagens = [
\ {'word': '-name', 'menu': 'packageName'},
\ {'word': '-version', 'menu': 'packageVersion'},
\ {'word': '-load', 'menu': 'filespec'},
\ {'word': '-source', 'menu': 'filespec'},
\ ]
let b:pkgMkIndex = [
\ {'word': '-direct', 'menu': ''},
\ {'word': '-lazy', 'menu': ''},
\ {'word': '-load', 'menu': 'pkgPat'},
\ {'word': '-verbose', 'menu': ''},
\ ]
let b:platform = [
\ {'word': 'generic', 'menu': ''},
\ {'word': 'identify', 'menu': ''},
\ {'word': 'patterns', 'menu': 'identifier'},
\ ]
let b:regexp = [
\ {'word': '-about', 'menu': ''},
\ {'word': '-expanded', 'menu': ''},
\ {'word': '-indices', 'menu': ''},
\ {'word': '-line', 'menu': ''},
\ {'word': '-linestop', 'menu': ''},
\ {'word': '-lineanchor', 'menu': ''},
\ {'word': '-nocase', 'menu': ''},
\ {'word': '-all', 'menu': ''},
\ {'word': '-inline', 'menu': ''},
\ {'word': '-start', 'menu': 'index'},
\ ]
let b:registry = [
\ {'word': 'broadcast', 'menu': 'keyName -timeout milliseconds'},
\ {'word': 'delete', 'menu': 'keyName valueName'},
\ {'word': 'get', 'menu': 'keyName valueName'},
\ {'word': 'keys', 'menu': 'keyName pattern'},
\ {'word': 'set', 'menu': 'keyName valueName data type'},
\ {'word': 'type', 'menu': 'keyName valueName'},
\ {'word': 'values', 'menu': 'keyName pattern'},
\ ]
let b:regsub = [
\ {'word': '-all', 'menu': ''},
\ {'word': '-expanded', 'menu': ''},
\ {'word': '-line', 'menu': ''},
\ {'word': '-linestop', 'menu': ''},
\ {'word': '-lineanchor', 'menu': ''},
\ {'word': '-nocase', 'menu': ''},
\ {'word': '-start', 'menu': 'index'},
\ ]
let b:return = [
\ {'word': '-errorcode', 'menu': 'list'},
\ {'word': '-errorinfo', 'menu': 'info'},
\ {'word': '-level', 'menu': 'level'},
\ {'word': '-options', 'menu': 'options'},
\ ]
let b:safe = [
\ {'word': 'interpCreate', 'menu': 'slave options...'},
\ {'word': 'interpInit', 'menu': 'slave options...'},
\ {'word': 'interpConfigure', 'menu': 'slave options...'},
\ {'word': 'interpDelete', 'menu': 'slave'},
\ {'word': 'interpFindInAccessPath', 'menu': 'slave directory'},
\ {'word': 'interpAddToAccessPath', 'menu': 'slave directory'},
\ {'word': 'setLogCmd', 'menu': 'cmd arg...'},
\ ]
let b:safe_ns_setLogCmd = [
\ {'word': '-accessPath', 'menu': 'directoryList'},
\ {'word': '-statics', 'menu': 'boolean'},
\ {'word': '-noStatics', 'menu': ''},
\ {'word': '-nested', 'menu': 'boolean'},
\ {'word': '-nestedLoadOk', 'menu': ''},
\ {'word': '-deleteHook', 'menu': 'script'},
\ ]
let b:socket = [
\ {'word': '-myaddr', 'menu': 'addr'},
\ {'word': '-myport', 'menu': 'port'},
\ {'word': '-async', 'menu': ''},
\ {'word': '-error', 'menu': ''},
\ {'word': '-sockname', 'menu': ''},
\ {'word': '-peername', 'menu': ''},
\ ]
let b:string = [
\ {'word': 'bytelength', 'menu': 'string'},
\ {'word': 'compare', 'menu': '-nocase -length int string1 string2'},
\ {'word': 'equal', 'menu': '-nocase -length int string1 string2'},
\ {'word': 'first', 'menu': 'needleString haystackString startIndex'},
\ {'word': 'index', 'menu': 'string charIndex'},
\ {'word': 'is', 'menu': 'class -strict -failindex varname string'},
\ {'word': 'last', 'menu': 'needleString haystackString lastIndex'},
\ {'word': 'length', 'menu': 'string'},
\ {'word': 'map', 'menu': '-nocase mapping string'},
\ {'word': 'match', 'menu': '-nocase pattern string'},
\ {'word': 'range', 'menu': 'string first last'},
\ {'word': 'repeat', 'menu': 'string count'},
\ {'word': 'replace', 'menu': 'string first last newstring'},
\ {'word': 'reverse', 'menu': 'string'},
\ {'word': 'tolower', 'menu': 'string first last'},
\ {'word': 'totitle', 'menu': 'string first last'},
\ {'word': 'toupper', 'menu': 'string first last'},
\ {'word': 'trim', 'menu': 'string chars'},
\ {'word': 'trimleft', 'menu': 'string chars'},
\ {'word': 'trimright', 'menu': 'string chars'},
\ {'word': 'wordend', 'menu': 'string charIndex'},
\ {'word': 'wordstart', 'menu': 'string charIndex'},
\ ]
let b:switch = [
\ {'word': '-exact', 'menu': ''},
\ {'word': '-glob', 'menu': ''},
\ {'word': '-regexp', 'menu': ''},
\ {'word': '-nocase', 'menu': ''},
\ {'word': '-matchvar', 'menu': 'varName'},
\ {'word': '-indexvar', 'menu': 'varName'},
\ ]
let b:tcltest = [
\ {'word': '-constraints', 'menu': 'list'},
\ {'word': '-setup', 'menu': 'script'},
\ {'word': '-body', 'menu': 'script'},
\ {'word': '-cleanup', 'menu': 'script'},
\ {'word': '-match', 'menu': 'patternList'},
\ {'word': '-result', 'menu': 'expectedValue'},
\ {'word': '-output', 'menu': 'expectedValue'},
\ {'word': '-errorOutput', 'menu': 'expectedValue'},
\ {'word': '-returnCodes', 'menu': 'expectedCodeList'},
\ {'word': '-singleproc', 'menu': 'boolean'},
\ {'word': '-debug', 'menu': 'level'},
\ {'word': '-verbose', 'menu': 'level'},
\ {'word': '-preservecore', 'menu': 'level'},
\ {'word': '-limitconstraints', 'menu': 'boolean'},
\ {'word': '-tmpdir', 'menu': 'directory'},
\ {'word': '-testdir', 'menu': 'directory'},
\ {'word': '-file', 'menu': 'patternList'},
\ {'word': '-notfile', 'menu': 'patternList'},
\ {'word': '-relateddir', 'menu': 'patternList'},
\ {'word': '-asidefromdir', 'menu': 'patternList'},
\ {'word': '-skip', 'menu': 'patternList'},
\ {'word': '-load', 'menu': 'script'},
\ {'word': '-loadfile', 'menu': 'filename'},
\ {'word': '-outfile', 'menu': 'filename'},
\ {'word': '-errfile', 'menu': 'filename'},
\ {'word': 'test', 'menu': 'name description optionList'},
\ {'word': 'loadTestedCommands', 'menu': ''},
\ {'word': 'makeDirectory', 'menu': 'name directory'},
\ {'word': 'removeDirectory', 'menu': 'name directory'},
\ {'word': 'makeFile', 'menu': 'contents name directory'},
\ {'word': 'removeFile', 'menu': 'name directory'},
\ {'word': 'viewFile', 'menu': 'name directory'},
\ {'word': 'cleanupTests', 'menu': 'runningMultipleTests'},
\ {'word': 'runAllTests', 'menu': ''},
\ {'word': 'configure', 'menu': 'option value option value ...'},
\ {'word': 'customMatch', 'menu': 'mode command'},
\ {'word': 'testConstraint', 'menu': 'constraint value'},
\ {'word': 'outputChannel', 'menu': 'channelID'},
\ {'word': 'errorChannel', 'menu': 'channelID'},
\ {'word': 'interpreter', 'menu': 'interp'},
\ {'word': 'debug', 'menu': 'level'},
\ {'word': 'errorFile', 'menu': 'filename'},
\ {'word': 'limitConstraints', 'menu': 'boolean'},
\ {'word': 'loadFile', 'menu': 'filename'},
\ {'word': 'loadScript', 'menu': 'script'},
\ {'word': 'match', 'menu': 'patternList'},
\ {'word': 'matchDirectories', 'menu': 'patternList'},
\ {'word': 'matchFiles', 'menu': 'patternList'},
\ {'word': 'outputFile', 'menu': 'filename'},
\ {'word': 'preserveCore', 'menu': 'level'},
\ {'word': 'singleProcess', 'menu': 'boolean'},
\ {'word': 'skip', 'menu': 'patternList'},
\ {'word': 'skipDirectories', 'menu': 'patternList'},
\ {'word': 'skipFiles', 'menu': 'patternList'},
\ {'word': 'temporaryDirectory', 'menu': 'directory'},
\ {'word': 'testsDirectory', 'menu': 'directory'},
\ {'word': 'verbose', 'menu': 'level'},
\ {'word': 'bytestring', 'menu': 'string'},
\ {'word': 'normalizeMsg', 'menu': 'msg'},
\ {'word': 'normalizePath', 'menu': 'pathVar'},
\ {'word': 'workingDirectory', 'menu': 'dir'},
\ ]
let b:trace = [
\ {'word': 'add', 'menu': 'variable name ops commandPrefix'},
\ {'word': 'remove', 'menu': 'variable name opList commandPrefix'},
\ {'word': 'info', 'menu': 'variable name'},
\ {'word': 'variable', 'menu': 'name ops command'},
\ {'word': 'vdelete', 'menu': 'name ops command'},
\ {'word': 'vinfo', 'menu': 'name'},
\ ]
let b:unload = [
\ {'word': '-nocomplain', 'menu': ''},
\ {'word': '-keeplibrary', 'menu': ''},
\ ]

5183
etc/soft/vim/vim/+omnicompletion/tcl/TclCompletion.vim

File diff suppressed because it is too large Load Diff

1126
etc/soft/vim/vim/+omnicompletion/tcl/Tk.vim

File diff suppressed because it is too large Load Diff

108
etc/soft/vim/vim/+omnicompletion/tcl/tcl_completion.vim

@ -1,108 +0,0 @@
source ~/.vim/+omnicompletion/tcl/Packages.vim
source ~/.vim/+omnicompletion/tcl/Tcl.vim
source ~/.vim/+omnicompletion/tcl/Tk.vim
source ~/.vim/+omnicompletion/tcl/Base.vim
if (exists("g:tcl_completion") && g:tcl_completion) || &cp || v:version < 700
finish
endif
let g:tcl_completion = 1
setlocal omnifunc=TclComplete
let s:completion_type = ''
fu! TclComplete(findstart, base)
echomsg 'findstart=' . a:findstart . ', base=' . a:base
if a:findstart
" return the starting point of the word
let line = getline('.')
let pos = col('.') - 1
while pos > 0 && line[pos - 1] !~ ' \|,^\|,\|\[\|\s\|\t\|:'
let pos -= 1
endwhile
" Дополнение пространств имен
if line[pos - 1] == ':'
" Сдвиг на две позиции назад
let start = pos - 2
" TODO: Дополнение опций
elseif line[pos - 1] == '-'
let start = pos - 1
" Дополнение подкомманд
elseif line[pos - 1] =~ ' \|\t'
let start = pos - 1
else
let labelstr = 'default'
endif
" Получение слова для дополнения
if exists("start")
let labelpos = start
while labelpos > 0 && line[labelpos - 1] =~ '[]a-zA-Z_:0-9\.\"\{\} -<>\\]'
let labelpos -= 1
endwhile
let labelstr=strpart(line, labelpos, start - labelpos)
"Определение последнего ключевого слова в строке
let len = strlen(labelstr)
let newlabelstr = substitute(labelstr,"::","_ns_","")
while len > 1 && !exists("b:".newlabelstr)
""let newlabelstr = substitute(strpart(labelstr,0,len),"::","_ns_","")
""let newlabelstr = substitute(newlabelstr," ","_sp_","")
let newlabelstr = Escape(strpart(labelstr,0,len))
"FIXME: Для отладки
""echo system ("echo -: ".substitute(strpart(labelstr,0,len),"::","_",""))
let len -= 1
endwhile
if exists("b:".newlabelstr)
let labelstr = newlabelstr
endif
endif
if exists("labelstr") && labelstr != ""
let s:completion_type = labelstr
else
let s:completion_type = 'default'
endif
" FIXME: Для отладки
""echo system("echo labelstring == ".labelstr." completion == ".s:completion_type)
return pos
else
let suggestions = []
""let l:r = substitute(s:completion_type, "::", "_ns_", "")
""let l:r = substitute(l:r, " ", "_sp_", "")
let l:r = Escape(s:completion_type)
if exists('b:'.l:r)
exe 'let listing = b:'.l:r
for entry in listing
if entry.word =~ '^' . escape(a:base, '/')
call add(suggestions, entry)
endif
endfor
endif
return suggestions
if !has('gui_running')
redraw!
endif
endif
endfu
function Escape(str)
let result = substitute(a:str,"::","_ns_","g")
let result = substitute(result," ","_sp_","g")
return result
endfunction
Loading…
Cancel
Save