1- *eval.txt* For Vim version 7.4. Last change: 2016 Mar 03
1+ *eval.txt* For Vim version 7.4. Last change: 2016 Mar 07
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1817,24 +1817,24 @@ byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
18171817call( {func} , {arglist} [, {dict} ])
18181818 any call {func} with arguments {arglist}
18191819ceil( {expr} ) Float round {expr} up
1820- ch_close( {channel } ) none close {channel }
1821- ch_evalexpr( {channel } , {expr} [, {options} ])
1822- any evaluate {expr} on JSON {channel }
1823- ch_evalraw( {channel } , {string} [, {options} ])
1824- any evaluate {string} on raw {channel }
1825- ch_getbufnr( {channel } , {what} ) Number get buffer number for {channel } /{what}
1820+ ch_close( {handle } ) none close {handle }
1821+ ch_evalexpr( {handle } , {expr} [, {options} ])
1822+ any evaluate {expr} on JSON {handle }
1823+ ch_evalraw( {handle } , {string} [, {options} ])
1824+ any evaluate {string} on raw {handle }
1825+ ch_getbufnr( {handle } , {what} ) Number get buffer number for {handle } /{what}
18261826ch_getjob( {channel} ) Job get the Job of {channel}
1827- ch_log( {msg} [, {channel } ]) none write {msg} in the channel log file
1827+ ch_log( {msg} [, {handle } ]) none write {msg} in the channel log file
18281828ch_logfile( {fname} [, {mode} ]) none start logging channel activity
18291829ch_open( {address} [, {options} ]) Channel open a channel to {address}
1830- ch_read( {channel } [, {options} ]) String read from {channel }
1831- ch_readraw( {channel } [, {options} ]) String read raw from {channel }
1832- ch_sendexpr( {channel } , {expr} [, {options} ])
1833- any send {expr} over JSON {channel }
1834- ch_sendraw( {channel } , {string} [, {options} ])
1835- any send {string} over raw {channel }
1836- ch_setoptions( {channel } , {options} ) none set options for {channel }
1837- ch_status( {channel } ) String status of {channel }
1830+ ch_read( {handle } [, {options} ]) String read from {handle }
1831+ ch_readraw( {handle } [, {options} ]) String read raw from {handle }
1832+ ch_sendexpr( {handle } , {expr} [, {options} ])
1833+ any send {expr} over JSON {handle }
1834+ ch_sendraw( {handle } , {string} [, {options} ])
1835+ any send {string} over raw {handle }
1836+ ch_setoptions( {handle } , {options} ) none set options for {handle }
1837+ ch_status( {handle } ) String status of {handle }
18381838changenr() Number current change number
18391839char2nr( {expr} [, {utf8} ]) Number ASCII/UTF8 value of first char in {expr}
18401840cindent( {lnum} ) Number C indent for line {lnum}
@@ -2693,8 +2693,9 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
26932693 don't fit, a vertical layout is used anyway. For some systems
26942694 the horizontal layout is always used.
26952695
2696- ch_close({channel} ) *ch_close()*
2697- Close {channel} . See | channel-close | .
2696+ ch_close({handle} ) *ch_close()*
2697+ Close {handle} . See | channel-close | .
2698+ {handle} can be Channel or a Job that has a Channel.
26982699
26992700 Note that a channel is closed in three stages:
27002701 - The I/O ends, log message: "Closing channel". There can
@@ -2705,10 +2706,11 @@ ch_close({channel}) *ch_close()*
27052706
27062707 {only available when compiled with the | +channel | feature}
27072708
2708- ch_evalexpr({channel } , {expr} [, {options} ]) *ch_evalexpr()*
2709- Send {expr} over {channel } . The {expr} is encoded
2709+ ch_evalexpr({handle } , {expr} [, {options} ]) *ch_evalexpr()*
2710+ Send {expr} over {handle } . The {expr} is encoded
27102711 according to the type of channel. The function cannot be used
27112712 with a raw channel. See | channel-use | .
2713+ {handle} can be Channel or a Job that has a Channel.
27122714 *E917*
27132715 {options} must be a Dictionary. It must not have a "callback"
27142716 entry. It can have a "timeout" entry.
@@ -2719,8 +2721,10 @@ ch_evalexpr({channel}, {expr} [, {options}]) *ch_evalexpr()*
27192721
27202722 {only available when compiled with the | +channel | feature}
27212723
2722- ch_evalraw({channel} , {string} [, {options} ]) *ch_evalraw()*
2723- Send {string} over {channel} .
2724+ ch_evalraw({handle} , {string} [, {options} ]) *ch_evalraw()*
2725+ Send {string} over {handle} .
2726+ {handle} can be Channel or a Job that has a Channel.
2727+
27242728 Works like | ch_evalexpr() | , but does not encode the request or
27252729 decode the response. The caller is responsible for the
27262730 correct contents. Also does not add a newline for a channel
@@ -2730,8 +2734,9 @@ ch_evalraw({channel}, {string} [, {options}]) *ch_evalraw()*
27302734
27312735 {only available when compiled with the | +channel | feature}
27322736
2733- ch_getbufnr({channel} , {what} ) *ch_getbufnr()*
2734- Get the buffer number that {channel} is using for {what} .
2737+ ch_getbufnr({handle} , {what} ) *ch_getbufnr()*
2738+ Get the buffer number that {handle} is using for {what} .
2739+ {handle} can be Channel or a Job that has a Channel.
27352740 {what} can be "err" for stderr, "out" for stdout or empty for
27362741 socket output.
27372742 Returns -1 when there is no buffer.
@@ -2745,11 +2750,13 @@ ch_getjob({channel}) *ch_getjob()*
27452750 {only available when compiled with the | +channel | and
27462751 | +job | features}
27472752
2748- ch_log({msg} [, {channel } ]) *ch_log()*
2753+ ch_log({msg} [, {handle } ]) *ch_log()*
27492754 Write {msg} in the channel log file, if it was opened with
27502755 | ch_logfile() | .
2751- When {channel} is passed the channel number is used for the
2752- message. {channel} must be an open channel.
2756+ When {handle} is passed the channel number is used for the
2757+ message.
2758+ {handle} can be Channel or a Job that has a Channel. The
2759+ Channel must open.
27532760
27542761ch_logfile({fname} [, {mode} ]) *ch_logfile()*
27552762 Start logging channel activity to {fname} .
@@ -2785,8 +2792,9 @@ ch_open({address} [, {options}]) *ch_open()*
27852792 Default: 2000.
27862793 {only available when compiled with the | +channel | feature}
27872794
2788- ch_read({channel} [, {options} ]) *ch_read()*
2789- Read from {channel} and return the received message.
2795+ ch_read({handle} [, {options} ]) *ch_read()*
2796+ Read from {handle} and return the received message.
2797+ {handle} can be Channel or a Job that has a Channel.
27902798
27912799 This uses the channel timeout. When there is nothing to read
27922800 within that time an empty string is returned. To specify a
@@ -2806,14 +2814,15 @@ ch_read({channel} [, {options}]) *ch_read()*
28062814 For a JS or JSON channel this returns one decoded message.
28072815 This includes any sequence number.
28082816
2809- ch_readraw({channel } [, {options} ]) *ch_readraw()*
2817+ ch_readraw({handle } [, {options} ]) *ch_readraw()*
28102818 Like ch_read() but for a JS and JSON channel does not decode
28112819 the message.
28122820
2813- ch_sendexpr({channel } , {expr} [, {options} ]) *ch_sendexpr()*
2814- Send {expr} over {channel } . The {expr} is encoded
2821+ ch_sendexpr({handle } , {expr} [, {options} ]) *ch_sendexpr()*
2822+ Send {expr} over {handle } . The {expr} is encoded
28152823 according to the type of channel. The function cannot be used
28162824 with a raw channel. See | channel-use | . *E912*
2825+ {handle} can be Channel or a Job that has a Channel.
28172826
28182827 {options} must be a Dictionary. The "callback" item is a
28192828 Funcref or the name of a function it is invoked when the
@@ -2823,8 +2832,8 @@ ch_sendexpr({channel}, {expr} [, {options}]) *ch_sendexpr()*
28232832
28242833 {only available when compiled with the | +channel | feature}
28252834
2826- ch_sendraw({channel } , {string} [, {options} ]) *ch_sendraw()*
2827- Send {string} over {channel } .
2835+ ch_sendraw({handle } , {string} [, {options} ]) *ch_sendraw()*
2836+ Send {string} over {handle } .
28282837 Works like | ch_sendexpr() | , but does not encode the request or
28292838 decode the response. The caller is responsible for the
28302839 correct contents. Also does not add a newline for a channel
@@ -2834,24 +2843,26 @@ ch_sendraw({channel}, {string} [, {options}]) *ch_sendraw()*
28342843
28352844 {only available when compiled with the | +channel | feature}
28362845
2837- ch_setoptions({channel } , {options} ) *ch_setoptions()*
2838- Set options on {channel } :
2846+ ch_setoptions({handle } , {options} ) *ch_setoptions()*
2847+ Set options on {handle } :
28392848 "callback" the channel callback
28402849 "timeout" default read timeout in msec
28412850 "mode" mode for the whole channel
28422851 See | ch_open() | for more explanation.
2852+ {handle} can be Channel or a Job that has a Channel.
28432853
28442854 Note that changing the mode may cause queued messages to be
28452855 lost.
28462856
28472857 These options cannot be changed:
28482858 "waittime" only applies to "ch_open()|
28492859
2850- ch_status({channel } ) *ch_status()*
2851- Return the status of {channel } :
2860+ ch_status({handle } ) *ch_status()*
2861+ Return the status of {handle } :
28522862 "fail" failed to open the channel
28532863 "open" channel can be used
28542864 "closed" channel can not be used
2865+ {handle} can be Channel or a Job that has a Channel.
28552866
28562867 *copy()*
28572868copy({expr} ) Make a copy of {expr} . For Numbers and Strings this isn't
0 commit comments