Skip to content

Commit

Permalink
Update runtime files
Browse files Browse the repository at this point in the history
  • Loading branch information
brammool committed Feb 20, 2022
1 parent ad6c45f commit 944697a
Show file tree
Hide file tree
Showing 28 changed files with 379 additions and 327 deletions.
57 changes: 37 additions & 20 deletions runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 8.2. Last change: 2022 Feb 08
*builtin.txt* For Vim version 8.2. Last change: 2022 Feb 18


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -2082,9 +2082,12 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
dict.key |internal-variables|). Also works
list[i] for |curly-braces-names|, |Dictionary|
import.Func entries, |List| items, imported
items,etc.
items, etc.
Does not work for local variables in a
compiled `:def` function.
Also works for a function in |Vim9|
script, since it can be used as a
function reference.
Beware that evaluating an index may
cause an error message for an invalid
expression. E.g.: >
Expand Down Expand Up @@ -2137,7 +2140,8 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
exists("&shortname")
exists("$HOSTNAME")
exists("*strftime")
exists("*s:MyFunc")
exists("*s:MyFunc") " only for legacy script
exists("*MyFunc")
exists("bufcount")
exists(":Make")
exists("#CursorHold")
Expand Down Expand Up @@ -4999,20 +5003,20 @@ listener_add({callback} [, {buf}]) *listener_add()*
Returns a unique ID that can be passed to |listener_remove()|.

The {callback} is invoked with five arguments:
a:bufnr the buffer that was changed
a:start first changed line number
a:end first line number below the change
a:added number of lines added, negative if lines were
bufnr the buffer that was changed
start first changed line number
end first line number below the change
added number of lines added, negative if lines were
deleted
a:changes a List of items with details about the changes
changes a List of items with details about the changes

Example: >
func Listener(bufnr, start, end, added, changes)
echo 'lines ' .. a:start .. ' until ' .. a:end .. ' changed'
endfunc
call listener_add('Listener', bufnr)
< The List cannot be changed. Each item in a:changes is a
< The List cannot be changed. Each item in "changes" is a
dictionary with these entries:
lnum the first line number of the change
end the first line below the change
Expand Down Expand Up @@ -5139,7 +5143,7 @@ luaeval({expr} [, {expr}]) *luaeval()*

map({expr1}, {expr2}) *map()*
{expr1} must be a |List|, |String|, |Blob| or |Dictionary|.
When {expr1} is a |List|| or |Dictionary|, replace each
When {expr1} is a |List| or |Dictionary|, replace each
item in {expr1} with the result of evaluating {expr2}.
For a |Blob| each byte is replaced.
For a |String|, each character, including composing
Expand Down Expand Up @@ -6617,16 +6621,22 @@ reltimestr({time}) *reltimestr()*

*remote_expr()* *E449*
remote_expr({server}, {string} [, {idvar} [, {timeout}]])
Send the {string} to {server}. The string is sent as an
expression and the result is returned after evaluation.
The result must be a String or a |List|. A |List| is turned
into a String by joining the items with a line break in
between (not at the end), like with join(expr, "\n").
Send the {string} to {server}. The {server} argument is a
string, also see |{server}|.

The string is sent as an expression and the result is returned
after evaluation. The result must be a String or a |List|. A
|List| is turned into a String by joining the items with a
line break in between (not at the end), like with join(expr,
"\n").

If {idvar} is present and not empty, it is taken as the name
of a variable and a {serverid} for later use with
|remote_read()| is stored there.

If {timeout} is given the read times out after this many
seconds. Otherwise a timeout of 600 seconds is used.

See also |clientserver| |RemoteReply|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
Expand All @@ -6647,7 +6657,7 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]])
remote_foreground({server}) *remote_foreground()*
Move the Vim server with the name {server} to the foreground.
The {server} argument is a string.
The {server} argument is a string, also see |{server}|.
This works like: >
remote_expr({server}, "foreground()")
< Except that on Win32 systems the client does the work, to work
Expand Down Expand Up @@ -6696,12 +6706,17 @@ remote_read({serverid}, [{timeout}]) *remote_read()*
<
*remote_send()* *E241*
remote_send({server}, {string} [, {idvar}])
Send the {string} to {server}. The string is sent as input
keys and the function returns immediately. At the Vim server
the keys are not mapped |:map|.
Send the {string} to {server}. The {server} argument is a
string, also see |{server}|.

The string is sent as input keys and the function returns
immediately. At the Vim server the keys are not mapped
|:map|.

If {idvar} is present, it is taken as the name of a variable
and a {serverid} for later use with remote_read() is stored
there.

See also |clientserver| |RemoteReply|.
This function is not available in the |sandbox|.
{only available when compiled with the |+clientserver| feature}
Expand Down Expand Up @@ -6916,6 +6931,8 @@ screenpos({winid}, {lnum}, {col}) *screenpos()*
as if 'conceallevel' is zero. You can set the cursor to the
right position and use |screencol()| to get the value with
|conceal| taken into account.
If the position is in a closed fold the screen position of the
first character is returned, {col} is not used.

Can also be used as a |method|: >
GetWinid()->screenpos(lnum, col)
Expand Down Expand Up @@ -7897,7 +7914,7 @@ sha256({string}) *sha256()*
shellescape({string} [, {special}]) *shellescape()*
Escape {string} for use as a shell command argument.
When the 'shell' contains powershell (MS-Windows) or pwsh
(MS-Windows, Linux, and MacOS) then it will enclose {string}
(MS-Windows, Linux, and macOS) then it will enclose {string}
in single quotes and will double up all internal single
quotes.
On MS-Windows, when 'shellslash' is not set, it will enclose
Expand Down
8 changes: 4 additions & 4 deletions runtime/doc/editing.txt
@@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2022 Feb 04
*editing.txt* For Vim version 8.2. Last change: 2022 Feb 16


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -222,7 +222,7 @@ If you want to keep the changed buffer without saving it, switch on the
Edit {file} always. Discard any changes to the
current buffer.
Also see |++opt| and |+cmd|.

*:edit_#* *:e#*
:e[dit] [++opt] [+cmd] #[count]
Edit the [count]th buffer (as shown by |:files|).
This command does the same as [count] CTRL-^. But ":e
Expand Down Expand Up @@ -389,7 +389,7 @@ as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this
is to use "path\[[]abc]", this matches the file "path\[abc]".

*starstar-wildcard*
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
Expanding "**" is possible on Unix, Win32, macOS and a few other systems.
This allows searching a directory tree. This goes up to 100 directories deep.
Note there are some commands where this works slightly differently, see
|file-searching|.
Expand Down Expand Up @@ -1695,7 +1695,7 @@ which version of the file you want to keep.

The accuracy of the time check depends on the filesystem. On Unix it is
usually sub-second. With old file sytems and on MS-Windows it is normally one
second. Use has('nanotime') check if sub-second time stamp checks are
second. Use `has('nanotime')` to check if sub-second time stamp checks are
available.

There is one situation where you get the message while there is nothing wrong:
Expand Down
12 changes: 7 additions & 5 deletions runtime/doc/eval.txt
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2022 Feb 04
*eval.txt* For Vim version 8.2. Last change: 2022 Feb 20


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1371,7 +1371,7 @@ And NOT: >
-(1.234->string())
What comes after "->" can be a name, a simple expression (not containing any
parenthesis), or any expression in parenthesis: >
parenthesis), or any expression in parentheses: >
base->name(args)
base->some.name(args)
base->alist[idx](args)
Expand Down Expand Up @@ -2182,7 +2182,8 @@ v:lnum Line number for the 'foldexpr' |fold-expr|, 'formatexpr' and

*v:maxcol* *maxcol-variable*
v:maxcol Maximum line length. Depending on where it is used it can be
screen columns, characters or bytes.
screen columns, characters or bytes. The value currently is
2147483647 on all systems.

*v:mouse_win* *mouse_win-variable*
v:mouse_win Window number for a mouse click obtained with |getchar()|.
Expand Down Expand Up @@ -3001,8 +3002,9 @@ Also note that if you have two script files, and one calls a function in the
other and vice versa, before the used function is defined, it won't work.
Avoid using the autoload functionality at the toplevel.

In |Vim9| script you will get error *E1263* if you use a function name with a
"#" character when not in an autoload script.
In |Vim9| script you will get error *E1263* if you define a function with
a "#" character in the name. You should use a name without "#" and use
`:export`.

Hint: If you distribute a bunch of scripts you can pack them together with the
|vimball| utility. Also read the user manual |distribute-script|.
Expand Down
10 changes: 5 additions & 5 deletions runtime/doc/options.txt
@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2022 Feb 08
*options.txt* For Vim version 8.2. Last change: 2022 Feb 18


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -4038,7 +4038,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'guitablabel' 'gtl' string (default empty)
global
{only available when compiled with GUI enabled}
When nonempty describes the text to use in a label of the GUI tab
When non-empty describes the text to use in a label of the GUI tab
pages line. When empty and when the result is empty Vim will use a
default label. See |setting-guitablabel| for more info.

Expand All @@ -4056,7 +4056,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'guitabtooltip' 'gtt' string (default empty)
global
{only available when compiled with GUI enabled}
When nonempty describes the text to use in a tooltip for the GUI tab
When non-empty describes the text to use in a tooltip for the GUI tab
pages line. When empty Vim will use a default tooltip.
This option is otherwise just like 'guitablabel' above.
You can include a line break. Simplest method is to use |:let|: >
Expand Down Expand Up @@ -7459,7 +7459,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global or local to window |global-local|
{not available when compiled without the |+statusline|
feature}
When nonempty, this option determines the content of the status line.
When non-empty, this option determines the content of the status line.
Also see |status-line|.

The option consists of printf style '%' items interspersed with
Expand Down Expand Up @@ -7767,7 +7767,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'tabline'* *'tal'*
'tabline' 'tal' string (default empty)
global
When nonempty, this option determines the content of the tab pages
When non-empty, this option determines the content of the tab pages
line at the top of the Vim window. When empty Vim will use a default
tab pages line. See |setting-tabline| for more info.

Expand Down
10 changes: 5 additions & 5 deletions runtime/doc/os_win32.txt
@@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 8.2. Last change: 2021 Apr 05
*os_win32.txt* For Vim version 8.2. Last change: 2022 Feb 14


VIM REFERENCE MANUAL by George Reilly
Expand Down Expand Up @@ -294,7 +294,7 @@ A. When using :! to run an external command, you can run it with "start". For
/b no console window will be opened
You can use only one of these flags at a time. A second one will be
treated as the start of the command.

*windows-asynchronously*
Q. How do I avoid getting a window for programs that I run asynchronously?
A. You have two possible solutions depending on what you want:
1) You may use the /min flag in order to run program in a minimized state
Expand All @@ -308,17 +308,17 @@ A. You have two possible solutions depending on what you want:

Example for a console application, run Exuberant ctags: >
:!start /min ctags -R .
< When it has finished you should see file named "tags" in your current
< When it has finished you should see file named "tags" in your current
directory. You should notice the window title blinking on your taskbar.
This is more noticeable for commands that take longer.
Now delete the "tags" file and run this command: >
:!start /b ctags -R .
< You should have the same "tags" file, but this time there will be no
< You should have the same "tags" file, but this time there will be no
blinking on the taskbar.
Example for a GUI application: >
:!start /min notepad
:!start /b notepad
< The first command runs notepad minimized and the second one runs it
< The first command runs notepad minimized and the second one runs it
normally.

*windows-icon*
Expand Down
6 changes: 5 additions & 1 deletion runtime/doc/remote.txt
@@ -1,4 +1,4 @@
*remote.txt* For Vim version 8.2. Last change: 2021 Dec 27
*remote.txt* For Vim version 8.2. Last change: 2022 Feb 17


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -120,6 +120,10 @@ when sending command to it.

The --serverlist argument will cause Vim to print a list of registered command
servers on the standard output (stdout) and exit.
*{server}*
The {server} argument is used by several functions. When this is an empty
string then on Unix the default server name is used, which is "GVIM". On
MS-Windows an empty string does not work.

Win32 Note: Making the Vim server go to the foreground doesn't always work,
because MS-Windows doesn't allow it. The client will move the server to the
Expand Down
6 changes: 6 additions & 0 deletions runtime/doc/tags
Expand Up @@ -2415,6 +2415,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:dsp tagsrch.txt /*:dsp*
:dsplit tagsrch.txt /*:dsplit*
:e editing.txt /*:e*
:e# editing.txt /*:e#*
:ea undo.txt /*:ea*
:earlier undo.txt /*:earlier*
:ec eval.txt /*:ec*
Expand All @@ -2432,6 +2433,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:edit editing.txt /*:edit*
:edit! editing.txt /*:edit!*
:edit!_f editing.txt /*:edit!_f*
:edit_# editing.txt /*:edit_#*
:edit_f editing.txt /*:edit_f*
:el eval.txt /*:el*
:else eval.txt /*:else*
Expand Down Expand Up @@ -4032,6 +4034,7 @@ E1075 vim9.txt /*E1075*
E1076 eval.txt /*E1076*
E1077 vim9.txt /*E1077*
E108 eval.txt /*E108*
E1080 vim9.txt /*E1080*
E1081 eval.txt /*E1081*
E1083 editing.txt /*E1083*
E1084 eval.txt /*E1084*
Expand Down Expand Up @@ -10529,6 +10532,7 @@ vim9-namespace vim9.txt /*vim9-namespace*
vim9-no-dict-function vim9.txt /*vim9-no-dict-function*
vim9-rationale vim9.txt /*vim9-rationale*
vim9-reload vim9.txt /*vim9-reload*
vim9-s-namespace vim9.txt /*vim9-s-namespace*
vim9-scopes vim9.txt /*vim9-scopes*
vim9-script-intro usr_46.txt /*vim9-script-intro*
vim9-types vim9.txt /*vim9-types*
Expand Down Expand Up @@ -10686,6 +10690,7 @@ windowid windows.txt /*windowid*
windowid-variable eval.txt /*windowid-variable*
windows windows.txt /*windows*
windows-3.1 os_win32.txt /*windows-3.1*
windows-asynchronously os_win32.txt /*windows-asynchronously*
windows-icon os_win32.txt /*windows-icon*
windows-intro windows.txt /*windows-intro*
windows-starting windows.txt /*windows-starting*
Expand Down Expand Up @@ -10859,6 +10864,7 @@ zz scroll.txt /*zz*
{offset} pattern.txt /*{offset}*
{register} change.txt /*{register}*
{rhs} map.txt /*{rhs}*
{server} remote.txt /*{server}*
{subject} helphelp.txt /*{subject}*
{} intro.txt /*{}*
} motion.txt /*}*
Expand Down
9 changes: 1 addition & 8 deletions runtime/doc/todo.txt
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2022 Feb 11
*todo.txt* For Vim version 8.2. Last change: 2022 Feb 16


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -38,13 +38,9 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------

Disallow using "s:" in Vim9 script at the script level.
Disallow a legacy function creating an s: variable in Vim9 script.

Once Vim9 is stable:
- Use Vim9 for runtime files.
- Check code coverage, add more tests if needed.
vim9compile.c
vim9execute.c
vim9expr.c
vim9instr.c
Expand Down Expand Up @@ -421,9 +417,6 @@ When editing a file with ":edit" the output of :swapname is relative, while
editing it with "vim file" it is absolute. (#355)
Which one should it be?

:map output does not clear the reset of the command line.
(#5623, also see #5962)

Problem with auto-formatting - inserting space and putting cursor before added
character. (#6154)

Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/usr_41.txt
Expand Up @@ -162,7 +162,7 @@ and avoid errors. Such as thinking that the "-0o36" above makes the number
negative, while it is actually seen as a subtraction.

To actually have the minus sign be used for negation, you can put the second
expression in parenthesis: >
expression in parentheses: >
echo -0x7f (-0o36)
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/vim-ja.UTF-8.1
@@ -1,4 +1,4 @@
.TH VIM 1 "2006 Apr 11"
.TH VIM 1 "2021 Jun 13"
.SH 名前
vim \- Vi IMproved, プログラマのテキストエディタ
.SH 書式
Expand Down

0 comments on commit 944697a

Please sign in to comment.