|
1 |
| -*eval.txt* For Vim version 8.0. Last change: 2017 Sep 17 |
| 1 | +*eval.txt* For Vim version 8.0. Last change: 2017 Oct 28 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -120,9 +120,8 @@ To test for a non-empty string, use empty(): >
|
120 | 120 | Function arguments often behave slightly different from |TRUE|: If the
|
121 | 121 | argument is present and it evaluates to a non-zero Number, |v:true| or a
|
122 | 122 | non-empty String, then the value is considered to be TRUE.
|
123 |
| -Note that " " and "0" are also non-empty strings, thus cause the mode to be |
124 |
| -cleared. A List, Dictionary or Float is not a Number or String, thus |
125 |
| -evaluates to FALSE. |
| 123 | +Note that " " and "0" are also non-empty strings, thus considered to be TRUE. |
| 124 | +A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE. |
126 | 125 |
|
127 | 126 | *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
|
128 | 127 | List, Dictionary, Funcref, Job and Channel types are not automatically
|
@@ -815,14 +814,15 @@ Examples:
|
815 | 814 | "abc" == "Abc" evaluates to 1 if 'ignorecase' is set, 0 otherwise
|
816 | 815 |
|
817 | 816 | *E691* *E692*
|
818 |
| -A |List| can only be compared with a |List| and only "equal", "not equal" and |
819 |
| -"is" can be used. This compares the values of the list, recursively. |
820 |
| -Ignoring case means case is ignored when comparing item values. |
| 817 | +A |List| can only be compared with a |List| and only "equal", "not equal", |
| 818 | +"is" and "isnot" can be used. This compares the values of the list, |
| 819 | +recursively. Ignoring case means case is ignored when comparing item values. |
821 | 820 |
|
822 | 821 | *E735* *E736*
|
823 | 822 | A |Dictionary| can only be compared with a |Dictionary| and only "equal", "not
|
824 |
| -equal" and "is" can be used. This compares the key/values of the |Dictionary| |
825 |
| -recursively. Ignoring case means case is ignored when comparing item values. |
| 823 | +equal", "is" and "isnot" can be used. This compares the key/values of the |
| 824 | +|Dictionary| recursively. Ignoring case means case is ignored when comparing |
| 825 | +item values. |
826 | 826 |
|
827 | 827 | *E694*
|
828 | 828 | A |Funcref| can only be compared with a |Funcref| and only "equal", "not
|
@@ -2321,7 +2321,7 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]])
|
2321 | 2321 | server2client({clientid}, {string})
|
2322 | 2322 | Number send reply string
|
2323 | 2323 | serverlist() String get a list of available servers
|
2324 |
| -setbufline( {expr}, {lnum}, {line}) |
| 2324 | +setbufline({expr}, {lnum}, {line}) |
2325 | 2325 | Number set line {lnum} to {line} in buffer
|
2326 | 2326 | {expr}
|
2327 | 2327 | setbufvar({expr}, {varname}, {val})
|
@@ -2950,6 +2950,9 @@ ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()*
|
2950 | 2950 | correct contents. Also does not add a newline for a channel
|
2951 | 2951 | in NL mode, the caller must do that. The NL in the response
|
2952 | 2952 | is removed.
|
| 2953 | + Note that Vim does not know when the text received on a raw |
| 2954 | + channel is complete, it may only return the first part and you |
| 2955 | + need to use ch_readraw() to fetch the rest. |
2953 | 2956 | See |channel-use|.
|
2954 | 2957 |
|
2955 | 2958 | {only available when compiled with the |+channel| feature}
|
@@ -6463,6 +6466,12 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]])
|
6463 | 6466 | {only available when compiled with the |+clientserver| feature}
|
6464 | 6467 | Note: Any errors will cause a local error message to be issued
|
6465 | 6468 | and the result will be the empty string.
|
| 6469 | + |
| 6470 | + Variables will be evaluated in the global namespace, |
| 6471 | + independent of a function currently being activel. Except |
| 6472 | + when in debug mode, then local function variables and |
| 6473 | + arguments can be evaluated. |
| 6474 | + |
6466 | 6475 | Examples: >
|
6467 | 6476 | :echo remote_expr("gvim", "2+2")
|
6468 | 6477 | :echo remote_expr("gvim1", "b:current_syntax")
|
@@ -8154,6 +8163,11 @@ term_setsize({buf}, {expr}) *term_setsize()*
|
8154 | 8163 | term_start({cmd}, {options}) *term_start()*
|
8155 | 8164 | Open a terminal window and run {cmd} in it.
|
8156 | 8165 |
|
| 8166 | + {cmd} can be a string or a List, like with |job_start()|. The |
| 8167 | + string "NONE" can be used to open a terminal window without |
| 8168 | + starting a job, the pty of the terminal can be used by a |
| 8169 | + command like gdb. |
| 8170 | + |
8157 | 8171 | Returns the buffer number of the terminal window. If {cmd}
|
8158 | 8172 | cannot be executed the window does open and shows an error
|
8159 | 8173 | message.
|
@@ -9059,13 +9073,16 @@ See |:verbose-cmd| for more information.
|
9059 | 9073 |
|
9060 | 9074 | *E124* *E125* *E853* *E884*
|
9061 | 9075 | :fu[nction][!] {name}([arguments]) [range] [abort] [dict] [closure]
|
9062 |
| - Define a new function by the name {name}. The name |
9063 |
| - must be made of alphanumeric characters and '_', and |
9064 |
| - must start with a capital or "s:" (see above). Note |
9065 |
| - that using "b:" or "g:" is not allowed. (since patch |
9066 |
| - 7.4.260 E884 is given if the function name has a colon |
9067 |
| - in the name, e.g. for "foo:bar()". Before that patch |
9068 |
| - no error was given). |
| 9076 | + Define a new function by the name {name}. The body of |
| 9077 | + the function follows in the next lines, until the |
| 9078 | + matching |:endfunction|. |
| 9079 | + |
| 9080 | + The name must be made of alphanumeric characters and |
| 9081 | + '_', and must start with a capital or "s:" (see |
| 9082 | + above). Note that using "b:" or "g:" is not allowed. |
| 9083 | + (since patch 7.4.260 E884 is given if the function |
| 9084 | + name has a colon in the name, e.g. for "foo:bar()". |
| 9085 | + Before that patch no error was given). |
9069 | 9086 |
|
9070 | 9087 | {name} can also be a |Dictionary| entry that is a
|
9071 | 9088 | |Funcref|: >
|
@@ -9201,9 +9218,10 @@ to the number of named arguments. When using "...", the number of arguments
|
9201 | 9218 | may be larger.
|
9202 | 9219 |
|
9203 | 9220 | It is also possible to define a function without any arguments. You must
|
9204 |
| -still supply the () then. The body of the function follows in the next lines, |
9205 |
| -until the matching |:endfunction|. It is allowed to define another function |
9206 |
| -inside a function body. |
| 9221 | +still supply the () then. |
| 9222 | + |
| 9223 | +It is allowed to define another function inside a function |
| 9224 | +body. |
9207 | 9225 |
|
9208 | 9226 | *local-variables*
|
9209 | 9227 | Inside a function local variables can be used. These will disappear when the
|
|
0 commit comments