1- *eval.txt* For Vim version 7.4. Last change: 2016 Feb 07
1+ *eval.txt* For Vim version 7.4. Last change: 2016 Feb 13
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1416,7 +1416,7 @@ v:exception The value of the exception most recently caught and not
14161416
14171417 *v:false* *false-variable*
14181418v:false A Number with value zero. Used to put "false" in JSON. See
1419- | jsonencode ()| .
1419+ | json_encode ()| .
14201420 When used as a string this evaluates to "false". >
14211421 echo v:false
14221422< false ~
@@ -1556,15 +1556,15 @@ v:mouse_col Column number for a mouse click obtained with |getchar()|.
15561556
15571557 *v:none* *none-variable*
15581558v:none An empty String. Used to put an empty item in JSON. See
1559- | jsonencode ()| .
1559+ | json_encode ()| .
15601560 When used as a number this evaluates to zero.
15611561 When used as a string this evaluates to "none". >
15621562 echo v:none
15631563< none ~
15641564
15651565 *v:null* *null-variable*
15661566v:null An empty String. Used to put "null" in JSON. See
1567- | jsonencode ()| .
1567+ | json_encode ()| .
15681568 When used as a number this evaluates to zero.
15691569 When used as a string this evaluates to "null". >
15701570 echo v:null
@@ -1737,7 +1737,7 @@ v:throwpoint The point where the exception most recently caught and not
17371737
17381738 *v:true* *true-variable*
17391739v:true A Number with value one. Used to put "true" in JSON. See
1740- | jsonencode ()| .
1740+ | json_encode ()| .
17411741 When used as a string this evaluates to "true". >
17421742 echo v:true
17431743< true ~
@@ -1816,7 +1816,9 @@ call( {func}, {arglist} [, {dict}])
18161816 any call {func} with arguments {arglist}
18171817ceil( {expr} ) Float round {expr} up
18181818ch_close( {handle} ) none close a channel
1819+ ch_logfile( {fname} [, {mode} ]) none start logging channel activity
18191820ch_open( {address} [, {argdict} )] Number open a channel to {address}
1821+ ch_readraw( {handle} ) String read from channel {handle}
18201822ch_sendexpr( {handle} , {expr} [, {callback} ])
18211823 any send {expr} over JSON channel {handle}
18221824ch_sendraw( {handle} , {string} [, {callback} ])
@@ -1980,9 +1982,9 @@ mapcheck( {name}[, {mode} [, {abbr}]])
19801982 String check for mappings matching {name}
19811983match( {expr} , {pat} [, {start} [, {count} ]])
19821984 Number position where {pat} matches in {expr}
1983- matchadd( {group} , {pattern} [, {priority} [, {id} ]])
1985+ matchadd( {group} , {pattern} [, {priority} [, {id} [, {dict} ] ]])
19841986 Number highlight {pattern} with {group}
1985- matchaddpos( {group} , {list } [, {priority} [, {id} ]])
1987+ matchaddpos( {group} , {pos } [, {priority} [, {id} [, {dict} ] ]])
19861988 Number highlight positions with {group}
19871989matcharg( {nr} ) List arguments of | :match |
19881990matchdelete( {id} ) Number delete match identified by {id}
@@ -2274,7 +2276,7 @@ assert_fails({cmd} [, {error}]) *assert_fails()*
22742276assert_false({actual} [, {msg} ]) *assert_false()*
22752277 When {actual} is not false an error message is added to
22762278 | v:errors | , like with | assert_equal() | .
2277- A value is false when it is zero. When " {actual} " is not a
2279+ A value is false when it is zero. When {actual} is not a
22782280 number the assert fails.
22792281 When {msg} is omitted an error in the form "Expected False but
22802282 got {actual} " is produced.
@@ -2676,10 +2678,16 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
26762678 don't fit, a vertical layout is used anyway. For some systems
26772679 the horizontal layout is always used.
26782680
2679- ch_close({handle} ) *ch_close()*
2681+ ch_close({handle} ) *ch_close()*
26802682 Close channel {handle} . See | channel | .
26812683 {only available when compiled with the | +channel | feature}
26822684
2685+ ch_logfile( {fname} [, {mode} ]) *ch_logfile()*
2686+ Start logging channel activity to {fname} .
2687+ When {mode} is omitted or "a" append to the file.
2688+ When {mode} is "w" start with an empty file.
2689+ When {fname} is an empty string: stop logging.
2690+
26832691ch_open({address} [, {argdict} ]) *ch_open()*
26842692 Open a channel to {address} . See | channel | .
26852693 Returns the channel handle on success. Returns a negative
@@ -2703,7 +2711,13 @@ ch_open({address} [, {argdict}]) *ch_open()*
27032711 Default: 2000.
27042712 {only available when compiled with the | +channel | feature}
27052713
2706- ch_sendexpr({handle} , {expr} [, {callback} ]) *ch_sendexpr()*
2714+ ch_readraw({handle} ) *ch_readraw()*
2715+ Read from channel {handle} and return the received message.
2716+ This uses the channel timeout. When there is nothing to read
2717+ within that time an empty string is returned.
2718+ TODO: depends on channel mode.
2719+
2720+ ch_sendexpr({handle} , {expr} [, {callback} ]) *ch_sendexpr()*
27072721 Send {expr} over channel {handle} . The {expr} is encoded
27082722 according to the type of channel. The function cannot be used
27092723 with a raw channel. See | channel-use | . *E912*
@@ -2844,9 +2858,11 @@ deepcopy({expr}[, {noref}]) *deepcopy()* *E698*
28442858 different from using {expr} directly.
28452859 When {expr} is a | List | a full copy is created. This means
28462860 that the original | List | can be changed without changing the
2847- copy, and vice versa. When an item is a | List | , a copy for it
2848- is made, recursively. Thus changing an item in the copy does
2849- not change the contents of the original | List | .
2861+ copy, and vice versa. When an item is a | List | or
2862+ | Dictionary | , a copy for it is made, recursively. Thus
2863+ changing an item in the copy does not change the contents of
2864+ the original | List | .
2865+ A | Dictionary | is copied in a similar way as a | List | .
28502866 When {noref} is omitted or zero a contained | List | or
28512867 | Dictionary | is only copied once. All references point to
28522868 this single copy. With {noref} set to 1 every occurrence of a
@@ -2907,6 +2923,14 @@ diff_hlID({lnum}, {col}) *diff_hlID()*
29072923 The highlight ID can be used with | synIDattr() | to obtain
29082924 syntax information about the highlighting.
29092925
2926+ *disable_char_avail_for_testing()*
2927+ disable_char_avail_for_testing({expr} )
2928+ When {expr} is 1 the internal char_avail() function will
2929+ return FALSE. When {expr} is 0 the char_avail() function will
2930+ function normally.
2931+ Only use this for a test where typeahead causes the test not
2932+ to work. E.g., to trigger the CursorMovedI autocommand event.
2933+
29102934empty({expr} ) *empty()*
29112935 Return the Number 1 if {expr} is empty, zero otherwise.
29122936 - A | List | or | Dictionary | is empty when it does not have any
@@ -3937,7 +3961,7 @@ glob2regpat({expr}) *glob2regpat()*
39373961 empty string.
39383962
39393963 *globpath()*
3940- globpath({path} , {expr} [, {nosuf} [, {list} [, {allinks } ]]])
3964+ globpath({path} , {expr} [, {nosuf} [, {list} [, {alllinks } ]]])
39413965 Perform glob() on all directories in {path} and concatenate
39423966 the results. Example: >
39433967 :echo globpath(&rtp, "syntax/c.vim")
@@ -3963,7 +3987,7 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]])
39633987 they are separated by <NL> characters. Example: >
39643988 :echo globpath(&rtp, "syntax/c.vim", 0, 1)
39653989<
3966- {allinks } is used as with | glob() | .
3990+ {alllinks } is used as with | glob() | .
39673991
39683992 The "**" item can be used to search in a directory tree.
39693993 For example, to find all "README.txt" files in the directories
@@ -4314,22 +4338,25 @@ job_start({command} [, {options}]) *job_start()*
43144338 Start a job and return a Job object. Unlike | system() | and
43154339 | :!cmd | this does not wait for the job to finish.
43164340
4317- {command} can be a string . This works best on MS-Windows. On
4341+ {command} can be a String . This works best on MS-Windows. On
43184342 Unix it is split up in white-separated parts to be passed to
43194343 execvp(). Arguments in double quotes can contain white space.
43204344
4321- {command} can be a list , where the first item is the executable
4345+ {command} can be a List , where the first item is the executable
43224346 and further items are the arguments. All items are converted
43234347 to String. This works best on Unix.
43244348
4349+ On MS-Windows, job_start() makes a GUI application hidden. If
4350+ want to show it, Use | :!start | instead.
4351+
43254352 The command is executed directly, not through a shell, the
43264353 'shell' option is not used. To use the shell: >
43274354 let job = job_start(["/bin/sh", "-c", "echo hello"])
43284355< Or: >
43294356 let job = job_start('/bin/sh -c "echo hello"')
4330- < However, the status of the job will now be the status of the
4331- shell, and stopping the job means stopping the shell and the
4332- command may continue to run .
4357+ < Note that this will start two processes, the shell and the
4358+ command it executes. If you don't want this use the "exec"
4359+ shell command .
43334360
43344361 On Unix $PATH is used to search for the executable only when
43354362 the command does not contain a slash.
@@ -4342,40 +4369,51 @@ job_start({command} [, {options}]) *job_start()*
43424369 The returned Job object can be used to get the status with
43434370 | job_status() | and stop the job with | job_stop() | .
43444371
4345- {options} must be a Dictionary. It can contain these optional
4346- items:
4347- killonexit When non-zero kill the job when Vim
4348- exits. (default: 0, don't kill)
4372+ {options} must be a Dictionary. It can contain many optional
4373+ items, see | job-options | .
43494374
4350- {only available when compiled with the | +channel | feature}
4375+ {only available when compiled with the | +job | feature}
43514376
43524377job_status({job} ) *job_status()*
43534378 Returns a String with the status of {job} :
43544379 "run" job is running
43554380 "fail" job failed to start
43564381 "dead" job died or was stopped after running
43574382
4358- {only available when compiled with the | +channel | feature}
4383+ {only available when compiled with the | +job | feature}
43594384
43604385job_stop({job} [, {how} ]) *job_stop()*
43614386 Stop the {job} . This can also be used to signal the job.
43624387
43634388 When {how} is omitted or is "term" the job will be terminated
4364- normally. For Unix SIGTERM is sent.
4365- Other values:
4389+ normally. For Unix SIGTERM is sent. For MS-Windows
4390+ CTRL_BREAK will be sent. This goes to the process group, thus
4391+ children may also be affected.
4392+
4393+ Other values for Unix:
43664394 "hup" Unix: SIGHUP
43674395 "quit" Unix: SIGQUIT
43684396 "kill" Unix: SIGKILL (strongest way to stop)
43694397 number Unix: signal with that number
43704398
4399+ Other values for MS-Windows:
4400+ "int" Windows: CTRL_C
4401+ "kill" Windows: terminate process forcedly
4402+ Others Windows: CTRL_BREAK
4403+
4404+ On Unix the signal is sent to the process group. This means
4405+ that when the job is "sh -c command" it affects both the shell
4406+ and the command.
4407+
43714408 The result is a Number: 1 if the operation could be executed,
43724409 0 if "how" is not supported on the system.
43734410 Note that even when the operation was executed, whether the
43744411 job was actually stopped needs to be checked with
43754412 job_status().
4376- The operation will even be done when the job wasn't running.
4413+ The status of the job isn't checked, the operation will even
4414+ be done when Vim thinks the job isn't running.
43774415
4378- {only available when compiled with the | +channel | feature}
4416+ {only available when compiled with the | +job | feature}
43794417
43804418join({list} [, {sep} ]) *join()*
43814419 Join the items in {list} together into one String.
@@ -4773,7 +4811,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
47734811 done like 'magic' is set and 'cpoptions' is empty.
47744812
47754813 *matchadd()* *E798* *E799* *E801*
4776- matchadd({group} , {pattern} [, {priority} [, {id} [, {dict} ]]])
4814+ matchadd({group} , {pattern} [, {priority} [, {id} [, {dict} ]]])
47774815 Defines a pattern to be highlighted in the current window (a
47784816 "match"). It will be highlighted with {group} . Returns an
47794817 identification number (ID), which can be used to delete the
@@ -4809,7 +4847,7 @@ matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
48094847 highlighted matches. The dict can have the following members:
48104848
48114849 conceal Special character to show instead of the
4812- match (only for | hl-Conceal | highlighed
4850+ match (only for | hl-Conceal | highlighted
48134851 matches, see | :syn-cchar | )
48144852
48154853 The number of matches is not limited, as it is the case with
@@ -6808,7 +6846,7 @@ type({expr}) The result is a Number, depending on the type of {expr}:
68086846 :if type(myvar) == type({})
68096847 :if type(myvar) == type(0.0)
68106848 :if type(myvar) == type(v:false)
6811- :if type(myvar) == type(v:none
6849+ :if type(myvar) == type(v:none)
68126850
68136851 undofile({name} ) *undofile()*
68146852 Return the name of the undo file that would be used for a file
0 commit comments