Skip to content

Commit 6dc1510

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 6fdff01 + d58a3bf commit 6dc1510

File tree

19 files changed

+238
-87
lines changed

19 files changed

+238
-87
lines changed

runtime/compiler/shellcheck.vim

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
" Vim compiler file
2+
" Compiler: ShellCheck
3+
" Maintainer: Doug Kearns <[email protected]>
4+
" Last Change: 2020 Sep 4
5+
6+
if exists("current_compiler")
7+
finish
8+
endif
9+
let current_compiler = "shellcheck"
10+
11+
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
12+
command -nargs=* CompilerSet setlocal <args>
13+
endif
14+
15+
let s:cpo_save = &cpo
16+
set cpo&vim
17+
18+
CompilerSet makeprg=shellcheck\ -f\ gcc
19+
CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m\ [SC%n],
20+
\%f:%l:%c:\ %tarning:\ %m\ [SC%n],
21+
\%f:%l:%c:\ %tote:\ %m\ [SC%n],
22+
\%-G%.%#
23+
24+
let &cpo = s:cpo_save
25+
unlet s:cpo_save

runtime/doc/autocmd.txt

Lines changed: 2 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: 2020 Aug 02
1+
*autocmd.txt* For Vim version 8.2. Last change: 2020 Sep 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -633,7 +633,7 @@ CompleteDone After Insert mode completion is done. Either
633633

634634
*CursorHold*
635635
CursorHold When the user doesn't press a key for the time
636-
specified with 'updatetime'. Not re-triggered
636+
specified with 'updatetime'. Not triggered
637637
until the user has pressed a key (i.e. doesn't
638638
fire every 'updatetime' ms if you leave Vim to
639639
make some coffee. :) See |CursorHold-example|

runtime/doc/eval.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.2. Last change: 2020 Sep 22
1+
*eval.txt* For Vim version 8.2. Last change: 2020 Sep 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -877,7 +877,7 @@ Example: >
877877
All expressions within one level are parsed from left to right.
878878

879879

880-
expr1 *expr1* *E109*
880+
expr1 *expr1* *trinary* *E109*
881881
-----
882882

883883
expr2 ? expr1 : expr1

runtime/doc/filetype.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*filetype.txt* For Vim version 8.2. Last change: 2019 Jul 16
1+
*filetype.txt* For Vim version 8.2. Last change: 2020 Sep 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -397,6 +397,13 @@ ways to change this:
397397
3. Docs for the default filetype plugins. *ftplugin-docs*
398398

399399

400+
AWK *ft-awk-plugin*
401+
402+
Support for features specific to GNU Awk, like @include, can be enabled by
403+
setting: >
404+
let g:awk_is_gawk = 1
405+
406+
400407
CHANGELOG *ft-changelog-plugin*
401408

402409
Allows for easy entrance of Changelog entries in Changelog files. There are

runtime/doc/gui.txt

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*gui.txt* For Vim version 8.2. Last change: 2020 Mar 16
1+
*gui.txt* For Vim version 8.2. Last change: 2020 Sep 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -548,15 +548,6 @@ floating menus that do not appear on the main menu bar.
548548
5.2 Creating New Menus *creating-menus*
549549

550550
*:me* *:menu* *:noreme* *:noremenu*
551-
*:am* *:amenu* *:an* *:anoremenu*
552-
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
553-
*:ome* *:omenu* *:onoreme* *:onoremenu*
554-
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
555-
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
556-
*:sme* *:smenu* *:snoreme* *:snoremenu*
557-
*:ime* *:imenu* *:inoreme* *:inoremenu*
558-
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
559-
*:tlm* *:tlmenu* *:tln* *:tlnoremenu*
560551
*E330* *E327* *E331* *E336* *E333*
561552
*E328* *E329* *E337* *E792*
562553
To create a new menu item, use the ":menu" commands. They are mostly like
@@ -597,6 +588,7 @@ With the shortcut "F" (while keeping the <Alt> key pressed), and then "O",
597588
this menu can be used. The second part is shown as "Open :e". The ":e"
598589
is right aligned, and the "O" is underlined, to indicate it is the shortcut.
599590

591+
*:am* *:amenu* *:an* *:anoremenu*
600592
The ":amenu" command can be used to define menu entries for all modes at once,
601593
except for Terminal mode. To make the command work correctly, a character is
602594
automatically inserted for some modes:
@@ -635,6 +627,30 @@ included they make the <> form and raw key codes not being recognized).
635627
Note that <Esc> in Cmdline mode executes the command, like in a mapping. This
636628
is Vi compatible. Use CTRL-C to quit Cmdline mode.
637629

630+
*:nme* *:nmenu* *:nnoreme* *:nnoremenu* *:nunme* *:nunmenu*
631+
Menu commands starting with "n" work in Normal mode. |mapmode-n|
632+
633+
*:ome* *:omenu* *:onoreme* *:onoremenu* *:ounme* *:ounmenu*
634+
Menu commands starting with "o" work in Operator-pending mode. |mapmode-o|
635+
636+
*:vme* *:vmenu* *:vnoreme* *:vnoremenu* *:vunme* *:vunmenu*
637+
Menu commands starting with "v" work in Visual mode. |mapmode-v|
638+
639+
*:xme* *:xmenu* *:xnoreme* *:xnoremenu* *:xunme* *:xunmenu*
640+
Menu commands starting with "x" work in Visual and Select mode. |mapmode-x|
641+
642+
*:sme* *:smenu* *:snoreme* *:snoremenu* *:sunme* *:sunmenu*
643+
Menu commands starting with "s" work in Select mode. |mapmode-s|
644+
645+
*:ime* *:imenu* *:inoreme* *:inoremenu* *:iunme* *:iunmenu*
646+
Menu commands starting with "i" work in Insert mode. |mapmode-i|
647+
648+
*:cme* *:cmenu* *:cnoreme* *:cnoremenu* *:cunme* *:cunmenu*
649+
Menu commands starting with "c" work in Cmdline mode. |mapmode-c|
650+
651+
*:tlm* *:tlmenu* *:tln* *:tlnoremenu* *:tlu* *:tlunmenu*
652+
Menu commands starting with "tl" work in Terminal mode. |mapmode-t|
653+
638654
*:menu-<silent>* *:menu-silent*
639655
To define a menu which will not be echoed on the command line, add
640656
"<silent>" as the first argument. Example: >
@@ -899,14 +915,6 @@ using the last visual selection.
899915

900916
*:unme* *:unmenu*
901917
*:aun* *:aunmenu*
902-
*:nunme* *:nunmenu*
903-
*:ounme* *:ounmenu*
904-
*:vunme* *:vunmenu*
905-
*:xunme* *:xunmenu*
906-
*:sunme* *:sunmenu*
907-
*:iunme* *:iunmenu*
908-
*:cunme* *:cunmenu*
909-
*:tlu* *:tlunmenu*
910918
To delete a menu item or a whole submenu, use the unmenu commands, which are
911919
analogous to the unmap commands. Eg: >
912920
:unmenu! Edit.Paste

runtime/doc/popup.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*popup.txt* For Vim version 8.2. Last change: 2020 Sep 08
1+
*popup.txt* For Vim version 8.2. Last change: 2020 Sep 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -711,7 +711,7 @@ The second argument of |popup_create()| is a dictionary with options:
711711
By default a double line is used all around when
712712
'encoding' is "utf-8" and 'ambiwidth' is "single",
713713
otherwise ASCII characters are used.
714-
scrollbar non-zero: show a scrollbar when the text doesn't fit.
714+
scrollbar 1 or true: show a scrollbar when the text doesn't fit.
715715
zero: do not show a scrollbar. Default is non-zero.
716716
Also see |popup-scrollbar|.
717717
scrollbarhighlight Highlight group name for the scrollbar. The

runtime/doc/starting.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*starting.txt* For Vim version 8.2. Last change: 2020 Feb 04
1+
*starting.txt* For Vim version 8.2. Last change: 2020 Sep 23
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -513,6 +513,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
513513
'nocompatible': use Vim defaults
514514
- no |gvimrc| script is loaded
515515
- no viminfo file is read or written
516+
Note that a following "-u" argument overrules the effect of
517+
"-u DEFAULTS".
516518

517519
*-x*
518520
-x Use encryption to read/write files. Will prompt for a key,

runtime/doc/tags

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6547,6 +6547,7 @@ ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax*
65476547
ft-asmh8300-syntax syntax.txt /*ft-asmh8300-syntax*
65486548
ft-aspperl-syntax syntax.txt /*ft-aspperl-syntax*
65496549
ft-aspvbs-syntax syntax.txt /*ft-aspvbs-syntax*
6550+
ft-awk-plugin filetype.txt /*ft-awk-plugin*
65506551
ft-bash-syntax syntax.txt /*ft-bash-syntax*
65516552
ft-basic-syntax syntax.txt /*ft-basic-syntax*
65526553
ft-c-omni insert.txt /*ft-c-omni*
@@ -7891,6 +7892,7 @@ matcharg() eval.txt /*matcharg()*
78917892
matchdelete() eval.txt /*matchdelete()*
78927893
matchend() eval.txt /*matchend()*
78937894
matchfuzzy() eval.txt /*matchfuzzy()*
7895+
matchfuzzypos() eval.txt /*matchfuzzypos()*
78947896
matchit-install usr_05.txt /*matchit-install*
78957897
matchlist() eval.txt /*matchlist()*
78967898
matchparen pi_paren.txt /*matchparen*
@@ -9788,6 +9790,7 @@ tooltips gui.txt /*tooltips*
97889790
toupper() eval.txt /*toupper()*
97899791
tr() eval.txt /*tr()*
97909792
trim() eval.txt /*trim()*
9793+
trinary eval.txt /*trinary*
97919794
trojan-horse starting.txt /*trojan-horse*
97929795
true vim9.txt /*true*
97939796
true-variable eval.txt /*true-variable*
@@ -10180,6 +10183,7 @@ vim9-declaration vim9.txt /*vim9-declaration*
1018010183
vim9-declarations usr_46.txt /*vim9-declarations*
1018110184
vim9-differences vim9.txt /*vim9-differences*
1018210185
vim9-export vim9.txt /*vim9-export*
10186+
vim9-final vim9.txt /*vim9-final*
1018310187
vim9-gotchas vim9.txt /*vim9-gotchas*
1018410188
vim9-import vim9.txt /*vim9-import*
1018510189
vim9-rationale vim9.txt /*vim9-rationale*

runtime/doc/todo.txt

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 8.2. Last change: 2020 Sep 19
1+
*todo.txt* For Vim version 8.2. Last change: 2020 Sep 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,14 +38,19 @@ browser use: https://github.com/vim/vim/issues/1234
3838
*known-bugs*
3939
-------------------- Known bugs and current work -----------------------
4040

41-
Why does Test_invalid_sid() not work in the GUI?
41+
Popup windows: don't send any keys from ":normal" to popup filter?
42+
Can drop ex_normal_busy_done then.
43+
44+
Move Test_let_* from test_vim9_script to test_vim9_assign
45+
46+
Modifiers in GTK: issue #6457. CTRL-6 should work, like CTRL-@ and CTRL-_.
4247

43-
Add matchfuzzy() and matchfuzzypos() Yegappan, #6947
44-
should be ready now
48+
3 October: remove using :let in Vim9 script.
4549

50+
Go back to not using string/list/dict as falsy/thruthy boolean?
51+
or only make "||" and "&&" result in a boolean?
4652
Making everything work:
47-
- Fix memory leak in test_vim9_func (through compile_nested_function and
48-
get_lambda_tv())
53+
- Fix memory leaks in test_vim9_assign, remove "if 0"
4954
- Fix memory leaks in test_vim9_script
5055
- At the Vim9 script level, keep script variables local to the block they are
5156
declared in, like in Javascript (using :let).
@@ -78,6 +83,7 @@ Making everything work:
7883
- Make sure that where a callback is expected a function can be used (without
7984
quotes). E.g. sort() and map(). Also at the script level.
8085
- assignment to more complex lval: list[1][2][3] = 8
86+
Also "list[0] += value". test in Test_assign_dict_unknown_type().
8187
- ":put" with ISN_PUT does not handle range correctly, e.g. ":$-2put".
8288
Add command to parse range at runtime?
8389
- Make map() give an error if the resulting type is wrong.
@@ -92,9 +98,10 @@ Making everything work:
9298
- ISN_CHECKTYPE could use check_argtype()
9399
- give error for variable name:
94100
let p = function('NoSuchFunc')
95-
- Give runtime error if function argument is wrong.
96-
def Increment(nr: number)
97-
range(3)->Increment()
101+
- If a :def function is called with a function reference, compile it to get
102+
the function type.
103+
def Filter(x: string, Cond: func(string): bool)
104+
Filter(x, { v -> v =~ '^b' })
98105
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
99106
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
100107
- Expand `=expr` in :mkspell
@@ -122,6 +129,8 @@ Making everything work:
122129
- When evaluating constants for script variables, some functions could work:
123130
has('asdf'), len('string')
124131
- Implement "as Name" in "import Item as Name from ..."
132+
- Implement using imported items at script level from "import * as X" in
133+
eval_variable(). Should pass the ".xxx" that follows and return that.
125134
- Disallow unlet for local/script/imported vars
126135
- Make "++nr" work.
127136
- Make closures work:
@@ -332,6 +341,8 @@ Make it possible to map (console and GUI): #6457
332341
Patch for Template string: #4634
333342
Have another look at the implementation.
334343

344+
Valgrind warns for uninitialized values in f_term_dumpwrite().
345+
335346
Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
336347
replace this:
337348
let left = GetLeftFunc()
@@ -341,6 +352,8 @@ Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
341352
let res = GetLeftFunc() <=> GetRightFunc() ?< lower ?= equal ?> upper
342353
Patch to make :q work with local arglist. (Christian Brabandt, #6286)
343354

355+
Why does Test_invalid_sid() not work in the GUI?
356+
344357
Lua: updating wrong buffer when using newly created, unloaded buffer.
345358
(#6539)
346359

runtime/doc/vim9.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,35 @@ rewrite old scripts, they keep working as before. You may want to use a few
6565

6666
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
6767

68+
Overview ~
69+
70+
Brief summary of the differences you will most often encounter when using Vim9
71+
script and `:def` functions; details are below:
72+
- Comments start with #, not ": >
73+
echo "hello" # comment
74+
- Using a backslash for line continuation is hardly ever needed: >
75+
echo "hello "
76+
.. yourName
77+
.. ", how are you?"
78+
- White space is required in many places.
79+
- Assign values without `:let`, declare variables with `:var`: >
80+
var count = 0
81+
count += 3
82+
- Constants can be declared with `:final` and `:const`: >
83+
final matches = [] # add matches
84+
const names = ['Betty', 'Peter'] # cannot be changed
85+
- `:final` cannot be used as an abbreviation of `:finally`.
86+
- Variables and functions are script-local by default.
87+
- Functions are declared with argument types and return type: >
88+
def CallMe(count: number, message: string): bool
89+
- Call functions without `:call`: >
90+
writefile(['done'], 'file.txt')
91+
- You cannot use `:xit`, `:t`, `:append`, `:change`, `:insert` or curly-braces
92+
names.
93+
- A range before a command must be prefixed with a colon: >
94+
:%s/this/that
95+
96+
6897
Comments starting with # ~
6998

7099
In legacy Vim script comments start with double quote. In Vim9 script

0 commit comments

Comments
 (0)