Skip to content

Commit 4d30606

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents be7e877 + c5b1c20 commit 4d30606

131 files changed

Lines changed: 4737 additions & 1312 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/doc/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ DOCS = \
142142
usr_43.txt \
143143
usr_44.txt \
144144
usr_45.txt \
145+
usr_46.txt \
145146
usr_90.txt \
146147
usr_toc.txt \
147148
various.txt \
@@ -283,6 +284,7 @@ HTMLS = \
283284
usr_43.html \
284285
usr_44.html \
285286
usr_45.html \
287+
usr_46.html \
286288
usr_90.html \
287289
usr_toc.html \
288290
various.html \

runtime/doc/autocmd.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.2. Last change: 2020 Jan 26
1+
*autocmd.txt* For Vim version 8.2. Last change: 2020 Jun 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1161,6 +1161,8 @@ TextYankPost After text has been yanked or deleted in the
11611161
register.
11621162
regtype Type of the register, see
11631163
|getregtype()|.
1164+
visual True if the operation is
1165+
performed on a |Visual| area.
11641166
Not triggered when |quote_| is used nor when
11651167
called recursively.
11661168
It is not allowed to change the buffer text,

runtime/doc/eval.txt

Lines changed: 114 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.2. Last change: 2020 Jun 07
1+
*eval.txt* For Vim version 8.2. Last change: 2020 Jun 14
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1533,6 +1533,7 @@ An internal variable is explicitly destroyed with the ":unlet" command
15331533
Using a name that is not an internal variable or refers to a variable that has
15341534
been destroyed results in an error.
15351535

1536+
*variable-scope*
15361537
There are several name spaces for variables. Which one is to be used is
15371538
specified by what is prepended:
15381539

@@ -1551,7 +1552,9 @@ delete all script-local variables: >
15511552
:for k in keys(s:)
15521553
: unlet s:[k]
15531554
:endfor
1554-
<
1555+
1556+
Note: in Vim9 script this is different, see |vim9-scopes|.
1557+
15551558
*buffer-variable* *b:var* *b:*
15561559
A variable name that is preceded with "b:" is local to the current buffer.
15571560
Thus you can have several "b:foo" variables, one for each buffer.
@@ -1742,6 +1745,14 @@ v:cmdbang Set like v:cmdarg for a file read/write command. When a "!"
17421745
was used the value is 1, otherwise it is 0. Note that this
17431746
can only be used in autocommands. For user commands |<bang>|
17441747
can be used.
1748+
*v:collate* *collate-variable*
1749+
v:collate The current locale setting for collation order of the runtime
1750+
environment. This allows Vim scripts to be aware of the
1751+
current locale encoding. Technical: it's the value of
1752+
LC_COLLATE. When not using a locale the value is "C".
1753+
This variable can not be set directly, use the |:language|
1754+
command.
1755+
See |multi-lang|.
17451756

17461757
*v:completed_item* *completed_item-variable*
17471758
v:completed_item
@@ -2206,7 +2217,8 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV|
22062217
'c', with only digits and ';' in between.
22072218
When this option is set, the TermResponse autocommand event is
22082219
fired, so that you can react to the response from the
2209-
terminal.
2220+
terminal. You can use |terminalprops()| to see what Vim
2221+
figured out about the terminal.
22102222
The response from a new xterm is: "<Esc>[> Pp ; Pv ; Pc c". Pp
22112223
is the terminal type: 0 for vt100 and 1 for vt220. Pv is the
22122224
patch level (since this was introduced in patch 95, it's
@@ -2691,8 +2703,10 @@ pyxeval({expr}) any evaluate |python_x| expression
26912703
rand([{expr}]) Number get pseudo-random number
26922704
range({expr} [, {max} [, {stride}]])
26932705
List items from {expr} to {max}
2694-
readdir({dir} [, {expr}]) List file names in {dir} selected by {expr}
2695-
readdirex({dir} [, {expr}]) List file info in {dir} selected by {expr}
2706+
readdir({dir} [, {expr} [, {dict}]])
2707+
List file names in {dir} selected by {expr}
2708+
readdirex({dir} [, {expr} [, {dict}]])
2709+
List file info in {dir} selected by {expr}
26962710
readfile({fname} [, {type} [, {max}]])
26972711
List get list of lines from file {fname}
26982712
reduce({object}, {func} [, {initial}])
@@ -2882,6 +2896,7 @@ term_setsize({buf}, {rows}, {cols})
28822896
none set the size of a terminal
28832897
term_start({cmd} [, {options}]) Number open a terminal window and run a job
28842898
term_wait({buf} [, {time}]) Number wait for screen to be updated
2899+
terminalprops() Dict properties of the terminal
28852900
test_alloc_fail({id}, {countdown}, {repeat})
28862901
none make memory allocation fail
28872902
test_autochdir() none enable 'autochdir' during startup
@@ -4533,7 +4548,7 @@ flatten({list} [, {maxdepth}]) *flatten()*
45334548
a very large number.
45344549
The {list} is changed in place, make a copy first if you do
45354550
not want that.
4536-
*E964*
4551+
*E900*
45374552
{maxdepth} means how deep in nested lists changes are made.
45384553
{list} is not modified when {maxdepth} is 0.
45394554
{maxdepth} must be positive number.
@@ -6288,10 +6303,11 @@ inputlist({textlist}) *inputlist()*
62886303
displayed, one string per line. The user will be prompted to
62896304
enter a number, which is returned.
62906305
The user can also select an item by clicking on it with the
6291-
mouse. For the first string 0 is returned. When clicking
6292-
above the first item a negative number is returned. When
6293-
clicking on the prompt one more than the length of {textlist}
6294-
is returned.
6306+
mouse, if the mouse is enabled in the command line ('mouse' is
6307+
"a" or includes "c"). For the first string 0 is returned.
6308+
When clicking above the first item a negative number is
6309+
returned. When clicking on the prompt one more than the
6310+
length of {textlist} is returned.
62956311
Make sure {textlist} has less than 'lines' entries, otherwise
62966312
it won't work. It's a good idea to put the entry number at
62976313
the start of the string. And put a prompt in the first item.
@@ -7910,11 +7926,12 @@ rand([{expr}]) *rand()* *random*
79107926
:echo rand(seed)
79117927
:echo rand(seed) % 16 " random number 0 - 15
79127928
<
7913-
readdir({directory} [, {expr}]) *readdir()*
7929+
readdir({directory} [, {expr} [, {dict}]]) *readdir()*
79147930
Return a list with file and directory names in {directory}.
79157931
You can also use |glob()| if you don't need to do complicated
79167932
things, such as limiting the number of matches.
7917-
The list will be sorted (case sensitive).
7933+
The list will be sorted (case sensitive), see the {dict}
7934+
argument below for changing the sort order.
79187935

79197936
When {expr} is omitted all entries are included.
79207937
When {expr} is given, it is evaluated to check what to do:
@@ -7932,18 +7949,38 @@ readdir({directory} [, {expr}]) *readdir()*
79327949
< To skip hidden and backup files: >
79337950
readdir(dirname, {n -> n !~ '^\.\|\~$'})
79347951

7952+
< The optional {dict} argument allows for further custom
7953+
values. Currently this is used to specify if and how sorting
7954+
should be performed. The dict can have the following members:
7955+
7956+
sort How to sort the result returned from the system.
7957+
Valid values are:
7958+
"none" do not sort (fastest method)
7959+
"case" sort case sensitive (byte value of
7960+
each character, technically, using
7961+
strcmp()) (default)
7962+
"icase" sort case insensitive (technically
7963+
using strcasecmp())
7964+
"collate" sort using the collation order
7965+
of the "POSIX" or "C" |locale|
7966+
(technically using strcoll())
7967+
Other values are silently ignored.
7968+
7969+
For example, to get a list of all files in the current
7970+
directory without sorting the individual entries: >
7971+
readdir('.', '1', #{sort: 'none'})
79357972
< If you want to get a directory tree: >
7936-
function! s:tree(dir)
7937-
return {a:dir : map(readdir(a:dir),
7973+
function! s:tree(dir)
7974+
return {a:dir : map(readdir(a:dir),
79387975
\ {_, x -> isdirectory(x) ?
7939-
\ {x : s:tree(a:dir . '/' . x)} : x})}
7940-
endfunction
7941-
echo s:tree(".")
7976+
\ {x : s:tree(a:dir . '/' . x)} : x})}
7977+
endfunction
7978+
echo s:tree(".")
79427979
<
79437980
Can also be used as a |method|: >
79447981
GetDirName()->readdir()
79457982
<
7946-
readdirex({directory} [, {expr}]) *readdirex()*
7983+
readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
79477984
Extended version of |readdir()|.
79487985
Return a list of Dictionaries with file and directory
79497986
information in {directory}.
@@ -7952,7 +7989,9 @@ readdirex({directory} [, {expr}]) *readdirex()*
79527989
This is much faster than calling |readdir()| then calling
79537990
|getfperm()|, |getfsize()|, |getftime()| and |getftype()| for
79547991
each file and directory especially on MS-Windows.
7955-
The list will be sorted by name (case sensitive).
7992+
The list will by default be sorted by name (case sensitive),
7993+
the sorting can be changed by using the optional {dict}
7994+
argument, see |readdir()|.
79567995

79577996
The Dictionary for file and directory information has the
79587997
following items:
@@ -7992,6 +8031,11 @@ readdirex({directory} [, {expr}]) *readdirex()*
79928031
When {expr} is a function the entry is passed as the argument.
79938032
For example, to get a list of files ending in ".txt": >
79948033
readdirex(dirname, {e -> e.name =~ '.txt$'})
8034+
<
8035+
For example, to get a list of all files in the current
8036+
directory without sorting the individual entries: >
8037+
readdirex(dirname, '1', #{sort: 'none'})
8038+
79958039
<
79968040
Can also be used as a |method|: >
79978041
GetDirName()->readdirex()
@@ -10402,6 +10446,41 @@ tempname() *tempname()* *temp-file-name*
1040210446

1040310447
term_ functions are documented here: |terminal-function-details|
1040410448

10449+
10450+
terminalprops() *terminalprops()*
10451+
Returns a dictionary with properties of the terminal that Vim
10452+
detected from the response to |t_RV| request. See
10453+
|v:termresponse| for the response itself. If |v:termresponse|
10454+
is empty most values here will be 'u' for unknown.
10455+
cursor_style wether sending |t_RS| works **
10456+
cursor_blink_mode wether sending |t_RC| works **
10457+
underline_rgb whether |t_8u| works **
10458+
mouse mouse type supported
10459+
10460+
** value 'u' for unknown, 'y' for yes, 'n' for no
10461+
10462+
If the |+termresponse| feature is missing then the result is
10463+
an empty dictionary.
10464+
10465+
If "cursor_style" is 'y' then |t_RS| will be send to request the
10466+
current cursor style.
10467+
If "cursor_blink_mode" is 'y' then |t_RC| will be send to
10468+
request the cursor blink status.
10469+
"cursor_style" and "cursor_blink_mode" are also set if |t_u7|
10470+
is not empty, Vim will detect the working of sending |t_RS|
10471+
and |t_RC| on startup.
10472+
10473+
When "underline_rgb" is not 'y', then |t_8u| will be made empty.
10474+
This avoids sending it to xterm, which would clear the colors.
10475+
10476+
For "mouse" the value 'u' is unknown
10477+
10478+
Also see:
10479+
- 'ambiwidth' - detected by using |t_u7|.
10480+
- |v:termstyleresp| and |v:termblinkresp| for the response to
10481+
|t_RS| and |t_RC|.
10482+
10483+
1040510484
test_ functions are documented here: |test-functions-details|
1040610485

1040710486

@@ -10797,7 +10876,10 @@ win_getid([{win} [, {tab}]]) *win_getid()*
1079710876

1079810877
win_gettype([{nr}]) *win_gettype()*
1079910878
Return the type of the window:
10879+
"autocmd" autocommand window. Temporary window
10880+
used to execute autocommands.
1080010881
"popup" popup window |popup|
10882+
"preview" preview window |preview-window|
1080110883
"command" command-line window |cmdwin|
1080210884
(empty) normal window
1080310885
"unknown" window {nr} not found
@@ -11763,6 +11845,9 @@ like this: >
1176311845

1176411846
:call filename#funcname()
1176511847

11848+
These functions are always global, in Vim9 script "g:" needs to be used: >
11849+
:call g:filename#funcname()
11850+
1176611851
When such a function is called, and it is not defined yet, Vim will search the
1176711852
"autoload" directories in 'runtimepath' for a script file called
1176811853
"filename.vim". For example "~/.vim/autoload/filename.vim". That file should
@@ -11774,7 +11859,11 @@ then define the function like this: >
1177411859

1177511860
The file name and the name used before the # in the function must match
1177611861
exactly, and the defined function must have the name exactly as it will be
11777-
called.
11862+
called. In Vim9 script the "g:" prefix must be used: >
11863+
function g:filename#funcname()
11864+
11865+
or for a compiled function: >
11866+
def g:filename#funcname()
1177811867

1177911868
It is possible to use subdirectories. Every # in the function name works like
1178011869
a path separator. Thus when calling a function: >
@@ -11857,6 +11946,9 @@ This does NOT work: >
1185711946
==============================================================================
1185811947
7. Commands *expression-commands*
1185911948

11949+
Note: in Vim9 script `:let` is used for variable declaration, not assignment.
11950+
An assignment leaves out the `:let` command. |vim9-declaration|
11951+
1186011952
:let {var-name} = {expr1} *:let* *E18*
1186111953
Set internal variable {var-name} to the result of the
1186211954
expression {expr1}. The variable will get the type
@@ -12079,12 +12171,14 @@ text...
1207912171
s: script-local variables
1208012172
l: local function variables
1208112173
v: Vim variables.
12174+
This does not work in Vim9 script. |vim9-declaration|
1208212175

1208312176
:let List the values of all variables. The type of the
1208412177
variable is indicated before the value:
1208512178
<nothing> String
1208612179
# Number
1208712180
* Funcref
12181+
This does not work in Vim9 script. |vim9-declaration|
1208812182

1208912183
:unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795*
1209012184
Remove the internal variable {name}. Several variable

runtime/doc/mlang.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,27 @@ use of "-" and "_".
3737
:lan[guage] mes[sages]
3838
:lan[guage] cty[pe]
3939
:lan[guage] tim[e]
40+
:lan[guage] col[late]
4041
Print the current language (aka locale).
4142
With the "messages" argument the language used for
4243
messages is printed. Technical: LC_MESSAGES.
4344
With the "ctype" argument the language used for
4445
character encoding is printed. Technical: LC_CTYPE.
4546
With the "time" argument the language used for
4647
strftime() is printed. Technical: LC_TIME.
48+
With the "collate" argument the language used for
49+
collation order is printed. Technical: LC_COLLATE.
4750
Without argument all parts of the locale are printed
4851
(this is system dependent).
4952
The current language can also be obtained with the
50-
|v:lang|, |v:ctype| and |v:lc_time| variables.
53+
|v:lang|, |v:ctype|, |v:collate| and |v:lc_time|
54+
variables.
5155

5256
:lan[guage] {name}
5357
:lan[guage] mes[sages] {name}
5458
:lan[guage] cty[pe] {name}
5559
:lan[guage] tim[e] {name}
60+
:lan[guage] col[late] {name}
5661
Set the current language (aka locale) to {name}.
5762
The locale {name} must be a valid locale on your
5863
system. Some systems accept aliases like "en" or
@@ -72,7 +77,10 @@ use of "-" and "_".
7277
With the "time" argument the language used for time
7378
and date messages is set. This affects strftime().
7479
This sets $LC_TIME.
75-
Without an argument both are set, and additionally
80+
With the "collate" argument the language used for the
81+
collation order is set. This affects sorting of
82+
characters. This sets $LC_COLLATE.
83+
Without an argument all are set, and additionally
7684
$LANG is set.
7785
When compiled with the |+float| feature the LC_NUMERIC
7886
value will always be set to "C", so that floating

runtime/doc/options.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.2. Last change: 2020 May 31
1+
*options.txt* For Vim version 8.2. Last change: 2020 Jun 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5381,7 +5381,7 @@ A jump table for the options with a short description can be found at |Q_op|.
53815381
< If your terminal can't overrule the mouse events going to the
53825382
application, use: >
53835383
:set mouse=nvi
5384-
< The you can press ":", select text for the system, and press Esc to go
5384+
< Then you can press ":", select text for the system, and press Esc to go
53855385
back to Vim using the mouse events.
53865386
In |defaults.vim| "nvi" is used if the 'term' option is not matching
53875387
"xterm".
@@ -8717,8 +8717,6 @@ A jump table for the options with a short description can be found at |Q_op|.
87178717
*'virtualedit'* *'ve'*
87188718
'virtualedit' 've' string (default "")
87198719
global
8720-
{not available when compiled without the
8721-
|+virtualedit| feature}
87228720
A comma separated list of these words:
87238721
block Allow virtual editing in Visual block mode.
87248722
insert Allow virtual editing in Insert mode.

runtime/doc/os_vms.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*os_vms.txt* For Vim version 8.2. Last change: 2019 Jan 29
1+
*os_vms.txt* For Vim version 8.2. Last change: 2020 Jun 07
22

33

44
VIM REFERENCE MANUAL

0 commit comments

Comments
 (0)