Mercurial > vim
comparison runtime/doc/eval.txt @ 8094:18a3f0f05244 v7.4.1341
commit https://github.com/vim/vim/commit/910b8aac5dc4693c4508b7acd2cef0bbfac04242
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 16 21:03:07 2016 +0100
patch 7.4.1341
Problem: It's difficult to add more arguments to ch_sendraw() and
ch_sendexpr().
Solution: Make the third option a dictionary.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 16 Feb 2016 21:15:05 +0100 |
parents | 7676818d486b |
children | f5da459c5698 |
comparison
equal
deleted
inserted
replaced
8093:4ffd0f8167f8 | 8094:18a3f0f05244 |
---|---|
1 *eval.txt* For Vim version 7.4. Last change: 2016 Feb 13 | 1 *eval.txt* For Vim version 7.4. Last change: 2016 Feb 16 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
1819 ceil( {expr}) Float round {expr} up | 1819 ceil( {expr}) Float round {expr} up |
1820 ch_close( {handle}) none close a channel | 1820 ch_close( {handle}) none close a channel |
1821 ch_logfile( {fname} [, {mode}]) none start logging channel activity | 1821 ch_logfile( {fname} [, {mode}]) none start logging channel activity |
1822 ch_open( {address} [, {argdict})] Number open a channel to {address} | 1822 ch_open( {address} [, {argdict})] Number open a channel to {address} |
1823 ch_readraw( {handle}) String read from channel {handle} | 1823 ch_readraw( {handle}) String read from channel {handle} |
1824 ch_sendexpr( {handle}, {expr} [, {callback}]) | 1824 ch_sendexpr( {handle}, {expr} [, {options}]) |
1825 any send {expr} over JSON channel {handle} | 1825 any send {expr} over JSON channel {handle} |
1826 ch_sendraw( {handle}, {string} [, {callback}]) | 1826 ch_sendraw( {handle}, {string} [, {options}]) |
1827 any send {string} over raw channel {handle} | 1827 any send {string} over raw channel {handle} |
1828 ch_status( {handle}) String status of channel {handle} | 1828 ch_status( {handle}) String status of channel {handle} |
1829 changenr() Number current change number | 1829 changenr() Number current change number |
1830 char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr} | 1830 char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr} |
1831 cindent( {lnum}) Number C indent for line {lnum} | 1831 cindent( {lnum}) Number C indent for line {lnum} |
2723 Read from channel {handle} and return the received message. | 2723 Read from channel {handle} and return the received message. |
2724 This uses the channel timeout. When there is nothing to read | 2724 This uses the channel timeout. When there is nothing to read |
2725 within that time an empty string is returned. | 2725 within that time an empty string is returned. |
2726 TODO: depends on channel mode. | 2726 TODO: depends on channel mode. |
2727 | 2727 |
2728 ch_sendexpr({handle}, {expr} [, {callback}]) *ch_sendexpr()* | 2728 ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()* |
2729 Send {expr} over channel {handle}. The {expr} is encoded | 2729 Send {expr} over channel {handle}. The {expr} is encoded |
2730 according to the type of channel. The function cannot be used | 2730 according to the type of channel. The function cannot be used |
2731 with a raw channel. See |channel-use|. *E912* | 2731 with a raw channel. See |channel-use|. *E912* |
2732 | 2732 |
2733 When {callback} is given returns immediately. Without | 2733 {options} must be a Dictionary. |
2734 {callback} waits for a response and returns the decoded | 2734 When "callback" is a Funcref or the name of a function, |
2735 expression. When there is an error or timeout returns an | 2735 ch_sendexpr() returns immediately. The callback is invoked |
2736 empty string. | 2736 when the response is received. See |channel-callback|. |
2737 | 2737 |
2738 When {callback} is zero no response is expected. | 2738 Without "callback" ch_sendexpr() waits for a response and |
2739 Otherwise {callback} must be a Funcref or the name of a | 2739 returns the decoded expression. When there is an error or |
2740 function. It is called when the response is received. See | 2740 timeout it returns an empty string. |
2741 |channel-callback|. | 2741 |
2742 When "callback" is zero no response is expected. | |
2742 | 2743 |
2743 {only available when compiled with the |+channel| feature} | 2744 {only available when compiled with the |+channel| feature} |
2744 | 2745 |
2745 ch_sendraw({handle}, {string} [, {callback}]) *ch_sendraw()* | 2746 ch_sendraw({handle}, {string} [, {options}]) *ch_sendraw()* |
2746 Send {string} over channel {handle}. | 2747 Send {string} over channel {handle}. |
2747 Works like |ch_sendexpr()|, but does not encode the request or | 2748 Works like |ch_sendexpr()|, but does not encode the request or |
2748 decode the response. The caller is responsible for the | 2749 decode the response. The caller is responsible for the |
2749 correct contents. See |channel-use|. | 2750 correct contents. Also does not add a newline for a channel |
2751 in NL mode, the caller must do that. The NL in the response | |
2752 is removed. | |
2753 See |channel-use|. | |
2750 | 2754 |
2751 {only available when compiled with the |+channel| feature} | 2755 {only available when compiled with the |+channel| feature} |
2752 | 2756 |
2753 ch_status({handle}) *ch_status()* | 2757 ch_status({handle}) *ch_status()* |
2754 Return the status of channel {handle}: | 2758 Return the status of channel {handle}: |
7272 lispindent Compiled with support for lisp indenting. | 7276 lispindent Compiled with support for lisp indenting. |
7273 listcmds Compiled with commands for the buffer list |:files| | 7277 listcmds Compiled with commands for the buffer list |:files| |
7274 and the argument list |arglist|. | 7278 and the argument list |arglist|. |
7275 localmap Compiled with local mappings and abbr. |:map-local| | 7279 localmap Compiled with local mappings and abbr. |:map-local| |
7276 lua Compiled with Lua interface |Lua|. | 7280 lua Compiled with Lua interface |Lua|. |
7277 mac Macintosh version of Vim. | 7281 mac Any Macintosh version of Vim. |
7278 macunix Compiled for OS X, with darwin | 7282 macunix Compiled for OS X, with darwin |
7279 osx Compiled for OS X, with or without darwin | 7283 osx Compiled for OS X, with or without darwin |
7280 menu Compiled with support for |:menu|. | 7284 menu Compiled with support for |:menu|. |
7281 mksession Compiled with support for |:mksession|. | 7285 mksession Compiled with support for |:mksession|. |
7282 modify_fname Compiled with file name modifiers. |filename-modifiers| | 7286 modify_fname Compiled with file name modifiers. |filename-modifiers| |