Skip to content

Commit 53f7fcc

Browse files
committed
Update runtime files
1 parent 327d3ee commit 53f7fcc

33 files changed

Lines changed: 804 additions & 353 deletions

.github/CODEOWNERS

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

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ jobs:
366366
features: NORMAL
367367

368368
steps:
369-
- name: Initalize
369+
- name: Initialize
370370
id: init
371371
shell: bash
372372
run: |

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
@@ -679,7 +679,8 @@ CursorHoldI Just like CursorHold, but in Insert mode.
679679
CursorMoved After the cursor was moved in Normal or Visual
680680
mode. Also when the text of the cursor line
681681
has been changed, e.g., with "x", "rx" or "p".
682-
Not triggered when there is typeahead, when
682+
Not triggered when there is typeahead, while
683+
executing commands in a script file, when
683684
an operator is pending or when moving to
684685
another window while remaining at the same
685686
cursor position.

runtime/doc/digraph.txt

Lines changed: 1 addition & 1 deletion
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

runtime/doc/editing.txt

Lines changed: 6 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

0 commit comments

Comments
 (0)