1
0
forked from aniani/vim

Update runtime files

This commit is contained in:
Bram Moolenaar
2022-12-11 15:53:04 +00:00
parent 79336e19cb
commit 7db29e4b5c
11 changed files with 528 additions and 99 deletions

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.0. Last change: 2022 Dec 03
*eval.txt* For Vim version 9.0. Last change: 2022 Dec 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -163,9 +163,10 @@ 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.
*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.
*E913* *E974* *E975* *E976* *E1319* *E1320* *E1321* *E1322*
*E1323* *E1324*
|List|, |Dictionary|, |Funcref|, |Job|, |Channel|, |Blob|, |Class| and
|object| types are not automatically converted.
*E805* *E806* *E808*
When mixing Number and Float the Number is converted to Float. Otherwise

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.0. Last change: 2022 Nov 30
*options.txt* For Vim version 9.0. Last change: 2022 Dec 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -7117,45 +7117,49 @@ A jump table for the options with a short description can be found at |Q_op|.
messages, for example with CTRL-G, and to avoid some other messages.
It is a list of flags:
flag meaning when present ~
f use "(3 of 5)" instead of "(file 3 of 5)"
i use "[noeol]" instead of "[Incomplete last line]"
l use "999L, 888B" instead of "999 lines, 888 bytes"
m use "[+]" instead of "[Modified]"
n use "[New]" instead of "[New File]"
r use "[RO]" instead of "[readonly]"
w use "[w]" instead of "written" for file write message
f use "(3 of 5)" instead of "(file 3 of 5)" *shm-f*
i use "[noeol]" instead of "[Incomplete last line]" *shm-i*
l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l*
m use "[+]" instead of "[Modified]" *shm-m*
n use "[New]" instead of "[New File]" *shm-n*
r use "[RO]" instead of "[readonly]" *shm-r*
w use "[w]" instead of "written" for file write message *shm-w*
and "[a]" instead of "appended" for ':w >> file' command
x use "[dos]" instead of "[dos format]", "[unix]" instead of
"[unix format]" and "[mac]" instead of "[mac format]".
a all of the above abbreviations
x use "[dos]" instead of "[dos format]", "[unix]" *shm-x*
instead of "[unix format]" and "[mac]" instead of "[mac
format]".
a all of the above abbreviations *shm-a*
o overwrite message for writing a file with subsequent message
for reading a file (useful for ":wn" or when 'autowrite' on)
O message for reading a file overwrites any previous message.
Also for quickfix message (e.g., ":cn").
s don't give "search hit BOTTOM, continuing at TOP" or "search
hit TOP, continuing at BOTTOM" messages; when using the search
count do not show "W" after the count message (see S below)
t truncate file message at the start if it is too long to fit
on the command-line, "<" will appear in the left most column.
Ignored in Ex mode.
T truncate other messages in the middle if they are too long to
fit on the command line. "..." will appear in the middle.
Ignored in Ex mode.
W don't give "written" or "[w]" when writing a file
A don't give the "ATTENTION" message when an existing swap file
is found.
I don't give the intro message when starting Vim |:intro|.
c don't give |ins-completion-menu| messages. For example,
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
"Pattern not found", "Back at original", etc.
C don't give messages while scanning for ins-completion items,
for instance "scanning tags"
q use "recording" instead of "recording @a"
F don't give the file info when editing a file, like `:silent`
was used for the command; note that this also affects messages
from autocommands
S do not show search count message when searching, e.g.
o overwrite message for writing a file with subsequent *shm-o*
message for reading a file (useful for ":wn" or when
'autowrite' on)
O message for reading a file overwrites any previous *smh-O*
message. Also for quickfix message (e.g., ":cn").
s don't give "search hit BOTTOM, continuing at TOP" or *shm-s*
"search hit TOP, continuing at BOTTOM" messages; when using
the search count do not show "W" after the count message (see
S below)
t truncate file message at the start if it is too long *shm-t*
to fit on the command-line, "<" will appear in the left most
column. Ignored in Ex mode.
T truncate other messages in the middle if they are too *shm-T*
long to fit on the command line. "..." will appear in the
middle. Ignored in Ex mode.
W don't give "written" or "[w]" when writing a file *shm-W*
A don't give the "ATTENTION" message when an existing *shm-A*
swap file is found.
I don't give the intro message when starting Vim, *shm-I*
see |:intro|.
c don't give |ins-completion-menu| messages. For *shm-c*
example, "-- XXX completion (YYY)", "match 1 of 2", "The only
match", "Pattern not found", "Back at original", etc.
C don't give messages while scanning for ins-completion *shm-C*
items, for instance "scanning tags"
q use "recording" instead of "recording @a" *shm-q*
F don't give the file info when editing a file, like *shm-F*
`:silent` was used for the command; note that this also
affects messages from autocommands
S do not show search count message when searching, e.g. *shm-S*
"[1/5]"
This gives you the opportunity to avoid that a change between buffers

View File

@@ -1273,6 +1273,21 @@ not "b:current_compiler". What the command actually does is the following:
For writing a compiler plugin, see |write-compiler-plugin|.
DOTNET *compiler-dotnet*
The .NET CLI compiler outputs both errors and warnings by default. The output
may be limited to include only errors, by setting the g:dotnet_errors_only
variable to |v:true|.
The associated project name is included in each error and warning. To supress
the project name, set the g:dotnet_show_project_file variable to |v:false|.
Example: limit output to only display errors, and suppress the project name: >
let dotnet_errors_only = v:true
let dotnet_show_project_file = v:false
compiler dotnet
<
GCC *quickfix-gcc* *compiler-gcc*
There's one variable you can set for the GCC compiler:

View File

@@ -3988,6 +3988,7 @@ CTRL-{char} intro.txt /*CTRL-{char}*
Channel eval.txt /*Channel*
Channels eval.txt /*Channels*
Chinese mbyte.txt /*Chinese*
Class vim9class.txt /*Class*
Cmd-event autocmd.txt /*Cmd-event*
CmdUndefined autocmd.txt /*CmdUndefined*
Cmdline cmdline.txt /*Cmdline*
@@ -4368,7 +4369,20 @@ E1311 map.txt /*E1311*
E1312 windows.txt /*E1312*
E1313 eval.txt /*E1313*
E1314 vim9class.txt /*E1314*
E1315 vim9class.txt /*E1315*
E1316 vim9class.txt /*E1316*
E1317 vim9class.txt /*E1317*
E1318 vim9class.txt /*E1318*
E1319 eval.txt /*E1319*
E132 userfunc.txt /*E132*
E1320 eval.txt /*E1320*
E1321 eval.txt /*E1321*
E1322 eval.txt /*E1322*
E1323 eval.txt /*E1323*
E1324 eval.txt /*E1324*
E1325 vim9class.txt /*E1325*
E1326 vim9class.txt /*E1326*
E1327 vim9class.txt /*E1327*
E133 userfunc.txt /*E133*
E134 change.txt /*E134*
E135 autocmd.txt /*E135*
@@ -5427,6 +5441,7 @@ OS390-bugs os_390.txt /*OS390-bugs*
OS390-has-ebcdic os_390.txt /*OS390-has-ebcdic*
OS390-limitations os_390.txt /*OS390-limitations*
OS390-open-source os_390.txt /*OS390-open-source*
Object vim9class.txt /*Object*
OffTheSpot mbyte.txt /*OffTheSpot*
OnTheSpot mbyte.txt /*OnTheSpot*
Operator-pending intro.txt /*Operator-pending*
@@ -6264,6 +6279,7 @@ cino-w indent.txt /*cino-w*
cino-{ indent.txt /*cino-{*
cino-} indent.txt /*cino-}*
cinoptions-values indent.txt /*cinoptions-values*
class vim9class.txt /*class*
class-member vim9class.txt /*class-member*
class-method vim9class.txt /*class-method*
clear-undo undo.txt /*clear-undo*
@@ -6322,6 +6338,7 @@ compile-changes-8 version8.txt /*compile-changes-8*
compile-changes-9 version9.txt /*compile-changes-9*
compiler-compaqada ft_ada.txt /*compiler-compaqada*
compiler-decada ft_ada.txt /*compiler-decada*
compiler-dotnet quickfix.txt /*compiler-dotnet*
compiler-gcc quickfix.txt /*compiler-gcc*
compiler-gnat ft_ada.txt /*compiler-gnat*
compiler-hpada ft_ada.txt /*compiler-hpada*
@@ -8878,6 +8895,14 @@ nr2char() builtin.txt /*nr2char()*
nroff.vim syntax.txt /*nroff.vim*
null vim9.txt /*null*
null-variable eval.txt /*null-variable*
null_blob vim9.txt /*null_blob*
null_channel vim9.txt /*null_channel*
null_dict vim9.txt /*null_dict*
null_function vim9.txt /*null_function*
null_job vim9.txt /*null_job*
null_list vim9.txt /*null_list*
null_partial vim9.txt /*null_partial*
null_string vim9.txt /*null_string*
number_relativenumber options.txt /*number_relativenumber*
numbered-function eval.txt /*numbered-function*
numbermax-variable eval.txt /*numbermax-variable*
@@ -8887,6 +8912,7 @@ o insert.txt /*o*
o_CTRL-V motion.txt /*o_CTRL-V*
o_V motion.txt /*o_V*
o_v motion.txt /*o_v*
object vim9class.txt /*object*
object-motions motion.txt /*object-motions*
object-select motion.txt /*object-select*
objects index.txt /*objects*
@@ -9545,6 +9571,27 @@ shellescape() builtin.txt /*shellescape()*
shift intro.txt /*shift*
shift-left-right change.txt /*shift-left-right*
shiftwidth() builtin.txt /*shiftwidth()*
shm-A options.txt /*shm-A*
shm-C options.txt /*shm-C*
shm-F options.txt /*shm-F*
shm-I options.txt /*shm-I*
shm-S options.txt /*shm-S*
shm-T options.txt /*shm-T*
shm-W options.txt /*shm-W*
shm-a options.txt /*shm-a*
shm-c options.txt /*shm-c*
shm-f options.txt /*shm-f*
shm-i options.txt /*shm-i*
shm-l options.txt /*shm-l*
shm-m options.txt /*shm-m*
shm-n options.txt /*shm-n*
shm-o options.txt /*shm-o*
shm-q options.txt /*shm-q*
shm-r options.txt /*shm-r*
shm-s options.txt /*shm-s*
shm-t options.txt /*shm-t*
shm-w options.txt /*shm-w*
shm-x options.txt /*shm-x*
short-name-changed version4.txt /*short-name-changed*
showing-menus gui.txt /*showing-menus*
sign-column sign.txt /*sign-column*
@@ -9583,6 +9630,7 @@ slice() builtin.txt /*slice()*
slow-fast-terminal term.txt /*slow-fast-terminal*
slow-start starting.txt /*slow-start*
slow-terminal term.txt /*slow-terminal*
smh-O options.txt /*smh-O*
socket-interface channel.txt /*socket-interface*
sort() builtin.txt /*sort()*
sorting change.txt /*sorting*

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.0. Last change: 2022 Dec 05
*todo.txt* For Vim version 9.0. Last change: 2022 Dec 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -54,6 +54,14 @@ Upcoming larger works:
Further Vim9 improvements, possibly after launch:
- implement :class and :interface: See |vim9-classes| #11544
make default constructor use "this.member = void"
make public / default read access / private work for members.
string value of class and object in echo_string_core()
object empty(), len() - can class define a method?
tv_equal() should compare values, not identity.
garbage collection: set_ref_in_item(): Mark items in class as used ?
type() should return different type for each class?
how about lock/unlock?
- implement :type
- implement :enum
- Use Vim9 for more runtime files.

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 03
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1023,7 +1023,9 @@ always converted to string: >
Simple types are Number, Float, Special and Bool. For other types |string()|
should be used.
*false* *true* *null* *E1034*
*false* *true* *null* *null_blob* *null_channel*
*null_dict* *null_function* *null_job* *null_list*
*null_partial* *null_string* *E1034*
In Vim9 script one can use the following predefined values: >
true
false

View File

@@ -1,4 +1,4 @@
*vim9class.txt* For Vim version 9.0. Last change: 2022 Dec 04
*vim9class.txt* For Vim version 9.0. Last change: 2022 Dec 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -96,7 +96,7 @@ Let's start with a simple example: a class that stores a text position: >
this.col = col
enddef
endclass
< *object* *Object*
You can create an object from this class with the new() method: >
var pos = TextPosition.new(1, 1)
@@ -104,7 +104,7 @@ You can create an object from this class with the new() method: >
The object members "lnum" and "col" can be accessed directly: >
echo $'The text position is ({pos.lnum}, {pos.col})'
< *E1317* *E1327*
If you have been using other object-oriented languages you will notice that
in Vim the object members are consistently referred to with the "this."
prefix. This is different from languages like Java and TypeScript. This
@@ -329,14 +329,14 @@ The interface name can be used as a type: >
==============================================================================
5. More class details *Vim9-class*
5. More class details *Vim9-class* *Class* *class*
Defining a class ~
*:class* *:endclass* *:abstract*
A class is defined between `:class` and `:endclass`. The whole class is
defined in one script file. It is not possible to add to a class later.
A class can only be defined in a |Vim9| script file. *E1315*
A class can only be defined in a |Vim9| script file. *E1316*
A class cannot be defined inside a function.
It is possible to define more than one class in a script file. Although it
@@ -361,7 +361,7 @@ these variants: >
*E1314*
The class name should be CamelCased. It must start with an uppercase letter.
That avoids clashing with builtin types.
*E1315*
After the class name these optional items can be used. Each can appear only
once. They can appear in any order, although this order is recommended: >
extends ClassName
@@ -377,6 +377,20 @@ named interface. This avoids the need for separately specifying the
interface, which is often done in many languages, especially Java.
Items in a class ~
*E1318* *E1325* *E1326*
Inside a class, in betweeen `:class` and `:endclass`, these items can appear:
- An object member declaration: >
this._memberName: memberType
this.memberName: memberType
public this.memberName: memberType
- A constructor method: >
def new(arguments)
def newName(arguments)
- An object method: >
def SomeMethod(arguments)
Defining an interface ~
*:interface* *:endinterface*
An interface is defined between `:interface` and `:endinterface`. It may be
@@ -417,11 +431,28 @@ members, in the order they were specified. Thus if your class looks like: >
Then The default constructor will be: >
def new(this.name, this.age, this.gender)
def new(this.name = void, this.age = void, this.gender = void)
enddef
All object members will be used, also private access ones.
The "= void" default values make the arguments optional. Thus you can also
call `new()` without any arguments. Since "void" isn't an actual value, no
assignment will happen and the default value for the object members will be
used. This is a more useful example, with default values: >
class TextPosition
this.lnum: number = 1
this.col: number = 1
endclass
If you want the constructor to have mandatory arguments, you need to write it
yourself. For example, if for the AutoNew class above you insist on getting
the name, you can define the constructor like this: >
def new(this.name, this.age = void, this.gender = void)
enddef
Multiple constructors ~