Update runtime files

This commit is contained in:
Bram Moolenaar
2020-06-21 22:12:03 +02:00
parent 8d9437968b
commit 73fef33014
15 changed files with 105 additions and 59 deletions

View File

@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2020 Jun 14
*vim9.txt* For Vim version 8.2. Last change: 2020 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,7 +30,7 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
Vim script has been growing over time, while preserving backwards
compatibility. That means bad choices from the past often can't be changed
and compability with Vi restricts possible solutions. Execution is quite
and compatibility with Vi restricts possible solutions. Execution is quite
slow, each line is parsed every time it is executed.
The main goal of Vim9 script is to drastically improve performance. This is
@ -68,7 +68,7 @@ In Vim script comments normally start with double quote. That can also be the
start of a string, thus in many places it cannot be used. In Vim9 script a
comment can also start with #. In Vi this is a command to list text with
numbers, but you can also use `:number` for that. >
let count = 0 # number of occurences
let count = 0 # number of occurrences
To improve readability there must be a space between the command and the #
that starts a comment. Note that #{ is the start of a dictionary, therefore
@ -269,6 +269,13 @@ possible AFTER the operators. For example: >
PosFunc(arg) :
NegFunc(arg)
A special case is "->" for function call chains, it can appear in the next
line: >
let result = GetBuilder()
->BuilderSetWidth(333)
->BuilderSetHeight(777)
->BuilderBuild()
Note that "enddef" cannot be used at the start of a continuation line, it ends
the current function.
@ -566,7 +573,7 @@ defined (otherwise script-local) items: >
Import ~
*:import* *:imp*
*:import* *:imp* *E1094*
The exported items can be imported individually in another Vim9 script: >
import EXPORTED_CONST from "thatscript.vim"
import MyClass from "myclass.vim"
@ -692,7 +699,7 @@ A, B and C, where A calls B, B calls C, and C calls A again. It's impossible
to reorder the functions to avoid forward references.
An alternative would be to first scan through the file to locate items and
figure out their type, so that forward refeferences are found, and only then
figure out their type, so that forward references are found, and only then
execute the script and compile the functions. This means the script has to be
parsed twice, which is slower, and some conditions at the script level, such
as checking if a feature is supported, are hard to use. An attempt was made