summaryrefslogtreecommitdiffstats
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-08 21:51:59 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-08 21:51:59 +0000
commit2f0936cb9a2eb026acac03e6a8fd0b2a5d97508b (patch)
tree193ef7f4cab9dd35f6a88f7767526bd8c4029465 /runtime/doc/eval.txt
parentb2810f123cbf4b585f8bc5f0e594a6690d95729a (diff)
Update runtime files
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt33
1 files changed, 17 insertions, 16 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index dca886e85c..974f231ca8 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2021 Dec 28
+*eval.txt* For Vim version 8.2. Last change: 2022 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -13,9 +13,9 @@ done, the features in this document are not available. See |+eval| and
|no-eval-feature|.
This file is mainly about the backwards compatible (legacy) Vim script. For
-specifics of Vim9 script, which executes much faster, supports type checking
-and much more, see |vim9.txt|. Where the syntax or semantics differ a remark
-is given.
+specifics of Vim9 script, which can execute much faster, supports type
+checking and much more, see |vim9.txt|. Where the syntax or semantics differ
+a remark is given.
1. Variables |variables|
1.1 Variable types
@@ -162,8 +162,8 @@ non-empty String, then the value is considered to be TRUE.
Note that " " and "0" are also non-empty strings, thus considered to be TRUE.
A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
- *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913*
- *E974* *E975* *E976*
+ *E611* *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910*
+ *E913* *E974* *E975* *E976*
|List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not
automatically converted.
@@ -172,7 +172,7 @@ When mixing Number and Float the Number is converted to Float. Otherwise
there is no automatic conversion of Float. You can use str2float() for String
to Float, printf() for Float to String and float2nr() for Float to Number.
- *E891* *E892* *E893* *E894* *E907* *E911* *E914*
+ *E362* *E891* *E892* *E893* *E894* *E907* *E911* *E914*
When expecting a Float a Number can also be used, but nothing else.
*no-type-checking*
@@ -1346,7 +1346,7 @@ When expr9 is a |Funcref| type variable, invoke the function it refers to.
expr9->name([args]) method call *method* *->*
expr9->{lambda}([args])
- *E276*
+ *E260* *E276*
For methods that are also available as global functions this is the same as: >
name(expr9 [, args])
There can also be methods specifically for the type of "expr9".
@@ -1582,7 +1582,7 @@ See below |functions|.
lambda expression *expr-lambda* *lambda*
-----------------
-{args -> expr1} legacy lambda expression
+{args -> expr1} legacy lambda expression *E451*
(args) => expr1 |Vim9| lambda expression
A lambda expression creates a new unnamed function which returns the result of
@@ -1659,10 +1659,10 @@ See also: |numbered-function|
3. Internal variable *internal-variables* *E461*
An internal variable name can be made up of letters, digits and '_'. But it
-cannot start with a digit. In legacy script it also possible to use curly
+cannot start with a digit. In legacy script it is also possible to use curly
braces, see |curly-braces-names|.
-In legacy script ann internal variable is created with the ":let" command
+In legacy script an internal variable is created with the ":let" command
|:let|. An internal variable is explicitly destroyed with the ":unlet"
command |:unlet|.
Using a name that is not an internal variable or refers to a variable that has
@@ -2162,7 +2162,8 @@ v:lnum Line number for the 'foldexpr' |fold-expr|, 'formatexpr' and
|sandbox|.
*v:maxcol* *maxcol-variable*
-v:maxcol Maximum line length.
+v:maxcol Maximum line length. Depending on where it is used it can be
+ screen columns, characters or bytes.
*v:mouse_win* *mouse_win-variable*
v:mouse_win Window number for a mouse click obtained with |getchar()|.
@@ -2573,7 +2574,7 @@ functions.
In |Vim9| script functions are local to the script by default, prefix "g:" to
define a global function.
- *:fu* *:function* *E128* *E129* *E123*
+ *:fu* *:function* *E128* *E129* *E123* *E454*
:fu[nction] List all functions and their arguments.
:fu[nction] {name} List function {name}.
@@ -2699,7 +2700,7 @@ See |:verbose-cmd| for more information.
command, use line breaks instead of |:bar|: >
:exe "func Foo()\necho 'foo'\nendfunc"
<
- *:delf* *:delfunction* *E130* *E131* *E933*
+ *:delf* *:delfunction* *E131* *E933*
:delf[unction][!] {name}
Delete function {name}.
{name} can also be a |Dictionary| entry that is a
@@ -4946,7 +4947,7 @@ When the |+eval| feature is available the command is skipped because of the
silently ignored, and the command is executed.
==============================================================================
-12. The sandbox *eval-sandbox* *sandbox* *E48*
+12. The sandbox *eval-sandbox* *sandbox*
The 'foldexpr', 'formatexpr', 'includeexpr', 'indentexpr', 'statusline' and
'foldtext' options may be evaluated in a sandbox. This means that you are
@@ -4954,7 +4955,7 @@ protected from these expressions having nasty side effects. This gives some
safety for when these options are set from a modeline. It is also used when
the command from a tags file is executed and for CTRL-R = in the command line.
The sandbox is also used for the |:sandbox| command.
-
+ *E48*
These items are not allowed in the sandbox:
- changing the buffer text
- defining or changing mapping, autocommands, user commands