Skip to content

Commit dd60c36

Browse files
committed
Update runtime files
1 parent 341f387 commit dd60c36

35 files changed

Lines changed: 683 additions & 203 deletions

runtime/autoload/dist/vimindent.vim

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,13 +1121,8 @@ def Is_IN_KeywordForLoop(line_1: string, line_2: string): bool # {{{3
11211121
enddef
11221122

11231123
def InCommentOrString(): bool # {{{3
1124-
for synID: number in synstack('.', col('.'))
1125-
if synIDattr(synID, 'name') =~ '\ccomment\|string\|heredoc'
1126-
return true
1127-
endif
1128-
endfor
1129-
1130-
return false
1124+
return synstack('.', col('.'))
1125+
->indexof((_, id: number): bool => synIDattr(id, 'name') =~ '\ccomment\|string\|heredoc') >= 0
11311126
enddef
11321127

11331128
def AlsoClosesBlock(line_B: dict<any>): bool # {{{3

runtime/autoload/python.vim

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ let s:maxoff = 50 " maximum number of lines to look backwards for ()
2222
function s:SearchBracket(fromlnum, flags)
2323
return searchpairpos('[[({]', '', '[])}]', a:flags,
2424
\ {-> synstack('.', col('.'))
25-
\ ->map({_, id -> id->synIDattr('name')})
26-
\ ->match('\%(Comment\|Todo\|String\)$') >= 0},
25+
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
2726
\ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
2827
endfunction
2928

@@ -157,15 +156,13 @@ function python#GetIndent(lnum, ...)
157156
" the start of the comment. synID() is slow, a linear search would take
158157
" too long on a long line.
159158
if synstack(plnum, pline_len)
160-
\ ->map({_, id -> id->synIDattr('name')})
161-
\ ->match('\%(Comment\|Todo\)$') >= 0
159+
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
162160
let min = 1
163161
let max = pline_len
164162
while min < max
165163
let col = (min + max) / 2
166164
if synstack(plnum, col)
167-
\ ->map({_, id -> id->synIDattr('name')})
168-
\ ->match('\%(Comment\|Todo\)$') >= 0
165+
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
169166
let max = col
170167
else
171168
let min = col + 1

runtime/doc/builtin.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.0. Last change: 2023 Feb 14
1+
*builtin.txt* For Vim version 9.0. Last change: 2023 Feb 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2569,8 +2569,7 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
25692569
extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()*
25702570
Like |extend()| but instead of adding items to {expr1} a new
25712571
List or Dictionary is created and returned. {expr1} remains
2572-
unchanged. Items can still be changed by {expr2}, if you
2573-
don't want that use |deepcopy()| first.
2572+
unchanged.
25742573

25752574

25762575
feedkeys({string} [, {mode}]) *feedkeys()*
@@ -9811,6 +9810,8 @@ timer_start({time}, {callback} [, {options}])
98119810
{time} is the waiting time in milliseconds. This is the
98129811
minimum time before invoking the callback. When the system is
98139812
busy or Vim is not waiting for input the time will be longer.
9813+
Zero can be used to execute the callback when Vim is back in
9814+
the main loop.
98149815

98159816
{callback} is the function to call. It can be the name of a
98169817
function or a |Funcref|. It is called with one argument, which

runtime/doc/change.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*change.txt* For Vim version 9.0. Last change: 2022 Nov 20
1+
*change.txt* For Vim version 9.0. Last change: 2023 Feb 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -296,7 +296,9 @@ gr{char} Replace the virtual characters under the cursor with
296296
{char}. This replaces in screen space, not file
297297
space. See |gR| and |Virtual-Replace-mode| for more
298298
details. As with |r| a count may be given.
299-
{char} can be entered like with |r|.
299+
{char} can be entered like with |r|, but characters
300+
that have a special meaning in Insert mode, such as
301+
most CTRL-keys, cannot be used.
300302

301303
*digraph-arg*
302304
The argument for Normal mode commands like |r| and |t| is a single character.
@@ -1033,7 +1035,7 @@ inside of strings can change! Also see 'softtabstop' option. >
10331035
< to display registers '1' and 'a'. Spaces are allowed
10341036
in {arg}.
10351037

1036-
*:di* *:display*
1038+
*:di* *:dis* *:display*
10371039
:di[splay] [arg] Same as :registers.
10381040

10391041
*y* *yank*
@@ -1842,9 +1844,9 @@ editing text paragraphs. A few hints on how to use this:
18421844

18431845
- Set 'formatoptions' to "aw2tq" to make text with indents like this:
18441846

1845-
bla bla foobar bla
1847+
bla bla foobar bla
18461848
bla foobar bla foobar bla
1847-
bla bla foobar bla
1849+
bla bla foobar bla
18481850
bla foobar bla bla foobar
18491851

18501852
- Add the 'c' flag to only auto-format comments. Useful in source code.

runtime/doc/eval.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 9.0. Last change: 2023 Jan 12
1+
*eval.txt* For Vim version 9.0. Last change: 2023 Feb 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4581,10 +4581,10 @@ The input is in the variable "line", the results in the variables "file",
45814581

45824582
getting the scriptnames in a Dictionary ~
45834583
*scriptnames-dictionary*
4584-
The |:scriptnames| command can be used to get a list of all script files that
4585-
have been sourced. There is no equivalent function or variable for this
4586-
(because it's rarely needed). In case you need to manipulate the list this
4587-
code can be used: >
4584+
The `:scriptnames` command can be used to get a list of all script files that
4585+
have been sourced. There is also the `getscriptinfo()` function, but the
4586+
information returned is not exactly the same. In case you need to manipulate
4587+
the output of `scriptnames` this code can be used: >
45884588
" Get the output of ":scriptnames" in the scriptnames_output variable.
45894589
let scriptnames_output = ''
45904590
redir => scriptnames_output

runtime/doc/gui.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*gui.txt* For Vim version 9.0. Last change: 2022 Nov 17
1+
*gui.txt* For Vim version 9.0. Last change: 2023 Feb 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -856,7 +856,7 @@ Example for debugger tools: >
856856
nnoremenu 1.20 WinBar.Next :Next<CR>
857857
nnoremenu 1.30 WinBar.Finish :Finish<CR>
858858
nnoremenu 1.40 WinBar.Cont :Continue<CR>
859-
<
859+
< *hl-ToolbarLine* *hl-ToolbarButton*
860860
The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
861861

862862
When splitting the window the window toolbar is not copied to the new window.

runtime/doc/map.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*map.txt* For Vim version 9.0. Last change: 2023 Feb 18
1+
*map.txt* For Vim version 9.0. Last change: 2023 Feb 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1073,7 +1073,7 @@ translated). The meaning of {value}:
10731073
On protocol is used
10741074
Disabled protocol was used but expected to have been disabled
10751075
by 't_TE'
1076-
Cleared protocol expected to have beeen disabled by 't_TE',
1076+
Cleared protocol expected to have been disabled by 't_TE',
10771077
previous state is unknown
10781078

10791079

@@ -1421,12 +1421,13 @@ this, they can be made local to the script.
14211421

14221422
*<SID>* *<SNR>* *E81*
14231423
The string "<SID>" can be used in a mapping or menu. This requires that the
1424-
'<' flag is not present in 'cpoptions'.
1424+
'<' flag is not present in 'cpoptions'. This is useful if you have a
1425+
script-local function that you want to call from a mapping in the same script.
14251426
When executing the map command, Vim will replace "<SID>" with the special
14261427
key code <SNR>, followed by a number that's unique for the script, and an
14271428
underscore. Example: >
14281429
:map <SID>Add
1429-
could define a mapping "<SNR>23_Add".
1430+
would define a mapping "<SNR>23_Add".
14301431

14311432
When defining a function in a script, "s:" can be prepended to the name to
14321433
make it local to the script (in |Vim9| script functions without a prefix are

runtime/doc/repeat.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*repeat.txt* For Vim version 9.0. Last change: 2022 Sep 22
1+
*repeat.txt* For Vim version 9.0. Last change: 2023 Feb 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -423,6 +423,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
423423
after resolving symbolic links got sourced with
424424
another name the other script is after "->". E.g.
425425
"20->22" means script 20 was sourced as script 22.
426+
Also see `getscriptinfo()`.
426427
{not available when compiled without the |+eval|
427428
feature}
428429

runtime/doc/sign.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*sign.txt* For Vim version 9.0. Last change: 2022 Dec 20
1+
*sign.txt* For Vim version 9.0. Last change: 2023 Feb 21
22

33

44
VIM REFERENCE MANUAL by Gordon Prieur
@@ -614,23 +614,23 @@ sign_placelist({list})
614614
|sign_place()| function. The {list} argument specifies the
615615
List of signs to place. Each list item is a dict with the
616616
following sign attributes:
617-
buffer buffer name or number. For the accepted
617+
buffer Buffer name or number. For the accepted
618618
values, see |bufname()|.
619-
group sign group. {group} functions as a namespace
619+
group Sign group. {group} functions as a namespace
620620
for {id}, thus two groups can use the same
621621
IDs. If not specified or set to an empty
622622
string, then the global group is used. See
623623
|sign-group| for more information.
624-
id sign identifier. If not specified or zero,
624+
id Sign identifier. If not specified or zero,
625625
then a new unique identifier is allocated.
626626
Otherwise the specified number is used. See
627627
|sign-identifier| for more information.
628-
lnum line number in the buffer where the sign is to
628+
lnum Line number in the buffer where the sign is to
629629
be placed. For the accepted values, see
630630
|line()|.
631-
name name of the sign to place. See |sign_define()|
632-
for more information.
633-
priority priority of the sign. When multiple signs are
631+
name Name of the sign to place. See |sign_define()|
632+
for more information.
633+
priority Priority of the sign. When multiple signs are
634634
placed on a line, the sign with the highest
635635
priority is used. If not specified, the
636636
default value of 10 is used. See

runtime/doc/syntax.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*syntax.txt* For Vim version 9.0. Last change: 2023 Feb 20
1+
*syntax.txt* For Vim version 9.0. Last change: 2023 Feb 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2791,17 +2791,25 @@ For highlighted doctests and code inside: >
27912791
:let python_no_doctest_highlight = 1
27922792
or >
27932793
:let python_no_doctest_code_highlight = 1
2794-
(first option implies second one).
2794+
The first option implies the second one.
27952795

27962796
For highlighted trailing whitespace and mix of spaces and tabs: >
27972797
:let python_space_error_highlight = 1
27982798
2799-
If you want all possible Python highlighting (the same as setting the
2800-
preceding last option and unsetting all other ones): >
2799+
If you want all possible Python highlighting:
28012800
:let python_highlight_all = 1
2801+
This has the same effect as setting python_space_error_highlight and
2802+
unsetting all the other ones.
2803+
2804+
If you use Python 2 or straddling code (Python 2 and 3 compatible),
2805+
you can enforce the use of an older syntax file with support for
2806+
Python 2 and up to Python 3.5.
2807+
: let python_use_python2_syntax = 1
2808+
This option will exclude all modern Python 3.6 or higher features.
2809+
2810+
Note: Only existence of these options matters, not their value.
2811+
You can replace 1 above with anything.
28022812

2803-
Note: Only existence of these options matter, not their value. You can replace
2804-
1 above with anything.
28052813

28062814
QUAKE *quake.vim* *ft-quake-syntax*
28072815

@@ -5370,7 +5378,7 @@ ColorColumn Used for the columns set with 'colorcolumn'.
53705378
*hl-Conceal*
53715379
Conceal Placeholder characters substituted for concealed
53725380
text (see 'conceallevel').
5373-
*hl-Cursor*
5381+
*hl-Cursor* *hl-lCursor*
53745382
Cursor Character under the cursor.
53755383
lCursor Character under the cursor when |language-mapping|
53765384
is used (see 'guicursor').

0 commit comments

Comments
 (0)