Update runtime files.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Nov 21
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Dec 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -909,7 +909,7 @@ Insert mode to avoid every key with a modifier causing Insert mode to end.
|
||||
1.12 MAPPING AN OPERATOR *:map-operator*
|
||||
|
||||
An operator is used before a {motion} command. To define your own operator
|
||||
you must create mapping that first sets the 'operatorfunc' option and then
|
||||
you must create a mapping that first sets the 'operatorfunc' option and then
|
||||
invoke the |g@| operator. After the user types the {motion} command the
|
||||
specified function will be called.
|
||||
|
||||
@ -1321,15 +1321,15 @@ last defined. Example: >
|
||||
See |:verbose-cmd| for more information.
|
||||
|
||||
*E174* *E182*
|
||||
:com[mand][!] [{attr}...] {cmd} {rep}
|
||||
:com[mand][!] [{attr}...] {cmd} {repl}
|
||||
Define a user command. The name of the command is
|
||||
{cmd} and its replacement text is {rep}. The command's
|
||||
attributes (see below) are {attr}. If the command
|
||||
already exists, an error is reported, unless a ! is
|
||||
specified, in which case the command is redefined.
|
||||
There is one exception: When sourcing a script again,
|
||||
a command that was previously defined in that script
|
||||
will be silently replaced.
|
||||
{cmd} and its replacement text is {repl}. The
|
||||
command's attributes (see below) are {attr}. If the
|
||||
command already exists, an error is reported, unless a
|
||||
! is specified, in which case the command is
|
||||
redefined. There is one exception: When sourcing a
|
||||
script again, a command that was previously defined in
|
||||
that script will be silently replaced.
|
||||
|
||||
|
||||
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
|
||||
@ -1539,11 +1539,11 @@ feature. Use the full name for new scripts.
|
||||
|
||||
Replacement text ~
|
||||
|
||||
The replacement text for a user defined command is scanned for special escape
|
||||
sequences, using <...> notation. Escape sequences are replaced with values
|
||||
from the entered command line, and all other text is copied unchanged. The
|
||||
resulting string is executed as an Ex command. To avoid the replacement use
|
||||
<lt> in place of the initial <. Thus to include "<bang>" literally use
|
||||
The replacement text {repl} for a user defined command is scanned for special
|
||||
escape sequences, using <...> notation. Escape sequences are replaced with
|
||||
values from the entered command line, and all other text is copied unchanged.
|
||||
The resulting string is executed as an Ex command. To avoid the replacement
|
||||
use <lt> in place of the initial <. Thus to include "<bang>" literally use
|
||||
"<lt>bang>".
|
||||
|
||||
The valid escape sequences are
|
||||
@ -1669,6 +1669,11 @@ errors and the "update" command to write modified buffers): >
|
||||
This will invoke: >
|
||||
:call Allargs("%s/foo/bar/ge|update")
|
||||
<
|
||||
If the command is defined in Vim9 script (a script that starts with
|
||||
`:vim9script` and in a `:def` function) then {repl} will be executed as in Vim9
|
||||
script. Thus this depends on where the command is defined, not where it is
|
||||
used.
|
||||
|
||||
When defining a user command in a script, it will be able to call functions
|
||||
local to the script and use mappings local to the script. When the user
|
||||
invokes the user command, it will run in the context of the script it was
|
||||
|
||||
Reference in New Issue
Block a user