Skip to content

Commit 1ed3cd6

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents f1bb2fb + e2edc2e commit 1ed3cd6

88 files changed

Lines changed: 1838 additions & 451 deletions

Some content is hidden

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

.codecov.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage:
2+
range: "80...100"
3+
status:
4+
project:
5+
default:
6+
threshold: 0.05%

.github/CODEOWNERS_vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ runtime/syntax/nsis.vim @k-takata
164164
runtime/syntax/pdf.vim @tpope
165165
runtime/syntax/php.vim @TysonAndre
166166
runtime/syntax/privoxy.vim @dkearns
167+
runtime/syntax/prolog.vim @XVilka
167168
runtime/syntax/rc.vim @chrisbra
168169
runtime/syntax/rpcgen.vim @cecamp
169170
runtime/syntax/ruby.vim @dkearns

runtime/autoload/dist/ft.vim

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ func dist#ft#FTinc()
362362
setf aspvbs
363363
elseif lines =~ "<?"
364364
setf php
365+
" Pascal supports // comments but they're vary rarely used for file
366+
" headers so assume POV-Ray
367+
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? s:ft_pascal_keywords
368+
setf pascal
365369
else
366370
call dist#ft#FTasmsyntax()
367371
if exists("b:asmsyntax")
@@ -408,6 +412,9 @@ func dist#ft#FTprogress_asm()
408412
setf progress
409413
endfunc
410414

415+
let s:ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
416+
let s:ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
417+
411418
func dist#ft#FTprogress_pascal()
412419
if exists("g:filetype_p")
413420
exe "setf " . g:filetype_p
@@ -419,8 +426,7 @@ func dist#ft#FTprogress_pascal()
419426
let lnum = 1
420427
while lnum <= 10 && lnum < line('$')
421428
let line = getline(lnum)
422-
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
423-
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
429+
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
424430
setf pascal
425431
return
426432
elseif line !~ '^\s*$' || line =~ '^/\*'
@@ -433,6 +439,19 @@ func dist#ft#FTprogress_pascal()
433439
setf progress
434440
endfunc
435441

442+
func dist#ft#FTpp()
443+
if exists("g:filetype_pp")
444+
exe "setf " . g:filetype_pp
445+
else
446+
let line = getline(nextnonblank(1))
447+
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
448+
setf pascal
449+
else
450+
setf puppet
451+
endif
452+
endif
453+
endfunc
454+
436455
func dist#ft#FTr()
437456
let max = line("$") > 50 ? 50 : line("$")
438457

runtime/doc/editing.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*editing.txt* For Vim version 8.2. Last change: 2020 Dec 19
1+
*editing.txt* For Vim version 8.2. Last change: 2021 Jan 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1014,7 +1014,7 @@ to write anyway add a '!' to the command.
10141014

10151015
*write-permissions*
10161016
When writing a new file the permissions are read-write. For unix the mask is
1017-
0666 with additionally umask applied. When writing a file that was read Vim
1017+
0o666 with additionally umask applied. When writing a file that was read Vim
10181018
will preserve the permissions, but clear the s-bit.
10191019

10201020
*write-readonly*

runtime/doc/eval.txt

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 10
1+
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 13
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -314,6 +314,9 @@ similar to -1. >
314314
:let shortlist = mylist[2:2] " List with one item: [3]
315315
:let otherlist = mylist[:] " make a copy of the List
316316

317+
Notice that the last index is inclusive. If you prefer using an exclusive
318+
index use the |slice()| method.
319+
317320
If the first index is beyond the last item of the List or the second item is
318321
before the first item, the result is an empty list. There is no error
319322
message.
@@ -1217,6 +1220,9 @@ a Number it is first converted to a String.
12171220
In Vim9 script the indexes are character indexes. To use byte indexes use
12181221
|strpart()|.
12191222

1223+
The item at index expr1b is included, it is inclusive. For an exclusive index
1224+
use the |slice()| function.
1225+
12201226
If expr1a is omitted zero is used. If expr1b is omitted the length of the
12211227
string minus one is used.
12221228

@@ -2536,6 +2542,9 @@ expand({expr} [, {nosuf} [, {list}]])
25362542
expandcmd({expr}) String expand {expr} like with `:edit`
25372543
extend({expr1}, {expr2} [, {expr3}])
25382544
List/Dict insert items of {expr2} into {expr1}
2545+
extendnew({expr1}, {expr2} [, {expr3}])
2546+
List/Dict like |extend()| but creates a new
2547+
List or Dictionary
25392548
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
25402549
filereadable({file}) Number |TRUE| if {file} is a readable file
25412550
filewritable({file}) Number |TRUE| if {file} is a writable file
@@ -2784,6 +2793,7 @@ pyxeval({expr}) any evaluate |python_x| expression
27842793
rand([{expr}]) Number get pseudo-random number
27852794
range({expr} [, {max} [, {stride}]])
27862795
List items from {expr} to {max}
2796+
readblob({fname}) Blob read a |Blob| from {fname}
27872797
readdir({dir} [, {expr} [, {dict}]])
27882798
List file names in {dir} selected by {expr}
27892799
readdirex({dir} [, {expr} [, {dict}]])
@@ -2892,6 +2902,8 @@ sign_unplacelist({list}) List unplace a list of signs
28922902
simplify({filename}) String simplify filename as much as possible
28932903
sin({expr}) Float sine of {expr}
28942904
sinh({expr}) Float hyperbolic sine of {expr}
2905+
slice({expr}, {start} [, {end}]) String, List or Blob
2906+
slice of a String, List or Blob
28952907
sort({list} [, {func} [, {dict}]])
28962908
List sort {list}, using {func} to compare
28972909
sound_clear() none stop playing all sounds
@@ -3025,7 +3037,8 @@ tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
30253037
trim({text} [, {mask} [, {dir}]])
30263038
String trim characters in {mask} from {text}
30273039
trunc({expr}) Float truncate Float {expr}
3028-
type({name}) Number type of variable {name}
3040+
type({expr}) Number type of value {expr}
3041+
typename({expr}) String representation of the type of {expr}
30293042
undofile({name}) String undo file name for {name}
30303043
undotree() List undo file tree
30313044
uniq({list} [, {func} [, {dict}]])
@@ -4532,6 +4545,13 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
45324545
mylist->extend(otherlist)
45334546

45344547

4548+
extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()*
4549+
Like |extend()| but instead of adding items to {expr1} a new
4550+
List or Dictionary is created and returned. {expr1} remains
4551+
unchanged. Items can still be changed by {expr2}, if you
4552+
don't want that use |deepcopy()| first.
4553+
4554+
45354555
feedkeys({string} [, {mode}]) *feedkeys()*
45364556
Characters in {string} are queued for processing as if they
45374557
come from a mapping or were typed by the user.
@@ -8266,6 +8286,14 @@ rand([{expr}]) *rand()* *random*
82668286
:echo rand(seed)
82678287
:echo rand(seed) % 16 " random number 0 - 15
82688288
<
8289+
8290+
readblob({fname}) *readblob()*
8291+
Read file {fname} in binary mode and return a |Blob|.
8292+
When the file can't be opened an error message is given and
8293+
the result is an empty |Blob|.
8294+
Also see |readfile()| and |writefile()|.
8295+
8296+
82698297
readdir({directory} [, {expr} [, {dict}]]) *readdir()*
82708298
Return a list with file and directory names in {directory}.
82718299
You can also use |glob()| if you don't need to do complicated
@@ -8380,6 +8408,7 @@ readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
83808408
Can also be used as a |method|: >
83818409
GetDirName()->readdirex()
83828410
<
8411+
83838412
*readfile()*
83848413
readfile({fname} [, {type} [, {max}]])
83858414
Read file {fname} and return a |List|, each line of the file
@@ -8391,8 +8420,6 @@ readfile({fname} [, {type} [, {max}]])
83918420
- When the last line ends in a NL an extra empty list item is
83928421
added.
83938422
- No CR characters are removed.
8394-
When {type} contains "B" a |Blob| is returned with the binary
8395-
data of the file unmodified.
83968423
Otherwise:
83978424
- CR characters that appear before a NL are removed.
83988425
- Whether the last line ends in a NL or not does not matter.
@@ -8410,6 +8437,9 @@ readfile({fname} [, {type} [, {max}]])
84108437
Note that without {max} the whole file is read into memory.
84118438
Also note that there is no recognition of encoding. Read a
84128439
file into a buffer if you need to.
8440+
Deprecated (use |readblob()| instead): When {type} contains
8441+
"B" a |Blob| is returned with the binary data of the file
8442+
unmodified.
84138443
When the file can't be opened an error message is given and
84148444
the result is an empty list.
84158445
Also see |writefile()|.
@@ -9852,6 +9882,18 @@ sinh({expr}) *sinh()*
98529882
{only available when compiled with the |+float| feature}
98539883

98549884

9885+
slice({expr}, {start} [, {end}]) *slice()*
9886+
Similar to using a |slice| "expr[start : end]", but "end" is
9887+
used exclusive. And for a string the indexes are used as
9888+
character indexes instead of byte indexes, like in
9889+
|vim9script|.
9890+
When {end} is omitted the slice continues to the last item.
9891+
When {end} is -1 the last item is omitted.
9892+
9893+
Can also be used as a |method|: >
9894+
GetList()->slice(offset)
9895+
9896+
98559897
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
98569898
Sort the items in {list} in-place. Returns {list}.
98579899

@@ -11131,6 +11173,14 @@ type({expr}) The result is a Number representing the type of {expr}.
1113111173
< Can also be used as a |method|: >
1113211174
mylist->type()
1113311175

11176+
11177+
typename({expr}) *typename()*
11178+
Return a string representation of the type of {expr}.
11179+
Example: >
11180+
echo typename([1, 2, 3])
11181+
list<number>
11182+
11183+
1113411184
undofile({name}) *undofile()*
1113511185
Return the name of the undo file that would be used for a file
1113611186
with name {name} when writing. This uses the 'undodir'
@@ -11288,9 +11338,11 @@ win_execute({id}, {command} [, {silent}]) *win_execute()*
1128811338
call win_execute(winid, 'set syntax=python')
1128911339
< Doing the same with `setwinvar()` would not trigger
1129011340
autocommands and not actually show syntax highlighting.
11341+
1129111342
*E994*
1129211343
Not all commands are allowed in popup windows.
11293-
When window {id} does not exist then no error is given.
11344+
When window {id} does not exist then no error is given and
11345+
an empty string is returned.
1129411346

1129511347
Can also be used as a |method|, the base is passed as the
1129611348
second argument: >

runtime/doc/index.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,8 @@ tag command action ~
15921592
|:sign| :sig[n] manipulate signs
15931593
|:silent| :sil[ent] run a command silently
15941594
|:sleep| :sl[eep] do nothing for a few seconds
1595+
|:sleep!| :sl[eep]! do nothing for a few seconds, without the
1596+
cursor visible
15951597
|:slast| :sla[st] split window and go to last file in the
15961598
argument list
15971599
|:smagic| :sm[agic] :substitute with 'magic'

runtime/doc/options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.2. Last change: 2020 Dec 21
1+
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -438,7 +438,7 @@ the system, mostly it is something like 256 or 1024 characters.
438438
CTRL-? CTRL-H
439439
not CTRL-? CTRL-?
440440

441-
(CTRL-? is 0177 octal, 0x7f hex)
441+
(CTRL-? is 0o177 octal, 0x7f hex)
442442

443443
If your delete key terminal code is wrong, but the
444444
code for backspace is alright, you can put this in

runtime/doc/os_vms.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*os_vms.txt* For Vim version 8.2. Last change: 2020 Dec 30
1+
*os_vms.txt* For Vim version 8.2. Last change: 2021 Jan 04
22

33

44
VIM REFERENCE MANUAL
@@ -767,8 +767,10 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
767767

768768
Version 8.2
769769
- make all changes needed for clean compile build of v8.2 on VMS on all platforms
770-
- test on VSI OpenVMS platforms
771-
- added XPM support - Motif GUI with toolbar on all platforms
770+
- fix the call mkdir bug ([email protected])
771+
- test on VSI OpenVMS Alpha and Itanium platforms
772+
- added LUA support
773+
- added XPM support - Motif GUI with toolbar on all platforms
772774
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
773775
- start integrating the new test scripts
774776

runtime/doc/pattern.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*pattern.txt* For Vim version 8.2. Last change: 2020 Dec 25
1+
*pattern.txt* For Vim version 8.2. Last change: 2021 Jan 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1179,7 +1179,7 @@ x A single character, with no special meaning, matches itself
11791179
\b <BS>
11801180
\n line break, see above |/[\n]|
11811181
\d123 decimal number of character
1182-
\o40 octal number of character up to 0377
1182+
\o40 octal number of character up to 0o377
11831183
\x20 hexadecimal number of character up to 0xff
11841184
\u20AC hex. number of multibyte character up to 0xffff
11851185
\U1234 hex. number of multibyte character up to 0xffffffff
@@ -1217,7 +1217,8 @@ x A single character, with no special meaning, matches itself
12171217
\%d123 Matches the character specified with a decimal number. Must be
12181218
followed by a non-digit.
12191219
\%o40 Matches the character specified with an octal number up to 0377.
1220-
Numbers below 040 must be followed by a non-octal digit or a non-digit.
1220+
Numbers below 0o40 must be followed by a non-octal digit or a
1221+
non-digit.
12211222
\%x2a Matches the character specified with up to two hexadecimal characters.
12221223
\%u20AC Matches the character specified with up to four hexadecimal
12231224
characters.

0 commit comments

Comments
 (0)