Skip to content

Commit 3b5d079

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents b3eb410 + 60dc827 commit 3b5d079

File tree

135 files changed

+3957
-1534
lines changed

Some content is hidden

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

135 files changed

+3957
-1534
lines changed

.github/CODEOWNERS_vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ runtime/compiler/sass.vim @tpope
5151
runtime/compiler/se.vim @dkearns
5252
runtime/compiler/shellcheck.vim @dkearns
5353
runtime/compiler/sml.vim @dkearns
54+
runtime/compiler/spectral.vim @romainl
5455
runtime/compiler/stylelint.vim @dkearns
5556
runtime/compiler/tcl.vim @dkearns
5657
runtime/compiler/tidy.vim @dkearns
@@ -59,6 +60,7 @@ runtime/compiler/tsc.vim @dkearns
5960
runtime/compiler/typedoc.vim @dkearns
6061
runtime/compiler/xmllint.vim @dkearns
6162
runtime/compiler/xo.vim @dkearns
63+
runtime/compiler/yamllint.vim @romainl
6264
runtime/compiler/zsh.vim @dkearns
6365
runtime/doc/pi_getscript.txt @cecamp
6466
runtime/doc/pi_logipat.txt @cecamp

README_VIM9.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ full code is below):
4545
| Vim old | 5.018541 |
4646
| Python | 0.369598 |
4747
| Lua | 0.078817 |
48+
| LuaJit | 0.004245 |
4849
| Vim new | 0.073595 |
4950

5051
That looks very promising! It's just one example, but it shows how much
5152
we can gain, and also that Vim script can be faster than builtin
5253
interfaces.
5354

54-
In practice the script would not do something useless as counting but change
55-
the text. For example, reindent all the lines:
55+
LuaJit is much faster at Lua-only instructions. In practice the script would
56+
not do something useless as counting but change the text. For example,
57+
reindent all the lines:
5658

5759
``` vim
5860
let totallen = 0
@@ -64,13 +66,17 @@ the text. For example, reindent all the lines:
6466

6567
| how | time in sec |
6668
| --------| -------- |
67-
| Vim old | 0.853752 |
68-
| Python | 0.304584 |
69-
| Lua | 0.286573 |
70-
| Vim new | 0.190276 |
69+
| Vim old | 0.578598 |
70+
| Python | 0.152040 |
71+
| Lua | 0.164917 |
72+
| LuaJit | 0.128400 |
73+
| Vim new | 0.079692 |
74+
75+
[These times were measured on a different system by Dominique Pelle]
7176

7277
The differences are smaller, but Vim 9 script is clearly the fastest.
73-
Using LuaJIT gives 0.25, only a little bit faster than plain Lua.
78+
Using LuaJIT is only a little bit faster than plain Lua here, clearly the call
79+
back to the Vim code is costly.
7480

7581
How does Vim9 script work? The function is first compiled into a sequence of
7682
instructions. Each instruction has one or two parameters and a stack is

runtime/compiler/spectral.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
" Vim compiler file
2+
" Compiler: Spectral for YAML
3+
" Maintainer: Romain Lafourcade <[email protected]>
4+
" Last Change: 2021 July 21
5+
6+
if exists("current_compiler")
7+
finish
8+
endif
9+
let current_compiler = "spectral"
10+
11+
if exists(":CompilerSet") != 2
12+
command -nargs=* CompilerSet setlocal <args>
13+
endif
14+
15+
CompilerSet makeprg=spectral\ lint\ %\ -f\ text
16+
CompilerSet errorformat=%f:%l:%c\ %t%.%\\{-}\ %m
17+

runtime/compiler/yamllint.vim

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
" Vim compiler file
2+
" Compiler: Yamllint for YAML
3+
" Maintainer: Romain Lafourcade <[email protected]>
4+
" Last Change: 2021 July 21
5+
6+
if exists("current_compiler")
7+
finish
8+
endif
9+
let current_compiler = "yamllint"
10+
11+
if exists(":CompilerSet") != 2
12+
command -nargs=* CompilerSet setlocal <args>
13+
endif
14+
15+
CompilerSet makeprg=yamllint\ -f\ parsable
16+

runtime/doc/autocmd.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jul 02
1+
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jul 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -681,7 +681,8 @@ CursorHoldI Just like CursorHold, but in Insert mode.
681681
CursorMoved After the cursor was moved in Normal or Visual
682682
mode. Also when the text of the cursor line
683683
has been changed, e.g., with "x", "rx" or "p".
684-
Not triggered when there is typeahead, when
684+
Not triggered when there is typeahead, while
685+
executing commands in a script file, when
685686
an operator is pending or when moving to
686687
another window while remaining at the same
687688
cursor position.

runtime/doc/digraph.txt

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

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -40,7 +40,7 @@ An alternative is using the 'keymap' option.
4040
future.
4141
NOTE: This command cannot add a digraph that starts
4242
with a white space. If you want to add such digraph,
43-
you can use |setdigraph()| instead.
43+
you can use |digraph_set()| instead.
4444

4545
Vim is normally compiled with the |+digraphs| feature. If the feature is
4646
disabled, the ":digraph" command will display an error message.

runtime/doc/editing.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*editing.txt* For Vim version 8.2. Last change: 2021 May 27
1+
*editing.txt* For Vim version 8.2. Last change: 2021 Jul 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1469,8 +1469,11 @@ be readable again. If you use a wrong key, it will be a mess.
14691469
:X Prompt for an encryption key. The typing is done without showing the
14701470
actual text, so that someone looking at the display won't see it.
14711471
The typed key is stored in the 'key' option, which is used to encrypt
1472-
the file when it is written. The file will remain unchanged until you
1473-
write it. See also |-x|.
1472+
the file when it is written.
1473+
The file will remain unchanged until you write it. Note that commands
1474+
such as `:xit` and `ZZ` will NOT write the file unless there are other
1475+
changes.
1476+
See also |-x|.
14741477

14751478
The value of the 'key' options is used when text is written. When the option
14761479
is not empty, the written file will be encrypted, using the value as the
@@ -1749,6 +1752,12 @@ There are three different types of searching:
17491752
/u/user_x/work/include
17501753
/u/user_x/include
17511754
1755+
< Note: If your 'path' setting includes an non-existing directory, Vim will
1756+
skip the non-existing directory, but continues searching in the parent of
1757+
the non-existing directory if upwards searching is used. E.g. when
1758+
searching "../include" and that doesn't exist, and upward searching is
1759+
used, also searches in "..".
1760+
17521761
3) Combined up/downward search:
17531762
If Vim's current path is /u/user_x/work/release and you do >
17541763
set path=**;/u/user_x

0 commit comments

Comments
 (0)