diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 7 | ||||
-rw-r--r-- | runtime/doc/job_control.txt | 8 | ||||
-rw-r--r-- | runtime/doc/nvim_intro.txt | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 869c416b88..fca8ac1291 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4014,8 +4014,15 @@ items({dict}) *items()* jobsend({job}, {data}) {Nvim} *jobsend()* Send data to {job} by writing it to the stdin of the process. + Returns 1 if the write succeeded, 0 otherwise. See |job-control| for more information. + {data} may be a string, string convertible, or a list. If + {data} is a list, the items will be separated by newlines and + any newlines in an item will be sent as a NUL. For example: > + :call jobsend(j, ["abc", "123\n456"]) +< will send "abc<NL>123<NUL>456<NL>". + jobstart({name}, {prog}[, {argv}]) {Nvim} *jobstart()* Spawns {prog} as a job and associate it with the {name} string, which will be used to match the "filename pattern" in diff --git a/runtime/doc/job_control.txt b/runtime/doc/job_control.txt index 49ee3889bc..226244875d 100644 --- a/runtime/doc/job_control.txt +++ b/runtime/doc/job_control.txt @@ -47,9 +47,9 @@ event. The best way to understand is with a complete example: function JobHandler() if v:job_data[1] == 'stdout' - let str = 'shell '. v:job_data[0].' stdout: '.v:job_data[2] + let str = 'shell '. v:job_data[0].' stdout: '.join(v:job_data[2]) elseif v:job_data[1] == 'stderr' - let str = 'shell '.v:job_data[0].' stderr: '.v:job_data[2] + let str = 'shell '.v:job_data[0].' stderr: '.join(v:job_data[2]) else let str = 'shell '.v:job_data[0].' exited' endif @@ -80,8 +80,8 @@ Here's what is happening: following elements: 0: The job id 1: The kind of activity: one of "stdout", "stderr" or "exit" - 2: When "activity" is "stdout" or "stderr", this will contain the data read - from stdout or stderr + 2: When "activity" is "stdout" or "stderr", this will contain a list of + lines read from stdout or stderr To send data to the job's stdin, one can use the |jobsend()| function, like this: diff --git a/runtime/doc/nvim_intro.txt b/runtime/doc/nvim_intro.txt index d3aa459ba2..7b115b1912 100644 --- a/runtime/doc/nvim_intro.txt +++ b/runtime/doc/nvim_intro.txt @@ -4,7 +4,7 @@ NVIM REFERENCE MANUAL by Thiago de Arruda -Introduction to Nvim *nvim-intro* +Introduction to Nvim *nvim* *nvim-intro* This is an introduction to Vim users that are just getting started with Nvim. It is not meant for Vim beginners. For a basic introduction to Vim, |