aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/remote/host.vim12
-rw-r--r--runtime/doc/Makefile10
-rw-r--r--runtime/doc/autocmd.txt2
-rw-r--r--runtime/doc/cmdline.txt5
-rw-r--r--runtime/doc/eval.txt64
-rw-r--r--runtime/doc/help.txt5
-rw-r--r--runtime/doc/if_lua.txt403
-rw-r--r--runtime/doc/if_mzsch.txt286
-rw-r--r--runtime/doc/if_perl.txt294
-rw-r--r--runtime/doc/if_pyth.txt23
-rw-r--r--runtime/doc/if_ruby.txt216
-rw-r--r--runtime/doc/if_tcl.txt533
-rw-r--r--runtime/doc/index.txt13
-rw-r--r--runtime/doc/insert.txt6
-rw-r--r--runtime/doc/message.txt7
-rw-r--r--runtime/doc/msgpack_rpc.txt12
-rw-r--r--runtime/doc/nvim_python.txt2
-rw-r--r--runtime/doc/nvim_terminal_emulator.txt9
-rw-r--r--runtime/doc/options.txt33
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/doc/syntax.txt16
-rw-r--r--runtime/doc/tips.txt15
-rw-r--r--runtime/doc/todo.txt8
-rw-r--r--runtime/doc/usr_41.txt2
-rw-r--r--runtime/doc/various.txt11
-rw-r--r--runtime/doc/vi_diff.txt3
-rw-r--r--runtime/doc/vim_diff.txt2
-rw-r--r--runtime/optwin.vim4
-rw-r--r--runtime/syntax/vim.vim121
-rw-r--r--runtime/tools/README.txt37
-rw-r--r--runtime/tools/blink.c21
-rw-r--r--runtime/tools/ccfilter.193
-rw-r--r--runtime/tools/ccfilter.c326
-rw-r--r--runtime/tools/ccfilter_README.txt91
-rwxr-xr-xruntime/tools/efm_filter.pl39
-rw-r--r--runtime/tools/efm_filter.txt31
-rwxr-xr-xruntime/tools/efm_perl.pl153
-rwxr-xr-xruntime/tools/mve.awk23
-rw-r--r--runtime/tools/mve.txt20
-rwxr-xr-xruntime/tools/pltags.pl300
-rwxr-xr-xruntime/tools/ref11
-rw-r--r--runtime/tools/shtags.161
-rwxr-xr-xruntime/tools/shtags.pl144
-rw-r--r--runtime/tools/unicode.vim290
-rwxr-xr-xruntime/tools/vim13213
-rw-r--r--runtime/tools/vim_vs_net.cmd24
-rwxr-xr-xruntime/tools/vimm6
-rwxr-xr-xruntime/tools/vimspell.sh55
-rw-r--r--runtime/tools/vimspell.txt22
-rw-r--r--runtime/tools/xcmdsrv_client.c584
50 files changed, 123 insertions, 4339 deletions
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index b07593f39b..ebbd85b6e6 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -133,6 +133,11 @@ function! s:RegistrationCommands(host)
let lines = []
for path in paths
let specs = rpcrequest(channel, 'specs', path)
+ if type(specs) != type([])
+ " host didn't return a spec list, indicates a failure while loading a
+ " plugin
+ continue
+ endif
call add(lines, "call remote#host#RegisterPlugin('".a:host
\ ."', '".path."', [")
for spec in specs
@@ -244,9 +249,10 @@ function! s:RequirePythonHost(name)
endif
catch
endtry
- throw 'Failed to load python host.' .
- \ " Try upgrading the Neovim python module with 'pip install --upgrade neovim'" .
- \ " or see ':help nvim-python'."
+ throw 'Failed to load python host. You can try to see what happened ' .
+ \ 'by starting Neovim with $NVIM_PYTHON_PYTHON_LOG and opening '.
+ \ 'the generated log file. Also, the host stderr will be available '.
+ \ 'in Neovim log, so it may contain useful information.'
endfunction
call remote#host#Register('python', function('s:RequirePythonHost'))
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile
index 4bced03d7e..e0d6e48cb9 100644
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -34,12 +34,7 @@ DOCS = \
helphelp.txt \
howto.txt \
if_cscop.txt \
- if_lua.txt \
- if_mzsch.txt \
- if_perl.txt \
if_pyth.txt \
- if_ruby.txt \
- if_tcl.txt \
indent.txt \
index.txt \
insert.txt \
@@ -156,12 +151,7 @@ HTMLS = \
helphelp.html \
howto.html \
if_cscop.html \
- if_lua.html \
- if_mzsch.html \
- if_perl.html \
if_pyth.html \
- if_ruby.html \
- if_tcl.html \
indent.html \
index.html \
insert.html \
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 1393131ab7..f771c225f4 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -791,7 +791,7 @@ ShellCmdPost After executing a shell command with |:!cmd|,
|:make| and |:grep|. Can be used to check for
any changed files.
For non-blocking shell commands, see
- |JobActivity|.
+ |job-control|.
*ShellFilterPost*
ShellFilterPost After executing a shell command with
":{range}!cmd", ":w !cmd" or ":r !cmd".
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index b426799239..da101e2dd1 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -522,8 +522,6 @@ followed by another Vim command:
:lcscope
:make
:normal
- :perl
- :perldo
:promptfind
:promptrepl
:pyfile
@@ -532,9 +530,6 @@ followed by another Vim command:
:read !
:scscope
:sign
- :tcl
- :tcldo
- :tclfile
:vglobal
:windo
:write !
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 710793fb04..a9ed4acb19 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1879,7 +1879,6 @@ lispindent( {lnum}) Number Lisp indent for line {lnum}
localtime() Number current time
log( {expr}) Float natural logarithm (base e) of {expr}
log10( {expr}) Float logarithm of Float {expr} to base 10
-luaeval( {expr}[, {expr}]) any evaluate |Lua| expression
map( {expr}, {string}) List/Dict change each item in {expr} to {expr}
maparg( {name}[, {mode} [, {abbr} [, {dict}]]])
String or Dict
@@ -1905,7 +1904,6 @@ min( {list}) Number minimum value of items in {list}
mkdir( {name} [, {path} [, {prot}]])
Number create directory {name}
mode( [expr]) String current editing mode
-mzeval( {expr}) any evaluate |MzScheme| expression
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
or( {expr}, {expr}) Number bitwise OR
@@ -4061,9 +4059,9 @@ jobstop({job}) {Nvim} *jobstop()*
Stop a job created with |jobstart()| by sending a `SIGTERM`
to the corresponding process. If the process doesn't exit
cleanly soon, a `SIGKILL` will be sent. When the job is
- finally closed, a |JobActivity| event will trigger with
- `v:job_data[0]` set to `exited`. See |job-control| for more
- information.
+ finally closed, the exit handler provided to |jobstart()| or
+ |termopen()| will be run.
+ See |job-control| for more information.
jobwait({ids}[, {timeout}]) {Nvim} *jobwait()*
Wait for a set of jobs to finish. The {ids} argument is a list
@@ -4239,19 +4237,6 @@ log10({expr}) *log10()*
< -2.0
-luaeval({expr}[, {expr}]) *luaeval()*
- Evaluate Lua expression {expr} and return its result converted
- to Vim data structures. Second {expr} may hold additional
- argument accessible as _A inside first {expr}.
- Strings are returned as they are.
- Boolean objects are converted to numbers.
- Numbers are converted to |Float| values.
- Dictionaries and lists obtained by vim.eval() are returned
- as-is.
- Other objects are returned as zero without any errors.
- See |lua-luaeval| for more details.
- {only available when compiled with the |+lua| feature}
-
map({expr}, {string}) *map()*
{expr} must be a |List| or a |Dictionary|.
Replace each item in {expr} with the result of evaluating
@@ -4615,23 +4600,6 @@ mode([expr]) Return a string that indicates the current mode.
"c" or "n".
Also see |visualmode()|.
-mzeval({expr}) *mzeval()*
- Evaluate MzScheme expression {expr} and return its result
- converted to Vim data structures.
- Numbers and strings are returned as they are.
- Pairs (including lists and improper lists) and vectors are
- returned as Vim |Lists|.
- Hash tables are represented as Vim |Dictionary| type with keys
- converted to strings.
- All other types are converted to string with display function.
- Examples: >
- :mz (define l (list 1 2 3))
- :mz (define h (make-hash)) (hash-set! h "list" l)
- :echo mzeval("l")
- :echo mzeval("h")
-<
- {only available when compiled with the |+mzscheme| feature}
-
nextnonblank({lnum}) *nextnonblank()*
Return the line number of the first line at or below {lnum}
that is not blank. Example: >
@@ -5405,13 +5373,25 @@ server2client( {clientid}, {string}) *server2client()*
:echo server2client(expand("<client>"), "HELLO")
<
serverlist() *serverlist()*
- Return a list of available server names, one per line.
- When there are no servers or the information is not available
- an empty string is returned. See also |clientserver|.
- {only available when compiled with the |+clientserver| feature}
+ Returns a list of available server names in a list.
+ When there are no servers an empty string is returned.
Example: >
:echo serverlist()
<
+serverlisten([{address}]) *serverlisten()*
+ Opens a Unix or TCP socket at {address} for clients to connect
+ to and returns {address}. If no address is given, it is
+ equivalent to >
+ :call serverlisten(tempname())
+< If |$NVIM_LISTEN_ADDRESS| is not set, it will be set to
+ {address}.
+
+serverstop({address}) *serverstop()*
+ Closes the Unix or TCP socket at {address}. Does nothing if
+ {address} is empty, or does not refer to a server. If
+ {address} equals |$NVIM_LISTEN_ADDRESS|, the listen address
+ will be unset.
+
setbufvar({expr}, {varname}, {val}) *setbufvar()*
Set option or local variable {varname} in buffer {expr} to
{val}.
@@ -6773,7 +6753,6 @@ lispindent Compiled with support for lisp indenting.
listcmds Compiled with commands for the buffer list |:files|
and the argument list |arglist|.
localmap Compiled with local mappings and abbr. |:map-local|
-lua Compiled with Lua interface |Lua|.
mac Macintosh version of Vim.
macunix Macintosh version of Vim, using Unix files (OS-X).
menu Compiled with support for |:menu|.
@@ -6792,10 +6771,8 @@ multi_byte Compiled with support for 'encoding'
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
multi_byte_ime Compiled with support for IME input method.
multi_lang Compiled with support for multiple languages.
-mzscheme Compiled with MzScheme interface |mzscheme|.
ole Compiled with OLE automation support for Win32.
path_extra Compiled with up/downwards search in 'path' and 'tags'
-perl Compiled with Perl interface.
persistent_undo Compiled with support for persistent undo history.
postscript Compiled with PostScript file printing.
printer Compiled with |:hardcopy| support.
@@ -6805,12 +6782,10 @@ python3 Compiled with Python 3.x interface. |has-python|
quickfix Compiled with |quickfix| support.
reltime Compiled with |reltime()| support.
rightleft Compiled with 'rightleft' support.
-ruby Compiled with Ruby interface |ruby|.
scrollbind Compiled with 'scrollbind' support.
showcmd Compiled with 'showcmd' support.
signs Compiled with |:sign| support.
smartindent Compiled with 'smartindent' support.
-sniff Compiled with SNiFF interface support.
spell Compiled with spell checking support |spell|.
startuptime Compiled with |--startuptime| support.
statusline Compiled with support for 'statusline', 'rulerformat'
@@ -6825,7 +6800,6 @@ tag_old_static Compiled with support for old static tags
|tag-old-static|.
tag_any_white Compiled with support for any white characters in tags
files |tag-any-white|.
-tcl Compiled with Tcl interface.
terminfo Compiled with terminfo instead of termcap.
termresponse Compiled with support for |t_RV| and |v:termresponse|.
textobjects Compiled with support for |text-objects|.
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 34ca6d0d12..347c1310ff 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -156,12 +156,7 @@ GUI ~
Interfaces ~
|if_cscop.txt| using Cscope with Vim
-|if_lua.txt| Lua interface
-|if_mzsch.txt| MzScheme interface
-|if_perl.txt| Perl interface
|if_pyth.txt| Python interface
-|if_tcl.txt| Tcl interface
-|if_ruby.txt| Ruby interface
|debugger.txt| Interface with a debugger
|sign.txt| debugging signs
diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt
deleted file mode 100644
index 2b322ddbae..0000000000
--- a/runtime/doc/if_lua.txt
+++ /dev/null
@@ -1,403 +0,0 @@
-*if_lua.txt* For Vim version 7.4. Last change: 2013 Sep 04
-
-
- VIM REFERENCE MANUAL by Luis Carvalho
-
-
-The Lua Interface to Vim *lua* *Lua*
-
-1. Commands |lua-commands|
-2. The vim module |lua-vim|
-3. List userdata |lua-list|
-4. Dict userdata |lua-dict|
-5. Funcref userdata |lua-funcref|
-6. Buffer userdata |lua-buffer|
-7. Window userdata |lua-window|
-8. The luaeval function |lua-luaeval|
-
-{Vi does not have any of these commands}
-
-The Lua interface is available only when Vim was compiled with the
-|+lua| feature.
-
-==============================================================================
-1. Commands *lua-commands*
-
- *:lua*
-:[range]lua {chunk}
- Execute Lua chunk {chunk}. {not in Vi}
-
-Examples:
->
- :lua print("Hello, Vim!")
- :lua local curbuf = vim.buffer() curbuf[7] = "line #7"
-<
-
-:[range]lua << {endmarker}
-{script}
-{endmarker}
- Execute Lua script {script}. {not in Vi}
- Note: This command doesn't work when the Lua
- feature wasn't compiled in. To avoid errors, see
- |script-here|.
-
-{endmarker} must NOT be preceded by any white space. If {endmarker} is
-omitted from after the "<<", a dot '.' must be used after {script}, like
-for the |:append| and |:insert| commands.
-This form of the |:lua| command is mainly useful for including Lua code
-in Vim scripts.
-
-Example:
->
- function! CurrentLineInfo()
- lua << EOF
- local linenr = vim.window().line
- local curline = vim.buffer()[linenr]
- print(string.format("Current line [%d] has %d chars",
- linenr, #curline))
- EOF
- endfunction
-<
-
- *:luado*
-:[range]luado {body} Execute Lua function "function (line, linenr) {body}
- end" for each line in the [range], with the function
- argument being set to the text of each line in turn,
- without a trailing <EOL>, and the current line number.
- If the value returned by the function is a string it
- becomes the text of the line in the current turn. The
- default for [range] is the whole file: "1,$".
- {not in Vi}
-
-Examples:
->
- :luado return string.format("%s\t%d", line:reverse(), #line)
-
- :lua require"lpeg"
- :lua -- balanced parenthesis grammar:
- :lua bp = lpeg.P{ "(" * ((1 - lpeg.S"()") + lpeg.V(1))^0 * ")" }
- :luado if bp:match(line) then return "-->\t" .. line end
-<
-
- *:luafile*
-:[range]luafile {file}
- Execute Lua script in {file}. {not in Vi}
- The whole argument is used as a single file name.
-
-Examples:
->
- :luafile script.lua
- :luafile %
-<
-
-All these commands execute a Lua chunk from either the command line (:lua and
-:luado) or a file (:luafile) with the given line [range]. Similarly to the Lua
-interpreter, each chunk has its own scope and so only global variables are
-shared between command calls. All Lua default libraries are available. In
-addition, Lua "print" function has its output redirected to the Vim message
-area, with arguments separated by a white space instead of a tab.
-
-Lua uses the "vim" module (see |lua-vim|) to issue commands to Vim
-and manage buffers (|lua-buffer|) and windows (|lua-window|). However,
-procedures that alter buffer content, open new buffers, and change cursor
-position are restricted when the command is executed in the |sandbox|.
-
-
-==============================================================================
-2. The vim module *lua-vim*
-
-Lua interfaces Vim through the "vim" module. The first and last line of the
-input range are stored in "vim.firstline" and "vim.lastline" respectively. The
-module also includes routines for buffer, window, and current line queries,
-Vim evaluation and command execution, and others.
-
- vim.list([arg]) Returns an empty list or, if "arg" is a Lua
- table with numeric keys 1, ..., n (a
- "sequence"), returns a list l such that l[i] =
- arg[i] for i = 1, ..., n (see |List|).
- Non-numeric keys are not used to initialize
- the list. See also |lua-eval| for conversion
- rules. Example: >
- :lua t = {math.pi, false, say = 'hi'}
- :echo luaeval('vim.list(t)')
- :" [3.141593, 0], 'say' is ignored
-<
- vim.dict([arg]) Returns an empty dictionary or, if "arg" is a
- Lua table, returns a dict d such that d[k] =
- arg[k] for all string keys k in "arg" (see
- |Dictionary|). Number keys are converted to
- strings. Keys that are not strings are not
- used to initialize the dictionary. See also
- |lua-eval| for conversion rules. Example: >
- :lua t = {math.pi, false, say = 'hi'}
- :echo luaeval('vim.dict(t)')
- :" {'say': 'hi'}, numeric keys ignored
-<
- vim.funcref({name}) Returns a Funcref to function {name} (see
- |Funcref|). It is equivalent to Vim's
- "function". NOT IMPLEMENTED YET
-
- vim.buffer([arg]) If "arg" is a number, returns buffer with
- number "arg" in the buffer list or, if "arg"
- is a string, returns buffer whose full or short
- name is "arg". In both cases, returns 'nil'
- (nil value, not string) if the buffer is not
- found. Otherwise, if "toboolean(arg)" is
- 'true' returns the first buffer in the buffer
- list or else the current buffer.
-
- vim.window([arg]) If "arg" is a number, returns window with
- number "arg" or 'nil' (nil value, not string)
- if not found. Otherwise, if "toboolean(arg)"
- is 'true' returns the first window or else the
- current window.
-
- vim.type({arg}) Returns the type of {arg}. It is equivalent to
- Lua's "type" function, but returns "list",
- "dict", "funcref", "buffer", or "window" if
- {arg} is a list, dictionary, funcref, buffer,
- or window, respectively. Examples: >
- :lua l = vim.list()
- :lua print(type(l), vim.type(l))
- :" userdata list
-<
- vim.command({cmd}) Executes the vim (ex-mode) command {cmd}.
- Examples: >
- :lua vim.command"set tw=60"
- :lua vim.command"normal ddp"
-<
- vim.eval({expr}) Evaluates expression {expr} (see |expression|),
- converts the result to Lua, and returns it.
- Vim strings and numbers are directly converted
- to Lua strings and numbers respectively. Vim
- lists and dictionaries are converted to Lua
- userdata (see |lua-list| and |lua-dict|).
- Examples: >
- :lua tw = vim.eval"&tw"
- :lua print(vim.eval"{'a': 'one'}".a)
-<
- vim.line() Returns the current line (without the trailing
- <EOL>), a Lua string.
-
- vim.beep() Beeps.
-
- vim.open({fname}) Opens a new buffer for file {fname} and
- returns it. Note that the buffer is not set as
- current.
-
-
-==============================================================================
-3. List userdata *lua-list*
-
-List userdata represent vim lists, and the interface tries to follow closely
-Vim's syntax for lists. Since lists are objects, changes in list references in
-Lua are reflected in Vim and vice-versa. A list "l" has the following
-properties and methods:
-
-Properties
-----------
- o "#l" is the number of items in list "l", equivalent to "len(l)"
- in Vim.
- o "l[k]" returns the k-th item in "l"; "l" is zero-indexed, as in Vim.
- To modify the k-th item, simply do "l[k] = newitem"; in
- particular, "l[k] = nil" removes the k-th item from "l".
- o "l()" returns an iterator for "l".
-
-Methods
--------
- o "l:add(item)" appends "item" to the end of "l".
- o "l:insert(item[, pos])" inserts "item" at (optional)
- position "pos" in the list. The default value for "pos" is 0.
-
-Examples:
->
- :let l = [1, 'item']
- :lua l = vim.eval('l') -- same 'l'
- :lua l:add(vim.list())
- :lua l[0] = math.pi
- :echo l[0] " 3.141593
- :lua l[0] = nil -- remove first item
- :lua l:insert(true, 1)
- :lua print(l, #l, l[0], l[1], l[-1])
- :lua for item in l() do print(item) end
-<
-
-==============================================================================
-4. Dict userdata *lua-dict*
-
-Similarly to list userdata, dict userdata represent vim dictionaries; since
-dictionaries are also objects, references are kept between Lua and Vim. A dict
-"d" has the following properties:
-
-Properties
-----------
- o "#d" is the number of items in dict "d", equivalent to "len(d)"
- in Vim.
- o "d.key" or "d['key']" returns the value at entry "key" in "d".
- To modify the entry at this key, simply do "d.key = newvalue"; in
- particular, "d.key = nil" removes the entry from "d".
- o "d()" returns an iterator for "d" and is equivalent to "items(d)" in
- Vim.
-
-Examples:
->
- :let d = {'n':10}
- :lua d = vim.eval('d') -- same 'd'
- :lua print(d, d.n, #d)
- :let d.self = d
- :lua for k, v in d() do print(d, k, v) end
- :lua d.x = math.pi
- :lua d.self = nil -- remove entry
- :echo d
-<
-
-==============================================================================
-5. Funcref userdata *lua-funcref*
-
-Funcref userdata represent funcref variables in Vim. Funcrefs that were
-defined with a "dict" attribute need to be obtained as a dictionary key
-in order to have "self" properly assigned to the dictionary (see examples
-below.) A funcref "f" has the following properties:
-
-Properties
-----------
- o "#f" is the name of the function referenced by "f"
- o "f(...)" calls the function referenced by "f" (with arguments)
-
-Examples:
->
- :function I(x)
- : return a:x
- : endfunction
- :let R = function('I')
- :lua i1 = vim.funcref('I')
- :lua i2 = vim.eval('R')
- :lua print(#i1, #i2) -- both 'I'
- :lua print(i1, i2, #i2(i1) == #i1(i2))
- :function Mylen() dict
- : return len(self.data)
- : endfunction
- :let mydict = {'data': [0, 1, 2, 3]}
- :lua d = vim.eval('mydict'); d.len = vim.funcref('Mylen')
- :echo mydict.len()
- :lua l = d.len -- assign d as 'self'
- :lua print(l())
-<
-
-==============================================================================
-6. Buffer userdata *lua-buffer*
-
-Buffer userdata represent vim buffers. A buffer userdata "b" has the following
-properties and methods:
-
-Properties
-----------
- o "b()" sets "b" as the current buffer.
- o "#b" is the number of lines in buffer "b".
- o "b[k]" represents line number k: "b[k] = newline" replaces line k
- with string "newline" and "b[k] = nil" deletes line k.
- o "b.name" contains the short name of buffer "b" (read-only).
- o "b.fname" contains the full name of buffer "b" (read-only).
- o "b.number" contains the position of buffer "b" in the buffer list
- (read-only).
-
-Methods
--------
- o "b:insert(newline[, pos])" inserts string "newline" at (optional)
- position "pos" in the buffer. The default value for "pos" is
- "#b + 1". If "pos == 0" then "newline" becomes the first line in
- the buffer.
- o "b:next()" returns the buffer next to "b" in the buffer list.
- o "b:previous()" returns the buffer previous to "b" in the buffer
- list.
- o "b:isvalid()" returns 'true' (boolean) if buffer "b" corresponds to
- a "real" (not freed from memory) Vim buffer.
-
-Examples:
->
- :lua b = vim.buffer() -- current buffer
- :lua print(b.name, b.number)
- :lua b[1] = "first line"
- :lua b:insert("FIRST!", 0)
- :lua b[1] = nil -- delete top line
- :lua for i=1,3 do b:insert(math.random()) end
- :3,4lua for i=vim.lastline,vim.firstline,-1 do b[i] = nil end
- :lua vim.open"myfile"() -- open buffer and set it as current
-
- function! ListBuffers()
- lua << EOF
- local b = vim.buffer(true) -- first buffer in list
- while b ~= nil do
- print(b.number, b.name, #b)
- b = b:next()
- end
- vim.beep()
- EOF
- endfunction
-<
-
-==============================================================================
-7. Window userdata *lua-window*
-
-Window objects represent vim windows. A window userdata "w" has the following
-properties and methods:
-
-Properties
-----------
- o "w()" sets "w" as the current window.
- o "w.buffer" contains the buffer of window "w" (read-only).
- o "w.line" represents the cursor line position in window "w".
- o "w.col" represents the cursor column position in window "w".
- o "w.width" represents the width of window "w".
- o "w.height" represents the height of window "w".
-
-Methods
--------
- o "w:next()" returns the window next to "w".
- o "w:previous()" returns the window previous to "w".
- o "w:isvalid()" returns 'true' (boolean) if window "w" corresponds to
- a "real" (not freed from memory) Vim window.
-
-Examples:
->
- :lua w = vim.window() -- current window
- :lua print(w.buffer.name, w.line, w.col)
- :lua w.width = w.width + math.random(10)
- :lua w.height = 2 * math.random() * w.height
- :lua n,w = 0,vim.window(true) while w~=nil do n,w = n + 1,w:next() end
- :lua print("There are " .. n .. " windows")
-<
-
-==============================================================================
-8. The luaeval function *lua-luaeval* *lua-eval*
-
-The (dual) equivalent of "vim.eval" for passing Lua values to Vim is
-"luaeval". "luaeval" takes an expression string and an optional argument and
-returns the result of the expression. It is semantically equivalent in Lua to:
->
- local chunkheader = "local _A = select(1, ...) return "
- function luaeval (expstr, arg)
- local chunk = assert(loadstring(chunkheader .. expstr, "luaeval"))
- return chunk(arg) -- return typval
- end
-<
-Note that "_A" receives the argument to "luaeval". Lua numbers, strings, and
-list, dict, and funcref userdata are converted to their Vim respective types,
-while Lua booleans are converted to numbers. An error is thrown if conversion
-of any of the remaining Lua types, including userdata other than lists, dicts,
-and funcrefs, is attempted.
-
-Examples: >
-
- :echo luaeval('math.pi')
- :lua a = vim.list():add('newlist')
- :let a = luaeval('a')
- :echo a[0] " 'newlist'
- :function Rand(x,y) " random uniform between x and y
- : return luaeval('(_A.y-_A.x)*math.random()+_A.x', {'x':a:x,'y':a:y})
- : endfunction
- :echo Rand(1,10)
-
-
-==============================================================================
- vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt
deleted file mode 100644
index b42570a75a..0000000000
--- a/runtime/doc/if_mzsch.txt
+++ /dev/null
@@ -1,286 +0,0 @@
-*if_mzsch.txt* For Vim version 7.4. Last change: 2012 Dec 17
-
-
- VIM REFERENCE MANUAL by Sergey Khorev
-
-
-The MzScheme Interface to Vim *mzscheme* *MzScheme*
-
-1. Commands |mzscheme-commands|
-2. Examples |mzscheme-examples|
-3. Threads |mzscheme-threads|
-4. Vim access from MzScheme |mzscheme-vim|
-5. mzeval() Vim function |mzscheme-mzeval|
-6. Using Function references |mzscheme-funcref|
-7. Dynamic loading |mzscheme-dynamic|
-
-{Vi does not have any of these commands}
-
-The MzScheme interface is available only if Vim was compiled with the
-|+mzscheme| feature.
-
-Based on the work of Brent Fulgham.
-Dynamic loading added by Sergey Khorev
-
-MzScheme and PLT Scheme names have been rebranded as Racket. For more
-information please check http://racket-lang.org
-
-Futures and places of Racket version 5.x up to and including 5.3.1 do not
-work correctly with processes created by Vim.
-The simplest solution is to build Racket on your own with these features
-disabled: >
- ./configure --disable-futures --disable-places --prefix=your-install-prefix
-
-To speed up the process, you might also want to use --disable-gracket and
---disable-docs
-
-==============================================================================
-1. Commands *mzscheme-commands*
-
- *:mzscheme* *:mz*
-:[range]mz[scheme] {stmt}
- Execute MzScheme statement {stmt}. {not in Vi}
-
-:[range]mz[scheme] << {endmarker}
-{script}
-{endmarker}
- Execute inlined MzScheme script {script}.
- Note: This command doesn't work if the MzScheme
- feature wasn't compiled in. To avoid errors, see
- |script-here|.
-
- *:mzfile* *:mzf*
-:[range]mzf[ile] {file} Execute the MzScheme script in {file}. {not in Vi}
-
-All of these commands do essentially the same thing - they execute a piece of
-MzScheme code, with the "current range" set to the given line
-range.
-
-In the case of :mzscheme, the code to execute is in the command-line.
-In the case of :mzfile, the code to execute is the contents of the given file.
-
-MzScheme interface defines exception exn:vim, derived from exn.
-It is raised for various Vim errors.
-
-During compilation, the MzScheme interface will remember the current MzScheme
-collection path. If you want to specify additional paths use the
-'current-library-collection-paths' parameter. E.g., to cons the user-local
-MzScheme collection path: >
- :mz << EOF
- (current-library-collection-paths
- (cons
- (build-path (find-system-path 'addon-dir) (version) "collects")
- (current-library-collection-paths)))
- EOF
-<
-
-All functionality is provided through module vimext.
-
-The exn:vim is available without explicit import.
-
-To avoid clashes with MzScheme, consider using prefix when requiring module,
-e.g.: >
- :mzscheme (require (prefix vim- vimext))
-<
-All the examples below assume this naming scheme.
-
- *mzscheme-sandbox*
-When executed in the |sandbox|, access to some filesystem and Vim interface
-procedures is restricted.
-
-==============================================================================
-2. Examples *mzscheme-examples*
->
- :mzscheme (display "Hello")
- :mz (display (string-append "Using MzScheme version " (version)))
- :mzscheme (require (prefix vim- vimext)) ; for MzScheme < 4.x
- :mzscheme (require (prefix-in vim- 'vimext)) ; MzScheme 4.x
- :mzscheme (vim-set-buff-line 10 "This is line #10")
-<
-Inline script usage: >
- function! <SID>SetFirstLine()
- :mz << EOF
- (display "!!!")
- (require (prefix vim- vimext))
- ; for newer versions (require (prefix-in vim- 'vimext))
- (vim-set-buff-line 1 "This is line #1")
- (vim-beep)
- EOF
- endfunction
-
- nmap <F9> :call <SID>SetFirstLine() <CR>
-<
-File execution: >
- :mzfile supascript.scm
-<
-Vim exception handling: >
- :mz << EOF
- (require (prefix vim- vimext))
- ; for newer versions (require (prefix-in vim- 'vimext))
- (with-handlers
- ([exn:vim? (lambda (e) (display (exn-message e)))])
- (vim-eval "nonsense-string"))
- EOF
-<
-Auto-instantiation of vimext module (can be placed in your |vimrc|): >
- function! MzRequire()
- :redir => l:mzversion
- :mz (version)
- :redir END
- if strpart(l:mzversion, 1, 1) < "4"
- " MzScheme versions < 4.x:
- :mz (require (prefix vim- vimext))
- else
- " newer versions:
- :mz (require (prefix-in vim- 'vimext))
- endif
- endfunction
-
- if has("mzscheme")
- silent call MzRequire()
- endif
-<
-==============================================================================
-3. Threads *mzscheme-threads*
-
-The MzScheme interface supports threads. They are independent from OS threads,
-thus scheduling is required. The option 'mzquantum' determines how often
-Vim should poll for available MzScheme threads.
-NOTE
-Thread scheduling in the console version of Vim is less reliable than in the
-GUI version.
-
-==============================================================================
-4. Vim access from MzScheme *mzscheme-vim*
-
- *mzscheme-vimext*
-The 'vimext' module provides access to procedures defined in the MzScheme
-interface.
-
-Common
-------
- (command {command-string}) Perform the vim ":Ex" style command.
- (eval {expr-string}) Evaluate the vim expression into
- respective MzScheme object: |Lists| are
- represented as Scheme lists,
- |Dictionaries| as hash tables,
- |Funcref|s as functions (see also
- |mzscheme-funcref|)
- NOTE the name clashes with MzScheme eval,
- use module qualifiers to overcome this.
- (range-start) Start/End of the range passed with
- (range-end) the Scheme command.
- (beep) beep
- (get-option {option-name} [buffer-or-window]) Get Vim option value (either
- local or global, see set-option).
- (set-option {string} [buffer-or-window])
- Set a Vim option. String must have option
- setting form (like optname=optval, or
- optname+=optval, etc.) When called with
- {buffer} or {window} the local option will
- be set. The symbol 'global can be passed
- as {buffer-or-window}. Then |:setglobal|
- will be used.
-
-Buffers *mzscheme-buffer*
--------
- (buff? {object}) Is object a buffer?
- (buff-valid? {object}) Is object a valid buffer? (i.e.
- corresponds to the real Vim buffer)
- (get-buff-line {linenr} [buffer])
- Get line from a buffer.
- (set-buff-line {linenr} {string} [buffer])
- Set a line in a buffer. If {string} is #f,
- the line gets deleted. The [buffer]
- argument is optional. If omitted, the
- current buffer will be used.
- (get-buff-line-list {start} {end} [buffer])
- Get a list of lines in a buffer. {Start}
- and {end} are 1-based and inclusive.
- (set-buff-line-list {start} {end} {string-list} [buffer])
- Set a list of lines in a buffer. If
- string-list is #f or null, the lines get
- deleted. If a list is shorter than
- {end}-{start} the remaining lines will
- be deleted.
- (get-buff-name [buffer]) Get a buffer's text name.
- (get-buff-num [buffer]) Get a buffer's number.
- (get-buff-size [buffer]) Get buffer line count.
- (insert-buff-line-list {linenr} {string/string-list} [buffer])
- Insert a list of lines into a buffer after
- {linenr}. If {linenr} is 0, lines will be
- inserted at start.
- (curr-buff) Get the current buffer. Use other MzScheme
- interface procedures to change it.
- (buff-count) Get count of total buffers in the editor.
- (get-next-buff [buffer]) Get next buffer.
- (get-prev-buff [buffer]) Get previous buffer. Return #f when there
- are no more buffers.
- (open-buff {filename}) Open a new buffer (for file "name")
- (get-buff-by-name {buffername}) Get a buffer by its filename or #f
- if there is no such buffer.
- (get-buff-by-num {buffernum}) Get a buffer by its number (return #f if
- there is no buffer with this number).
-
-Windows *mzscheme-window*
-------
- (win? {object}) Is object a window?
- (win-valid? {object}) Is object a valid window (i.e. corresponds
- to the real Vim window)?
- (curr-win) Get the current window.
- (win-count) Get count of windows.
- (get-win-num [window]) Get window number.
- (get-win-by-num {windownum}) Get window by its number.
- (get-win-buffer [window]) Get the buffer for a given window.
- (get-win-height [window])
- (set-win-height {height} [window]) Get/Set height of window.
- (get-win-width [window])
- (set-win-width {width} [window])Get/Set width of window.
- (get-win-list [buffer]) Get list of windows for a buffer.
- (get-cursor [window]) Get cursor position in a window as
- a pair (linenr . column).
- (set-cursor (line . col) [window]) Set cursor position.
-
-==============================================================================
-5. mzeval() Vim function *mzscheme-mzeval*
-
-To facilitate bi-directional interface, you can use |mzeval()| function to
-evaluate MzScheme expressions and pass their values to VimL.
-
-==============================================================================
-6. Using Function references *mzscheme-funcref*
-
-MzScheme interface allows use of |Funcref|s so you can call Vim functions
-directly from Scheme. For instance: >
- function! MyAdd2(arg)
- return a:arg + 2
- endfunction
- mz (define f2 (vim-eval "function(\"MyAdd2\")"))
- mz (f2 7)
-< or : >
- :mz (define indent (vim-eval "function('indent')"))
- " return Vim indent for line 12
- :mz (indent 12)
-<
-
-==============================================================================
-7. Dynamic loading *mzscheme-dynamic* *E815*
-
-On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
-output then includes |+mzscheme/dyn|.
-
-This means that Vim will search for the MzScheme DLL files only when needed.
-When you don't use the MzScheme interface you don't need them, thus you can
-use Vim without these DLL files.
-
-To use the MzScheme interface the MzScheme DLLs must be in your search path.
-In a console window type "path" to see what directories are used.
-
-The names of the DLLs must match the MzScheme version Vim was compiled with.
-For MzScheme version 209 they will be "libmzsch209_000.dll" and
-"libmzgc209_000.dll". To know for sure look at the output of the ":version"
-command, look for -DDYNAMIC_MZSCH_DLL="something" and
--DDYNAMIC_MZGC_DLL="something" in the "Compilation" info.
-
-======================================================================
- vim:tw=78:ts=8:sts=4:ft=help:norl:
diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt
deleted file mode 100644
index 7be5f06f68..0000000000
--- a/runtime/doc/if_perl.txt
+++ /dev/null
@@ -1,294 +0,0 @@
-*if_perl.txt* For Vim version 7.4. Last change: 2013 Oct 05
-
-
- VIM REFERENCE MANUAL by Sven Verdoolaege
- and Matt Gerassimof
-
-Perl and Vim *perl* *Perl*
-
-1. Editing Perl files |perl-editing|
-2. Compiling VIM with Perl interface |perl-compiling|
-3. Using the Perl interface |perl-using|
-4. Dynamic loading |perl-dynamic|
-
-{Vi does not have any of these commands}
-
-The Perl interface only works when Vim was compiled with the |+perl| feature.
-
-==============================================================================
-1. Editing Perl files *perl-editing*
-
-Vim syntax highlighting supports Perl and POD files. Vim assumes a file is
-Perl code if the filename has a .pl or .pm suffix. Vim also examines the first
-line of a file, regardless of the filename suffix, to check if a file is a
-Perl script (see scripts.vim in Vim's syntax directory). Vim assumes a file
-is POD text if the filename has a .POD suffix.
-
-To use tags with Perl, you need a recent version of Exuberant ctags. Look
-here:
- http://ctags.sourceforge.net
-
-Alternatively, you can use the Perl script pltags.pl, which is shipped with
-Vim in the $VIMRUNTIME/tools directory. This script has currently more
-features than Exuberant ctags' Perl support.
-
-==============================================================================
-2. Compiling VIM with Perl interface *perl-compiling*
-
-To compile Vim with Perl interface, you need Perl 5.004 (or later). Perl must
-be installed before you compile Vim. Vim's Perl interface does NOT work with
-the 5.003 version that has been officially released! It will probably work
-with Perl 5.003_05 and later.
-
-The Perl patches for Vim were made by:
- Sven Verdoolaege <skimo@breughel.ufsia.ac.be>
- Matt Gerassimof
-
-Perl for MS-Windows can be found at: http://www.perl.com/
-The ActiveState one should work.
-
-==============================================================================
-3. Using the Perl interface *perl-using*
-
- *:perl* *:pe*
-:pe[rl] {cmd} Execute Perl command {cmd}. The current package
- is "main". Simple example to test if `:perl` is
- working: >
- :perl VIM::Msg("Hello")
-
-:pe[rl] << {endpattern}
-{script}
-{endpattern}
- Execute Perl script {script}.
- {endpattern} must NOT be preceded by any white space.
- If {endpattern} is omitted, it defaults to a dot '.'
- like for the |:append| and |:insert| commands. Using
- '.' helps when inside a function, because "$i;" looks
- like the start of an |:insert| command to Vim.
- This form of the |:perl| command is mainly useful for
- including perl code in vim scripts.
- Note: This command doesn't work when the Perl feature
- wasn't compiled in. To avoid errors, see
- |script-here|.
-
-
-Example vim script: >
-
- function! WhitePearl()
- perl << EOF
- VIM::Msg("pearls are nice for necklaces");
- VIM::Msg("rubys for rings");
- VIM::Msg("pythons for bags");
- VIM::Msg("tcls????");
- EOF
- endfunction
-<
-
- *:perldo* *:perld*
-:[range]perld[o] {cmd} Execute Perl command {cmd} for each line in the
- [range], with $_ being set to the text of each line in
- turn, without a trailing <EOL>. Setting $_ will change
- the text, but note that it is not possible to add or
- delete lines using this command.
- The default for [range] is the whole file: "1,$".
-
-Here are some things you can try: >
-
- :perl $a=1
- :perldo $_ = reverse($_);1
- :perl VIM::Msg("hello")
- :perl $line = $curbuf->Get(42)
-<
- *E299*
-Executing Perl commands in the |sandbox| is limited. ":perldo" will not be
-possible at all. ":perl" will be evaluated in the Safe environment, if
-possible.
-
-
- *perl-overview*
-Here is an overview of the functions that are available to Perl: >
-
- :perl VIM::Msg("Text") # displays a message
- :perl VIM::Msg("Error", "ErrorMsg") # displays an error message
- :perl VIM::Msg("remark", "Comment") # displays a highlighted message
- :perl VIM::SetOption("ai") # sets a vim option
- :perl $nbuf = VIM::Buffers() # returns the number of buffers
- :perl @buflist = VIM::Buffers() # returns array of all buffers
- :perl $mybuf = (VIM::Buffers('qq.c'))[0] # returns buffer object for 'qq.c'
- :perl @winlist = VIM::Windows() # returns array of all windows
- :perl $nwin = VIM::Windows() # returns the number of windows
- :perl ($success, $v) = VIM::Eval('&path') # $v: option 'path', $success: 1
- :perl ($success, $v) = VIM::Eval('&xyz') # $v: '' and $success: 0
- :perl $v = VIM::Eval('expand("<cfile>")') # expands <cfile>
- :perl $curwin->SetHeight(10) # sets the window height
- :perl @pos = $curwin->Cursor() # returns (row, col) array
- :perl @pos = (10, 10)
- :perl $curwin->Cursor(@pos) # sets cursor to @pos
- :perl $curwin->Cursor(10,10) # sets cursor to row 10 col 10
- :perl $mybuf = $curwin->Buffer() # returns the buffer object for window
- :perl $curbuf->Name() # returns buffer name
- :perl $curbuf->Number() # returns buffer number
- :perl $curbuf->Count() # returns the number of lines
- :perl $l = $curbuf->Get(10) # returns line 10
- :perl @l = $curbuf->Get(1 .. 5) # returns lines 1 through 5
- :perl $curbuf->Delete(10) # deletes line 10
- :perl $curbuf->Delete(10, 20) # delete lines 10 through 20
- :perl $curbuf->Append(10, "Line") # appends a line
- :perl $curbuf->Append(10, "Line1", "Line2", "Line3") # appends 3 lines
- :perl @l = ("L1", "L2", "L3")
- :perl $curbuf->Append(10, @l) # appends L1, L2 and L3
- :perl $curbuf->Set(10, "Line") # replaces line 10
- :perl $curbuf->Set(10, "Line1", "Line2") # replaces lines 10 and 11
- :perl $curbuf->Set(10, @l) # replaces 3 lines
-<
- *perl-Msg*
-VIM::Msg({msg}, {group}?)
- Displays the message {msg}. The optional {group}
- argument specifies a highlight group for Vim to use
- for the message.
-
- *perl-SetOption*
-VIM::SetOption({arg}) Sets a vim option. {arg} can be any argument that the
- ":set" command accepts. Note that this means that no
- spaces are allowed in the argument! See |:set|.
-
- *perl-Buffers*
-VIM::Buffers([{bn}...]) With no arguments, returns a list of all the buffers
- in an array context or returns the number of buffers
- in a scalar context. For a list of buffer names or
- numbers {bn}, returns a list of the buffers matching
- {bn}, using the same rules as Vim's internal
- |bufname()| function.
- WARNING: the list becomes invalid when |:bwipe| is
- used. Using it anyway may crash Vim.
-
- *perl-Windows*
-VIM::Windows([{wn}...]) With no arguments, returns a list of all the windows
- in an array context or returns the number of windows
- in a scalar context. For a list of window numbers
- {wn}, returns a list of the windows with those
- numbers.
- WARNING: the list becomes invalid when a window is
- closed. Using it anyway may crash Vim.
-
- *perl-DoCommand*
-VIM::DoCommand({cmd}) Executes Ex command {cmd}.
-
- *perl-Eval*
-VIM::Eval({expr}) Evaluates {expr} and returns (success, value) in list
- context or just value in scalar context.
- success=1 indicates that val contains the value of
- {expr}; success=0 indicates a failure to evaluate
- the expression. '@x' returns the contents of register
- x, '&x' returns the value of option x, 'x' returns the
- value of internal |variables| x, and '$x' is equivalent
- to perl's $ENV{x}. All |functions| accessible from
- the command-line are valid for {expr}.
- A |List| is turned into a string by joining the items
- and inserting line breaks.
-
- *perl-SetHeight*
-Window->SetHeight({height})
- Sets the Window height to {height}, within screen
- limits.
-
- *perl-GetCursor*
-Window->Cursor({row}?, {col}?)
- With no arguments, returns a (row, col) array for the
- current cursor position in the Window. With {row} and
- {col} arguments, sets the Window's cursor position to
- {row} and {col}. Note that {col} is numbered from 0,
- Perl-fashion, and thus is one less than the value in
- Vim's ruler.
-
-Window->Buffer() *perl-Buffer*
- Returns the Buffer object corresponding to the given
- Window.
-
- *perl-Name*
-Buffer->Name() Returns the filename for the Buffer.
-
- *perl-Number*
-Buffer->Number() Returns the number of the Buffer.
-
- *perl-Count*
-Buffer->Count() Returns the number of lines in the Buffer.
-
- *perl-Get*
-Buffer->Get({lnum}, {lnum}?, ...)
- Returns a text string of line {lnum} in the Buffer
- for each {lnum} specified. An array can be passed
- with a list of {lnum}'s specified.
-
- *perl-Delete*
-Buffer->Delete({lnum}, {lnum}?)
- Deletes line {lnum} in the Buffer. With the second
- {lnum}, deletes the range of lines from the first
- {lnum} to the second {lnum}.
-
- *perl-Append*
-Buffer->Append({lnum}, {line}, {line}?, ...)
- Appends each {line} string after Buffer line {lnum}.
- The list of {line}s can be an array.
-
- *perl-Set*
-Buffer->Set({lnum}, {line}, {line}?, ...)
- Replaces one or more Buffer lines with specified
- {lines}s, starting at Buffer line {lnum}. The list of
- {line}s can be an array. If the arguments are
- invalid, replacement does not occur.
-
-$main::curwin
- The current window object.
-
-$main::curbuf
- The current buffer object.
-
-
- *script-here*
-When using a script language in-line, you might want to skip this when the
-language isn't supported. But this mechanism doesn't work: >
- if has('perl')
- perl << EOF
- this will NOT work!
- EOF
- endif
-Instead, put the Perl/Python/Ruby/etc. command in a function and call that
-function: >
- if has('perl')
- function DefPerl()
- perl << EOF
- this works
- EOF
- endfunction
- call DefPerl()
- endif
-Note that "EOF" must be at the start of the line.
-
-==============================================================================
-4. Dynamic loading *perl-dynamic*
-
-On MS-Windows and Unix the Perl library can be loaded dynamically. The
-|:version| output then includes |+perl/dyn|.
-
-This means that Vim will search for the Perl DLL or shared library file only
-when needed. When you don't use the Perl interface you don't need it, thus
-you can use Vim without this file.
-
-
-MS-Windows ~
-
-You can download Perl from http://www.perl.org. The one from ActiveState was
-used for building Vim.
-
-To use the Perl interface the Perl DLL must be in your search path.
-If Vim reports it cannot find the perl512.dll, make sure your $PATH includes
-the directory where it is located. The Perl installer normally does that.
-In a console window type "path" to see what directories are used.
-
-The name of the DLL must match the Perl version Vim was compiled with.
-Currently the name is "perl512.dll". That is for Perl 5.12. To know for
-sure edit "gvim.exe" and search for "perl\d*.dll\c".
-
-==============================================================================
- vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index 4ed8eac742..c2d169283f 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -107,6 +107,29 @@ Here are some examples *python-examples* >
(Note that changes - like the imports - persist from one command to the next,
just like in the Python interpreter.)
+ *script-here*
+When using a script language in-line, you might want to skip this when the
+language isn't supported. Note that this mechanism doesn't work:
+>
+ if has('python')
+ python << EOF
+ this will NOT work!
+ EOF
+ endif
+
+Instead, put the Python command in a function and call that function:
+>
+ if has('python')
+ function DefPython()
+ python << EOF
+ this works
+ EOF
+ endfunction
+ call DefPython()
+ endif
+
+Note that "EOF" must be at the start of the line.
+
==============================================================================
2. The vim module *python-vim*
diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
deleted file mode 100644
index 0a32d87851..0000000000
--- a/runtime/doc/if_ruby.txt
+++ /dev/null
@@ -1,216 +0,0 @@
-*if_ruby.txt* For Vim version 7.4. Last change: 2012 Aug 02
-
-
- VIM REFERENCE MANUAL by Shugo Maeda
-
-The Ruby Interface to Vim *ruby* *Ruby*
-
-
-1. Commands |ruby-commands|
-2. The VIM module |ruby-vim|
-3. VIM::Buffer objects |ruby-buffer|
-4. VIM::Window objects |ruby-window|
-5. Global variables |ruby-globals|
-6. Dynamic loading |ruby-dynamic|
-
-{Vi does not have any of these commands}
- *E266* *E267* *E268* *E269* *E270* *E271* *E272* *E273*
-
-The Ruby interface only works when Vim was compiled with the |+ruby| feature.
-
-The home page for ruby is http://www.ruby-lang.org/. You can find links for
-downloading Ruby there.
-
-==============================================================================
-1. Commands *ruby-commands*
-
- *:ruby* *:rub*
-:rub[y] {cmd} Execute Ruby command {cmd}. A command to try it out: >
- :ruby print "Hello"
-
-:rub[y] << {endpattern}
-{script}
-{endpattern}
- Execute Ruby script {script}.
- {endpattern} must NOT be preceded by any white space.
- If {endpattern} is omitted, it defaults to a dot '.'
- like for the |:append| and |:insert| commands. This
- form of the |:ruby| command is mainly useful for
- including ruby code in vim scripts.
- Note: This command doesn't work when the Ruby feature
- wasn't compiled in. To avoid errors, see
- |script-here|.
-
-Example Vim script: >
-
- function! RedGem()
- ruby << EOF
- class Garnet
- def initialize(s)
- @buffer = VIM::Buffer.current
- vimputs(s)
- end
- def vimputs(s)
- @buffer.append(@buffer.count,s)
- end
- end
- gem = Garnet.new("pretty")
- EOF
- endfunction
-<
-
- *:rubydo* *:rubyd* *E265*
-:[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
- [range], with $_ being set to the text of each line in
- turn, without a trailing <EOL>. Setting $_ will change
- the text, but note that it is not possible to add or
- delete lines using this command.
- The default for [range] is the whole file: "1,$".
-
- *:rubyfile* *:rubyf*
-:rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as
- ":ruby load 'file'", but allows file name completion.
-
-Executing Ruby commands is not possible in the |sandbox|.
-
-==============================================================================
-2. The VIM module *ruby-vim*
-
-Ruby code gets all of its access to vim via the "VIM" module.
-
-Overview >
- print "Hello" # displays a message
- VIM.command(cmd) # execute an Ex command
- num = VIM::Window.count # gets the number of windows
- w = VIM::Window[n] # gets window "n"
- cw = VIM::Window.current # gets the current window
- num = VIM::Buffer.count # gets the number of buffers
- b = VIM::Buffer[n] # gets buffer "n"
- cb = VIM::Buffer.current # gets the current buffer
- w.height = lines # sets the window height
- w.cursor = [row, col] # sets the window cursor position
- pos = w.cursor # gets an array [row, col]
- name = b.name # gets the buffer file name
- line = b[n] # gets a line from the buffer
- num = b.count # gets the number of lines
- b[n] = str # sets a line in the buffer
- b.delete(n) # deletes a line
- b.append(n, str) # appends a line after n
- line = VIM::Buffer.current.line # gets the current line
- num = VIM::Buffer.current.line_number # gets the current line number
- VIM::Buffer.current.line = "test" # sets the current line number
-<
-
-Module Functions:
-
- *ruby-message*
-VIM::message({msg})
- Displays the message {msg}.
-
- *ruby-set_option*
-VIM::set_option({arg})
- Sets a vim option. {arg} can be any argument that the ":set" command
- accepts. Note that this means that no spaces are allowed in the
- argument! See |:set|.
-
- *ruby-command*
-VIM::command({cmd})
- Executes Ex command {cmd}.
-
- *ruby-evaluate*
-VIM::evaluate({expr})
- Evaluates {expr} using the vim internal expression evaluator (see
- |expression|). Returns the expression result as a string.
- A |List| is turned into a string by joining the items and inserting
- line breaks.
-
-==============================================================================
-3. VIM::Buffer objects *ruby-buffer*
-
-VIM::Buffer objects represent vim buffers.
-
-Class Methods:
-
-current Returns the current buffer object.
-count Returns the number of buffers.
-self[{n}] Returns the buffer object for the number {n}. The first number
- is 0.
-
-Methods:
-
-name Returns the name of the buffer.
-number Returns the number of the buffer.
-count Returns the number of lines.
-length Returns the number of lines.
-self[{n}] Returns a line from the buffer. {n} is the line number.
-self[{n}] = {str}
- Sets a line in the buffer. {n} is the line number.
-delete({n}) Deletes a line from the buffer. {n} is the line number.
-append({n}, {str})
- Appends a line after the line {n}.
-line Returns the current line of the buffer if the buffer is
- active.
-line = {str} Sets the current line of the buffer if the buffer is active.
-line_number Returns the number of the current line if the buffer is
- active.
-
-==============================================================================
-4. VIM::Window objects *ruby-window*
-
-VIM::Window objects represent vim windows.
-
-Class Methods:
-
-current Returns the current window object.
-count Returns the number of windows.
-self[{n}] Returns the window object for the number {n}. The first number
- is 0.
-
-Methods:
-
-buffer Returns the buffer displayed in the window.
-height Returns the height of the window.
-height = {n} Sets the window height to {n}.
-width Returns the width of the window.
-width = {n} Sets the window width to {n}.
-cursor Returns a [row, col] array for the cursor position.
-cursor = [{row}, {col}]
- Sets the cursor position to {row} and {col}.
-
-==============================================================================
-5. Global variables *ruby-globals*
-
-There are two global variables.
-
-$curwin The current window object.
-$curbuf The current buffer object.
-
-==============================================================================
-6. Dynamic loading *ruby-dynamic*
-
-On MS-Windows and Unix the Ruby library can be loaded dynamically. The
-|:version| output then includes |+ruby/dyn|.
-
-This means that Vim will search for the Ruby DLL file or shared library only
-when needed. When you don't use the Ruby interface you don't need it, thus
-you can use Vim even though this library file is not on your system.
-
-You need to install the right version of Ruby for this to work. You can find
-the package to download from:
-http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
-Currently that is ruby-1.9.1-p429-i386-mswin32.zip
-
-To use the Ruby interface the Ruby DLL must be in your search path. In a
-console window type "path" to see what directories are used.
-
-The name of the DLL must match the Ruby version Vim was compiled with.
-Currently the name is "msvcrt-ruby191.dll". That is for Ruby 1.9.1. To know
-for sure edit "gvim.exe" and search for "ruby\d*.dll\c".
-
-If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file
-and comment-out the check for _MSC_VER.
-You may also need to rename the include directory name to match the version,
-strangely for Ruby 1.9.3 the directory is called 1.9.1.
-
-==============================================================================
- vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/if_tcl.txt b/runtime/doc/if_tcl.txt
deleted file mode 100644
index d6726a3546..0000000000
--- a/runtime/doc/if_tcl.txt
+++ /dev/null
@@ -1,533 +0,0 @@
-*if_tcl.txt* For Vim version 7.4. Last change: 2012 Aug 02
-
-
- VIM REFERENCE MANUAL by Ingo Wilken
-
-
-The Tcl Interface to Vim *tcl* *Tcl* *TCL*
-
-1. Commands |tcl-ex-commands|
-2. Tcl commands |tcl-commands|
-3. Tcl variables |tcl-variables|
-4. Tcl window commands |tcl-window-cmds|
-5. Tcl buffer commands |tcl-buffer-cmds|
-6. Miscellaneous; Output from Tcl |tcl-misc| |tcl-output|
-7. Known bugs & problems |tcl-bugs|
-8. Examples |tcl-examples|
-9. Dynamic loading |tcl-dynamic|
-
-{Vi does not have any of these commands} *E280* *E281*
-
-The Tcl interface only works when Vim was compiled with the |+tcl| feature.
-
-WARNING: There are probably still some bugs. Please send bug reports,
-comments, ideas etc to <Ingo.Wilken@informatik.uni-oldenburg.de>
-
-==============================================================================
-1. Commands *tcl-ex-commands* *E571* *E572*
-
- *:tcl* *:tc*
-:tc[l] {cmd} Execute Tcl command {cmd}. A simple check if `:tcl`
- is working: >
- :tcl puts "Hello"
-
-:[range]tc[l] << {endmarker}
-{script}
-{endmarker}
- Execute Tcl script {script}.
- Note: This command doesn't work when the Tcl feature
- wasn't compiled in. To avoid errors, see
- |script-here|.
-
-{endmarker} must NOT be preceded by any white space. If {endmarker} is
-omitted from after the "<<", a dot '.' must be used after {script}, like for
-the |:append| and |:insert| commands.
-This form of the |:tcl| command is mainly useful for including tcl code in Vim
-scripts.
-
-Example: >
- function! DefineDate()
- tcl << EOF
- proc date {} {
- return [clock format [clock seconds]]
- }
- EOF
- endfunction
-<
-
- *:tcldo* *:tcld*
-:[range]tcld[o] {cmd} Execute Tcl command {cmd} for each line in [range]
- with the variable "line" being set to the text of each
- line in turn, and "lnum" to the line number. Setting
- "line" will change the text, but note that it is not
- possible to add or delete lines using this command.
- If {cmd} returns an error, the command is interrupted.
- The default for [range] is the whole file: "1,$".
- See |tcl-var-line| and |tcl-var-lnum|. {not in Vi}
-
- *:tclfile* *:tclf*
-:tclf[ile] {file} Execute the Tcl script in {file}. This is the same as
- ":tcl source {file}", but allows file name completion.
- {not in Vi}
-
-
-Note that Tcl objects (like variables) persist from one command to the next,
-just as in the Tcl shell.
-
-Executing Tcl commands is not possible in the |sandbox|.
-
-==============================================================================
-2. Tcl commands *tcl-commands*
-
-Tcl code gets all of its access to vim via commands in the "::vim" namespace.
-The following commands are implemented: >
-
- ::vim::beep # Guess.
- ::vim::buffer {n} # Create Tcl command for one buffer.
- ::vim::buffer list # Create Tcl commands for all buffers.
- ::vim::command [-quiet] {cmd} # Execute an Ex command.
- ::vim::expr {expr} # Use Vim's expression evaluator.
- ::vim::option {opt} # Get vim option.
- ::vim::option {opt} {val} # Set vim option.
- ::vim::window list # Create Tcl commands for all windows.
-
-Commands:
- ::vim::beep *tcl-beep*
- Honk. Does not return a result.
-
- ::vim::buffer {n} *tcl-buffer*
- ::vim::buffer exists {n}
- ::vim::buffer list
- Provides access to vim buffers. With an integer argument, creates a
- buffer command (see |tcl-buffer-cmds|) for the buffer with that
- number, and returns its name as the result. Invalid buffer numbers
- result in a standard Tcl error. To test for valid buffer numbers,
- vim's internal functions can be used: >
- set nbufs [::vim::expr bufnr("$")]
- set isvalid [::vim::expr "bufexists($n)"]
-< The "list" option creates a buffer command for each valid buffer, and
- returns a list of the command names as the result.
- Example: >
- set bufs [::vim::buffer list]
- foreach b $bufs { $b append end "The End!" }
-< The "exists" option checks if a buffer with the given number exists.
- Example: >
- if { [::vim::buffer exists $n] } { ::vim::command ":e #$n" }
-< This command might be replaced by a variable in future versions.
- See also |tcl-var-current| for the current buffer.
-
- ::vim::command {cmd} *tcl-command*
- ::vim::command -quiet {cmd}
- Execute the vim (ex-mode) command {cmd}. Any Ex command that affects
- a buffer or window uses the current buffer/current window. Does not
- return a result other than a standard Tcl error code. After this
- command is completed, the "::vim::current" variable is updated.
- The "-quiet" flag suppresses any error messages from vim.
- Examples: >
- ::vim::command "set ts=8"
- ::vim::command "%s/foo/bar/g"
-< To execute normal-mode commands, use "normal" (see |:normal|): >
- set cmd "jj"
- ::vim::command "normal $cmd"
-< See also |tcl-window-command| and |tcl-buffer-command|.
-
- ::vim::expr {expr} *tcl-expr*
- Evaluates the expression {expr} using vim's internal expression
- evaluator (see |expression|). Any expression that queries a buffer
- or window property uses the current buffer/current window. Returns
- the result as a string. A |List| is turned into a string by joining
- the items and inserting line breaks.
- Examples: >
- set perl_available [::vim::expr has("perl")]
-< See also |tcl-window-expr| and |tcl-buffer-expr|.
-
- ::vim::option {opt} *tcl-option*
- ::vim::option {opt} {value}
- Without second argument, queries the value of a vim option. With this
- argument, sets the vim option to {value}, and returns the previous
- value as the result. Any options that are marked as 'local to buffer'
- or 'local to window' affect the current buffer/current window. The
- global value is not changed, use the ":set" command for that. For
- boolean options, {value} should be "0" or "1", or any of the keywords
- "on", "off" or "toggle". See |option-summary| for a list of options.
- Example: >
- ::vim::option ts 8
-< See also |tcl-window-option| and |tcl-buffer-option|.
-
- ::vim::window {option} *tcl-window*
- Provides access to vim windows. Currently only the "list" option is
- implemented. This creates a window command (see |tcl-window-cmds|) for
- each window, and returns a list of the command names as the result.
- Example: >
- set wins [::vim::window list]
- foreach w $wins { $w height 4 }
-< This command might be replaced by a variable in future versions.
- See also |tcl-var-current| for the current window.
-
-==============================================================================
-3. Tcl variables *tcl-variables*
-
-The ::vim namespace contains a few variables. These are created when the Tcl
-interpreter is called from vim and set to current values. >
-
- ::vim::current # array containing "current" objects
- ::vim::lbase # number of first line
- ::vim::range # array containing current range numbers
- line # current line as a string (:tcldo only)
- lnum # current line number (:tcldo only)
-
-Variables:
- ::vim::current *tcl-var-current*
- This is an array providing access to various "current" objects
- available in vim. The contents of this array are updated after
- "::vim::command" is called, as this might change vim's current
- settings (e.g., by deleting the current buffer).
- The "buffer" element contains the name of the buffer command for the
- current buffer. This can be used directly to invoke buffer commands
- (see |tcl-buffer-cmds|). This element is read-only.
- Example: >
- $::vim::current(buffer) insert begin "Hello world"
-< The "window" element contains the name of the window command for the
- current window. This can be used directly to invoke window commands
- (see |tcl-window-cmds|). This element is read-only.
- Example: >
- $::vim::current(window) height 10
-<
- ::vim::lbase *tcl-var-lbase*
- This variable controls how Tcl treats line numbers. If it is set to
- '1', then lines and columns start at 1. This way, line numbers from
- Tcl commands and vim expressions are compatible. If this variable is
- set to '0', then line numbers and columns start at 0 in Tcl. This is
- useful if you want to treat a buffer as a Tcl list or a line as a Tcl
- string and use standard Tcl commands that return an index ("lsort" or
- "string first", for example). The default value is '1'. Currently,
- any non-zero values is treated as '1', but your scripts should not
- rely on this. See also |tcl-linenumbers|.
-
- ::vim::range *tcl-var-range*
- This is an array with three elements, "start", "begin" and "end". It
- contains the line numbers of the start and end row of the current
- range. "begin" is the same as "start". This variable is read-only.
- See |tcl-examples|.
-
- line *tcl-var-line*
- lnum *tcl-var-lnum*
- These global variables are only available if the ":tcldo" Ex command
- is being executed. They contain the text and line number of the
- current line. When the Tcl command invoked by ":tcldo" is completed,
- the current line is set to the contents of the "line" variable, unless
- the variable was unset by the Tcl command. The "lnum" variable is
- read-only. These variables are not in the "::vim" namespace so they
- can be used in ":tcldo" without much typing (this might be changed in
- future versions). See also |tcl-linenumbers|.
-
-==============================================================================
-4. Tcl window commands *tcl-window-cmds*
-
-Window commands represent vim windows. They are created by several commands:
- ::vim::window list |tcl-window|
- "windows" option of a buffer command |tcl-buffer-windows|
-The ::vim::current(window) variable contains the name of the window command
-for the current window. A window command is automatically deleted when the
-corresponding vim window is closed.
-
-Let's assume the name of the window command is stored in the Tcl variable "win",
-i.e. "$win" calls the command. The following options are available: >
-
- $win buffer # Create Tcl command for window's buffer.
- $win command {cmd} # Execute Ex command in windows context.
- $win cursor # Get current cursor position.
- $win cursor {var} # Set cursor position from array variable.
- $win cursor {row} {col} # Set cursor position.
- $win delcmd {cmd} # Call Tcl command when window is closed.
- $win expr {expr} # Evaluate vim expression in windows context.
- $win height # Report the window's height.
- $win height {n} # Set the window's height.
- $win option {opt} [val] # Get/Set vim option in windows context.
-
-Options:
- $win buffer *tcl-window-buffer*
- Creates a Tcl command for the window's buffer, and returns its name as
- the result. The name should be stored in a variable: >
- set buf [$win buffer]
-< $buf is now a valid Tcl command. See |tcl-buffer-cmds| for the
- available options.
-
- $win cursor *tcl-window-cursor*
- $win cursor {var}
- $win cursor {row} {col}
- Without argument, reports the current cursor position as a string.
- This can be converted to a Tcl array variable: >
- array set here [$win cursor]
-< "here(row)" and "here(column)" now contain the cursor position.
- With a single argument, the argument is interpreted as the name of a
- Tcl array variable, which must contain two elements "row" and "column".
- These are used to set the cursor to the new position: >
- $win cursor here ;# not $here !
-< With two arguments, sets the cursor to the specified row and column: >
- $win cursor $here(row) $here(column)
-< Invalid positions result in a standard Tcl error, which can be caught
- with "catch". The row and column values depend on the "::vim::lbase"
- variable. See |tcl-var-lbase|.
-
- $win delcmd {cmd} *tcl-window-delcmd*
- Registers the Tcl command {cmd} as a deletion callback for the window.
- This command is executed (in the global scope) just before the window
- is closed. Complex commands should be build with "list": >
- $win delcmd [list puts vimerr "window deleted"]
-< See also |tcl-buffer-delcmd|.
-
- $win height *tcl-window-height*
- $win height {n}
- Without argument, reports the window's current height. With an
- argument, tries to set the window's height to {n}, then reports the
- new height (which might be different from {n}).
-
- $win command [-quiet] {cmd} *tcl-window-command*
- $win expr {expr} *tcl-window-expr*
- $win option {opt} [val] *tcl-window-option*
- These are similar to "::vim::command" etc., except that everything is
- done in the context of the window represented by $win, instead of the
- current window. For example, setting an option that is marked 'local
- to window' affects the window $win. Anything that affects or queries
- a buffer uses the buffer displayed in this window (i.e. the buffer
- that is represented by "$win buffer"). See |tcl-command|, |tcl-expr|
- and |tcl-option| for more information.
- Example: >
- $win option number on
-
-==============================================================================
-5. Tcl buffer commands *tcl-buffer-cmds*
-
-Buffer commands represent vim buffers. They are created by several commands:
- ::vim::buffer {N} |tcl-buffer|
- ::vim::buffer list |tcl-buffer|
- "buffer" option of a window command |tcl-window-buffer|
-The ::vim::current(buffer) variable contains the name of the buffer command
-for the current buffer. A buffer command is automatically deleted when the
-corresponding vim buffer is destroyed. Whenever the buffer's contents are
-changed, all marks in the buffer are automatically adjusted. Any changes to
-the buffer's contents made by Tcl commands can be undone with the "undo" vim
-command (see |undo|).
-
-Let's assume the name of the buffer command is stored in the Tcl variable "buf",
-i.e. "$buf" calls the command. The following options are available: >
-
- $buf append {n} {str} # Append a line to buffer, after line {n}.
- $buf command {cmd} # Execute Ex command in buffers context.
- $buf count # Report number of lines in buffer.
- $buf delcmd {cmd} # Call Tcl command when buffer is deleted.
- $buf delete {n} # Delete a single line.
- $buf delete {n} {m} # Delete several lines.
- $buf expr {expr} # Evaluate vim expression in buffers context.
- $buf get {n} # Get a single line as a string.
- $buf get {n} {m} # Get several lines as a list.
- $buf insert {n} {str} # Insert a line in buffer, as line {n}.
- $buf last # Report line number of last line in buffer.
- $buf mark {mark} # Report position of buffer mark.
- $buf name # Report name of file in buffer.
- $buf number # Report number of this buffer.
- $buf option {opt} [val] # Get/Set vim option in buffers context.
- $buf set {n} {text} # Replace a single line.
- $buf set {n} {m} {list} # Replace several lines.
- $buf windows # Create Tcl commands for buffer's windows.
-<
- *tcl-linenumbers*
-Most buffer commands take line numbers as arguments. How Tcl treats these
-numbers depends on the "::vim::lbase" variable (see |tcl-var-lbase|). Instead
-of line numbers, several keywords can be also used: "top", "start", "begin",
-"first", "bottom", "end" and "last".
-
-Options:
- $buf append {n} {str} *tcl-buffer-append*
- $buf insert {n} {str} *tcl-buffer-insert*
- Add a line to the buffer. With the "insert" option, the string
- becomes the new line {n}, with "append" it is inserted after line {n}.
- Example: >
- $buf insert top "This is the beginning."
- $buf append end "This is the end."
-< To add a list of lines to the buffer, use a loop: >
- foreach line $list { $buf append $num $line ; incr num }
-<
- $buf count *tcl-buffer-count*
- Reports the total number of lines in the buffer.
-
- $buf delcmd {cmd} *tcl-buffer-delcmd*
- Registers the Tcl command {cmd} as a deletion callback for the buffer.
- This command is executed (in the global scope) just before the buffer
- is deleted. Complex commands should be build with "list": >
- $buf delcmd [list puts vimerr "buffer [$buf number] gone"]
-< See also |tcl-window-delcmd|.
-
- $buf delete {n} *tcl-buffer-delete*
- $buf delete {n} {m}
- Deletes line {n} or lines {n} through {m} from the buffer.
- This example deletes everything except the last line: >
- $buf delete first [expr [$buf last] - 1]
-<
- $buf get {n} *tcl-buffer-get*
- $buf get {n} {m}
- Gets one or more lines from the buffer. For a single line, the result
- is a string; for several lines, a list of strings.
- Example: >
- set topline [$buf get top]
-<
- $buf last *tcl-buffer-last*
- Reports the line number of the last line. This value depends on the
- "::vim::lbase" variable. See |tcl-var-lbase|.
-
- $buf mark {mark} *tcl-buffer-mark*
- Reports the position of the named mark as a string, similar to the
- cursor position of the "cursor" option of a window command (see
- |tcl-window-cursor|). This can be converted to a Tcl array variable: >
- array set mpos [$buf mark "a"]
-< "mpos(column)" and "mpos(row)" now contain the position of the mark.
- If the mark is not set, a standard Tcl error results.
-
- $buf name
- Reports the name of the file in the buffer. For a buffer without a
- file, this is an empty string.
-
- $buf number
- Reports the number of this buffer. See |:buffers|.
- This example deletes a buffer from vim: >
- ::vim::command "bdelete [$buf number]"
-<
- $buf set {n} {string} *tcl-buffer-set*
- $buf set {n} {m} {list}
- Replace one or several lines in the buffer. If the list contains more
- elements than there are lines to replace, they are inserted into the
- buffer. If the list contains fewer elements, any unreplaced line is
- deleted from the buffer.
-
- $buf windows *tcl-buffer-windows*
- Creates a window command for each window that displays this buffer, and
- returns a list of the command names as the result.
- Example: >
- set winlist [$buf windows]
- foreach win $winlist { $win height 4 }
-< See |tcl-window-cmds| for the available options.
-
- $buf command [-quiet] {cmd} *tcl-buffer-command*
- $buf expr {expr} *tcl-buffer-expr*
- $buf option {opt} [val] *tcl-buffer-option*
- These are similar to "::vim::command" etc., except that everything is
- done in the context of the buffer represented by $buf, instead of the
- current buffer. For example, setting an option that is marked 'local
- to buffer' affects the buffer $buf. Anything that affects or queries
- a window uses the first window in vim's window list that displays this
- buffer (i.e. the first entry in the list returned by "$buf windows").
- See |tcl-command|, |tcl-expr| and |tcl-option| for more information.
- Example: >
- if { [$buf option modified] } { $buf command "w" }
-
-==============================================================================
-6. Miscellaneous; Output from Tcl *tcl-misc* *tcl-output*
-
-The standard Tcl commands "exit" and "catch" are replaced by custom versions.
-"exit" terminates the current Tcl script and returns to vim, which deletes the
-Tcl interpreter. Another call to ":tcl" then creates a new Tcl interpreter.
-"exit" does NOT terminate vim! "catch" works as before, except that it does
-not prevent script termination from "exit". An exit code != 0 causes the ex
-command that invoked the Tcl script to return an error.
-
-Two new I/O streams are available in Tcl, "vimout" and "vimerr". All output
-directed to them is displayed in the vim message area, as information messages
-and error messages, respectively. The standard Tcl output streams stdout and
-stderr are mapped to vimout and vimerr, so that a normal "puts" command can be
-used to display messages in vim.
-
-==============================================================================
-7. Known bugs & problems *tcl-bugs*
-
-Calling one of the Tcl Ex commands from inside Tcl (via "::vim::command") may
-have unexpected side effects. The command creates a new interpreter, which
-has the same abilities as the standard interpreter - making "::vim::command"
-available in a safe child interpreter therefore makes the child unsafe. (It
-would be trivial to block nested :tcl* calls or ensure that such calls from a
-safe interpreter create only new safe interpreters, but quite pointless -
-depending on vim's configuration, "::vim::command" may execute arbitrary code
-in any number of other scripting languages.) A call to "exit" within this new
-interpreter does not affect the old interpreter; it only terminates the new
-interpreter, then script processing continues normally in the old interpreter.
-
-Input from stdin is currently not supported.
-
-==============================================================================
-8. Examples: *tcl-examples*
-
-Here are a few small (and maybe useful) Tcl scripts.
-
-This script sorts the lines of the entire buffer (assume it contains a list
-of names or something similar):
- set buf $::vim::current(buffer)
- set lines [$buf get top bottom]
- set lines [lsort -dictionary $lines]
- $buf set top bottom $lines
-
-This script reverses the lines in the buffer. Note the use of "::vim::lbase"
-and "$buf last" to work with any line number setting.
- set buf $::vim::current(buffer)
- set t $::vim::lbase
- set b [$buf last]
- while { $t < $b } {
- set tl [$buf get $t]
- set bl [$buf get $b]
- $buf set $t $bl
- $buf set $b $tl
- incr t
- incr b -1
- }
-
-This script adds a consecutive number to each line in the current range:
- set buf $::vim::current(buffer)
- set i $::vim::range(start)
- set n 1
- while { $i <= $::vim::range(end) } {
- set line [$buf get $i]
- $buf set $i "$n\t$line"
- incr i ; incr n
- }
-
-The same can also be done quickly with two Ex commands, using ":tcldo":
- :tcl set n 1
- :[range]tcldo set line "$n\t$line" ; incr n
-
-This procedure runs an Ex command on each buffer (idea stolen from Ron Aaron):
- proc eachbuf { cmd } {
- foreach b [::vim::buffer list] {
- $b command $cmd
- }
- }
-Use it like this:
- :tcl eachbuf %s/foo/bar/g
-Be careful with Tcl's string and backslash substitution, tough. If in doubt,
-surround the Ex command with curly braces.
-
-
-If you want to add some Tcl procedures permanently to vim, just place them in
-a file (e.g. "~/.vimrc.tcl" on Unix machines), and add these lines to your
-startup file (usually "~/.vimrc" on Unix):
- if has("tcl")
- tclfile ~/.vimrc.tcl
- endif
-
-==============================================================================
-9. Dynamic loading *tcl-dynamic*
-
-On MS-Windows the Tcl library can be loaded dynamically. The |:version|
-output then includes |+tcl/dyn|.
-
-This means that Vim will search for the Tcl DLL file only when needed. When
-you don't use the Tcl interface you don't need it, thus you can use Vim
-without this DLL file.
-
-To use the Tcl interface the Tcl DLL must be in your search path. In a
-console window type "path" to see what directories are used.
-
-The name of the DLL must match the Tcl version Vim was compiled with.
-Currently the name is "tcl83.dll". That is for Tcl 8.3. To know for sure
-edit "gvim.exe" and search for "tcl\d*.dll\c".
-
-==============================================================================
- vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 3eedb234f3..dfa4086488 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1325,9 +1325,6 @@ tag command action ~
|:ltag| :lt[ag] jump to tag and add matching tags to the
location list
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
-|:lua| :lua execute |Lua| command
-|:luado| :luad[o] execute Lua command for each line
-|:luafile| :luaf[ile] execute |Lua| script file
|:lvimgrep| :lv[imgrep] search for pattern in files
|:lvimgrepadd| :lvimgrepa[dd] like :vimgrep, but append to current list
|:lwindow| :lw[indow] open or close location window
@@ -1348,8 +1345,6 @@ tag command action ~
|:mkvimrc| :mkv[imrc] write current mappings and settings to a file
|:mkview| :mkvie[w] write view of current window to a file
|:mode| :mod[e] show or change the screen mode
-|:mzscheme| :mz[scheme] execute MzScheme command
-|:mzfile| :mzf[ile] execute MzScheme script file
|:next| :n[ext] go to next file in the argument list
|:new| :new create a new empty window
|:nmap| :nm[ap] like ":map" but for Normal mode
@@ -1382,13 +1377,11 @@ tag command action ~
|:ownsyntax| :ow[nsyntax] set new local syntax highlight for this window
|:pclose| :pc[lose] close preview window
|:pedit| :ped[it] edit file in the preview window
-|:perl| :pe[rl] execute Perl command
|:print| :p[rint] print lines
|:profdel| :profd[el] stop profiling a function or script
|:profile| :prof[ile] profiling functions and scripts
|:promptfind| :pro[mptfind] open GUI dialog for searching
|:promptrepl| :promptr[epl] open GUI dialog for search/replace
-|:perldo| :perld[o] execute Perl command for each line
|:pop| :po[p] jump to older entry in tag stack
|:popup| :popu[p] popup a menu by name
|:ppop| :pp[op] ":pop" in preview window
@@ -1429,9 +1422,6 @@ tag command action ~
|:rewind| :rew[ind] go to the first file in the argument list
|:right| :ri[ght] right align text
|:rightbelow| :rightb[elow] make split window appear right or below
-|:ruby| :rub[y] execute Ruby command
-|:rubydo| :rubyd[o] execute Ruby command for each line
-|:rubyfile| :rubyf[ile] execute Ruby script file
|:rundo| :rund[o] read undo information from a file
|:runtime| :ru[ntime] source vim scripts in 'runtimepath'
|:rviminfo| :rv[iminfo] read from viminfo file
@@ -1534,9 +1524,6 @@ tag command action ~
|:tab| :tab create new tab when opening new window
|:tag| :ta[g] jump to tag
|:tags| :tags show the contents of the tag stack
-|:tcl| :tc[l] execute Tcl command
-|:tcldo| :tcld[o] execute Tcl command for each line
-|:tclfile| :tclf[ile] execute Tcl script file
|:tearoff| :te[aroff] tear-off a menu
|:tfirst| :tf[irst] jump to first matching tag
|:throw| :th[row] throw an exception
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index c4c21f9175..e008fa12fe 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1421,9 +1421,9 @@ automatically switch to HTML/CSS/JavaScript completion. Note: contrary to
original HTML files completion of tags (and only tags) isn't context aware.
-RUBY *ft-ruby-omni*
+RUBY *ft-ruby-omni* {Nvim}
-Completion of Ruby code requires that vim be built with |+ruby|.
+NOTE: Completion for ruby code is not currently provided by Nvim.
Ruby completion will parse your buffer on demand in order to provide a list of
completions. These completions will be drawn from modules loaded by 'require'
@@ -1444,7 +1444,7 @@ The completions provided by CTRL-X CTRL-O are sensitive to the context:
Notes:
- Vim will load/evaluate code in order to provide completions. This may
- cause some code execution, which may be a concern. This is no longer
+ cause some code execution, which may be a concern. This is no longer
enabled by default, to enable this feature add >
let g:rubycomplete_buffer_loading = 1
<- In context 1 above, Vim can parse the entire buffer to add a list of
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index 70f20a155b..bd236536c0 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -315,10 +315,9 @@ generate this message. This could be caused by a |-m| commandline argument.
You can switch the 'write' option on with ":set write".
*E25* >
- GUI cannot be used: Not enabled at compile time
+ Nvim does not have a built-in GUI
-You are running a version of Vim that doesn't include the GUI code. Therefore
-"gvim" and ":gui" don't work.
+Neovim does not have a built in GUI, so |:gvim| and |:gui| don't work.
*E49* >
Invalid scroll size
@@ -522,7 +521,7 @@ for about 14 levels. When more nesting is done, Vim assumes that there is a
recursive loop somewhere and stops with this error message.
*E319* >
- Sorry, the command is not available in this version
+ The command is not available in this version
You have used a command that is not present in the version of Vim you are
using. When compiling Vim, many different features can be enabled or
diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt
index f3fcd069c4..b6142e2234 100644
--- a/runtime/doc/msgpack_rpc.txt
+++ b/runtime/doc/msgpack_rpc.txt
@@ -116,6 +116,12 @@ functions can be called interactively:
>>> nvim = attach('socket', path='[address]')
>>> nvim.command('echo "hello world!"')
<
+One can also spawn and connect to an embedded nvim instance via |rpcstart()|
+>
+ let vim = rpcstart('nvim', ['--embed'])
+ echo rpcrequest(vim, 'vim_eval', '"Hello " . "world!"')
+ call rpcstop(vim)
+<
==============================================================================
4. Implementing new clients *msgpack-rpc-clients*
@@ -177,6 +183,10 @@ Buffer -> enum value kObjectTypeBuffer
Window -> enum value kObjectTypeWindow
Tabpage -> enum value kObjectTypeTabpage
+An API method expecting one of these types may be passed an integer instead,
+although they are not interchangeable. For example, a Buffer may be passed as
+an integer, but not a Window or Tabpage.
+
The most reliable way of determining the type codes for the special nvim types
is at runtime by inspecting the `types` key of metadata dictionary returned by
`vim_get_api_info` method. Here's an example json representation of the
@@ -216,7 +226,7 @@ that makes this task easier:
- Methods that operate instances of Nvim's types are prefixed with the type
name in lower case, e.g. `buffer_get_line` represents the `get_line` method
of a Buffer instance.
-- Global methods are prefixed with `vim`, e.g. `vim_list_buffers`.
+- Global methods are prefixed with `vim`, e.g. `vim_get_buffers`.
So, for an object-oriented language, a client library would have the classes
that represent Nvim's types, and the methods of each class could be defined
diff --git a/runtime/doc/nvim_python.txt b/runtime/doc/nvim_python.txt
index 531036d567..bafcf047dd 100644
--- a/runtime/doc/nvim_python.txt
+++ b/runtime/doc/nvim_python.txt
@@ -35,7 +35,7 @@ Most Python plugins created for Vim 7.3 should work after these steps.
*g:python_host_prog*
-To point Nvim to a specific Python interpreter, set `g:python_host_prog`:
+To point Nvim to a specific Python interpreter, set |g:python_host_prog|:
>
let g:python_host_prog='/path/to/python'
<
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt
index 160242a7fa..850391200e 100644
--- a/runtime/doc/nvim_terminal_emulator.txt
+++ b/runtime/doc/nvim_terminal_emulator.txt
@@ -99,16 +99,13 @@ variables (set via the |TermOpen| autocmd):
- `{g,b}:terminal_color_$NUM`: The terminal color palette, where `$NUM` is the
color index, between 0 and 255 inclusive. This only affects UIs with RGB
capabilities; for normal terminals the color index is simply forwarded.
-- `{g,b}:terminal_focused_cursor_highlight`: Highlight group applied to the
- cursor in a focused terminal. The default equivalent to having a group with
- `cterm=reverse` `gui=reverse``.
-- `{g,b}:terminal_unfocused_cursor_highlight`: Highlight group applied to the
- cursor in an unfocused terminal. The default equivalent to having a group with
- `ctermbg=11` `guibg=#fce94f``.
The configuration variables are only processed when the terminal starts, which
is why it needs to be done with the |TermOpen| autocmd or setting global
variables before the terminal is started.
+The terminal cursor can be highlighted via |hl-TermCursor| and
+|hl-TermCursorNC|.
+
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index c0f1888d84..6090dd6cb0 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3651,17 +3651,19 @@ A jump table for the options with a short description can be found at |Q_op|.
*'highlight'* *'hl'*
'highlight' 'hl' string (default (as a single string):
- "8:SpecialKey,~:EndOfBuffer,@:NonText,i
- d:Directory,e:ErrorMsg,i:IncSearch,
- l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
+ "8:SpecialKey,~:EndOfBuffer,z:TermCursor,
+ Z:TermCursorNC,@:NonText,d:Directory,
+ e:ErrorMsg,i:IncSearch,l:Search,
+ m:MoreMsg,M:ModeMsg,n:LineNr,
N:CursorLineNr,r:Question,s:StatusLine,
S:StatusLineNC,c:VertSplit,t:Title,
- v:Visual,w:WarningMsg,W:WildMenu,f:Folded,
- F:FoldColumn,A:DiffAdd,C:DiffChange,
- D:DiffDelete,T:DiffText,>:SignColumn,
- B:SpellBad,P:SpellCap,R:SpellRare,
- L:SpellLocal,-:Conceal,+:Pmenu,=:PmenuSel,
- x:PmenuSbar,X:PmenuThumb")
+ v:Visual,w:WarningMsg,W:WildMenu,
+ f:Folded,F:FoldColumn,A:DiffAdd,
+ C:DiffChange,D:DiffDelete,T:DiffText,
+ >:SignColumn,B:SpellBad,P:SpellCap,
+ R:SpellRare,L:SpellLocal,-:Conceal,
+ +:Pmenu,=:PmenuSel,x:PmenuSbar,
+ X:PmenuThumb")
global
{not in Vi}
This option can be used to set highlighting mode for various
@@ -3670,6 +3672,8 @@ A jump table for the options with a short description can be found at |Q_op|.
use for that occasion. The occasions are:
|hl-SpecialKey| 8 Meta and special keys listed with ":map"
|hl-EndOfBuffer| ~ lines after the last line in the buffer
+ |hl-TermCursor| z Cursor in a focused terminal
+ |hl-TermCursorNC| Z Cursor in an unfocused terminal
|hl-NonText| @ '@' at the end of the window and
characters from 'showbreak'
|hl-Directory| d directories in CTRL-D listing and other special
@@ -3681,7 +3685,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|hl-LineNr| n line number for ":number" and ":#" commands, and
when 'number' or 'relativenumber' option is set.
- |hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is
+ |hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is
set.
|hl-Question| r |hit-enter| prompt and yes/no questions
|hl-StatusLine| s status line of current window |status-line|
@@ -4949,15 +4953,6 @@ A jump table for the options with a short description can be found at |Q_op|.
time in msec between two mouse clicks for the second click to be
recognized as a multi click.
- *'mzquantum'* *'mzq'*
-'mzquantum' 'mzq' number (default 100)
- global
- {not in Vi}
- {not available when compiled without the |+mzscheme|
- feature}
- The number of milliseconds between polls for MzScheme threads.
- Negative or zero value means no thread scheduling.
-
*'nrformats'* *'nf'*
'nrformats' 'nf' string (default "octal,hex")
local to buffer
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 1554b823eb..5e0aa8021f 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -793,7 +793,6 @@ Short explanation of each option: *option-list*
'mousemodel' 'mousem' changes meaning of mouse buttons
'mouseshape' 'mouses' shape of the mouse pointer in different modes
'mousetime' 'mouset' max time between mouse double-click
-'mzquantum' 'mzq' the interval between polls for MzScheme threads
'nrformats' 'nf' number formats recognized for CTRL-A command
'number' 'nu' print the line number in front of each line
'numberwidth' 'nuw' number of columns used for the line number
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 19289dafec..6415b4203f 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -3221,16 +3221,10 @@ The g:vimsyn_embed option allows users to select what, if any, types of
embedded script highlighting they wish to have. >
g:vimsyn_embed == 0 : don't embed any scripts
- g:vimsyn_embed =~ 'm' : support embedded mzscheme
- g:vimsyn_embed =~ 'p' : support embedded perl
g:vimsyn_embed =~ 'P' : support embedded python
- g:vimsyn_embed =~ 'r' : support embedded ruby
- g:vimsyn_embed =~ 't' : support embedded tcl
<
By default, g:vimsyn_embed is a string supporting interpreters that your vim
-itself supports. Concatenate multiple characters to support multiple types
-of embedded interpreters; ie. g:vimsyn_embed= "mp" supports embedded mzscheme
-and embedded perl.
+itself supports.
*g:vimsyn_folding*
Some folding is now supported with syntax/vim.vim: >
@@ -3238,11 +3232,7 @@ Some folding is now supported with syntax/vim.vim: >
g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding
g:vimsyn_folding =~ 'a' : augroups
g:vimsyn_folding =~ 'f' : fold functions
- g:vimsyn_folding =~ 'm' : fold mzscheme script
- g:vimsyn_folding =~ 'p' : fold perl script
g:vimsyn_folding =~ 'P' : fold python script
- g:vimsyn_folding =~ 'r' : fold ruby script
- g:vimsyn_folding =~ 't' : fold tcl script
<
*g:vimsyn_noerror*
Not all error highlighting that syntax/vim.vim does may be correct; VimL is a
@@ -4763,6 +4753,10 @@ DiffText diff mode: Changed text within a changed line |diff.txt|
{Nvim} *hl-EndOfBuffer*
EndOfBuffer filler lines (~) after the end of the buffer.
By default, this is highlighted like |hl-NonText|.
+ {Nvim} *hl-TermCursor*
+TermCursor cursor in a focused terminal
+ {Nvim} *hl-TermCursorNC*
+TermCursorNC cursor in an unfocused terminal
*hl-ErrorMsg*
ErrorMsg error messages on the command line
*hl-VertSplit*
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt
index 90aa20e8b4..e1d02da292 100644
--- a/runtime/doc/tips.txt
+++ b/runtime/doc/tips.txt
@@ -26,7 +26,6 @@ Change a name in multiple files |change-name|
Speeding up external commands |speed-up|
Useful mappings |useful-mappings|
Compressing the help files |gzip-helpfile|
-Executing shell commands in a window |shell-window|
Hex editing |hex-editing|
Using <> notation in autocommands |autocmd-<>|
Highlighting matching parens |match-parens|
@@ -406,20 +405,6 @@ when they are not in the same location as the compressed "doc" directory. See
|$VIMRUNTIME|.
==============================================================================
-Executing shell commands in a window *shell-window*
-
-There have been questions for the possibility to execute a shell in a window
-inside Vim. The answer: you can't! Including this would add a lot of code to
-Vim, which is a good reason not to do this. After all, Vim is an editor, it
-is not supposed to do non-editing tasks. However, to get something like this,
-you might try splitting your terminal screen or display window with the
-"splitvt" program. You can probably find it on some ftp server. The person
-that knows more about this is Sam Lantinga <slouken@cs.ucdavis.edu>.
-An alternative is the "window" command, found on BSD Unix systems, which
-supports multiple overlapped windows. Or the "screen" program, found at
-www.uni-erlangen.de, which supports a stack of windows.
-
-==============================================================================
Hex editing *hex-editing* *using-xxd*
See section |23.4| of the user manual.
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index f66bc961f0..73dea6293d 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -849,8 +849,6 @@ Results in E670. (Tony Mechelynck, 2010 May 2)
'beval' option should be global-local.
-Ruby: ":ruby print $buffer.number" returns zero.
-
setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
7 The 'directory' option supports changing path separators to "%" to make
@@ -1186,8 +1184,6 @@ still delete them. Also convert all buffer file names?
Update src/testdir/main.aap.
-"vim -c 'sniff connect'" hangs Vim. (Dominique Pelle, 2008 Dec 7)
-
Something wrong with session that has "cd" commands and "badd", in such a way
that Vim doesn't find the edited file in the buffer list, causing the
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
@@ -1604,9 +1600,6 @@ error. without --remote-silent it works fine. (Ben Fritz, 2008 Jun 20)
Gvim: dialog for closing Vim should check if Vim is busy writing a file. Then
use a different dialog: "busy saving, really quit? yes / no".
-Check other interfaces for changing curbuf in a wrong way. Patch like for
-if_ruby.c.
-
":helpgrep" should use the directory from 'helpfile'.
The need_fileinfo flag is messy. Instead make the message right away and put
@@ -2689,7 +2682,6 @@ Problems that will (probably) not be solved:
XtOpenDisplay() prints this directly, there is no way to avoid it.
- X windows: Setting 'guifontset' to an illegal value sometimes crashes Vim.
This is caused by a fault in a X library function, can't be solved in Vim.
-- Win32 tcl: has("tcl") hangs when the tcl84.dll is from cygwin.
- Motif: When adding a menu item "Find this &Symbol", the "s" in "this" will
be underlined, instead of in "Symbol". Motif doesn't let us specify which
character gets the highlighting.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 4db0af07a5..90b4ba7a9d 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -914,8 +914,6 @@ Various: *various-functions*
taglist() get list of matching tags
tagfiles() get a list of tags files
- luaeval() evaluate Lua expression
- mzeval() evaluate |MzScheme| expression
py3eval() evaluate Python expression (|+python3|)
pyeval() evaluate Python expression (|+python|)
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index d138fcf456..fe3915a561 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -279,7 +279,6 @@ g8 Print the hex values of the bytes used in the
< The screen is not redrawn then, thus you have to use
CTRL-L or ":redraw!" if the command did display
something.
- Also see |shell-window|.
*:!!*
:!! Repeat last ":!{cmd}".
@@ -364,8 +363,6 @@ N *+lispindent* |'lisp'|
N *+listcmds* Vim commands for the list of buffers |buffer-hidden|
and argument list |:argdelete|
N *+localmap* Support for mappings local to a buffer |:map-local|
-m *+lua* |Lua| interface
-m *+lua/dyn* |Lua| interface |/dyn|
N *+menu* |:menu|
N *+mksession* |:mksession|
N *+modify_fname* |filename-modifiers|
@@ -381,11 +378,7 @@ N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
N *+multi_byte* 16 and 32 bit characters |multibyte|
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
N *+multi_lang* non-English language support |multi-lang|
-m *+mzscheme* Mzscheme interface |mzscheme|
-m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
N *+path_extra* Up/downwards search in 'path' and 'tags'
-m *+perl* Perl interface |perl|
-m *+perl/dyn* Perl interface |perl-dynamic| |/dyn|
N *+persistent_undo* Persistent undo |undo-persistence|
*+postscript* |:hardcopy| writes a PostScript file
N *+printer* |:hardcopy| command
@@ -398,8 +391,6 @@ N *+quickfix* |:make| and |quickfix| commands
N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
'redrawtime' option
B *+rightleft* Right to left typing |'rightleft'|
-m *+ruby* Ruby interface |ruby|
-m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
N *+scrollbind* |'scrollbind'|
B *+signs* |:sign|
N *+smartindent* |'smartindent'|
@@ -411,8 +402,6 @@ N *+syntax* Syntax highlighting |syntax|
N *+tag_binary* binary searching in tags file |tag-binary-search|
N *+tag_old_static* old method for static tags |tag-old-static|
m *+tag_any_white* any white space allowed in tags file |tag-any-white|
-m *+tcl* Tcl interface |tcl|
-m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
*+terminfo* uses |terminfo| instead of termcap
N *+termresponse* support for |t_RV| and |v:termresponse|
N *+textobjects* |text-objects| selection
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index 9b1657fd09..7661652ac3 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -401,8 +401,7 @@ Scripts and Expressions. |expression|
|:try| Catch exceptions.
etc., etc. See |eval|.
Debugging and profiling are supported. |debug-scripts| |profile|
- If this is not enough, an interface is provided to |Python|, |Ruby|,
- |Tcl|, |Lua|, |Perl| and |MzScheme|.
+ If this is not enough, an interface is provided to |Python|.
Viminfo. |viminfo-file|
The command-line history, marks and registers can be stored in a file
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 328e1eda75..94514d7b03 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -68,6 +68,8 @@ Events:
Highlight groups:
- |hl-EndOfBuffer|
+- |hl-TermCursor|
+- |hl-TermCursorNC|
==============================================================================
5. Missing legacy features *nvim-features-missing*
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 92ded381d0..395d6d9b46 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -1251,10 +1251,6 @@ call append("$", "\t(local to buffer)")
call <SID>BinOptionL("bl")
call append("$", "debug\tset to \"msg\" to see all error messages")
call append("$", " \tset debug=" . &debug)
-if has("mzscheme")
- call append("$", "mzquantum\tinterval in milliseconds between polls for MzScheme threads")
- call append("$", " \tset mzq=" . &mzq)
-endif
set cpo&vim
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 8ad6b2819f..aadc3371f3 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -17,12 +17,12 @@ set cpo&vim
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
-syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
-syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
-syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
-syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
-syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
-syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q
+syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
+syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
+syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
+syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] mak[e] mes mkv nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
+syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] ma[rk] messages mkvie[w] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
+syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q
syn match vimCommand contained "\<z[-+^.=]\="
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
@@ -31,8 +31,8 @@ syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir
syn keyword vimOption contained ai ambw ari aw backupext beval brk buflisted cdpath cin cinwords cocu compatible cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rl ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa wd wi wildignorecase window winwidth wmw writeany
syn keyword vimOption contained akm anti arshape awa backupskip bex browsedir buftype cedit cindent clipboard cole complete crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt report rlc ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts tx undolevels vbs viewdir wak weirdinvert wic wildmenu winfixheight wiv wop writebackup
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re restorescreen rnu rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl uc undoreload vdir viewoptions warn wfh wig wildmode winfixwidth wiw wrap writedelay
-syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wfw wildchar wildoptions winheight wm wrapmargin ws
-syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev patchmode ph preserveindent printheader pvh redrawtime ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc wh wildcharm wim winminheight wmh wrapscan ww
+syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses nuw opfunc patchexpr pfn popt printfont pumheight readonly revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wfw wildchar wildoptions winheight wm wrapmargin ws
+syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape odev patchmode ph preserveindent printheader pvh redrawtime ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc wh wildcharm wim winminheight wmh wrapscan ww
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf pa path pheader previewheight printmbcharset pvw regexpengine rightleft rtp sbo scrolljump sel shell shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur unnamedclip unc verbosefile visualbell
" vimOptions: These are the turn-off setting variants {{{2
@@ -62,18 +62,18 @@ syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
" AutoCmd Events {{{2
syn case ignore
-syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave JobActivity MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TabNew TabNewEntered TabClosed TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
+syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TabNew TabNewEntered TabClosed TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
" Default highlighting groups {{{2
-syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
+syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel TermCursor TermCursorNC Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
-syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setpos setreg settabwinvar sha256 shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
+syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime mapcheck matcharg matchlist min or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setpos setreg settabwinvar sha256 shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
syn keyword vimFuncName contained acos append argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setmatches setqflist settabvar setwinvar shellescape simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode winbufnr winheight winnr winrestview winwidth xor
syn keyword vimFuncName contained add argc asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client jobsend jobstart jobstop rpcnotify rpcrequest rpcstart rpcstop
@@ -550,14 +550,9 @@ syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' e
" Allows users to specify the type of embedded script highlighting
" they want: (perl/python/ruby/tcl support)
" g:vimsyn_embed == 0 : don't embed any scripts
-" g:vimsyn_embed ~= 'l' : embed lua (but only if vim supports it)
-" g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it)
-" g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it)
" g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it)
-" g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it)
-" g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it)
if !exists("g:vimsyn_embed")
- let g:vimsyn_embed= "lmpPr"
+ let g:vimsyn_embed= "P"
endif
" [-- lua --] {{{3
@@ -570,21 +565,9 @@ if !filereadable(s:luapath)
endif
endfor
endif
-if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath)
- unlet! b:current_syntax
- exe "syn include @vimLuaScript ".s:luapath
- if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l'
- syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
- syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript
- else
- syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
- syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript
- endif
- syn cluster vimFuncBodyList add=vimLuaRegion
-else
- syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+
-endif
+
+syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+
+syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+
unlet s:luapath
" [-- perl --] {{{3
@@ -597,21 +580,9 @@ if !filereadable(s:perlpath)
endif
endfor
endif
-if (g:vimsyn_embed =~ 'p' && has("perl")) && filereadable(s:perlpath)
- unlet! b:current_syntax
- exe "syn include @vimPerlScript ".s:perlpath
- if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'p'
- syn region vimPerlRegion fold matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript
- syn region vimPerlRegion fold matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript
- else
- syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript
- syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript
- endif
- syn cluster vimFuncBodyList add=vimPerlRegion
-else
- syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+
-endif
+
+syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+
+syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+
unlet s:perlpath
" [-- ruby --] {{{3
@@ -624,20 +595,9 @@ if !filereadable(s:rubypath)
endif
endfor
endif
-if (g:vimsyn_embed =~ 'r' && has("ruby")) && filereadable(s:rubypath)
- unlet! b:current_syntax
- exe "syn include @vimRubyScript ".s:rubypath
- if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'r'
- syn region vimRubyRegion fold matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript
- else
- syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript
- endif
- syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript
- syn cluster vimFuncBodyList add=vimRubyRegion
-else
- syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+
-endif
+
+syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+
+syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+
unlet s:rubypath
" [-- python --] {{{3
@@ -684,22 +644,11 @@ if s:trytcl
endif
endfor
endif
- if (g:vimsyn_embed =~ 't' && has("tcl")) && filereadable(s:tclpath)
- unlet! b:current_syntax
- exe "syn include @vimTclScript ".s:tclpath
- if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 't'
- syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
- syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
- else
- syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
- syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
- endif
- syn cluster vimFuncBodyList add=vimTclScript
- else
- syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
- endif
+
+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
+ syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
unlet s:tclpath
+
else
syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
@@ -716,23 +665,9 @@ if !filereadable(s:mzschemepath)
endif
endfor
endif
-if (g:vimsyn_embed =~ 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
- unlet! b:current_syntax
- let iskKeep= &isk
- exe "syn include @vimMzSchemeScript ".s:mzschemepath
- let &isk= iskKeep
- if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'm'
- syn region vimMzSchemeRegion fold matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
- syn region vimMzSchemeRegion fold matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
- else
- syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
- syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
- endif
- syn cluster vimFuncBodyList add=vimMzSchemeRegion
-else
- syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+
-endif
+
+syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+
+syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+
unlet s:mzschemepath
" Synchronize (speed) {{{2
diff --git a/runtime/tools/README.txt b/runtime/tools/README.txt
deleted file mode 100644
index 19976b325c..0000000000
--- a/runtime/tools/README.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-Some tools that can be used with Vim:
-
-blink.c: C program to make the cursor blink in an xterm.
-
-ccfilter*: C program to filter the output of a few compilers to a common
- QuickFix format.
-
-efm_filter.*: Perl script to filter compiler messages to QuickFix format.
-
-efm_perl.pl: Perl script to filter error messages from the Perl interpreter
- for use with Vim quickfix mode.
-
-mve.* Awk script to filter error messages to QuickFix format.
-
-pltags.pl: Perl script to create a tags file from Perl scripts.
-
-ref: Shell script for the K command.
-
-shtags.*: Perl script to create a tags file from a shell script.
-
-vim132: Shell script to edit in 132 column mode on vt100 compatible
- terminals.
-
-vimm: Shell script to start Vim on a DEC terminal with mouse
- enabled.
-
-vimspell.*: Shell script for highlighting spelling mistakes.
-
-vim_vs_net.cmd: MS-Windows command file to use Vim with MS Visual Studio 7 and
- later.
-
-xcmdsrv_client.c: Example for a client program that communicates with a Vim
- server through the X-Windows interface.
-
-unicode.vim Vim script to generate tables for src/mbyte.c.
-
-[xxd can be found in the src directory]
diff --git a/runtime/tools/blink.c b/runtime/tools/blink.c
deleted file mode 100644
index 1ffd848edc..0000000000
--- a/runtime/tools/blink.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * An extremely simple program to make the cursor blink in an xterm.
- * This is useful when the cursor is hard to spot in a highlighted file.
- * Start in the background: "blink&" Stop by killing it.
- * Bram Moolenaar 980109 (based on an idea from John Lange).
- */
-
-#include <stdio.h>
-
-main()
-{
- while (1)
- {
- printf("\e[?25h");
- fflush(stdout);
- usleep(400000); /* on time */
- printf("\e[?25l");
- fflush(stdout);
- usleep(250000); /* off time */
- }
-}
diff --git a/runtime/tools/ccfilter.1 b/runtime/tools/ccfilter.1
deleted file mode 100644
index e3de38da1f..0000000000
--- a/runtime/tools/ccfilter.1
+++ /dev/null
@@ -1,93 +0,0 @@
-.TH ccfilter 1 "01-Apr-97"
-.SH NAME
-ccfilter \- a compiler's output filter for vim quickfix
-.SH SYNOPSIS
-ccfilter [
-.B <options>
-]
-.SH DESCRIPTION
-The ccfilter utility "filters" the output of several compilers
-and makers (make/gmake) from several platforms (see NOTES below)
-to a standardized format which easily fits in vim's quickfix
-feature. For further details, see in vim ":help quickfix".
-.PP
-ccfilter reads
-.B 'stdin'
-and outputs to
-.B 'stdout'
-\.
-.PP
-The need for ccfilter is clear, as some compilers have irregular
-and/or multiple line error messages (with the relevant information on
-line 2), which makes it impossible for the errorformat to correctly
-display them !
-
-When working on different platforms, and with different compilers,
-ccfilter eases the utilization of quickfix, due to it's standardized
-output, allowing to have in .vimrc a plain
-.br
-.B \ \ \ \ :set\ errorformat=%f:%l:%c:%t:%m
-
-.SH USAGE
-When using ccfilter, one would include the following lines in .vimrc:
-.br
-.B \ \ \ \ :set shellpipe=\\\\|&ccfilter\\\\>
-.br
-.B \ \ \ \ :set errorformat=%f:%l:%c:%t:%m
-
-.SH OPTIONS
-.TP 16
--c
-Decrement column by one. This may be needed, depending on
-the compiler being used.
-.TP
--r
-Decrement row by one. This may be needed, depending on
-the compiler being used.
-.TP
--v
-Verbose (Outputs also invalid lines).
-This option makes ccfilter output also the lines that
-couldn't be correctly parsed. This is used mostly for
-ccfilter debugging.
-.TP
--o <COMPILER>
-Treat input as <COMPILER>'s output.
-Even when configuring ccfilter to assume a default
-COMPILER, sometimes it's helpful to be able to specify
-the COMPILER used to generate ccfilter's input.
-For example, when cross-compiling on a network from a
-single machine.
-.TP
--h
-Shows a brief help, describing the configured default COMPILER
-and the valid parameters for COMPILER.
-
-.SH NOTES
-Currently, ccfilter accepts output from several compilers, as
-described below:
-.TP 10
-GCC
-GCC compiler
-.TP
-AIX
-AIX's C compiler
-.TP
-ATT
-AT&T/NCR's High Performance C Compiler
-.TP
-IRIX
-IRIX's MIPS/MIPSpro C compiler
-.TP
-SOLARIS
-SOLARIS's SparcWorks C compiler
-.TP
-HPUX
-HPUX's C compiler
-
-.SH AUTHOR
-.B ccfilter
-was developed by
-.B Pablo Ariel Kohan
-.BR
-.B mailto:pablo@memco.co.il
diff --git a/runtime/tools/ccfilter.c b/runtime/tools/ccfilter.c
deleted file mode 100644
index 270333910f..0000000000
--- a/runtime/tools/ccfilter.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/* ======================================================================= */
-/* Project : VIM */
-/* Module : ccfilter Version: 02.01.01 */
-/* File : ccfilter.c */
-/* Purpose : Filter gmake/cc output into a standardized form */
-/* ======================================================================= */
-/* Created On: 12-Sep-95 20:32 */
-/* Last modification: 03-Feb-98 */
-/* -e option added by Bernd Feige */
-/* ======================================================================= */
-/* Copyright : */
-/* This source file is copyright (c) to Pablo Ariel Kohan */
-/* ======================================================================= */
-#define __CCFILTER_C__
-
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#define LINELENGTH 2048
-
-/* Collector(s) */
-char Line[LINELENGTH];
-char Line2[LINELENGTH];
-/* Components */
-char FileName[1024];
-char BasePath[1024];
-char CWD[1024];
-unsigned long Row;
-unsigned long Col;
-char Severity;
-char Reason[LINELENGTH];
-
-#define COMPILER_UNKNOWN 0
-#define COMPILER_GCC 1
-#define COMPILER_AIX 2
-#define COMPILER_ATT 3
-#define COMPILER_IRIX 4
-#define COMPILER_SOLARIS 5
-#define COMPILER_HPUX 6
-
-char *COMPILER_Names[][2] =
- {
- /* Name Description */
- { "N/A", "" },
- { "GCC", "GCC compiler" },
- { "AIX", "AIX's C compiler" },
- { "ATT", "AT&T/NCR's High Performance C Compiler" },
- { "IRIX", "IRIX's MIPS/MIPSpro C compiler" },
- { "SOLARIS", "SOLARIS's SparcWorks C compiler" },
- { "HPUX", "HPUX's C compiler" }
- };
-#define COMPILER_QTY (sizeof(COMPILER_Names)/sizeof(COMPILER_Names[0]))
-
-#if defined(_GCC)
-# define COMPILER_DEFAULT COMPILER_GCC
-#elif defined(_AIX)
-# define COMPILER_DEFAULT COMPILER_AIX
-#elif defined(_ATT)
-# define COMPILER_DEFAULT COMPILER_ATT
-#elif defined(_IRIX)
-# define COMPILER_DEFAULT COMPILER_IRIX
-#elif defined(_SOLARIS)
-# define COMPILER_DEFAULT COMPILER_SOLARIS
-#elif defined(_HPUX)
-# define COMPILER_DEFAULT COMPILER_HPUX
-#else
-# define COMPILER_DEFAULT COMPILER_UNKNOWN
-#endif
-
-const char USAGE[] =
-"ccfilter v2.1 (c)1994-1997 by Pablo Ariel Kohan\n"
-"Filter Out compiler's output, and converts it to fit VIM\n\n"
-"Usage:\n"
-" ccfilter [<options>]\n"
-"Where: <options> is one or more of:\n"
-" -c Decrement column by one\n"
-" -r Decrement row by one\n"
-" -e Echo stdin to stderr\n"
-" -v Verbose (Outputs also invalid lines)\n"
-" -o <COMPILER> Treat input as <COMPILER>'s output\n"
-" Note: COMPILER may be preceded by an _\n"
-" -h This usage.\n";
-
-
-int ShowUsage( char *szError )
-{ int i;
-
- fprintf( stderr, USAGE );
-
- fprintf( stderr, "Current default <COMPILER>: %s\n",
- COMPILER_Names[COMPILER_DEFAULT][0] );
-
- fprintf( stderr, "Acceptable parameters for <COMPILER> are:\n" );
- for (i=1; i < COMPILER_QTY; i++)
- fprintf( stderr, " %-15.15s %s\n",
- COMPILER_Names[i][0],
- COMPILER_Names[i][1] );
- fprintf(stderr, szError);
- return 0;
-}
-
-char *echogets(char *s, int echo) {
- char * const retval=fgets(s, LINELENGTH, stdin);
- if (echo!=0 && retval!=NULL) {
- fputs(retval, stderr);
- }
- return retval;
-}
-
-int main( int argc, char *argv[] )
-{ int rv, i, j, ok;
- int stay;
- int prefetch;
- char *p;
- int dec_col = 0; /* Decrement column value by 1 */
- int dec_row = 0; /* Decrement row value by 1 */
- int echo = 0; /* Echo stdin to stderr */
- int verbose = 0; /* Include Bad Formatted Lines */
- int CWDlen;
- int COMPILER = COMPILER_DEFAULT;
-
- getcwd( CWD, sizeof(CWD) );
- CWDlen = strlen(CWD);
-
- for (i=1; i<argc; i++)
- {
- if (argv[i][0] != '-')
- return ShowUsage("");
- switch ( argv[i][1] )
- {
- case 'c':
- dec_col = 1;
- break;
- case 'r':
- dec_row = 1;
- break;
- case 'e':
- echo = 1;
- break;
- case 'v':
- verbose = 1;
- break;
- case 'o':
- {
- if (i+1 >= argc)
- return ShowUsage("Error: Missing parameter for -o\n");
- i++;
- COMPILER = -1;
- for (j=1; j<COMPILER_QTY; j++)
- if ( (strcmp(argv[i], COMPILER_Names[j][0]) == 0) ||
- ( (argv[i][0] == '_') &&
- (strcmp(&argv[i][1], COMPILER_Names[j][0]) == 0) ) )
- COMPILER = j;
- if (COMPILER == -1)
- return ShowUsage("Error: Invalid COMPILER specified\n");
- }
- break;
- case 'h':
- return ShowUsage("");
- default:
- return ShowUsage("Error: Invalid option\n");
- }
- }
- if (COMPILER == 0)
- return ShowUsage("Error: COMPILER must be specified in this system\n");
-
- stay = ( echogets(Line, echo) != NULL );
- prefetch = 0;
-
- while( stay )
- {
- *FileName = 0;
- Row = 0;
- Col = 0;
- Severity = ' ';
- *Reason = 0;
- ok = 0;
- switch (COMPILER)
- {
- case COMPILER_GCC:
- Severity = 'e';
-#ifdef GOTO_FROM_WHERE_INCLUDED
- rv = sscanf( Line, "In file included from %[^:]:%u:",
- FileName, &Row );
- if ( rv == 2 )
- {
- ok = (echogets(Reason, echo) != NULL);
- }
- else
-#endif
- {
- if ((rv = sscanf( Line, "%[^:]:%u: warning: %[^\n]",
- FileName, &Row, Reason ))==3) {
- Severity = 'w';
- } else {
- rv = sscanf( Line, "%[^:]:%u: %[^\n]",
- FileName, &Row, Reason );
- }
- ok = ( rv == 3 );
- }
- Col = (dec_col ? 1 : 0 );
- break;
- case COMPILER_AIX:
- rv = sscanf( Line, "\"%[^\"]\", line %u.%u: %*s (%c) %[^\n]",
- FileName, &Row, &Col, &Severity, Reason );
- ok = ( rv == 5 );
- break;
- case COMPILER_HPUX:
- rv = sscanf( Line, "cc: \"%[^\"]\", line %u: %c%*[^:]: %[^\n]",
- FileName, &Row, &Severity, Reason );
- ok = ( rv == 4 );
- Col = (dec_col ? 1 : 0 );
- break;
- case COMPILER_SOLARIS:
- rv = sscanf( Line, "\"%[^\"]\", line %u: warning: %[^\n]",
- FileName, &Row, Reason );
- Severity = 'w';
- ok = ( rv == 3 );
- if ( rv != 3 )
- {
- rv = sscanf( Line, "\"%[^\"]\", line %u: %[^\n]",
- FileName, &Row, Reason );
- Severity = 'e';
- ok = ( rv == 3 );
- }
- Col = (dec_col ? 1 : 0 );
- break;
- case COMPILER_ATT:
- rv = sscanf( Line, "%c \"%[^\"]\",L%u/C%u%*[^:]:%[^\n]",
- &Severity, FileName, &Row, &Col, Reason );
- ok = ( rv == 5 );
-
- if (rv != 5)
- { rv = sscanf( Line, "%c \"%[^\"]\",L%u/C%u: %[^\n]",
- &Severity, FileName, &Row, &Col, Reason );
- ok = ( rv == 5 );
- }
-
- if (rv != 5)
- { rv = sscanf( Line, "%c \"%[^\"]\",L%u: %[^\n]",
- &Severity, FileName, &Row, Reason );
- ok = ( rv == 4 );
- Col = (dec_col ? 1 : 0 );
- }
-
- stay = (echogets(Line2, echo) != NULL);
- while ( stay && (Line2[0] == '|') )
- { for (p=&Line2[2]; (*p) && (isspace(*p)); p++);
- strcat( Reason, ": " );
- strcat( Reason, p );
- Line2[0] = 0;
- stay = (echogets(Line2, echo) != NULL);
- }
- prefetch = 1;
- strcpy( Line, Line2 );
- break;
- case COMPILER_IRIX:
- Col = 1;
- prefetch = 0;
- rv = 0;
- ok = 0;
- if ( !strncmp(Line, "cfe: ", 5) )
- { p = &Line[5];
- Severity = tolower(*p);
- p = strchr( &Line[5], ':' );
- if (p == NULL)
- { ok = 0;
- }
- else
- {
- rv = sscanf( p+2, "%[^:]: %u: %[^\n]",
- FileName, &Row, Reason );
- if (rv != 3)
- rv = sscanf( p+2, "%[^,], line %u: %[^\n]",
- FileName, &Row, Reason );
- ok = ( rv == 3 );
- }
-
- if (ok)
- { prefetch = 1;
- stay = (echogets(Line, echo) != NULL);
- if (Line[0] == ' ')
- stay = (echogets(Line2, echo) != NULL);
- if ( (Line2[0] == ' ') &&
- ( (Line2[1] == '-') || (Line2[1] == '^') ) )
- { Col = strlen(Line2)-1;
- prefetch = 0;
- }
- else
- { strcat( Line, "\n" );
- strcat( Line, Line2 );
- }
- }
- }
- break;
- }
- if (dec_col) Col--;
- if (dec_row) Row--;
- if (!ok)
- {
- if ( Line[0] == 'g' )
- p = &Line[1];
- else
- p = &Line[0];
- ok = sscanf( p, "make[%*d]: Entering directory `%[^']",
- BasePath );
- if (verbose)
- printf( "[%u]?%s\n", ok, Line );
- }
- else
- {
- for (p=Reason; (*p) && (isspace(*p)); p++);
- if ( BasePath[CWDlen] == 0 )
- printf( "%s:%u:%u:%c:%s\n", FileName, Row, Col, Severity, p );
- else
- {
- printf( "%s/%s:%u:%u:%c:%s\n", &BasePath[CWDlen+1], FileName, Row, Col, Severity, p );
- }
- }
- if (!prefetch)
- stay = ( echogets(Line, echo) != NULL );
- }
- return 0;
-}
diff --git a/runtime/tools/ccfilter_README.txt b/runtime/tools/ccfilter_README.txt
deleted file mode 100644
index 3c12a8c89b..0000000000
--- a/runtime/tools/ccfilter_README.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-COMPILING AND INSTALLING:
-=========================
-
-To compile ccfilter, you can just do a plain:
- cc ccfilter.c -o ccfilter
-Though, it may be wise to have your default compiler defined,
-so you would normally compile it with one of the following:
- cc -D_GCC ccfilter.c -o ccfilter
- cc -D_AIX ccfilter.c -o ccfilter
- cc -D_ATT ccfilter.c -o ccfilter
- cc -D_IRIX ccfilter.c -o ccfilter
- cc -D_SOLARIS ccfilter.c -o ccfilter
- cc -D_HPUX ccfilter.c -o ccfilter
-You can then copy ccfilter to its target destination (i.e: /usr/local/bin).
-The man page ccfilter.1 has to be copied to somewhere in your MANPATH,
-under a man1 directory (i.e: /usr/local/man/man1).
-
-
-SUPPORTED COMPILERS/PORTING NOTES:
-==================================
-
-The supported formats for the different compilers are described below:
-In this section, meta-names are used as place-holders in the line
-formats: <FILE> <ROW> <COL> <SEVERITY> <REASON> <>
-The <> denotes ignored text.
-Line formats are delimited by the ^ (caret) symbol.
-
-0) Special case: "gmake directory change" lines:
- Lines with a format like:
- ^gmake[<NUM>]: Entering directory `<DIR>'^
- are used to follow the directory changes during the make process,
- providing in the <FILE> part, a relative (if possible) directory
- path to the erroneous file.
-
-
-1) GCC:
- Recognized lines are of the format:
- - ^In file included from <FILE>:<ROW>:^
- Line following this one is used as <REASON>
- <SEVERITY> is always 'e' (error)
- <COL> is always '0'
-
- - ^<FILE>:<ROW>:<REASON>^
- <SEVERITY> is always 'e' (error)
- <COL> is always '0'
-
-
-2) AIX:
- Recognized lines are of the format:
- - ^"<FILE>", line <ROW>.<COL>: <> (<SEVERITY>) <REASON>",
-
-
-3) HPUX:
- Recognized lines are of the format:
- - ^cc: "<FILE>", line <ROW>: <SEVERITY>: <REASON>^
- <COL> is always '0'
-
-
-4) SOLARIS:
- Recognized lines are of the format:
- - ^"<FILE>", line <ROW>: warning: <REASON>^
- This assumes <SEVERITY> is "W"
- <COL> is always '0'
-
- - ^"<FILE>", line <ROW>: <REASON>^
- This assumes <SEVERITY> is "E"
- <COL> is always '0'
-
-
-5) ATT / NCR:
- Recognized lines are of the format:
- - ^<SEVERITY> "<FILE>",L<ROW>/C<COL><>:<REASON>^
- or
- - ^<SEVERITY> "<FILE>",L<ROW>/C<COL>:<REASON>^
- Following lines beginning with a pipe (|) are continuation
- lines, and are therefore appended to the <REASON>
-
- - ^<SEVERITY> "<FILE>",L<ROW>:<REASON>^
- <COL> is '0'
- Following lines beginning with a pipe (|) are continuation
- lines, and are therefore appended to the <REASON>
-
-
-6) SGI-IRIX:
- Recognized lines are of the format:
- - ^cfe: <SEVERITY>: <FILE>: <ROW>: <REASON>^
- or
- ^cfe: <SEVERITY>: <FILE>, line <ROW>: <REASON>^
- Following lines beginning with a dash (-) are "column-bar"
- that end with a caret in the column of the error. These lines
- are analyzed to generate the <COL>.
diff --git a/runtime/tools/efm_filter.pl b/runtime/tools/efm_filter.pl
deleted file mode 100755
index 1d1a4f303b..0000000000
--- a/runtime/tools/efm_filter.pl
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env perl
-#
-# This program works as a filter that reads from stdin, copies to
-# stdout *and* creates an error file that can be read by vim.
-#
-# This program has only been tested on SGI, Irix5.3.
-#
-# Written by Ives Aerts in 1996. This little program is not guaranteed
-# to do (or not do) anything at all and can be freely used for
-# whatever purpose you can think of.
-
-$args = @ARGV;
-
-unless ($args == 1) {
- die("Usage: vimccparse <output filename>\n");
-}
-
-$filename = @ARGV[0];
-open (OUT, ">$filename") || die ("Can't open file: \"$filename\"");
-
-while (<STDIN>) {
- print;
- if ( (/"(.*)", line (\d+): (e)rror\((\d+)\):/)
- || (/"(.*)", line (\d+): (w)arning\((\d+)\):/) ) {
- $file=$1;
- $line=$2;
- $errortype="\u$3";
- $errornr=$4;
- chop($errormsg=<STDIN>);
- $errormsg =~ s/^\s*//;
- $sourceline=<STDIN>;
- $column=index(<STDIN>, "^") - 1;
-
- print OUT "$file>$line:$column:$errortype:$errornr:$errormsg\n";
- }
-}
-
-close(OUT);
-exit(0);
diff --git a/runtime/tools/efm_filter.txt b/runtime/tools/efm_filter.txt
deleted file mode 100644
index d3f97f45ad..0000000000
--- a/runtime/tools/efm_filter.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-[adopted from a message that Ives posted in the Vim mailing list]
-
-Some compilers produce an error message that cannot be handled with
-'errorformat' in Vim. Following is an example of a Perl script that
-translates one error message into something that Vim understands.
-
-
-The compiler that generates this kind of error messages (4 lines):
-
-"/tmp_mnt/cm/src/apertos/MoU/MetaCore/MetaCore/common/src/MetaCoreImp_M.cc",
-line 50: error(3114):
- identifier "PRIMITIVE_M" is undefined
- return(ExecuteCore(PRIMITIVE_M,
-
-You can find a small perl program at the end.
-The way I use it is:
-
-:set errorformat=%f>%l:%c:%t:%n:%m
-:set makeprg=clearmake\ -C\ gnu
-:set shellpipe=2>&1\|\ vimccparse
-
-If somebody thinks this is useful: feel free to do whatever you can think
-of with this code.
-
--Ives
-____________________________________________________________
-Ives Aerts (SW Developer) Sony Telecom Europe
-ives@sonytel.be St.Stevens Woluwestr. 55
-`Death could create most things, B-1130 Brussels, Belgium
- except for plumbing.' PHONE : +32 2 724 19 67
- (Soul Music - T.Pratchett) FAX : +32 2 726 26 86
diff --git a/runtime/tools/efm_perl.pl b/runtime/tools/efm_perl.pl
deleted file mode 100755
index 1aab2d4ea0..0000000000
--- a/runtime/tools/efm_perl.pl
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/usr/bin/perl -w
-
-# vimparse.pl - Reformats the error messages of the Perl interpreter for use
-# with the quickfix mode of Vim
-#
-# Copyright (c) 2001 by Joerg Ziefle <joerg.ziefle@gmx.de>
-# You may use and distribute this software under the same terms as Perl itself.
-#
-# Usage: put one of the two configurations below in your ~/.vimrc (without the
-# description and '# ') and enjoy (be sure to adjust the paths to vimparse.pl
-# before):
-#
-# Program is run interactively with 'perl -w':
-#
-# set makeprg=$HOME/bin/vimparse.pl\ %\ $*
-# set errorformat=%f:%l:%m
-#
-# Program is only compiled with 'perl -wc':
-#
-# set makeprg=$HOME/bin/vimparse.pl\ -c\ %\ $*
-# set errorformat=%f:%l:%m
-#
-# Usage:
-# vimparse.pl [-c] [-f <errorfile>] <programfile> [programargs]
-#
-# -c compile only, don't run (perl -wc)
-# -f write errors to <errorfile>
-#
-# Example usages:
-# * From the command line:
-# vimparse.pl program.pl
-#
-# vimparse.pl -c -f errorfile program.pl
-# Then run vim -q errorfile to edit the errors with Vim.
-#
-# * From Vim:
-# Edit in Vim (and save, if you don't have autowrite on), then
-# type ':mak' or ':mak args' (args being the program arguments)
-# to error check.
-#
-# Version history:
-# 0.2 (04/12/2001):
-# * First public version (sent to Bram)
-# * -c command line option for compiling only
-# * grammatical fix: 'There was 1 error.'
-# * bug fix for multiple arguments
-# * more error checks
-# * documentation (top of file, &usage)
-# * minor code clean ups
-# 0.1 (02/02/2001):
-# * Initial version
-# * Basic functionality
-#
-# Todo:
-# * test on more systems
-# * use portable way to determine the location of perl ('use Config')
-# * include option that shows perldiag messages for each error
-# * allow to pass in program by STDIN
-# * more intuitive behaviour if no error is found (show message)
-#
-# Tested under SunOS 5.7 with Perl 5.6.0. Let me know if it's not working for
-# you.
-
-use strict;
-use Getopt::Std;
-
-use vars qw/$opt_c $opt_f $opt_h/; # needed for Getopt in combination with use strict 'vars'
-
-use constant VERSION => 0.2;
-
-getopts('cf:h');
-
-&usage if $opt_h; # not necessarily needed, but good for further extension
-
-if (defined $opt_f) {
-
- open FILE, "> $opt_f" or do {
- warn "Couldn't open $opt_f: $!. Using STDOUT instead.\n";
- undef $opt_f;
- };
-
-};
-
-my $handle = (defined $opt_f ? \*FILE : \*STDOUT);
-
-(my $file = shift) or &usage; # display usage if no filename is supplied
-my $args = (@ARGV ? ' ' . join ' ', @ARGV : '');
-
-my @lines = `perl @{[defined $opt_c ? '-c ' : '' ]} -w "$file$args" 2>&1`;
-
-my $errors = 0;
-foreach my $line (@lines) {
-
- chomp($line);
- my ($file, $lineno, $message, $rest);
-
- if ($line =~ /^(.*)\sat\s(.*)\sline\s(\d+)(\.|,\snear\s\".*\")$/) {
-
- ($message, $file, $lineno, $rest) = ($1, $2, $3, $4);
- $errors++;
- $message .= $rest if ($rest =~ s/^,//);
- print $handle "$file:$lineno:$message\n";
-
- } else { next };
-
-}
-
-if (defined $opt_f) {
-
- my $msg;
- if ($errors == 1) {
-
- $msg = "There was 1 error.\n";
-
- } else {
-
- $msg = "There were $errors errors.\n";
-
- };
-
- print STDOUT $msg;
- close FILE;
- unlink $opt_f unless $errors;
-
-};
-
-sub usage {
-
- (local $0 = $0) =~ s/^.*\/([^\/]+)$/$1/; # remove path from name of program
- print<<EOT;
-Usage:
- $0 [-c] [-f <errorfile>] <programfile> [programargs]
-
- -c compile only, don't run (executes 'perl -wc')
- -f write errors to <errorfile>
-
-Examples:
- * At the command line:
- $0 program.pl
- Displays output on STDOUT.
-
- $0 -c -f errorfile program.pl
- Then run 'vim -q errorfile' to edit the errors with Vim.
-
- * In Vim:
- Edit in Vim (and save, if you don't have autowrite on), then
- type ':mak' or ':mak args' (args being the program arguments)
- to error check.
-EOT
-
- exit 0;
-
-};
diff --git a/runtime/tools/mve.awk b/runtime/tools/mve.awk
deleted file mode 100755
index 396f80677c..0000000000
--- a/runtime/tools/mve.awk
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/nawk -f
-#
-# Change "nawk" to "awk" or "gawk" if you get errors.
-#
-# Make Vim Errors
-# Processes errors from cc for use by Vim's quick fix tools
-# specifically it translates the ---------^ notation to a
-# column number
-#
-BEGIN { FS="[:,]" }
-
-/^cfe/ { file=$3
- msg=$5
- split($4,s," ")
- line=s[2]
-}
-
-# You may have to substitute a tab character for the \t here:
-/^[\t-]*\^/ {
- p=match($0, ".*\\^" )
- col=RLENGTH-2
- printf("%s, line %d, col %d : %s\n", file,line,col,msg)
-}
diff --git a/runtime/tools/mve.txt b/runtime/tools/mve.txt
deleted file mode 100644
index 8aa5cf66bf..0000000000
--- a/runtime/tools/mve.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-[ The mve awk script was posted on the vimdev mailing list ]
-
-From: jimmer@barney.mdhc.mdc.com (J. McGlasson)
-Date: Mon, 31 Mar 1997 13:16:49 -0700 (Mar)
-
-My compiler (SGI MIPSpro C compiler - IRIX 6.4) works like this.
-I have written a script mve (make vim errors), through which I pipe my make
-output, which translates output of the following form:
-
-cfe: Error: syntax.c, line 4: Syntax Error
- int i[12;
- ------------^
-
-into:
-
- cl.c, line 4, col 12 : Syntax Error
-
-(in vim notation: %f, line %l, col %c : %m)
-
-You might be able to tailor this for your compiler's output.
diff --git a/runtime/tools/pltags.pl b/runtime/tools/pltags.pl
deleted file mode 100755
index 7a74682b87..0000000000
--- a/runtime/tools/pltags.pl
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/env perl
-
-# pltags - create a tags file for Perl code, for use by vi(m)
-#
-# Distributed with Vim <http://www.vim.org/>, latest version always available
-# at <http://www.mscha.com/mscha.html?pltags#tools>
-#
-# Version 2.3, 28 February 2002
-#
-# Written by Michael Schaap <pltags@mscha.com>. Suggestions for improvement
-# are very welcome!
-#
-# This script will not work with Perl 4 or below!
-#
-# Revision history:
-# 1.0 1997? Original version, quickly hacked together
-# 2.0 1999? Completely rewritten, better structured and documented,
-# support for variables, packages, Exuberant Ctags extensions
-# 2.1 Jun 2000 Fixed critical bug (typo in comment) ;-)
-# Support multiple level packages (e.g. Archive::Zip::Member)
-# 2.2 Jul 2001 'Glob' wildcards - especially useful under Windows
-# (thanks to Serge Sivkov and Jason King)
-# Bug fix: reset package name for each file
-# 2.21 Jul 2001 Oops... bug in variable detection (/local../ -> /^local.../)
-# 2.3 Feb 2002 Support variables declared with "our"
-# (thanks to Lutz Mende)
-
-# Complain about undeclared variables
-use strict;
-
-# Used modules
-use Getopt::Long;
-
-# Options with their defaults
-my $do_subs = 1; # --subs, --nosubs include subs in tags file?
-my $do_vars = 1; # --vars, --novars include variables in tags file?
-my $do_pkgs = 1; # --pkgs, --nopkgs include packages in tags file?
-my $do_exts = 1; # --extensions, --noextensions
- # include Exuberant Ctags extensions
-
-# Global variables
-my $VERSION = "2.21"; # pltags version
-my $status = 0; # GetOptions return value
-my $file = ""; # File being processed
-my @tags = (); # List of produced tags
-my $is_pkg = 0; # Are we tagging a package?
-my $has_subs = 0; # Has this file any subs yet?
-my $package_name = ""; # Name of current package
-my $var_continues = 0; # Variable declaration continues on last line
-my $line = ""; # Current line in file
-my $stmt = ""; # Current Perl statement
-my @vars = (); # List of variables in declaration
-my $var = ""; # Variable in declaration
-my $tagline = ""; # Tag file line
-
-# Create a tag file line and push it on the list of found tags
-sub MakeTag($$$$$)
-{
- my ($tag, # Tag name
- $type, # Type of tag
- $is_static, # Is this a static tag?
- $file, # File in which tag appears
- $line) = @_; # Line in which tag appears
-
- my $tagline = ""; # Created tag line
-
- # Only process tag if not empty
- if ($tag)
- {
- # Get rid of \n, and escape / and \ in line
- chomp $line;
- $line =~ s/\\/\\\\/g;
- $line =~ s/\//\\\//g;
-
- # Create a tag line
- $tagline = "$tag\t$file\t/^$line\$/";
-
- # If we're told to do so, add extensions
- if ($do_exts)
- {
- $tagline .= ";\"\t$type"
- . ($is_static ? "\tfile:" : "")
- . ($package_name ? "\tclass:$package_name" : "");
- }
-
- # Push it on the stack
- push (@tags, $tagline);
- }
-}
-
-# Parse package name from statement
-sub PackageName($)
-{
- my ($stmt) = @_; # Statement
-
- # Look for the argument to "package". Return it if found, else return ""
- if ($stmt =~ /^package\s+([\w:]+)/)
- {
- my $pkgname = $1;
-
- # Remove any parent package name(s)
- $pkgname =~ s/.*://;
- return $pkgname;
- }
- else
- {
- return "";
- }
-}
-
-# Parse sub name from statement
-sub SubName($)
-{
- my ($stmt) = @_; # Statement
-
- # Look for the argument to "sub". Return it if found, else return ""
- if ($stmt =~ /^sub\s+([\w:]+)/)
- {
- my $subname = $1;
-
- # Remove any parent package name(s)
- $subname =~ s/.*://;
- return $subname;
- }
- else
- {
- return "";
- }
-}
-
-# Parse all variable names from statement
-sub VarNames($)
-{
- my ($stmt) = @_;
-
- # Remove my or local from statement, if present
- $stmt =~ s/^(my|our|local)\s+//;
-
- # Remove any assignment piece
- $stmt =~ s/\s*=.*//;
-
- # Now find all variable names, i.e. "words" preceded by $, @ or %
- @vars = ($stmt =~ /[\$\@\%]([\w:]+)\b/g);
-
- # Remove any parent package name(s)
- map(s/.*://, @vars);
-
- return (@vars);
-}
-
-############### Start ###############
-
-print "\npltags $VERSION by Michael Schaap <mscha\@mscha.com>\n\n";
-
-# Get options
-$status = GetOptions("subs!" => \$do_subs,
- "vars!" => \$do_vars,
- "pkgs!" => \$do_pkgs,
- "extensions!" => \$do_exts);
-
-# Usage if error in options or no arguments given
-unless ($status && @ARGV)
-{
- print "\n" unless ($status);
- print " Usage: $0 [options] filename ...\n\n";
- print " Where options can be:\n";
- print " --subs (--nosubs) (don't) include sub declarations in tag file\n";
- print " --vars (--novars) (don't) include variable declarations in tag file\n";
- print " --pkgs (--nopkgs) (don't) include package declarations in tag file\n";
- print " --extensions (--noextensions)\n";
- print " (don't) include Exuberant Ctags / Vim style\n";
- print " extensions in tag file\n\n";
- print " Default options: ";
- print ($do_subs ? "--subs " : "--nosubs ");
- print ($do_vars ? "--vars " : "--novars ");
- print ($do_pkgs ? "--pkgs " : "--nopkgs ");
- print ($do_exts ? "--extensions\n\n" : "--noextensions\n\n");
- print " Example: $0 *.pl *.pm ../shared/*.pm\n\n";
- exit;
-}
-
-# Loop through files on command line - 'glob' any wildcards, since Windows
-# doesn't do this for us
-foreach $file (map { glob } @ARGV)
-{
- # Skip if this is not a file we can open. Also skip tags files and backup
- # files
- next unless ((-f $file) && (-r $file) && ($file !~ /tags$/)
- && ($file !~ /~$/));
-
- print "Tagging file $file...\n";
-
- $is_pkg = 0;
- $package_name = "";
- $has_subs = 0;
- $var_continues = 0;
-
- open (IN, $file) or die "Can't open file '$file': $!";
-
- # Loop through file
- foreach $line (<IN>)
- {
- # Statement is line with comments and whitespace trimmed
- ($stmt = $line) =~ s/#.*//;
- $stmt =~ s/^\s*//;
- $stmt =~ s/\s*$//;
-
- # Nothing left? Never mind.
- next unless ($stmt);
-
- # This is a variable declaration if one was started on the previous
- # line, or if this line starts with my or local
- if ($var_continues or ($stmt =~/^my\b/)
- or ($stmt =~/^our\b/) or ($stmt =~/^local\b/))
- {
- # The declaration continues if the line does not end with ;
- $var_continues = ($stmt !~ /;$/);
-
- # Loop through all variable names in the declaration
- foreach $var (VarNames($stmt))
- {
- # Make a tag for this variable unless we're told not to. We
- # assume that a variable is always static, unless it appears
- # in a package before any sub. (Not necessarily true, but
- # it's ok for most purposes and Vim works fine even if it is
- # incorrect)
- if ($do_vars)
- {
- MakeTag($var, "v", (!$is_pkg or $has_subs), $file, $line);
- }
- }
- }
-
- # This is a package declaration if the line starts with package
- elsif ($stmt =~/^package\b/)
- {
- # Get name of the package
- $package_name = PackageName($stmt);
-
- if ($package_name)
- {
- # Remember that we're doing a package
- $is_pkg = 1;
-
- # Make a tag for this package unless we're told not to. A
- # package is never static.
- if ($do_pkgs)
- {
- MakeTag($package_name, "p", 0, $file, $line);
- }
- }
- }
-
- # This is a sub declaration if the line starts with sub
- elsif ($stmt =~/^sub\b/)
- {
- # Remember that this file has subs
- $has_subs = 1;
-
- # Make a tag for this sub unless we're told not to. We assume
- # that a sub is static, unless it appears in a package. (Not
- # necessarily true, but it's ok for most purposes and Vim works
- # fine even if it is incorrect)
- if ($do_subs)
- {
- MakeTag(SubName($stmt), "s", (!$is_pkg), $file, $line);
- }
- }
- }
- close (IN);
-}
-
-# Do we have any tags? If so, write them to the tags file
-if (@tags)
-{
- # Add some tag file extensions if we're told to
- if ($do_exts)
- {
- push (@tags, "!_TAG_FILE_FORMAT\t2\t/extended format/");
- push (@tags, "!_TAG_FILE_SORTED\t1\t/0=unsorted, 1=sorted/");
- push (@tags, "!_TAG_PROGRAM_AUTHOR\tMichael Schaap\t/mscha\@mscha.com/");
- push (@tags, "!_TAG_PROGRAM_NAME\tpltags\t//");
- push (@tags, "!_TAG_PROGRAM_VERSION\t$VERSION\t/supports multiple tags and extended format/");
- }
-
- print "\nWriting tags file.\n";
-
- open (OUT, ">tags") or die "Can't open tags file: $!";
-
- foreach $tagline (sort @tags)
- {
- print OUT "$tagline\n";
- }
-
- close (OUT);
-}
-else
-{
- print "\nNo tags found.\n";
-}
diff --git a/runtime/tools/ref b/runtime/tools/ref
deleted file mode 100755
index 77bfc805e2..0000000000
--- a/runtime/tools/ref
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-#
-# ref - Check spelling of the arguments
-#
-# Usage: ref word ..
-#
-# can be used for the K command of Vim
-#
-spell <<EOF
-$*
-EOF
diff --git a/runtime/tools/shtags.1 b/runtime/tools/shtags.1
deleted file mode 100644
index 314df883c7..0000000000
--- a/runtime/tools/shtags.1
+++ /dev/null
@@ -1,61 +0,0 @@
-.TH shtags 1 "local Utilities"
-.SH NAME
-shtags \- Create tags for shell scripts
-.SH SYNOPSIS
-.B shtags
-[\fI-mvw\fP] [\fI-t <file>\fP] [\fI-s <shell>\fP] <files>
-.SH DESCRIPTION
-\fBshtags\fP creates a \fBvi(1)\fP tags file for shell scripts - which
-essentially turns your code into a hypertext document. \fBshtags\fP
-attempts to create tags for all function and variable definitions,
-although this is a little difficult, because in most shell languages,
-variables don't need to be explicitly defined, and as such there is
-often no distinct "variable definition". If this is the case,
-\fBshtags\fP simply creates a tag for the first instance of a variable
-which is being set in a simple way, ie: \fIset x = 5\fP.
-.SH OPTIONS
-.IP "\fB-t <file>\fP"
-Name of tags file to create. (default is 'tags')
-.IP "\fB-s <shell>\fP"
-The name of the shell used by the script(s). By default,
-\fBshtags\fP tries to work out which is the appropriate shell for each
-file individually by looking at the first line of each file. This wont
-work however, if the script starts as a bourne shell script and tries
-to be clever about starting the shell it really wants.
-.b
-Currently supported shells are:
-.RS
-.IP \fBsh\fP
-Bourne Shell
-.IP \fBperl\fP
-Perl (versions 4 and 5)
-.IP \fBksh\fP
-Korn Shell
-.IP \fBtclsh\fP
-The TCL shell
-.IP \fBwish\fP
-The TK Windowing shell (same as tclsh)
-.RE
-
-.IP \fB-v\fP
-Include variable definitions (variables mentioned at the start of a line)
-.IP \fB-V\fP
-Print version information.
-.IP \fB-w\fP
-Suppress "duplicate tag" warning messages.
-.IP \fB-x\fP
-Explicitly create a new tags file. Normally new tags are merged with
-the old tags file.
-.PP
-\fBshtags\fP scans the specified files for subroutines and possibly
-variable definitions, and creates a \fBvi\fP style tags file.
-.SH FILES
-.IP \fBtags\fP
-A tags file contains a sorted list of tags, one tag per line. The
-format is the same as that used by \fBvi\fP(1)
-.SH AUTHOR
-Stephen Riehm
-.br
-sr@pc-plus.de
-.SH "SEE ALSO"
-ctags(1), etags(1), perl(1), tclsh(1), wish(1), sh(1), ksh(1).
diff --git a/runtime/tools/shtags.pl b/runtime/tools/shtags.pl
deleted file mode 100755
index 48dcdc7476..0000000000
--- a/runtime/tools/shtags.pl
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/usr/bin/env perl
-#
-# shtags: create a tags file for perl scripts
-#
-# Author: Stephen Riehm
-# Last Changed: 96/11/27 19:46:06
-#
-# "@(#) shtags 1.1 by S. Riehm"
-#
-
-# obvious... :-)
-sub usage
- {
- print <<_EOUSAGE_ ;
-USAGE: $program [-kvwVx] [-t <file>] <files>
- -t <file> Name of tags file to create. (default is 'tags')
- -s <shell> Name of the shell language in the script
- -v Include variable definitions.
- (variables mentioned at the start of a line)
- -V Print version information.
- -w Suppress "duplicate tag" warnings.
- -x Explicitly create a new tags file. Normally tags are merged.
- <files> List of files to scan for tags.
-_EOUSAGE_
- exit 0
- }
-
-sub version
-{
- #
- # Version information
- #
- @id = split( ', ', 'scripts/bin/shtags, /usr/local/, LOCAL_SCRIPTS, 1.1, 96/11/27, 19:46:06' );
- $id[0] =~ s,.*/,,;
- print <<_EOVERS;
-$id[0]: $id[3]
-Last Modified: @id[4,5]
-Component: $id[1]
-Release: $id[2]
-_EOVERS
- exit( 1 );
-}
-
-#
-# initialisations
-#
-($program = $0) =~ s,.*/,,;
-require 'getopts.pl';
-
-#
-# parse command line
-#
-&Getopts( "t:s:vVwx" ) || &usage();
-$tags_file = $opt_t || 'tags';
-$explicit = $opt_x;
-$variable_tags = $opt_v;
-$allow_warnings = ! $opt_w;
-&version if $opt_V;
-&usage() unless @ARGV != 0;
-
-# slurp up the existing tags. Some will be replaced, the ones that aren't
-# will be re-written exactly as they were read
-if( ! $explicit && open( TAGS, "< $tags_file" ) )
- {
- while( <TAGS> )
- {
- /^\S+/;
- $tags{$&} = $_;
- }
- close( TAGS );
- }
-
-#
-# for each line of every file listed on the command line, look for a
-# 'sub' definition, or, if variables are wanted aswell, look for a
-# variable definition at the start of a line
-#
-while( <> )
- {
- &check_shell($_), ( $old_file = $ARGV ) if $ARGV ne $old_file;
- next unless $shell;
- if( $shell eq "sh" )
- {
- next unless /^\s*(((\w+)))\s*\(\s*\)/
- || ( $variable_tags && /^(((\w+)=))/ );
- $match = $3;
- }
- if( $shell eq "ksh" )
- {
- # ksh
- next unless /^\s*function\s+(((\w+)))/
- || ( $variable_tags && /^(((\w+)=))/ );
- $match = $3;
- }
- if( $shell eq "perl" )
- {
- # perl
- next unless /^\s*sub\s+(\w+('|::))?(\w+)/
- || /^\s*(((\w+))):/
- || ( $variable_tags && /^(([(\s]*[\$\@\%]{1}(\w+).*=))/ );
- $match = $3;
- }
- if( $shell eq "tcl" )
- {
- next unless /^\s*proc\s+(((\S+)))/
- || ( $variable_tags && /^\s*set\s+(((\w+)\s))/ );
- $match = $3;
- }
- chop;
- warn "$match - duplicate ignored\n"
- if ( $new{$match}++
- || !( $tags{$match} = sprintf( "%s\t%s\t?^%s\$?\n", $match, $ARGV, $_ ) ) )
- && $allow_warnings;
- }
-
-# write the new tags to the tags file - note that the whole file is rewritten
-open( TAGS, "> $tags_file" );
-foreach( sort( keys %tags ) )
- {
- print TAGS "$tags{$_}";
- }
-close( TAGS );
-
-sub check_shell
- {
- local( $_ ) = @_;
- # read the first line of a script, and work out which shell it is,
- # unless a shell was specified on the command line
- #
- # This routine can't handle clever scripts which start sh and then
- # use sh to start the shell they really wanted.
- if( $opt_s )
- {
- $shell = $opt_s;
- }
- else
- {
- $shell = "sh" if /^:$/ || /^#!.*\/bin\/sh/;
- $shell = "ksh" if /^#!.*\/ksh/;
- $shell = "perl" if /^#!.*\/perl/;
- $shell = "tcl" if /^#!.*\/wish/;
- printf "Using $shell for $ARGV\n";
- }
- }
diff --git a/runtime/tools/unicode.vim b/runtime/tools/unicode.vim
deleted file mode 100644
index f3c58ed35a..0000000000
--- a/runtime/tools/unicode.vim
+++ /dev/null
@@ -1,290 +0,0 @@
-" Script to extract tables from Unicode .txt files, to be used in src/mbyte.c.
-" The format of the UnicodeData.txt file is explained here:
-" http://www.unicode.org/Public/5.1.0/ucd/UCD.html
-" For the other files see the header.
-"
-" Usage: Vim -S <this-file>
-"
-" Author: Bram Moolenaar
-" Last Update: 2010 Jan 12
-
-" Parse lines of UnicodeData.txt. Creates a list of lists in s:dataprops.
-func! ParseDataToProps()
- let s:dataprops = []
- let lnum = 1
- while lnum <= line('$')
- let l = split(getline(lnum), '\s*;\s*', 1)
- if len(l) != 15
- echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 15'
- return
- endif
- call add(s:dataprops, l)
- let lnum += 1
- endwhile
-endfunc
-
-" Parse lines of CaseFolding.txt. Creates a list of lists in s:foldprops.
-func! ParseFoldProps()
- let s:foldprops = []
- let lnum = 1
- while lnum <= line('$')
- let line = getline(lnum)
- if line !~ '^#' && line !~ '^\s*$'
- let l = split(line, '\s*;\s*', 1)
- if len(l) != 4
- echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 4'
- return
- endif
- call add(s:foldprops, l)
- endif
- let lnum += 1
- endwhile
-endfunc
-
-" Parse lines of EastAsianWidth.txt. Creates a list of lists in s:widthprops.
-func! ParseWidthProps()
- let s:widthprops = []
- let lnum = 1
- while lnum <= line('$')
- let line = getline(lnum)
- if line !~ '^#' && line !~ '^\s*$'
- let l = split(line, '\s*;\s*', 1)
- if len(l) != 2
- echoerr 'Found ' . len(l) . ' items in line ' . lnum . ', expected 2'
- return
- endif
- call add(s:widthprops, l)
- endif
- let lnum += 1
- endwhile
-endfunc
-
-" Build the toLower or toUpper table in a new buffer.
-" Uses s:dataprops.
-func! BuildCaseTable(name, index)
- let start = -1
- let end = -1
- let step = 0
- let add = -1
- let ranges = []
- for p in s:dataprops
- if p[a:index] != ''
- let n = ('0x' . p[0]) + 0
- let nl = ('0x' . p[a:index]) + 0
- if start >= 0 && add == nl - n && (step == 0 || n - end == step)
- " continue with same range.
- let step = n - end
- let end = n
- else
- if start >= 0
- " produce previous range
- call Range(ranges, start, end, step, add)
- endif
- let start = n
- let end = n
- let step = 0
- let add = nl - n
- endif
- endif
- endfor
- if start >= 0
- call Range(ranges, start, end, step, add)
- endif
-
- " New buffer to put the result in.
- new
- exe "file to" . a:name
- call setline(1, "static convertStruct to" . a:name . "[] =")
- call setline(2, "{")
- call append('$', ranges)
- call setline('$', getline('$')[:-2]) " remove last comma
- call setline(line('$') + 1, "};")
- wincmd p
-endfunc
-
-" Build the foldCase table in a new buffer.
-" Uses s:foldprops.
-func! BuildFoldTable()
- let start = -1
- let end = -1
- let step = 0
- let add = -1
- let ranges = []
- for p in s:foldprops
- if p[1] == 'C' || p[1] == 'S'
- let n = ('0x' . p[0]) + 0
- let nl = ('0x' . p[2]) + 0
- if start >= 0 && add == nl - n && (step == 0 || n - end == step)
- " continue with same range.
- let step = n - end
- let end = n
- else
- if start >= 0
- " produce previous range
- call Range(ranges, start, end, step, add)
- endif
- let start = n
- let end = n
- let step = 0
- let add = nl - n
- endif
- endif
- endfor
- if start >= 0
- call Range(ranges, start, end, step, add)
- endif
-
- " New buffer to put the result in.
- new
- file foldCase
- call setline(1, "static convertStruct foldCase[] =")
- call setline(2, "{")
- call append('$', ranges)
- call setline('$', getline('$')[:-2]) " remove last comma
- call setline(line('$') + 1, "};")
- wincmd p
-endfunc
-
-func! Range(ranges, start, end, step, add)
- let s = printf("\t{0x%x,0x%x,%d,%d},", a:start, a:end, a:step == 0 ? -1 : a:step, a:add)
- call add(a:ranges, s)
-endfunc
-
-" Build the combining table.
-" Uses s:dataprops.
-func! BuildCombiningTable()
- let start = -1
- let end = -1
- let ranges = []
- for p in s:dataprops
- if p[2] == 'Mn' || p[2] == 'Mc' || p[2] == 'Me'
- let n = ('0x' . p[0]) + 0
- if start >= 0 && end + 1 == n
- " continue with same range.
- let end = n
- else
- if start >= 0
- " produce previous range
- call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
- endif
- let start = n
- let end = n
- endif
- endif
- endfor
- if start >= 0
- call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
- endif
-
- " New buffer to put the result in.
- new
- file combining
- call setline(1, " static struct interval combining[] =")
- call setline(2, " {")
- call append('$', ranges)
- call setline('$', getline('$')[:-2]) " remove last comma
- call setline(line('$') + 1, " };")
- wincmd p
-endfunc
-
-" Build the double width or ambiguous width table in a new buffer.
-" Uses s:widthprops and s:dataprops.
-func! BuildWidthTable(pattern, tableName)
- let start = -1
- let end = -1
- let ranges = []
- let dataidx = 0
- for p in s:widthprops
- if p[1][0] =~ a:pattern
- if p[0] =~ '\.\.'
- " It is a range. we don't check for composing char then.
- let rng = split(p[0], '\.\.')
- if len(rng) != 2
- echoerr "Cannot parse range: '" . p[0] . "' in width table"
- endif
- let n = ('0x' . rng[0]) + 0
- let n_last = ('0x' . rng[1]) + 0
- else
- let n = ('0x' . p[0]) + 0
- let n_last = n
- endif
- " Find this char in the data table.
- while 1
- let dn = ('0x' . s:dataprops[dataidx][0]) + 0
- if dn >= n
- break
- endif
- let dataidx += 1
- endwhile
- if dn != n && n_last == n
- echoerr "Cannot find character " . n . " in data table"
- endif
- " Only use the char when it's not a composing char.
- " But use all chars from a range.
- let dp = s:dataprops[dataidx]
- if n_last > n || (dp[2] != 'Mn' && dp[2] != 'Mc' && dp[2] != 'Me')
- if start >= 0 && end + 1 == n
- " continue with same range.
- else
- if start >= 0
- " produce previous range
- call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
- endif
- let start = n
- endif
- let end = n_last
- endif
- endif
- endfor
- if start >= 0
- call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
- endif
-
- " New buffer to put the result in.
- new
- exe "file " . a:tableName
- call setline(1, " static struct interval " . a:tableName . "[] =")
- call setline(2, " {")
- call append('$', ranges)
- call setline('$', getline('$')[:-2]) " remove last comma
- call setline(line('$') + 1, " };")
- wincmd p
-endfunc
-
-
-
-" Edit the Unicode text file. Requires the netrw plugin.
-edit http://unicode.org/Public/UNIDATA/UnicodeData.txt
-
-" Parse each line, create a list of lists.
-call ParseDataToProps()
-
-" Build the toLower table.
-call BuildCaseTable("Lower", 13)
-
-" Build the toUpper table.
-call BuildCaseTable("Upper", 12)
-
-" Build the ranges of composing chars.
-call BuildCombiningTable()
-
-" Edit the case folding text file. Requires the netrw plugin.
-edit http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
-
-" Parse each line, create a list of lists.
-call ParseFoldProps()
-
-" Build the foldCase table.
-call BuildFoldTable()
-
-" Edit the width text file. Requires the netrw plugin.
-edit http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
-
-" Parse each line, create a list of lists.
-call ParseWidthProps()
-
-" Build the double width table.
-call BuildWidthTable('[WF]', 'doublewidth')
-
-" Build the ambiguous width table.
-call BuildWidthTable('A', 'ambiguous')
diff --git a/runtime/tools/vim132 b/runtime/tools/vim132
deleted file mode 100755
index 29ea4ce1ff..0000000000
--- a/runtime/tools/vim132
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/csh
-#
-# Shell script for use with UNIX
-# Starts up Vim with the terminal in 132 column mode
-# Only works on VT-100 terminals and lookalikes
-# You need to have a termcap entry "vt100-w". Same as vt100 but 132 columns.
-#
-set oldterm=$term
-echo "[?3h"
-setenv TERM vt100-w
-vim $*
-set term=$oldterm
-echo "[?3l"
diff --git a/runtime/tools/vim_vs_net.cmd b/runtime/tools/vim_vs_net.cmd
deleted file mode 100644
index bea6353f67..0000000000
--- a/runtime/tools/vim_vs_net.cmd
+++ /dev/null
@@ -1,24 +0,0 @@
-@rem
-@rem To use this with Visual Studio .Net
-@rem Tools->External Tools...
-@rem Add
-@rem Title - Vim
-@rem Command - d:\files\util\vim_vs_net.cmd
-@rem Arguments - +$(CurLine) $(ItemPath)
-@rem Init Dir - Empty
-@rem
-@rem Courtesy of Brian Sturk
-@rem
-@rem --remote-silent +%1 is a command +954, move ahead 954 lines
-@rem --remote-silent %2 full path to file
-@rem In Vim
-@rem :h --remote-silent for more details
-@rem
-@rem --servername VS_NET
-@rem This will create a new instance of vim called VS_NET. So if you
-open
-@rem multiple files from VS, they will use the same instance of Vim.
-@rem This allows you to have multiple copies of Vim running, but you can
-@rem control which one has VS files in it.
-@rem
-start /b gvim.exe --servername VS_NET --remote-silent "%1" "%2"
diff --git a/runtime/tools/vimm b/runtime/tools/vimm
deleted file mode 100755
index 7b84cb255e..0000000000
--- a/runtime/tools/vimm
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# enable DEC locator input model on remote terminal
-printf "\033[1;2'z\033[1;3'{\c"
-vim "$@"
-# disable DEC locator input model on remote terminal
-printf "\033[2;4'{\033[0'z\c"
diff --git a/runtime/tools/vimspell.sh b/runtime/tools/vimspell.sh
deleted file mode 100755
index d336fe6c31..0000000000
--- a/runtime/tools/vimspell.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-#
-# Spell a file & generate the syntax statements necessary to
-# highlight in vim. Based on a program from Krishna Gadepalli
-# <krishna@stdavids.picker.com>.
-#
-# I use the following mappings (in .vimrc):
-#
-# noremap <F8> :so `vimspell.sh %`<CR><CR>
-# noremap <F7> :syntax clear SpellErrors<CR>
-#
-# Neil Schemenauer <nascheme@ucalgary.ca>
-# March 1999
-# updated 2008 Jul 17 by Bram
-#
-# Safe method for the temp file by Javier Fernández-Sanguino_Peña
-
-INFILE=$1
-tmp="${TMPDIR-/tmp}"
-OUTFILE=`mktemp -t vimspellXXXXXX || tempfile -p vimspell || echo none`
-# If the standard commands failed then create the file
-# since we cannot create a directory (we cannot remove it on exit)
-# create a file in the safest way possible.
-if test "$OUTFILE" = none; then
- OUTFILE=$tmp/vimspell$$
- [ -e $OUTFILE ] && { echo "Cannot use temporary file $OUTFILE, it already exists!"; exit 1 ; }
- (umask 077; touch $OUTFILE)
-fi
-# Note the copy of vimspell cannot be deleted on exit since it is
-# used by vim, otherwise it should do this:
-# trap "rm -f $OUTFILE" 0 1 2 3 9 11 13 15
-
-
-#
-# local spellings
-#
-LOCAL_DICT=${LOCAL_DICT-$HOME/local/lib/local_dict}
-
-if [ -f $LOCAL_DICT ]
-then
- SPELL_ARGS="+$LOCAL_DICT"
-fi
-
-spell $SPELL_ARGS $INFILE | sort -u |
-awk '
- {
- printf "syntax match SpellErrors \"\\<%s\\>\"\n", $0 ;
- }
-
-END {
- printf "highlight link SpellErrors ErrorMsg\n\n" ;
- }
-' > $OUTFILE
-echo "!rm $OUTFILE" >> $OUTFILE
-echo $OUTFILE
diff --git a/runtime/tools/vimspell.txt b/runtime/tools/vimspell.txt
deleted file mode 100644
index 2842af7bd8..0000000000
--- a/runtime/tools/vimspell.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-vimspell.sh
-===========
-
-This is a simple script to spell check a file and generate the syntax
-statements necessary to highlight the errors in vim. It is based on a
-similar program by Krishna Gadepalli <krishna@stdavids.picker.com>.
-
-To use this script, first place it in a directory in your path. Next,
-you should add some convenient key mappings. I use the following (in
-.vimrc):
-
- noremap <F8> :so `vimspell.sh %`<CR><CR>
- noremap <F7> :syntax clear SpellErrors<CR>
-
-This program requires the old Unix "spell" command. On my Debian
-system, "spell" is a wrapper around "ispell". For better security,
-you should uncomment the line in the script that uses "tempfile" to
-create a temporary file. As all systems don't have "tempfile" the
-insecure "pid method" is used.
-
-
- Neil Schemenauer <nascheme@ucalgary.ca>
diff --git a/runtime/tools/xcmdsrv_client.c b/runtime/tools/xcmdsrv_client.c
deleted file mode 100644
index a0e6211a1d..0000000000
--- a/runtime/tools/xcmdsrv_client.c
+++ /dev/null
@@ -1,584 +0,0 @@
-/* vi:set ts=8 sts=4 sw=4:
- *
- * VIM - Vi IMproved by Bram Moolenaar
- * X-Windows communication by Flemming Madsen
- *
- * Do ":help uganda" in Vim to read copying and usage conditions.
- * Do ":help credits" in Vim to see a list of people who contributed.
- * See README.txt for an overview of the Vim source code.
- *
- * Client for sending commands to an '+xcmdsrv' enabled vim.
- * This is mostly a de-Vimified version of if_xcmdsrv.c in vim.
- * See that file for a protocol specification.
- *
- * You can make a test program with a Makefile like:
- * xcmdsrv_client: xcmdsrv_client.c
- * cc -o $@ -g -DMAIN -I/usr/X11R6/include -L/usr/X11R6/lib $< -lX11
- *
- */
-
-#include <stdio.h>
-#include <string.h>
-#ifdef HAVE_SELECT
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#else
-#include <sys/poll.h>
-#endif
-#include <X11/Intrinsic.h>
-#include <X11/Xatom.h>
-
-#define __ARGS(x) x
-
-/* Client API */
-char * sendToVim __ARGS((Display *dpy, char *name, char *cmd, int asKeys, int *code));
-
-#ifdef MAIN
-/* A sample program */
-main(int argc, char **argv)
-{
- char *res;
- int code;
-
- if (argc == 4)
- {
- if ((res = sendToVim(XOpenDisplay(NULL), argv[2], argv[3],
- argv[1][0] != 'e', &code)) != NULL)
- {
- if (code)
- printf("Error code returned: %d\n", code);
- puts(res);
- }
- exit(0);
- }
- else
- fprintf(stderr, "Usage: %s {k|e} <server> <command>", argv[0]);
-
- exit(1);
-}
-#endif
-
-/*
- * Maximum size property that can be read at one time by
- * this module:
- */
-
-#define MAX_PROP_WORDS 100000
-
-/*
- * Forward declarations for procedures defined later in this file:
- */
-
-static int x_error_check __ARGS((Display *dpy, XErrorEvent *error_event));
-static int AppendPropCarefully __ARGS((Display *display,
- Window window, Atom property, char *value, int length));
-static Window LookupName __ARGS((Display *dpy, char *name,
- int delete, char **loose));
-static int SendInit __ARGS((Display *dpy));
-static char *SendEventProc __ARGS((Display *dpy, XEvent *eventPtr,
- int expect, int *code));
-static int IsSerialName __ARGS((char *name));
-
-/* Private variables */
-static Atom registryProperty = None;
-static Atom commProperty = None;
-static Window commWindow = None;
-static int got_x_error = FALSE;
-
-
-/*
- * sendToVim --
- * Send to an instance of Vim via the X display.
- *
- * Results:
- * A string with the result or NULL. Caller must free if non-NULL
- */
-
- char *
-sendToVim(dpy, name, cmd, asKeys, code)
- Display *dpy; /* Where to send. */
- char *name; /* Where to send. */
- char *cmd; /* What to send. */
- int asKeys; /* Interpret as keystrokes or expr ? */
- int *code; /* Return code. 0 => OK */
-{
- Window w;
- Atom *plist;
- XErrorHandler old_handler;
-#define STATIC_SPACE 500
- char *property, staticSpace[STATIC_SPACE];
- int length;
- int res;
- static int serial = 0; /* Running count of sent commands.
- * Used to give each command a
- * different serial number. */
- XEvent event;
- XPropertyEvent *e = (XPropertyEvent *)&event;
- time_t start;
- char *result;
- char *loosename = NULL;
-
- if (commProperty == None && dpy != NULL)
- {
- if (SendInit(dpy) < 0)
- return NULL;
- }
-
- /*
- * Bind the server name to a communication window.
- *
- * Find any survivor with a serialno attached to the name if the
- * original registrant of the wanted name is no longer present.
- *
- * Delete any lingering names from dead editors.
- */
-
- old_handler = XSetErrorHandler(x_error_check);
- while (TRUE)
- {
- got_x_error = FALSE;
- w = LookupName(dpy, name, 0, &loosename);
- /* Check that the window is hot */
- if (w != None)
- {
- plist = XListProperties(dpy, w, &res);
- XSync(dpy, False);
- if (plist != NULL)
- XFree(plist);
- if (got_x_error)
- {
- LookupName(dpy, loosename ? loosename : name,
- /*DELETE=*/TRUE, NULL);
- continue;
- }
- }
- break;
- }
- if (w == None)
- {
- fprintf(stderr, "no registered server named %s\n", name);
- return NULL;
- }
- else if (loosename != NULL)
- name = loosename;
-
- /*
- * Send the command to target interpreter by appending it to the
- * comm window in the communication window.
- */
-
- length = strlen(name) + strlen(cmd) + 10;
- if (length <= STATIC_SPACE)
- property = staticSpace;
- else
- property = (char *) malloc((unsigned) length);
-
- serial++;
- sprintf(property, "%c%c%c-n %s%c-s %s",
- 0, asKeys ? 'k' : 'c', 0, name, 0, cmd);
- if (name == loosename)
- free(loosename);
- if (!asKeys)
- {
- /* Add a back reference to our comm window */
- sprintf(property + length, "%c-r %x %d", 0, (uint) commWindow, serial);
- length += strlen(property + length + 1) + 1;
- }
-
- res = AppendPropCarefully(dpy, w, commProperty, property, length + 1);
- if (length > STATIC_SPACE)
- free(property);
- if (res < 0)
- {
- fprintf(stderr, "Failed to send command to the destination program\n");
- return NULL;
- }
-
- if (asKeys) /* There is no answer for this - Keys are sent async */
- return NULL;
-
-
- /*
- * Enter a loop processing X events & pooling chars until we see the result
- */
-
-#define SEND_MSEC_POLL 50
-
- time(&start);
- while ((time((time_t *) 0) - start) < 60)
- {
- /* Look out for the answer */
-#ifndef HAVE_SELECT
- struct pollfd fds;
-
- fds.fd = ConnectionNumber(dpy);
- fds.events = POLLIN;
- if (poll(&fds, 1, SEND_MSEC_POLL) < 0)
- break;
-#else
- fd_set fds;
- struct timeval tv;
-
- tv.tv_sec = 0;
- tv.tv_usec = SEND_MSEC_POLL * 1000;
- FD_ZERO(&fds);
- FD_SET(ConnectionNumber(dpy), &fds);
- if (select(ConnectionNumber(dpy) + 1, &fds, NULL, NULL, &tv) < 0)
- break;
-#endif
- while (XEventsQueued(dpy, QueuedAfterReading) > 0)
- {
- XNextEvent(dpy, &event);
- if (event.type == PropertyNotify && e->window == commWindow)
- if ((result = SendEventProc(dpy, &event, serial, code)) != NULL)
- return result;
- }
- }
- return NULL;
-}
-
-
-/*
- * SendInit --
- * This procedure is called to initialize the
- * communication channels for sending commands and
- * receiving results.
- */
-
- static int
-SendInit(dpy)
- Display *dpy;
-{
- XErrorHandler old_handler;
-
- /*
- * Create the window used for communication, and set up an
- * event handler for it.
- */
- old_handler = XSetErrorHandler(x_error_check);
- got_x_error = FALSE;
-
- commProperty = XInternAtom(dpy, "Comm", False);
- /* Change this back to "InterpRegistry" to talk to tk processes */
- registryProperty = XInternAtom(dpy, "VimRegistry", False);
-
- if (commWindow == None)
- {
- commWindow =
- XCreateSimpleWindow(dpy, XDefaultRootWindow(dpy),
- getpid(), 0, 10, 10, 0,
- WhitePixel(dpy, DefaultScreen(dpy)),
- WhitePixel(dpy, DefaultScreen(dpy)));
- XSelectInput(dpy, commWindow, PropertyChangeMask);
- }
-
- XSync(dpy, False);
- (void) XSetErrorHandler(old_handler);
-
- return got_x_error ? -1 : 0;
-}
-
-/*
- * LookupName --
- * Given an interpreter name, see if the name exists in
- * the interpreter registry for a particular display.
- *
- * Results:
- * If the given name is registered, return the ID of
- * the window associated with the name. If the name
- * isn't registered, then return 0.
- */
-
- static Window
-LookupName(dpy, name, delete, loose)
- Display *dpy; /* Display whose registry to check. */
- char *name; /* Name of an interpreter. */
- int delete; /* If non-zero, delete info about name. */
- char **loose; /* Do another search matching -999 if not found
- Return result here if a match is found */
-{
- unsigned char *regProp, *entry;
- unsigned char *p;
- int result, actualFormat;
- unsigned long numItems, bytesAfter;
- Atom actualType;
- Window returnValue;
-
- /*
- * Read the registry property.
- */
-
- regProp = NULL;
- result = XGetWindowProperty(dpy, RootWindow(dpy, 0), registryProperty, 0,
- MAX_PROP_WORDS, False, XA_STRING, &actualType,
- &actualFormat, &numItems, &bytesAfter,
- &regProp);
-
- if (actualType == None)
- return 0;
-
- /*
- * If the property is improperly formed, then delete it.
- */
-
- if ((result != Success) || (actualFormat != 8) || (actualType != XA_STRING))
- {
- if (regProp != NULL)
- XFree(regProp);
- XDeleteProperty(dpy, RootWindow(dpy, 0), registryProperty);
- return 0;
- }
-
- /*
- * Scan the property for the desired name.
- */
-
- returnValue = None;
- entry = NULL; /* Not needed, but eliminates compiler warning. */
- for (p = regProp; (p - regProp) < numItems; )
- {
- entry = p;
- while ((*p != 0) && (!isspace(*p)))
- p++;
- if ((*p != 0) && (strcasecmp(name, p + 1) == 0))
- {
- sscanf(entry, "%x", (uint*) &returnValue);
- break;
- }
- while (*p != 0)
- p++;
- p++;
- }
-
- if (loose != NULL && returnValue == None && !IsSerialName(name))
- {
- for (p = regProp; (p - regProp) < numItems; )
- {
- entry = p;
- while ((*p != 0) && (!isspace(*p)))
- p++;
- if ((*p != 0) && IsSerialName(p + 1)
- && (strncmp(name, p + 1, strlen(name)) == 0))
- {
- sscanf(entry, "%x", (uint*) &returnValue);
- *loose = strdup(p + 1);
- break;
- }
- while (*p != 0)
- p++;
- p++;
- }
- }
-
- /*
- * Delete the property, if that is desired (copy down the
- * remainder of the registry property to overlay the deleted
- * info, then rewrite the property).
- */
-
- if ((delete) && (returnValue != None))
- {
- int count;
-
- while (*p != 0)
- p++;
- p++;
- count = numItems - (p-regProp);
- if (count > 0)
- memcpy(entry, p, count);
- XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING,
- 8, PropModeReplace, regProp,
- (int) (numItems - (p-entry)));
- XSync(dpy, False);
- }
-
- XFree(regProp);
- return returnValue;
-}
-
- static char *
-SendEventProc(dpy, eventPtr, expected, code)
- Display *dpy;
- XEvent *eventPtr; /* Information about event. */
- int expected; /* The one were waiting for */
- int *code; /* Return code. 0 => OK */
-{
- unsigned char *propInfo;
- unsigned char *p;
- int result, actualFormat;
- int retCode;
- unsigned long numItems, bytesAfter;
- Atom actualType;
-
- if ((eventPtr->xproperty.atom != commProperty)
- || (eventPtr->xproperty.state != PropertyNewValue))
- {
- return;
- }
-
- /*
- * Read the comm property and delete it.
- */
-
- propInfo = NULL;
- result = XGetWindowProperty(dpy, commWindow, commProperty, 0,
- MAX_PROP_WORDS, True, XA_STRING, &actualType,
- &actualFormat, &numItems, &bytesAfter,
- &propInfo);
-
- /*
- * If the property doesn't exist or is improperly formed
- * then ignore it.
- */
-
- if ((result != Success) || (actualType != XA_STRING)
- || (actualFormat != 8))
- {
- if (propInfo != NULL)
- {
- XFree(propInfo);
- }
- return;
- }
-
- /*
- * Several commands and results could arrive in the property at
- * one time; each iteration through the outer loop handles a
- * single command or result.
- */
-
- for (p = propInfo; (p - propInfo) < numItems; )
- {
- /*
- * Ignore leading NULs; each command or result starts with a
- * NUL so that no matter how badly formed a preceding command
- * is, we'll be able to tell that a new command/result is
- * starting.
- */
-
- if (*p == 0)
- {
- p++;
- continue;
- }
-
- if ((*p == 'r') && (p[1] == 0))
- {
- int serial, gotSerial;
- char *res;
-
- /*
- * This is a reply to some command that we sent out. Iterate
- * over all of its options. Stop when we reach the end of the
- * property or something that doesn't look like an option.
- */
-
- p += 2;
- gotSerial = 0;
- res = "";
- retCode = 0;
- while (((p-propInfo) < numItems) && (*p == '-'))
- {
- switch (p[1])
- {
- case 'r':
- if (p[2] == ' ')
- res = p + 3;
- break;
- case 's':
- if (sscanf(p + 2, " %d", &serial) == 1)
- gotSerial = 1;
- break;
- case 'c':
- if (sscanf(p + 2, " %d", &retCode) != 1)
- retCode = 0;
- break;
- }
- while (*p != 0)
- p++;
- p++;
- }
-
- if (!gotSerial)
- continue;
-
- if (code != NULL)
- *code = retCode;
- return serial == expected ? strdup(res) : NULL;
- }
- else
- {
- /*
- * Didn't recognize this thing. Just skip through the next
- * null character and try again.
- * Also, throw away commands that we cant process anyway.
- */
-
- while (*p != 0)
- p++;
- p++;
- }
- }
- XFree(propInfo);
-}
-
-/*
- * AppendPropCarefully --
- *
- * Append a given property to a given window, but set up
- * an X error handler so that if the append fails this
- * procedure can return an error code rather than having
- * Xlib panic.
- *
- * Return:
- * 0 on OK - -1 on error
- *--------------------------------------------------------------
- */
-
- static int
-AppendPropCarefully(dpy, window, property, value, length)
- Display *dpy; /* Display on which to operate. */
- Window window; /* Window whose property is to
- * be modified. */
- Atom property; /* Name of property. */
- char *value; /* Characters to append to property. */
- int length; /* How much to append */
-{
- XErrorHandler old_handler;
-
- old_handler = XSetErrorHandler(x_error_check);
- got_x_error = FALSE;
- XChangeProperty(dpy, window, property, XA_STRING, 8,
- PropModeAppend, value, length);
- XSync(dpy, False);
- (void) XSetErrorHandler(old_handler);
- return got_x_error ? -1 : 0;
-}
-
-
-/*
- * Another X Error handler, just used to check for errors.
- */
-/* ARGSUSED */
- static int
-x_error_check(dpy, error_event)
- Display *dpy;
- XErrorEvent *error_event;
-{
- got_x_error = TRUE;
- return 0;
-}
-
-/*
- * Check if "str" looks like it had a serial number appended.
- * Actually just checks if the name ends in a digit.
- */
- static int
-IsSerialName(str)
- char *str;
-{
- int len = strlen(str);
-
- return (len > 1 && isdigit(str[len - 1]));
-}