aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt41
1 files changed, 24 insertions, 17 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 16f9a2ea6e..77db2699f8 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1524,13 +1524,18 @@ v:errors Errors found by assert functions, such as |assert_true()|.
list by the assert function.
*v:event* *event-variable*
-v:event Dictionary of event data for the current |autocommand|. The
- available keys differ per event type and are specified at the
- documentation for each |event|. The possible keys are:
- operator The operation performed. Unlike
- |v:operator|, it is set also for an Ex
- mode command. For instance, |:yank| is
- translated to "|y|".
+v:event Dictionary of event data for the current |autocommand|. Valid
+ only during the autocommand lifetime: storing or passing
+ `v:event` is invalid. Copy it instead: >
+ au TextYankPost * let g:foo = deepcopy(v:event)
+< Keys vary by event; see the documentation for the specific
+ event, e.g. |TextYankPost|.
+ KEY DESCRIPTION ~
+ operator The current |operator|. Also set for
+ Ex commands (unlike |v:operator|). For
+ example if |TextYankPost| is triggered
+ by the |:yank| Ex command then
+ `v:event['operator']` is "y".
regcontents Text stored in the register as a
|readfile()|-style list of lines.
regname Requested register (e.g "x" for "xyy)
@@ -4847,16 +4852,18 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
Spawns {cmd} as a job. If {cmd} is a |List| it is run
directly. If {cmd} is a |String| it is processed like this: >
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
-< NOTE: This only shows the idea; see |shell-unquoting| before
- constructing lists with 'shell' or 'shellcmdflag'.
-
- NOTE: On Windows if {cmd} is a List, cmd[0] must be a valid
- executable (.exe, .com). If the executable is in $PATH it can
- be called by name, with or without an extension: >
- :call jobstart(['ping', 'neovim.io'])
-< If it is a path (not a name), it must include the extension: >
- :call jobstart(['System32\ping.exe', 'neovim.io'])
-<
+< (Only shows the idea; see |shell-unquoting| for full details.)
+
+ NOTE: on Windows if {cmd} is a List:
+ - cmd[0] must be an executable (not a "built-in"). If it is
+ in $PATH it can be called by name, without an extension: >
+ :call jobstart(['ping', 'neovim.io'])
+< If it is a full or partial path, extension is required: >
+ :call jobstart(['System32\ping.exe', 'neovim.io'])
+< - {cmd} is collapsed to a string of quoted args as expected
+ by CommandLineToArgvW https://msdn.microsoft.com/bb776391
+ unless cmd[0] is some form of "cmd.exe".
+
{opts} is a dictionary with these keys:
on_stdout: stdout event handler (function name or |Funcref|)
on_stderr: stderr event handler (function name or |Funcref|)