Skip to content

Commit 38b772a

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents ea8d89d + b4ebf9a commit 38b772a

30 files changed

+1629
-1383
lines changed

runtime/doc/change.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*change.txt* For Vim version 7.4. Last change: 2016 Feb 10
1+
*change.txt* For Vim version 7.4. Last change: 2016 Mar 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -109,7 +109,9 @@ is an error when 'cpoptions' includes the 'E' flag.
109109
*J*
110110
J Join [count] lines, with a minimum of two lines.
111111
Remove the indent and insert up to two spaces (see
112-
below).
112+
below). Fails when on the last line of the buffer.
113+
If [count] is too big it is reduce to the number of
114+
lines available.
113115

114116
*v_J*
115117
{Visual}J Join the highlighted lines, with a minimum of two

runtime/doc/channel.txt

Lines changed: 44 additions & 40 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 06
1+
*channel.txt* For Vim version 7.4. Last change: 2016 Mar 12
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -44,8 +44,8 @@ There are four main types of jobs:
4444
4. Running a filter, synchronously.
4545
Uses pipes.
4646

47-
For when using sockets See |job-start|, |job-may-start| and |channel-open|.
48-
For 2 and 3, one or more jobs using pipes, see |job-start|.
47+
For when using sockets See |job-start|, |job-start-nochannel| and
48+
|channel-open|. For 2 and 3, one or more jobs using pipes, see |job-start|.
4949
For 4 use the ":{range}!cmd" command, see |filter|.
5050

5151
Over the socket and pipes these protocols are available:
@@ -162,7 +162,7 @@ Use |ch_status()| to see if the channel could be opened.
162162
the channel uses pipes. When "err-cb" wasn't set the channel
163163
callback is used.
164164

165-
TODO: *close-cb*
165+
*close-cb*
166166
"close-cb" A function that is called when the channel gets closed, other
167167
than by calling ch_close(). It should be defined like this: >
168168
func MyCloseHandler(channel)
@@ -410,7 +410,6 @@ are:
410410
"open" The channel can be used.
411411
"closed" The channel was closed.
412412

413-
TODO:
414413
To obtain the job associated with a channel: ch_getjob(channel)
415414

416415
To read one message from a channel: >
@@ -486,15 +485,6 @@ time a line is added to the buffer, the last-but-one line will be send to the
486485
job stdin. This allows for editing the last line and sending it when pressing
487486
Enter.
488487

489-
TODO:
490-
To run a job and read its output once it is done: >
491-
let job = job_start({command}, {'exit-cb': 'MyHandler'})
492-
func MyHandler(job, status)
493-
let channel = job_getchannel()
494-
let output = ch_readall(channel)
495-
" parse output
496-
endfunc
497-
498488
==============================================================================
499489
9. Starting a job without a channel *job-start-nochannel*
500490

@@ -504,28 +494,23 @@ To start another process without creating a channel: >
504494
505495
This starts {command} in the background, Vim does not wait for it to finish.
506496

507-
TODO:
508497
When Vim sees that neither stdin, stdout or stderr are connected, no channel
509498
will be created. Often you will want to include redirection in the command to
510499
avoid it getting stuck.
511500

512501
There are several options you can use, see |job-options|.
513502

514-
TODO: *job-may-start*
515-
To start a job only when connecting to an address does not work use
516-
job_maystart('command', {address}, {options}), For Example: >
517-
let job = job_maystart(command, address, {"waittime": 1000})
518-
let channel = job_gethandle(job)
519-
520-
This comes down to: >
503+
*job-start-if-needed*
504+
To start a job only when connecting to an address does not work, do something
505+
like this: >
521506
let channel = ch_open(address, {"waittime": 0})
522507
if ch_status(channel) == "fail"
523508
let job = job_start(command)
524509
let channel = ch_open(address, {"waittime": 1000})
525-
call job_sethandle(channel)
526510
endif
527-
Note that the specified waittime applies to when the job has been started.
528-
This gives the job some time to make the port available.
511+
512+
Note that the waittime for ch_open() gives the job one second to make the port
513+
available.
529514

530515
==============================================================================
531516
10. Job options *job-options*
@@ -560,43 +545,54 @@ See |job_setoptions()| and |ch_setoptions()|.
560545
"stoponexit": "" Do not stop the job when Vim exits.
561546
The default is "term".
562547

563-
TODO: *job-term*
548+
*job-term*
564549
"term": "open" Start a terminal and connect the job
565550
stdin/stdout/stderr to it.
551+
NOTE: Not implemented yet!
552+
553+
"channel": {channel} Use an existing channel instead of creating a new one.
554+
The parts of the channel that get used for the new job
555+
will be disconnected from what they were used before.
556+
If the channel was still use by another job this may
557+
cause I/O errors.
558+
Existing callbacks and other settings remain.
566559

567-
*job-in-io*
568-
"in-io": "null" disconnect stdin TODO
560+
*job-in-io* *in-top* *in-bot* *in-name* *in-buf*
561+
"in-io": "null" disconnect stdin (read from /dev/null)
569562
"in-io": "pipe" stdin is connected to the channel (default)
570-
"in-io": "file" stdin reads from a file TODO
563+
"in-io": "file" stdin reads from a file
571564
"in-io": "buffer" stdin reads from a buffer
572565
"in-top": number when using "buffer": first line to send (default: 1)
573566
"in-bot": number when using "buffer": last line to send (default: last)
574567
"in-name": "/path/file" the name of the file or buffer to read from
575-
"in-buf": number the number of the buffer to read from TODO
568+
"in-buf": number the number of the buffer to read from
576569

577-
*job-out-io*
578-
"out-io": "null" disconnect stdout TODO
570+
*job-out-io* *out-name* *out-buf*
571+
"out-io": "null" disconnect stdout (goes to /dev/null)
579572
"out-io": "pipe" stdout is connected to the channel (default)
580-
"out-io": "file" stdout writes to a file TODO
573+
"out-io": "file" stdout writes to a file
581574
"out-io": "buffer" stdout appends to a buffer
582575
"out-name": "/path/file" the name of the file or buffer to write to
583-
"out-buf": number the number of the buffer to write to TODO
576+
"out-buf": number the number of the buffer to write to
584577

585-
*job-err-io*
578+
*job-err-io* *err-name* *err-buf*
586579
"err-io": "out" stderr messages to go to stdout
587-
"err-io": "null" disconnect stderr TODO
580+
"err-io": "null" disconnect stderr (goes to /dev/null)
588581
"err-io": "pipe" stderr is connected to the channel (default)
589-
"err-io": "file" stderr writes to a file TODO
590-
"err-io": "buffer" stderr appends to a buffer TODO
582+
"err-io": "file" stderr writes to a file
583+
"err-io": "buffer" stderr appends to a buffer
591584
"err-name": "/path/file" the name of the file or buffer to write to
592-
"err-buf": number the number of the buffer to write to TODO
585+
"err-buf": number the number of the buffer to write to
586+
587+
588+
Writing to a buffer ~
593589

594590
When the out-io or err-io mode is "buffer" and there is a callback, the text
595591
is appended to the buffer before invoking the callback.
596592

597593
When a buffer is used both for input and output, the output lines are put
598594
above the last line, since the last line is what is written to the channel
599-
input. Otherwise lines are appened below the last line.
595+
input. Otherwise lines are appended below the last line.
600596

601597
When using JS or JSON mode with "buffer", only messages with zero or negative
602598
ID will be added to the buffer, after decoding + encoding. Messages with a
@@ -616,6 +612,14 @@ line and the window is scrolled up to show the cursor if needed.
616612

617613
Undo is synced for every added line.
618614

615+
616+
Writing to a file ~
617+
618+
The file is created with permissions 600 (read-write for the user, not
619+
accessible for others). Use |setfperm()| to change this.
620+
621+
If the file already exists it is truncated.
622+
619623
==============================================================================
620624
11. Controlling a job *job-control*
621625

runtime/doc/eval.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 7.4. Last change: 2016 Mar 07
1+
*eval.txt* For Vim version 7.4. Last change: 2016 Mar 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4468,6 +4468,9 @@ items({dict}) *items()*
44684468

44694469
job_getchannel({job}) *job_getchannel()*
44704470
Get the channel handle that {job} is using.
4471+
To check if the job has no channel: >
4472+
if string(job_getchannel()) == 'channel fail'
4473+
<
44714474
{only available when compiled with the |+job| feature}
44724475

44734476
job_setoptions({job}, {options}) *job_setoptions()*
@@ -4524,6 +4527,8 @@ job_status({job}) *job_status()* *E916*
45244527
If an exit callback was set with the "exit-cb" option and the
45254528
job is now detected to be "dead" the callback will be invoked.
45264529

4530+
For more information see |job_info()|.
4531+
45274532
{only available when compiled with the |+job| feature}
45284533

45294534
job_stop({job} [, {how}]) *job_stop()*

runtime/doc/options.txt

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

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7909,14 +7909,16 @@ A jump table for the options with a short description can be found at |Q_op|.
79097909
{not in Vi}
79107910
{only in the GTK+ 2 and MacVim GUIs}
79117911
Controls the size of toolbar icons. The possible values are:
7912-
tiny Use tiny toolbar icons.
7913-
small Use small toolbar icons (default).
7914-
medium Use medium-sized toolbar icons.
7915-
large Use large toolbar icons.
7912+
tiny Use tiny icons.
7913+
small Use small icons (default).
7914+
medium Use medium-sized icons.
7915+
large Use large icons.
7916+
huge Use even larger icons.
7917+
giant Use very big icons.
79167918
The exact dimensions in pixels of the various icon sizes depend on
7917-
the current theme. Common dimensions are large=32x32, medium=24x24,
7918-
small=20x20 and tiny=16x16. In MacVim, both tiny and small equal
7919-
24x24, whereas medium and large equal 32x32.
7919+
the current theme. Common dimensions are giant=48x48, huge=32x32,
7920+
large=24x24, medium=24x24, small=20x20 and tiny=16x16. In MacVim, both
7921+
tiny and small equal 24x24, whereas medium and large equal 32x32.
79207922

79217923
If 'toolbariconsize' is empty, the global default size as determined
79227924
by user preferences or the current theme is used.

runtime/doc/tags

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5278,6 +5278,7 @@ charity uganda.txt /*charity*
52785278
charset mbyte.txt /*charset*
52795279
charset-conversion mbyte.txt /*charset-conversion*
52805280
chill.vim syntax.txt /*chill.vim*
5281+
chmod eval.txt /*chmod*
52815282
cindent() eval.txt /*cindent()*
52825283
cinkeys-format indent.txt /*cinkeys-format*
52835284
cino-# indent.txt /*cino-#*
@@ -5697,7 +5698,9 @@ end intro.txt /*end*
56975698
end-of-file pattern.txt /*end-of-file*
56985699
enlightened-terminal syntax.txt /*enlightened-terminal*
56995700
erlang.vim syntax.txt /*erlang.vim*
5701+
err-buf channel.txt /*err-buf*
57005702
err-cb channel.txt /*err-cb*
5703+
err-name channel.txt /*err-name*
57015704
err-timeout channel.txt /*err-timeout*
57025705
errmsg-variable eval.txt /*errmsg-variable*
57035706
error-file-format quickfix.txt /*error-file-format*
@@ -6821,6 +6824,10 @@ improved-viminfo version5.txt /*improved-viminfo*
68216824
improvements-5 version5.txt /*improvements-5*
68226825
improvements-6 version6.txt /*improvements-6*
68236826
improvements-7 version7.txt /*improvements-7*
6827+
in-bot channel.txt /*in-bot*
6828+
in-buf channel.txt /*in-buf*
6829+
in-name channel.txt /*in-name*
6830+
in-top channel.txt /*in-top*
68246831
inactive-buffer windows.txt /*inactive-buffer*
68256832
include-search tagsrch.txt /*include-search*
68266833
inclusive motion.txt /*inclusive*
@@ -6904,11 +6911,11 @@ job-err-cb channel.txt /*job-err-cb*
69046911
job-err-io channel.txt /*job-err-io*
69056912
job-exit-cb channel.txt /*job-exit-cb*
69066913
job-in-io channel.txt /*job-in-io*
6907-
job-may-start channel.txt /*job-may-start*
69086914
job-options channel.txt /*job-options*
69096915
job-out-cb channel.txt /*job-out-cb*
69106916
job-out-io channel.txt /*job-out-io*
69116917
job-start channel.txt /*job-start*
6918+
job-start-if-needed channel.txt /*job-start-if-needed*
69126919
job-start-nochannel channel.txt /*job-start-nochannel*
69136920
job-stoponexit channel.txt /*job-stoponexit*
69146921
job-term channel.txt /*job-term*
@@ -7666,7 +7673,9 @@ os_unix.txt os_unix.txt /*os_unix.txt*
76667673
os_vms.txt os_vms.txt /*os_vms.txt*
76677674
os_win32.txt os_win32.txt /*os_win32.txt*
76687675
other-features vi_diff.txt /*other-features*
7676+
out-buf channel.txt /*out-buf*
76697677
out-cb channel.txt /*out-cb*
7678+
out-name channel.txt /*out-name*
76707679
out-timeout channel.txt /*out-timeout*
76717680
p change.txt /*p*
76727681
pack-add repeat.txt /*pack-add*
@@ -8073,6 +8082,7 @@ set-spc-auto spell.txt /*set-spc-auto*
80738082
setbufvar() eval.txt /*setbufvar()*
80748083
setcharsearch() eval.txt /*setcharsearch()*
80758084
setcmdpos() eval.txt /*setcmdpos()*
8085+
setfperm() eval.txt /*setfperm()*
80768086
setline() eval.txt /*setline()*
80778087
setloclist() eval.txt /*setloclist()*
80788088
setmatches() eval.txt /*setmatches()*

0 commit comments

Comments
 (0)