Update runtime files.
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index ea9a220..3b37627 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 8.2. Last change: 2020 Nov 12
+*autocmd.txt* For Vim version 8.2. Last change: 2020 Dec 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -70,7 +70,8 @@
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
See |autocmd-buflocal|.
-If the `:autocmd` is in Vim9 script then {cmd} will be executed as in Vim9
+If the `:autocmd` is in Vim9 script (a script that starts with `:vim9script`
+and in a `:def` function) then {cmd} will be executed as in Vim9
script. Thus this depends on where the autocmd is defined, not where it is
triggered.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 6f594ab..9e81832 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 Nov 11
+*eval.txt* For Vim version 8.2. Last change: 2020 Dec 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5059,9 +5059,9 @@
The result is the value of option or local buffer variable
{varname} in buffer {expr}. Note that the name without "b:"
must be used.
- When {varname} is empty returns a dictionary with all the
+ When {varname} is empty returns a |Dictionary| with all the
buffer-local variables.
- When {varname} is equal to "&" returns a dictionary with all
+ When {varname} is equal to "&" returns a |Dictionary| with all
the buffer-local options.
Otherwise, when {varname} starts with "&" returns the value of
a buffer-local option.
@@ -5533,8 +5533,8 @@
|location-list-file-window| for more
details.
- Returns a Dictionary with default values if there is no location
- list for the window {nr}.
+ Returns a |Dictionary| with default values if there is no
+ location list for the window {nr}.
Returns an empty Dictionary if window {nr} does not exist.
Examples (See also |getqflist-examples|): >
@@ -5647,7 +5647,7 @@
getqflist([{what}]) *getqflist()*
- Returns a list with all the current quickfix errors. Each
+ Returns a |List| with all the current quickfix errors. Each
list item is a dictionary with these entries:
bufnr number of buffer that has the file name, use
bufname() to get the name
@@ -7153,7 +7153,8 @@
mapnew({expr1}, {expr2}) *mapnew()*
Like |map()| but instead of replacing items in {expr1} a new
List or Dictionary is created and returned. {expr1} remains
- unchanged.
+ unchanged. Items can still be changed by {expr2}, if you
+ don't want that use |deepcopy()| first.
mapset({mode}, {abbr}, {dict}) *mapset()*
@@ -7382,7 +7383,7 @@
matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
- If {list} is a list of strings, then returns a list with all
+ If {list} is a list of strings, then returns a |List| with all
the strings in {list} that fuzzy match {str}. The strings in
the returned list are sorted based on the matching score.
@@ -10660,7 +10661,7 @@
taglist({expr} [, {filename}]) *taglist()*
- Returns a list of tags matching the regular expression {expr}.
+ Returns a |List| of tags matching the regular expression {expr}.
If {filename} is passed it is used to prioritize the results
in the same way that |:tselect| does. See |tag-priority|.
@@ -10752,7 +10753,7 @@
terminalprops() *terminalprops()*
- Returns a dictionary with properties of the terminal that Vim
+ Returns a |Dictionary| with properties of the terminal that Vim
detected from the response to |t_RV| request. See
|v:termresponse| for the response itself. If |v:termresponse|
is empty most values here will be 'u' for unknown.
@@ -11159,7 +11160,7 @@
GetCommand()->win_execute(winid)
win_findbuf({bufnr}) *win_findbuf()*
- Returns a list with |window-ID|s for windows that contain
+ Returns a |List| with |window-ID|s for windows that contain
buffer {bufnr}. When there is none the list is empty.
Can also be used as a |method|: >
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index 8dcaa1f..36e766e 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -1,4 +1,4 @@
-*helphelp.txt* For Vim version 8.2. Last change: 2020 Jul 27
+*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -161,6 +161,25 @@
The initial height of the help window can be set with the 'helpheight' option
(default 20).
+When the help buffer is created, several local options are set to make sure
+the help text is displayed as it was intended:
+ 'iskeyword' nearly all ASCII chars except ' ', '*', '"' and '|'
+ 'foldmethod' "manual"
+ 'tabstop' 8
+ 'arabic' off
+ 'binary' off
+ 'buflisted' off
+ 'cursorbind' off
+ 'diff' off
+ 'foldenable' off
+ 'list' off
+ 'modifiable' off
+ 'number' off
+ 'relativenumber' off
+ 'rightleft' off
+ 'scrollbind' off
+ 'spell' off
+
Jump to specific subjects by using tags. This can be done in two ways:
- Use the "CTRL-]" command while standing on the name of a command or option.
This only works when the tag is a keyword. "<C-Leftmouse>" and
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 5132507..bf39130 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 8.2. Last change: 2020 Nov 21
+*map.txt* For Vim version 8.2. Last change: 2020 Dec 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -909,7 +909,7 @@
1.12 MAPPING AN OPERATOR *:map-operator*
An operator is used before a {motion} command. To define your own operator
-you must create mapping that first sets the 'operatorfunc' option and then
+you must create a mapping that first sets the 'operatorfunc' option and then
invoke the |g@| operator. After the user types the {motion} command the
specified function will be called.
@@ -1321,15 +1321,15 @@
See |:verbose-cmd| for more information.
*E174* *E182*
-:com[mand][!] [{attr}...] {cmd} {rep}
+:com[mand][!] [{attr}...] {cmd} {repl}
Define a user command. The name of the command is
- {cmd} and its replacement text is {rep}. The command's
- attributes (see below) are {attr}. If the command
- already exists, an error is reported, unless a ! is
- specified, in which case the command is redefined.
- There is one exception: When sourcing a script again,
- a command that was previously defined in that script
- will be silently replaced.
+ {cmd} and its replacement text is {repl}. The
+ command's attributes (see below) are {attr}. If the
+ command already exists, an error is reported, unless a
+ ! is specified, in which case the command is
+ redefined. There is one exception: When sourcing a
+ script again, a command that was previously defined in
+ that script will be silently replaced.
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
@@ -1539,11 +1539,11 @@
Replacement text ~
-The replacement text for a user defined command is scanned for special escape
-sequences, using <...> notation. Escape sequences are replaced with values
-from the entered command line, and all other text is copied unchanged. The
-resulting string is executed as an Ex command. To avoid the replacement use
-<lt> in place of the initial <. Thus to include "<bang>" literally use
+The replacement text {repl} for a user defined command is scanned for special
+escape sequences, using <...> notation. Escape sequences are replaced with
+values from the entered command line, and all other text is copied unchanged.
+The resulting string is executed as an Ex command. To avoid the replacement
+use <lt> in place of the initial <. Thus to include "<bang>" literally use
"<lt>bang>".
The valid escape sequences are
@@ -1669,6 +1669,11 @@
This will invoke: >
:call Allargs("%s/foo/bar/ge|update")
<
+If the command is defined in Vim9 script (a script that starts with
+`:vim9script` and in a `:def` function) then {repl} will be executed as in Vim9
+script. Thus this depends on where the command is defined, not where it is
+used.
+
When defining a user command in a script, it will be able to call functions
local to the script and use mappings local to the script. When the user
invokes the user command, it will run in the context of the script it was
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 19edb72..4a574e3 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 8.2. Last change: 2020 Sep 01
+*pattern.txt* For Vim version 8.2. Last change: 2020 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -361,8 +361,8 @@
*/atom*
5. An atom can be one of a long list of items. Many atoms match one character
in the text. It is often an ordinary character or a character class.
- Braces can be used to make a pattern into an atom. The "\z(\)" construct
- is only for syntax highlighting.
+ Parentheses can be used to make a pattern into an atom. The "\z(\)"
+ construct is only for syntax highlighting.
atom ::= ordinary-atom |/ordinary-atom|
or \( pattern \) |/\(|
@@ -676,7 +676,7 @@
Note that using "\&" works the same as using "\@=": "foo\&.." is the
same as "\(foo\)\@=..". But using "\&" is easier, you don't need the
- braces.
+ parentheses.
*/\@!*
@@ -1069,8 +1069,8 @@
[] (with 'nomagic': \[]) */[]* */\[]* */\_[]* */collection*
\_[]
- A collection. This is a sequence of characters enclosed in brackets.
- It matches any single character in the collection.
+ A collection. This is a sequence of characters enclosed in square
+ brackets. It matches any single character in the collection.
Example matches ~
[xyz] any 'x', 'y' or 'z'
[a-zA-Z]$ any alphabetic character at the end of a line
@@ -1129,11 +1129,12 @@
*[:ident:]* [:ident:] identifier character (same as "\i")
*[:keyword:]* [:keyword:] keyword character (same as "\k")
*[:fname:]* [:fname:] file name character (same as "\f")
- The brackets in character class expressions are additional to the
- brackets delimiting a collection. For example, the following is a
- plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is,
- a list of at least one character, each of which is either '-', '.',
- '/', alphabetic, numeric, '_' or '~'.
+ The square brackets in character class expressions are additional to
+ the square brackets delimiting a collection. For example, the
+ following is a plausible pattern for a UNIX filename:
+ "[-./[:alnum:]_~]\+". That is, a list of at least one character,
+ each of which is either '-', '.', '/', alphabetic, numeric, '_' or
+ '~'.
These items only work for 8-bit characters, except [:lower:] and
[:upper:] also work for multibyte characters when using the new
regexp engine. See |two-engines|. In the future these items may
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 00d01bc..ad61a8b 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 8.2. Last change: 2020 Nov 22
+*syntax.txt* For Vim version 8.2. Last change: 2020 Dec 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3183,6 +3183,7 @@
TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
+ *syntax-tex* *syntax-latex*
Tex Contents~
Tex: Want Syntax Folding? |tex-folding|
@@ -3199,6 +3200,7 @@
Tex: Selective Conceal Mode |g:tex_conceal|
Tex: Controlling iskeyword |g:tex_isk|
Tex: Fine Subscript and Superscript Control |tex-supersub|
+ Tex: Match Check Control |tex-matchcheck|
*tex-folding* *g:tex_fold_enabled*
Tex: Want Syntax Folding? ~
@@ -3422,6 +3424,22 @@
< in ~/.vim/ftplugin/tex/tex.vim in order to avoid having inscrutable
utf-8 glyphs appear.
+ *tex-matchcheck* *g:tex_matchcheck*
+ Tex: Match Check Control~
+
+ Sometimes one actually wants mismatched parentheses, square braces,
+ and or curly braces; for example, \text{(1,10] is a range from but
+ not including 1 to and including 10}. This wish, of course, conflicts
+ with the desire to provide delimiter mismatch detection. To
+ accommodate these conflicting goals, syntax/tex.vim provides >
+ g:tex_matchcheck = '[({[]'
+< which is shown along with its default setting. So, if one doesn't
+ want [] and () to be checked for mismatches, try using >
+ let g:tex_matchcheck= '[{}]'
+< If you don't want matching to occur inside bold and italicized
+ regions, >
+ let g:tex_excludematcher= 1
+< will prevent the texMatcher group from being included in those regions.
TF *tf.vim* *ft-tf-syntax*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 1e9b5da..4e58f65 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -6255,6 +6255,7 @@
exim starting.txt /*exim*
exists() eval.txt /*exists()*
exiting starting.txt /*exiting*
+exiting-variable eval.txt /*exiting-variable*
exp() eval.txt /*exp()*
expand() eval.txt /*expand()*
expand-env options.txt /*expand-env*
@@ -6862,6 +6863,7 @@
g:tex_flavor filetype.txt /*g:tex_flavor*
g:tex_fold_enabled syntax.txt /*g:tex_fold_enabled*
g:tex_isk syntax.txt /*g:tex_isk*
+g:tex_matchcheck syntax.txt /*g:tex_matchcheck*
g:tex_no_error syntax.txt /*g:tex_no_error*
g:tex_nospell syntax.txt /*g:tex_nospell*
g:tex_stylish syntax.txt /*g:tex_stylish*
@@ -9174,8 +9176,10 @@
syntax syntax.txt /*syntax*
syntax-functions usr_41.txt /*syntax-functions*
syntax-highlighting syntax.txt /*syntax-highlighting*
+syntax-latex syntax.txt /*syntax-latex*
syntax-loading syntax.txt /*syntax-loading*
syntax-printing usr_06.txt /*syntax-printing*
+syntax-tex syntax.txt /*syntax-tex*
syntax.txt syntax.txt /*syntax.txt*
syntax_cmd syntax.txt /*syntax_cmd*
sys-file-list help.txt /*sys-file-list*
@@ -9610,6 +9614,7 @@
tex-conceal syntax.txt /*tex-conceal*
tex-error syntax.txt /*tex-error*
tex-folding syntax.txt /*tex-folding*
+tex-matchcheck syntax.txt /*tex-matchcheck*
tex-math syntax.txt /*tex-math*
tex-morecommands syntax.txt /*tex-morecommands*
tex-nospell syntax.txt /*tex-nospell*
@@ -9787,6 +9792,7 @@
v:errors eval.txt /*v:errors*
v:event eval.txt /*v:event*
v:exception eval.txt /*v:exception*
+v:exiting eval.txt /*v:exiting*
v:false eval.txt /*v:false*
v:fcs_choice eval.txt /*v:fcs_choice*
v:fcs_reason eval.txt /*v:fcs_reason*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 454c0c2..2e65918 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 8.2. Last change: 2020 Nov 28
+*todo.txt* For Vim version 8.2. Last change: 2020 Dec 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,34 +38,16 @@
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Vim9 - Change
-- Drop support for #{} early December. Close #7310
- -> Does it work to recognize lambda?
- {x: int -> x + 5}
- var int = 5
- {x: int, y: int}
-Vim9 - Making everything work:
-- Compile: for [key, value] in items(map): Also support @r, $VAR, etc.
-- Make map() give an error if the resulting type of the first argument is
- wrong. Only works if the type is known? Is this slow (need to go over all
- items)?
-- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
-- need to check type when a declaration specifies a type: #6507
- let nr: number = 'asdf'
-- Check many more builtin function arguments at compile time.
-- Make sure that in vim9script a function call without namespace only finds
- the script-local function, not a global one.
-- Make sure that where a callback is expected a function can be used (without
- quotes). E.g. sort() and map(). Also at the script level.
-- ":put" with ISN_PUT does not handle range correctly, e.g. ":$-2put".
- Add command to parse range at runtime?
-- When defining an :autocmd or :command, how to specify using Vim9 syntax?
- - always do this when defined in a Vim9 script
- - add some command modifier.
-- For an :autocmd and :command argument, if a following line starts with "|"
- append it. It's like line continuation. (#6702)
+Vim9 - Make everything work:
+- For an :autocmd and :command argument defined in Vim9 script, if a following
+ line starts with "|" append it. It's like line continuation. (#6702)
+- The syntax of a range list[a:b] is ambiguous, is this one "a:b" variable or
+ a range from "a" to "b"? To avoid confusion, require white space before
+ (and after) the colon? #7409
- Implement "export {one, two three}".
- ISN_CHECKTYPE could use check_argtype()
+- Using a script variable inside a :def function doesn't work if the variable
+ is inside a block, see Test_nested_function(). Should it work?
- give error for variable name:
let p = function('NoSuchFunc')
- If a :def function is called with a function reference, compile it to get
@@ -78,7 +60,14 @@
- Does this work already: can use func as reference:
def SomeFunc() ...
map(list, SomeFunc)
+- For builtin functions using tv_get_string*() use check_for_string() to be
+ more strict about the argument type.
- Support passing v:none to use the default argument value. (#6504)
+- Make map() give an error if the resulting type of the first argument is
+ wrong. Only works if the type is known? Is this slow (need to go over all
+ items)?
+- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
+- Check many more builtin function arguments at compile time.
- make 0 == 'string' fail on the script level, like inside :def.
- Check that when using a user function name without prefix, it does not find
a global function. Prefixing g: is required.
@@ -107,9 +96,11 @@
- expandcmd() with `=expr` in filename uses legacy expression.
- eval_expr() in ex_cexpr()
- eval_expr() call in dbg_parsearg() and debuggy_find()
-New syntax and functionality:
Improve error checking:
- "echo Func()" is an error if Func() does not return anything.
+Before launch:
+- Add all the error numbers in a good place in documentation.
+- In the generic eval docs, point out the Vim9 syntax where it differs.
Also:
- For range: make table of first ASCII character with flag to quickly check if
it can be a Vim9 command. E.g. "+" can, but "." can't.
@@ -184,6 +175,8 @@
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
- Combining text property with 'cursorline' does not always work (Billie
Cleek, #5533)
+- Should we let the textprop highlight overrule other (e.g. diff) highlight if
+ the priority is above a certain value? (#7392)
- See remarks at top of src/textprop.c
'incsearch' with :s:
diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt
index b1c6fa7..fabee45 100644
--- a/runtime/doc/undo.txt
+++ b/runtime/doc/undo.txt
@@ -1,4 +1,4 @@
-*undo.txt* For Vim version 8.2. Last change: 2020 Oct 18
+*undo.txt* For Vim version 8.2. Last change: 2020 Nov 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -65,9 +65,9 @@
the redo will not be possible anymore.
'u' included, the Vi-compatible way:
-The undo command undoes the previous change, and also the previous undo command.
-The redo command repeats the previous undo command. It does NOT repeat a
-change command, use "." for that.
+The undo command undoes the previous change, and also the previous undo
+command. The redo command repeats the previous undo command. It does NOT
+repeat a change command, use "." for that.
Examples Vim way Vi-compatible way ~
"uu" two times undo no-op
@@ -103,7 +103,7 @@
:undojoin | delete
-After this an "u" command will undo the delete command and the previous
+After this a "u" command will undo the delete command and the previous
change.
To do the opposite, break a change into two undo blocks, in Insert mode use
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 5b0fded..1872b82 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 8.2. Last change: 2020 Dec 04
+*vim9.txt* For Vim version 8.2. Last change: 2020 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -123,8 +123,8 @@
Many errors are already found when compiling, before the function is executed.
The syntax is strict, to enforce code that is easy to read and understand.
-Compilation is done when:
-- the function is first called
+Compilation is done when either of these is encountered:
+- the first time the function is called
- when the `:defcompile` command is encountered in the script where the
function was defined
- `:disassemble` is used for the function.
@@ -132,8 +132,9 @@
reference
`:def` has no options like `:function` does: "range", "abort", "dict" or
-"closure". A `:def` function always aborts on an error, does not get a range
-passed and cannot be a "dict" function.
+"closure". A `:def` function always aborts on an error (unless `:silent!` was
+used for the command or inside a `:try` block), does not get a range passed
+and cannot be a "dict" function.
The argument types and return type need to be specified. The "any" type can
be used, type checking will then be done at runtime, like with legacy