Skip to content

Commit 4f3f668

Browse files
committed
Updated runtime files.
1 parent c4dcd60 commit 4f3f668

10 files changed

Lines changed: 232 additions & 120 deletions

File tree

runtime/doc/autocmd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 7.4. Last change: 2015 Dec 05
1+
*autocmd.txt* For Vim version 7.4. Last change: 2016 Mar 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/channel.txt

Lines changed: 63 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*channel.txt* For Vim version 7.4. Last change: 2016 Mar 15
1+
*channel.txt* For Vim version 7.4. Last change: 2016 Mar 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -120,24 +120,13 @@ Use |ch_status()| to see if the channel could be opened.
120120

121121
{address} has the form "hostname:port". E.g., "localhost:8765".
122122

123-
{options} is a dictionary with optional entries:
123+
{options} is a dictionary with optional entries: *channel-open-options*
124124

125125
"mode" can be: *channel-mode*
126126
"json" - Use JSON, see below; most convenient way. Default.
127127
"js" - Use JS (JavaScript) encoding, more efficient than JSON.
128128
"nl" - Use messages that end in a NL character
129129
"raw" - Use raw messages
130-
*in_mode* *out_mode* *err_mode*
131-
"in_mode" mode specifically for stdin, only when using pipes
132-
"out_mode" mode specifically for stdout, only when using pipes
133-
"err_mode" mode specifically for stderr, only when using pipes
134-
Note: when setting "mode" the part specific mode is
135-
overwritten. Therefore set "mode" first and the part specific
136-
mode later.
137-
138-
Note: when writing to a file or buffer and when reading from a
139-
buffer NL mode is used by default.
140-
141130
*channel-callback* *E921*
142131
"callback" A function that is called when a message is received that is
143132
not handled otherwise. It gets two arguments: the channel
@@ -155,16 +144,8 @@ Use |ch_status()| to see if the channel could be opened.
155144
as a string.
156145

157146
For all callbacks: Use |function()| to bind it to arguments
158-
and/or a dictionary.
159-
*out_cb*
160-
"out_cb" A function like "callback" but used for stdout. Only for when
161-
the channel uses pipes. When "out_cb" wasn't set the channel
162-
callback is used.
163-
*err_cb*
164-
"err_cb" A function like "callback" but used for stderr. Only for when
165-
the channel uses pipes. When "err_cb" wasn't set the channel
166-
callback is used.
167-
147+
and/or a Dictionary. Or use the form "dict.function" to bind
148+
the Dictionary.
168149
*close_cb*
169150
"close_cb" A function that is called when the channel gets closed, other
170151
than by calling ch_close(). It should be defined like this: >
@@ -178,16 +159,10 @@ Use |ch_status()| to see if the channel could be opened.
178159
actually uses a 1 msec timeout, that is required on many
179160
systems. Use a larger value for a remote server, e.g. 10
180161
msec at least.
181-
162+
*channel-timeout*
182163
"timeout" The time to wait for a request when blocking, E.g. when using
183164
ch_evalexpr(). In milliseconds. The default is 2000 (2
184165
seconds).
185-
*out_timeout* *err_timeout*
186-
"out_timeout" Timeout for stdout. Only when using pipes.
187-
"err_timeout" Timeout for stderr. Only when using pipes.
188-
Note: when setting "timeout" the part specific mode is
189-
overwritten. Therefore set "timeout" first and the part
190-
specific mode later.
191166

192167
When "mode" is "json" or "js" the "callback" is optional. When omitted it is
193168
only possible to receive a message after sending one.
@@ -215,6 +190,13 @@ pipes are used (stdin/stdout/stderr) they are all closed. This might not be
215190
what you want! Stopping the job with job_stop() might be better.
216191
All readahead is discarded, callbacks will no longer be invoked.
217192

193+
Note that a channel is closed in three stages:
194+
- The I/O ends, log message: "Closing channel". There can still be queued
195+
messages to read or callbacks to invoke.
196+
- The readahead is cleared, log message: "Clearing channel". Some variables
197+
may still reference the channel.
198+
- The channel is freed, log message: "Freeing channel".
199+
218200
When the channel can't be opened you will get an error message. There is a
219201
difference between MS-Windows and Unix: On Unix when the port doesn't exist
220202
ch_open() fails quickly. On MS-Windows "waittime" applies.
@@ -326,6 +308,9 @@ completion or error. You could use functions in an |autoload| script:
326308

327309
You can also use "call |feedkeys()|" to insert any key sequence.
328310

311+
When there is an error a message is written to the channel log, if it exists,
312+
and v:errmsg is set to the error.
313+
329314

330315
Command "normal" ~
331316

@@ -428,6 +413,23 @@ To read all output from a RAW channel that is available: >
428413
To read the error output: >
429414
let output = ch_readraw(channel, {"part": "err"})
430415
416+
ch_read() and ch_readraw() use the channel timeout. When there is nothing to
417+
read within that time an empty string is returned. To specify a different
418+
timeout in msec use the "timeout" option:
419+
{"timeout": 123} ~
420+
To read from the error output use the "part" option:
421+
{"part": "err"} ~
422+
To read a message with a specific ID, on a JS or JSON channel:
423+
{"id": 99} ~
424+
When no ID is specified or the ID is -1, the first message is returned. This
425+
overrules any callback waiting for this message.
426+
427+
For a RAW channel this returns whatever is available, since Vim does not know
428+
where a message ends.
429+
For a NL channel this returns one message.
430+
For a JS or JSON channel this returns one decoded message.
431+
This includes any sequence number.
432+
431433
==============================================================================
432434
8. Starting a job with a channel *job-start* *job*
433435

@@ -524,15 +526,31 @@ job_setoptions(job, {options}). Many options can be used with the channel
524526
related to the job, using ch_setoptions(channel, {options}).
525527
See |job_setoptions()| and |ch_setoptions()|.
526528

529+
*in_mode* *out_mode* *err_mode*
530+
"in_mode" mode specifically for stdin, only when using pipes
531+
"out_mode" mode specifically for stdout, only when using pipes
532+
"err_mode" mode specifically for stderr, only when using pipes
533+
See |channel-mode| for the values.
534+
535+
Note: when setting "mode" the part specific mode is
536+
overwritten. Therefore set "mode" first and the part
537+
specific mode later.
538+
539+
Note: when writing to a file or buffer and when
540+
reading from a buffer NL mode is used by default.
541+
527542
*job-callback*
528543
"callback": handler Callback for something to read on any part of the
529544
channel.
530-
*job-out_cb*
545+
*job-out_cb* *out_cb*
531546
"out_cb": handler Callback for when there is something to read on
532-
stdout.
533-
*job-err_cb*
547+
stdout. Only for when the channel uses pipes. When
548+
"out_cb" wasn't set the channel callback is used.
549+
550+
*job-err_cb* *err_cb*
534551
"err_cb": handler Callback for when there is something to read on
535-
stderr.
552+
stderr. Only for when the channel uses pipes. When
553+
"err_cb" wasn't set the channel callback is used.
536554
*job-close_cb*
537555
"close_cb": handler Callback for when the channel is closed. Same as
538556
"close_cb" on ch_open().
@@ -542,6 +560,17 @@ See |job_setoptions()| and |ch_setoptions()|.
542560
Vim checks about every 10 seconds for jobs that ended.
543561
The callback can also be triggered by calling
544562
|job_status()|.
563+
*job-timeout*
564+
"timeout" The time to wait for a request when blocking, E.g.
565+
when using ch_evalexpr(). In milliseconds. The
566+
default is 2000 (2 seconds).
567+
*out_timeout* *err_timeout*
568+
"out_timeout" Timeout for stdout. Only when using pipes.
569+
"err_timeout" Timeout for stderr. Only when using pipes.
570+
Note: when setting "timeout" the part specific mode is
571+
overwritten. Therefore set "timeout" first and the
572+
part specific mode later.
573+
545574
*job-stoponexit*
546575
"stoponexit": {signal} Send {signal} to the job when Vim exits. See
547576
|job_stop()| for possible values.

runtime/doc/eval.txt

Lines changed: 20 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 7.4. Last change: 2016 Mar 20
1+
*eval.txt* For Vim version 7.4. Last change: 2016 Mar 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2716,13 +2716,6 @@ ch_close({handle}) *ch_close()*
27162716
Close {handle}. See |channel-close|.
27172717
{handle} can be Channel or a Job that has a Channel.
27182718

2719-
Note that a channel is closed in three stages:
2720-
- The I/O ends, log message: "Closing channel". There can
2721-
still be queued messages to read or callbacks to invoke.
2722-
- The readahead is cleared, log message: "Clearing channel".
2723-
Some variables may still reference the channel.
2724-
- The channel is freed, log message: "Freeing channel".
2725-
27262719
{only available when compiled with the |+channel| feature}
27272720

27282721
ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
@@ -2732,7 +2725,8 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
27322725
{handle} can be Channel or a Job that has a Channel.
27332726
*E917*
27342727
{options} must be a Dictionary. It must not have a "callback"
2735-
entry. It can have a "timeout" entry.
2728+
entry. It can have a "timeout" entry to specify the timeout
2729+
for this specific request.
27362730

27372731
ch_evalexpr() waits for a response and returns the decoded
27382732
expression. When there is an error or timeout it returns an
@@ -2816,65 +2810,34 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()*
28162810

28172811
ch_open({address} [, {options}]) *ch_open()*
28182812
Open a channel to {address}. See |channel|.
2819-
Returns a Channel. Use |ch_status()| to check for
2820-
failure.
2813+
Returns a Channel. Use |ch_status()| to check for failure.
28212814

28222815
{address} has the form "hostname:port", e.g.,
28232816
"localhost:8765".
28242817

2825-
If {options} is given it must be a |Dictionary|. The optional
2826-
items are:
2827-
mode "raw", "js" or "json".
2828-
Default "json".
2829-
callback function to call for requests with a zero
2830-
sequence number. See |channel-callback|.
2831-
Default: none.
2832-
waittime Specify connect timeout as milliseconds.
2833-
Negative means forever.
2834-
Default: 0 (don't wait)
2835-
timeout Specify response read timeout value in
2836-
milliseconds.
2837-
Default: 2000.
2818+
If {options} is given it must be a |Dictionary|.
2819+
See |channel-open-options|.
2820+
28382821
{only available when compiled with the |+channel| feature}
28392822

28402823
ch_read({handle} [, {options}]) *ch_read()*
28412824
Read from {handle} and return the received message.
28422825
{handle} can be Channel or a Job that has a Channel.
2843-
2844-
This uses the channel timeout. When there is nothing to read
2845-
within that time an empty string is returned. To specify a
2846-
different timeout in msec use the "timeout" option:
2847-
{"timeout": 123} ~
2848-
To read from the error output use the "part" option:
2849-
{"part": "err"} ~
2850-
To read a message with a specific ID, on a JS or JSON channel:
2851-
{"id": 99} ~
2852-
When no ID is specified or the ID is -1, the first message is
2853-
returned. This overrules any callback waiting for this
2854-
message.
2855-
2856-
For a RAW channel this returns whatever is available, since
2857-
Vim does not know where a message ends.
2858-
For a NL channel this returns one message.
2859-
For a JS or JSON channel this returns one decoded message.
2860-
This includes any sequence number.
2826+
See |channel-more|.
2827+
{only available when compiled with the |+channel| feature}
28612828

28622829
ch_readraw({handle} [, {options}]) *ch_readraw()*
28632830
Like ch_read() but for a JS and JSON channel does not decode
2864-
the message.
2831+
the message. See |channel-more|.
2832+
{only available when compiled with the |+channel| feature}
28652833

28662834
ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
28672835
Send {expr} over {handle}. The {expr} is encoded
28682836
according to the type of channel. The function cannot be used
2869-
with a raw channel. See |channel-use|. *E912*
2837+
with a raw channel.
2838+
See |channel-use|. *E912*
28702839
{handle} can be Channel or a Job that has a Channel.
28712840

2872-
{options} must be a Dictionary. The "callback" item is a
2873-
Funcref or the name of a function it is invoked when the
2874-
response is received. See |channel-callback|.
2875-
Without "callback" the channel handler is invoked, otherwise
2876-
any received message is dropped.
2877-
28782841
{only available when compiled with the |+channel| feature}
28792842

28802843
ch_sendraw({handle}, {string} [, {options}]) *ch_sendraw()*
@@ -6675,13 +6638,17 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
66756638
Float, String or a composition of them, then the result can be
66766639
parsed back with |eval()|.
66776640
{expr} type result ~
6678-
String 'string'
6641+
String 'string' (single quotes are doubled)
66796642
Number 123
66806643
Float 123.123456 or 1.123456e8
66816644
Funcref function('name')
66826645
List [item, item]
66836646
Dictionary {key: value, key: value}
6684-
Note that in String values the ' character is doubled.
6647+
6648+
When a List or Dictionary has a recursive reference it is
6649+
replaced by "[...]" or "{...}". Using eval() on the result
6650+
will then fail.
6651+
66856652
Also see |strtrans()|.
66866653

66876654
*strlen()*
@@ -7665,6 +7632,7 @@ unix Unix version of Vim.
76657632
user_commands User-defined commands.
76667633
vertsplit Compiled with vertically split windows |:vsplit|.
76677634
vim_starting True while initial source'ing takes place. |startup|
7635+
*vim_starting*
76687636
viminfo Compiled with viminfo support.
76697637
virtualedit Compiled with 'virtualedit' option.
76707638
visual Compiled with Visual mode.

runtime/doc/helphelp.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*helphelp.txt* For Vim version 7.4. Last change: 2016 Mar 12
1+
*helphelp.txt* For Vim version 7.4. Last change: 2016 Mar 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -208,9 +208,11 @@ command: >
208208
sorted.
209209
When there are duplicates an error message is given.
210210
An existing tags file is silently overwritten.
211+
211212
The optional "++t" argument forces adding the
212213
"help-tags" tag. This is also done when the {dir} is
213214
equal to $VIMRUNTIME/doc.
215+
214216
To rebuild the help tags in the runtime directory
215217
(requires write permission there): >
216218
:helptags $VIMRUNTIME/doc

runtime/doc/options.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 7.4. Last change: 2016 Mar 19
1+
*options.txt* For Vim version 7.4. Last change: 2016 Mar 24
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2292,6 +2292,8 @@ A jump table for the options with a short description can be found at |Q_op|.
22922292
different. The whole undo file is encrypted, not just
22932293
the pieces of text.
22942294

2295+
You should use "blowfish2", also to re-encrypt older files.
2296+
22952297
When reading an encrypted file 'cryptmethod' will be set automatically
22962298
to the detected method of the file being read. Thus if you write it
22972299
without changing 'cryptmethod' the same method will be used.
@@ -3030,8 +3032,8 @@ A jump table for the options with a short description can be found at |Q_op|.
30303032
file only, the option is not changed.
30313033
When 'binary' is set, the value of 'fileformats' is not used.
30323034

3033-
Note that when Vim starts up with an empty buffer this option is not
3034-
used. Set 'fileformat' in your .vimrc instead.
3035+
When Vim starts up with an empty buffer the first item is used. You
3036+
can overrule this by setting 'fileformat' in your .vimrc.
30353037

30363038
For systems with a Dos-like <EOL> (<CR><NL>), when reading files that
30373039
are ":source"ed and for vimrc files, automatic <EOL> detection may be
@@ -5115,6 +5117,7 @@ A jump table for the options with a short description can be found at |Q_op|.
51155117
written. A ":set nomodified" command also resets the original
51165118
values to the current values and the 'modified' option will be
51175119
reset.
5120+
Similarly for 'eol' and 'bomb'.
51185121
This option is not set when a change is made to the buffer as the
51195122
result of a BufNewFile, BufRead/BufReadPost, BufWritePost,
51205123
FileAppendPost or VimLeave autocommand event. See |gzip-example| for

0 commit comments

Comments
 (0)