Skip to content

Commit 77cdfd1

Browse files
committed
Updated runtime files.
1 parent 4fc563b commit 77cdfd1

23 files changed

Lines changed: 352 additions & 283 deletions

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: 4 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()*

runtime/doc/options.txt

Lines changed: 9 additions & 7 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
@@ -7769,13 +7769,15 @@ A jump table for the options with a short description can be found at |Q_op|.
77697769
{not in Vi}
77707770
{only in the GTK+ 2 GUI}
77717771
Controls the size of toolbar icons. The possible values are:
7772-
tiny Use tiny toolbar icons.
7773-
small Use small toolbar icons (default).
7774-
medium Use medium-sized toolbar icons.
7775-
large Use large toolbar icons.
7772+
tiny Use tiny icons.
7773+
small Use small icons (default).
7774+
medium Use medium-sized icons.
7775+
large Use large icons.
7776+
huge Use even larger icons.
7777+
giant Use very big icons.
77767778
The exact dimensions in pixels of the various icon sizes depend on
7777-
the current theme. Common dimensions are large=32x32, medium=24x24,
7778-
small=20x20 and tiny=16x16.
7779+
the current theme. Common dimensions are giant=48x48, huge=32x32,
7780+
large=24x24, medium=24x24, small=20x20 and tiny=16x16.
77797781

77807782
If 'toolbariconsize' is empty, the global default size as determined
77817783
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
@@ -5226,6 +5226,7 @@ charity uganda.txt /*charity*
52265226
charset mbyte.txt /*charset*
52275227
charset-conversion mbyte.txt /*charset-conversion*
52285228
chill.vim syntax.txt /*chill.vim*
5229+
chmod eval.txt /*chmod*
52295230
cindent() eval.txt /*cindent()*
52305231
cinkeys-format indent.txt /*cinkeys-format*
52315232
cino-# indent.txt /*cino-#*
@@ -5642,7 +5643,9 @@ end intro.txt /*end*
56425643
end-of-file pattern.txt /*end-of-file*
56435644
enlightened-terminal syntax.txt /*enlightened-terminal*
56445645
erlang.vim syntax.txt /*erlang.vim*
5646+
err-buf channel.txt /*err-buf*
56455647
err-cb channel.txt /*err-cb*
5648+
err-name channel.txt /*err-name*
56465649
err-timeout channel.txt /*err-timeout*
56475650
errmsg-variable eval.txt /*errmsg-variable*
56485651
error-file-format quickfix.txt /*error-file-format*
@@ -6762,6 +6765,10 @@ improved-viminfo version5.txt /*improved-viminfo*
67626765
improvements-5 version5.txt /*improvements-5*
67636766
improvements-6 version6.txt /*improvements-6*
67646767
improvements-7 version7.txt /*improvements-7*
6768+
in-bot channel.txt /*in-bot*
6769+
in-buf channel.txt /*in-buf*
6770+
in-name channel.txt /*in-name*
6771+
in-top channel.txt /*in-top*
67656772
inactive-buffer windows.txt /*inactive-buffer*
67666773
include-search tagsrch.txt /*include-search*
67676774
inclusive motion.txt /*inclusive*
@@ -6845,11 +6852,11 @@ job-err-cb channel.txt /*job-err-cb*
68456852
job-err-io channel.txt /*job-err-io*
68466853
job-exit-cb channel.txt /*job-exit-cb*
68476854
job-in-io channel.txt /*job-in-io*
6848-
job-may-start channel.txt /*job-may-start*
68496855
job-options channel.txt /*job-options*
68506856
job-out-cb channel.txt /*job-out-cb*
68516857
job-out-io channel.txt /*job-out-io*
68526858
job-start channel.txt /*job-start*
6859+
job-start-if-needed channel.txt /*job-start-if-needed*
68536860
job-start-nochannel channel.txt /*job-start-nochannel*
68546861
job-stoponexit channel.txt /*job-stoponexit*
68556862
job-term channel.txt /*job-term*
@@ -7572,7 +7579,9 @@ os_unix.txt os_unix.txt /*os_unix.txt*
75727579
os_vms.txt os_vms.txt /*os_vms.txt*
75737580
os_win32.txt os_win32.txt /*os_win32.txt*
75747581
other-features vi_diff.txt /*other-features*
7582+
out-buf channel.txt /*out-buf*
75757583
out-cb channel.txt /*out-cb*
7584+
out-name channel.txt /*out-name*
75767585
out-timeout channel.txt /*out-timeout*
75777586
p change.txt /*p*
75787587
pack-add repeat.txt /*pack-add*
@@ -7979,6 +7988,7 @@ set-spc-auto spell.txt /*set-spc-auto*
79797988
setbufvar() eval.txt /*setbufvar()*
79807989
setcharsearch() eval.txt /*setcharsearch()*
79817990
setcmdpos() eval.txt /*setcmdpos()*
7991+
setfperm() eval.txt /*setfperm()*
79827992
setline() eval.txt /*setline()*
79837993
setloclist() eval.txt /*setloclist()*
79847994
setmatches() eval.txt /*setmatches()*

runtime/doc/todo.txt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 7.4. Last change: 2016 Mar 07
1+
*todo.txt* For Vim version 7.4. Last change: 2016 Mar 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,16 +35,11 @@ not be repeated below, unless there is extra information.
3535
-------------------- Known bugs and current work -----------------------
3636

3737
+channel:
38+
- CHANNEL_PIPES -> FEAT_JOB
39+
- FEAT_JOB / FEAT_CHANNEL -> FEAT_JOBCHANNEL ?
3840
- move code from eval.c to channel.c
39-
- implement TODO items in ":help channel":
40-
- job_start() options:
41-
in-io: null, in-buf
42-
out-io: null, file, out-buf
43-
err-io: null, file (err-name), buffer (err-buf)
44-
existing channel to use
45-
- job_maystart()
46-
- add job_info(): process ID, run/dead, etc.
47-
- add ch_info(): in/out/err mode, timeout, callbacks, etc.
41+
- add job_info(): process ID, run/dead, etc.
42+
- add ch_info(): in/out/err mode, timeout, callbacks, etc.
4843
- Move more details from eval.txt to channel.txt. Add tags in eval.txt.
4944
- When receiving malformed json starting with a quote it doesn't get
5045
discarded. Any invalid JSON or JSON that isn't a list will block further
@@ -53,16 +48,16 @@ not be repeated below, unless there is extra information.
5348
properly.
5449
- When a message in the queue but there is no callback, drop it after a while?
5550
Add timestamp to queued messages and callbacks with ID, remove after a
56-
minute.
57-
- Add more log calls, basically at every branch, before every callback, etc.
58-
- add remark about undo sync, is there a way to force it?
51+
minute. Option to set the droptime.
52+
- Add more ch_log calls, basically at every branch, before every callback, etc.
53+
- Add remark about undo sync, is there a way to force it?
5954
- When starting a job, have an option to open the server socket, so we know
6055
the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz,
6156
Feb 9) How to do this on MS-Windows?
6257
- Add more unit-testing in json_test.c
6358
- Add a test where ["eval","getline(123)"] gets a line with special
6459
characters (NUL, 0x80, etc.). Check that it isn't garbled.
65-
- make sure errors lead to a useful error msg. ["ex","foobar"]
60+
- Make sure errors lead to a useful error msg. ["ex","foobar"]
6661
- For connection to server, a "keep open" flag would be useful. Retry
6762
connecting in the main loop with zero timeout.
6863
Later
@@ -71,13 +66,16 @@ Later
7166

7267
emoji patch from Yasuhiro Matsumoto. Asked Thomas Dickey.
7368

69+
Remove sticky type checking.
70+
7471
Packages:
7572
- Add command to update help tags in 'runtimepath'. Pathogen has something
7673
like that.
7774
- colorscheme command in .vimrc doesn't work.
78-
- Postpone until later?
79-
- Also search in 'packpath'?
80-
- command to load packages now?
75+
- Also search in 'packpath', both "start" and "opt", don't add dir to 'rtp'
76+
- command like :runtime that also search 'packpath'. :packruntime
77+
use "ever" or "opt"? both?
78+
- command to load packages now?
8179

8280
More plugin support:
8381
- Have a way to install a callback from the main loop. Called every second or
@@ -198,9 +196,13 @@ Two patches now? New update Feb 24.
198196
Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
199197
Also in update of Feb 24?
200198

199+
After 7.5 is released:
200+
- Drop support for older MS-Windows systems, before XP.
201+
Patch from Ken Takata, 2016 Mar 8.
202+
201203
Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki
202204
Kiichi, 2016 Feb 28)
203-
https://gist.github.com/ichizok/64bdc92aed19ec9001dd
205+
Update Mar 8: https://gist.github.com/mattn/23c1f50999084992ca98
204206

205207
Need to try out instructions in INSSTALLpc.txt about how to install all
206208
interfaces and how to build Vim with them.
@@ -225,8 +227,6 @@ What if there is an invalid character?
225227
Should jsonencode()/jsondecode() restrict recursiveness?
226228
Or avoid recursiveness.
227229

228-
Patch to fix bug in statusline highlighting. (Christian Brabandt, 2016 Feb 2)
229-
230230
Use vim.vim syntax highlighting for help file examples, but without ":" in
231231
'iskeyword' for syntax.
232232

@@ -306,7 +306,7 @@ set_color_count().
306306

307307
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
308308

309-
Comparing nested structures with "==" uses a different comperator than when
309+
Comparing nested structures with "==" uses a different comparator than when
310310
comparing individual items.
311311
Also, "'' == 0" evaluates to true, which isn't nice.
312312
Add "===" to have a strict comparison (type and value match).

0 commit comments

Comments
 (0)