Update runtime files
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 727ff2a..f17a892 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -1,4 +1,4 @@
-*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 09
+*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 2752ce6..b30271e 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 9.0. Last change: 2022 Sep 26
+*cmdline.txt* For Vim version 9.0. Last change: 2022 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index ba95f32..3515891 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 9.0. Last change: 2022 Oct 07
+*eval.txt* For Vim version 9.0. Last change: 2022 Nov 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3073,6 +3073,10 @@
Unlock the internal variable {name}. Does the
opposite of |:lockvar|.
+ If {name} does not exist:
+ - In |Vim9| script an error is given.
+ - In legacy script this is silently ignored.
+
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
:en[dif] Execute the commands until the next matching `:else`
or `:endif` if {expr1} evaluates to non-zero.
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index 432ca7c..668b4d4 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -1,4 +1,4 @@
-*gui.txt* For Vim version 9.0. Last change: 2022 Apr 03
+*gui.txt* For Vim version 9.0. Last change: 2022 Nov 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -889,6 +889,11 @@
Note that hitting <Tab> while entering a menu name after a menu command may
be used to complete the name of the menu item.
+It is not allowed to change menus while listing them. *E1310*
+This doesn't normally happen, only when, for example, you would have a timer
+callback define a menu and the user lists menus in a way it shows
+|more-prompt|.
+
5.4 Executing Menus *execute-menus*
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 494b629..f2b6a61 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 9.0. Last change: 2022 Oct 19
+*map.txt* For Vim version 9.0. Last change: 2022 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -584,6 +584,9 @@
The |:filter| command can be used to select what mappings to list. The
pattern is matched against the {lhs} and {rhs} in the raw form.
+While mappings are being listed, it is not possible to add or clear mappings,
+e.g. from a timer callback. *E1309*
+
*:map-verbose*
When 'verbose' is non-zero, listing a key map will also display where it was
last defined. Example: >
@@ -1476,6 +1479,8 @@
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
Delete the user-defined command {cmd}.
+ This is not allowed while listing commands, e.g. from
+ a timer. *E1311*
:delc[ommand] -buffer {cmd} *E1237*
Delete the user-defined command {cmd} that was defined
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 4642bdd..f4bf379 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 9.0. Last change: 2022 Oct 28
+*options.txt* For Vim version 9.0. Last change: 2022 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 0a3e319..17d4b85 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 06
+*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1888,6 +1888,16 @@
Now you just need to make sure that you add all regions that contain
the preprocessor language to the cluster htmlPreproc.
+ *html-folding*
+The HTML syntax file provides syntax |folding| (see |:syn-fold|) between start
+and end tags. This can be turned on by >
+
+ :let g:html_syntax_folding = 1
+ :set foldmethod=syntax
+
+Note: Syntax folding might slow down syntax highlighting significantly,
+especially for large files.
+
HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax*
@@ -5394,8 +5404,8 @@
MatchParen Character under the cursor or just before it, if it
is a paired bracket, and its match. |pi_paren.txt|
*hl-MessageWindow*
-MessageWindow Messages popup window used when 'cmdheight' is zero. If not
- defined |hl-WarningMsg| is used.
+MessageWindow Messages popup window used by `:echowindow`. If not defined
+ |hl-WarningMsg| is used.
*hl-ModeMsg*
ModeMsg 'showmode' message (e.g., "-- INSERT --").
*hl-MoreMsg*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index a5159c3..497a929 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -3042,6 +3042,9 @@
:r! insert.txt /*:r!*
:range cmdline.txt /*:range*
:range! change.txt /*:range!*
+:range-closed-fold cmdline.txt /*:range-closed-fold*
+:range-offset cmdline.txt /*:range-offset*
+:range-pattern cmdline.txt /*:range-pattern*
:re insert.txt /*:re*
:read insert.txt /*:read*
:read! insert.txt /*:read!*
@@ -4355,7 +4358,10 @@
E1306 vim9.txt /*E1306*
E1307 vim9.txt /*E1307*
E1308 builtin.txt /*E1308*
+E1309 map.txt /*E1309*
E131 userfunc.txt /*E131*
+E1310 gui.txt /*E1310*
+E1311 map.txt /*E1311*
E132 userfunc.txt /*E132*
E133 userfunc.txt /*E133*
E134 change.txt /*E134*
@@ -7512,6 +7518,7 @@
getmarklist() builtin.txt /*getmarklist()*
getmatches() builtin.txt /*getmatches()*
getmousepos() builtin.txt /*getmousepos()*
+getmouseshape() builtin.txt /*getmouseshape()*
getpid() builtin.txt /*getpid()*
getpos() builtin.txt /*getpos()*
getqflist() builtin.txt /*getqflist()*
@@ -7832,6 +7839,7 @@
hpterm term.txt /*hpterm*
hpterm-color syntax.txt /*hpterm-color*
html-flavor insert.txt /*html-flavor*
+html-folding syntax.txt /*html-folding*
html-indent indent.txt /*html-indent*
html-indenting indent.txt /*html-indenting*
html.vim syntax.txt /*html.vim*
@@ -10179,6 +10187,7 @@
termdebug_shortcuts terminal.txt /*termdebug_shortcuts*
termdebug_use_prompt terminal.txt /*termdebug_use_prompt*
termdebug_wide terminal.txt /*termdebug_wide*
+termdebug_winbar terminal.txt /*termdebug_winbar*
terminal terminal.txt /*terminal*
terminal-api terminal.txt /*terminal-api*
terminal-autoshelldir terminal.txt /*terminal-autoshelldir*
diff --git a/runtime/doc/terminal.txt b/runtime/doc/terminal.txt
index 3acc513..a089ef9 100644
--- a/runtime/doc/terminal.txt
+++ b/runtime/doc/terminal.txt
@@ -1,4 +1,4 @@
-*terminal.txt* For Vim version 9.0. Last change: 2022 Oct 10
+*terminal.txt* For Vim version 9.0. Last change: 2022 Nov 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -469,7 +469,6 @@
Environment variables are used to pass information to the running job:
VIM_SERVERNAME v:servername
-
==============================================================================
2. Terminal functions *terminal-function-details*
@@ -1129,7 +1128,6 @@
Creating a screen dump ~
*terminal-screendump*
-
To create the screen dump, run Vim (or any other program) in a terminal and
make it show the desired state. Then use the |term_dumpwrite()| function to
create a screen dump file. For example: >
@@ -1153,7 +1151,6 @@
Comparing screen dumps ~
*terminal-diffscreendump*
-
|assert_equalfile()| does not make it easy to see what is different.
To spot the problem use |term_dumpdiff()|: >
call term_dumpdiff("mysyntax.dump", "test.dump")
@@ -1350,6 +1347,7 @@
Eval `:Evaluate`
This way you can use the mouse to perform the most common commands. You need
to have the 'mouse' option set to enable mouse clicks.
+See |termdebug_winbar| for configuring this toolbar.
*:Winbar*
You can add the window toolbar in other windows you open with: >
:Winbar
@@ -1415,6 +1413,20 @@
the state before the debugging was restored.
+Customizing ~
+ *termdebug-customizing* *g:termdebug_config*
+In the past several global variables were used for configuration. These are
+deprecated and using the g:termdebug_config dictionary is preferred. When
+g:termdebug_config exists the other global variables will NOT be used.
+The recommended way is to start with an empty dictionary: >
+ let g:termdebug_config = {}
+
+Then you can add entries to the dictionary as mentioned below. The
+deprecated global variable names are mentioned for completeness. If you are
+switching over to using g:termdebug_config you can find the old variable name
+and take over the value, then delete the deprecated variable.
+
+
Prompt mode ~
*termdebug-prompt*
When the |+terminal| feature is not supported and on MS-Windows, gdb will run
@@ -1430,13 +1442,13 @@
*termdebug_use_prompt*
Prompt mode can be used even when the |+terminal| feature is present with: >
let g:termdebug_config['use_prompt'] = 1
-Or if there is no g:termdebug_config: >
+If there is no g:termdebug_config you can use: >
let g:termdebug_use_prompt = 1
<
*termdebug_map_K*
The K key is normally mapped to :Evaluate. If you do not want this use: >
let g:termdebug_config['map_K'] = 0
-Or if there is no g:termdebug_config: >
+If there is no g:termdebug_config you can use: >
let g:termdebug_map_K = 0
<
*termdebug_disasm_window*
@@ -1444,7 +1456,7 @@
the "disasm_window_height" entry can be used to set the window height: >
let g:termdebug_config['disasm_window'] = 1
let g:termdebug_config['disasm_window_height'] = 15
-or, if there is no g:termdebug_config: >
+If there is no g:termdebug_config you can use: >
let g:termdebug_disasm_window = 15
Any value greater than 1 will set the Asm window height to that value.
@@ -1462,25 +1474,18 @@
communication channel.
-Customizing ~
- *termdebug-customizing* *g:termdebug_config*
-In the past several global variables were used for configuration. These are
-deprecated, using the g:termdebug_config dictionary is preferred. When
-g:termdebug_config exists the other global variables will not be used.
-
-
GDB command ~
*g:termdebugger*
To change the name of the gdb command, set "debugger" entry in
g:termdebug_config or the "g:termdebugger" variable before invoking
`:Termdebug`: >
let g:termdebug_config['command'] = "mygdb"
-Or if there is no g:termdebug_config: >
+If there is no g:termdebug_config you can use: >
let g:termdebugger = "mygdb"
If the command needs an argument use a List: >
let g:termdebug_config['command'] = ['rr', 'replay', '--']
-Or if there is no g:termdebug_config: >
+If there is no g:termdebug_config you can use: >
let g:termdebugger = ['rr', 'replay', '--']
Several arguments will be added to make gdb work well for the debugger.
@@ -1501,7 +1506,7 @@
Colors ~
- *hl-debugPC* *hl-debugBreakpoint*
+ *hl-debugPC* *hl-debugBreakpoint*
The color of the signs can be adjusted with these highlight groups:
- debugPC the current position
- debugBreakpoint a breakpoint
@@ -1517,7 +1522,6 @@
Shortcuts ~
*termdebug_shortcuts*
-
You can define your own shortcuts (mappings) to control gdb, that can work in
any window, using the TermDebugSendCommand() function. Example: >
map ,w :call TermDebugSendCommand('where')<CR>
@@ -1526,7 +1530,6 @@
Popup menu ~
*termdebug_popup*
-
By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds
these entries to the popup menu:
Set breakpoint `:Break`
@@ -1534,17 +1537,23 @@
Evaluate `:Evaluate`
If you don't want this then disable it with: >
let g:termdebug_config['popup'] = 0
-or if there is no g:termdebug_config: >
+If there is no g:termdebug_config you can use: >
let g:termdebug_popup = 0
+Window toolbar ~
+ *termdebug_winbar*
+By default the Termdebug plugin creates a window toolbar if the mouse is
+enabled (see |:Winbar|). If you don't want this then disable it with: >
+ let g:termdebug_config['winbar'] = 0
+
+
Vim window width ~
*termdebug_wide*
-
To change the width of the Vim window when debugging starts and use a vertical
split: >
let g:termdebug_config['wide'] = 163
-Or if there is no g:termdebug_config: >
+If there is no g:termdebug_config you can use: >
let g:termdebug_wide = 163
This will set 'columns' to 163 when `:Termdebug` is used. The value is
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index ff59a20..8ff194a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 9.0. Last change: 2022 Nov 09
+*todo.txt* For Vim version 9.0. Last change: 2022 Nov 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,19 +38,71 @@
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Add test for what 9.0.0827 fixes - '@' in termcap key code
+virtual text issues:
+- #11463 `after` is sometimes wrapped with `list`, `nowrap` and
+ `listchars+=extends:>`, cursor position is also wrong
+- #11520 `below` cannot be placed below empty lines
+ James Alvarado looks into it
'smoothscroll':
+- PR #11502 - cursor position wrong
+- PR #11514 - mouse click is off
- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
- computing 'scrolloff' position row use w_skipcol
-- PR: Error in screen dump for Test_smoothscroll_one_long_line. (PR #11436)
+- Check this list: https://github.com/vim/vim/pulls?q=is%3Apr+is%3Aopen+smoothscroll+author%3Aychin
+- Long line spanning multiple pages: After a few CTRL-E then gj causes a
+ scroll. (Ernie Rael, 18 Nov) Also pressing space or "l"
+
+Switching to window for a buffer in set_buffer_lines() doesn't work if there
+is no window. Use aucmd_prepbuf() instead. #11558
+
+
+Upcoming larger works:
+- Make spell checking work with recent .dic/.aff files, e.g. French. #4916
+ Make Vim understand the format somehow? Search for "spell" below.
+ Make sure suggestions are speedy, also with composed words (German).
+- Discuss alternatives for using other grammars (treesitter, TextMate).
+ - Possibly conversion to Vim syntax rules.
+ - Other mechanism than group and cluster to nest syntax items, to be used
+ for grammars.
+ - Possibly keeping the parsed syntax tree and incremental updates.
+ - Make clear how it relates to LSP.
+ - example plugin: https://github.com/uga-rosa/dps-vsctm.vim
+- Better support for detecting terminal emulator behavior (esp. special key
+ handling) and taking away the need for users to tweak their config.
+ > In the libvterm fork properly implement:
+ - modifyOtherKeys 2 - follow xterm implementation as close as possible
+ - Kitty key protocol - just like the latest Kitty
+ So that in TermDebug the key handling can be stepped through (instead of
+ having to log messages all over the place to see what happens). Ask
+ Leonerd about location of code, he might want to take over some of it.
+ > In the table of names pointing to the list of entries, with an additional
+ one. So that "xterm-kitty" can first load "xterm" and then add "kitty"
+ entries.
+ > Add an "expectKittyEsc" flag (Esc is always sent as a sequence, not one
+ character) and always wait after an Esc for more to come, don't leave
+ Insert mode.
+ -> Request code for Esc after outputting t_KI, use "k!" value.
+ Use response to set "expectKittyEsc".
+ -> Add ESC[>1uESC[?u to t_KI, parse flag response.
+ -> May also send t_RV and delay starting a shell command until the
+ response has been seen, to make sure the other responses don't get read
+ by a shell command.
+ > Add an option with a list of names that, when matching $TERM, indicate the
+ kitty keyboard protocol should be used? Allows adding "foot" and others
+ later, without modifying Vim. Perhaps a pattern-value pair:
+ set keyprotocol=kitty:kitty,foot:kitty,xterm:mok2,doggy:mok2
+ Here "mok2" means modifyOtherKeys level 2.
+ > Can we use the req_more_codes_from_term() mechanism with more terminals?
+ Should we repeat it after executing a shell command?
+ Can also add this to the 'keyprotocol' option: "mok2+tcap"
Further Vim9 improvements, possibly after launch:
- Use Vim9 for more runtime files.
- implement :type
- implement :enum
-- implement :class and :interface: See |vim9-classes|
+- implement :class and :interface: See |vim9-classes| #11544
- Inline call to map() and filter(), better type checking.
- When evaluating constants for script variables, some functions could work:
has(featureName), len(someString)
@@ -180,9 +232,33 @@
Add winid arg to col() and charcol() #11466 (request #11461)
+Make the default for 'ttyfast' on, checking $TERM names doesn't make much
+sense right now, most terminals are fast. #11549
+
+Can we make 'noendofline' and 'endoffile' visible? Should show by default,
+since it's an unusual situation.
+- Show 'noendofline' when it would be used for writing ('fileformat' "dos")
+ with an upside down exclamation mark? NonText highlighting.
+- Show 'endoffile' when it would be used for writing ('fileformat' "dos") with
+ "CTRL-Z", NonText highlighting.
+- Add 'fillchars' items to change this, default behavior like:
+ noeol:¡
+ eof:CTRL-Z
+
Test property disappears when using CR twice in a row. OK when some text was
entered. (#11151)
+Add 'keywordprg' to various ftplugin files:
+https://github.com/vim/vim/pull/5566
+
+Add some kind of ":whathappend" command and functions to make visible what the
+last few typed keys and executed commands are. To be used when the user
+wonders what went wrong.
+- typed keys - Normal mode command - like what is recorded in a register and
+ displayed by 'showcmd'.
+- executed command lines
+- with more verbosity: what scripts/functions/autocommands were executed
+
NFA regexp does not handle composing characters well: #10286
[ɔ̃] matches both ɔ and ɔ̃
\(ɔ\|ɔ̃\) matches ɔ and not ɔ̃
@@ -201,14 +277,6 @@
Horizontal mouse scroll only works when compiled with GUI? #11374
-In the libvterm fork properly implement:
-- modifyOtherKeys 2 - follow xterm implementation as close as possible, that
- is the reference.
-- Kitty key protocol - just like the latest Kitty
-So that in TermDebug the key handling can be stepped through (instead of
-having to log messages all over the place to see what happens).
-Ask Leonerd about location of code, he might want to take over some of it.
-
Using "A" and "o" in manually created fold (in empty buffer) does not behave
consistenly (James McCoy, #10698)
@@ -218,6 +286,8 @@
Syntax include problem: #11277. Related to Patch 8.2.2761
+Add str2blob() and blob2str() ? #4049
+
To avoid flicker: add an option that when a screen clear is requested, instead
of clearing it draws everything and uses "clear to end of line" for every line.
Resetting 't_ut' already causes this?
@@ -281,9 +351,6 @@
interrupt does not work. Where to add ui_breakcheck()?
New English spell files also have very slow suggestions.
-French spell files don't work correctly. #4916
- Make Vim understand the format somehow?
-
When 'spelloptions' is "camel" then zG doesn't work on some words.
(Gary Johnson, 17 Oct 2022)
diff --git a/runtime/doc/userfunc.txt b/runtime/doc/userfunc.txt
index 0ebc82a..ab2005e 100644
--- a/runtime/doc/userfunc.txt
+++ b/runtime/doc/userfunc.txt
@@ -1,4 +1,4 @@
-*userfunc.txt* For Vim version 9.0. Last change: 2022 Sep 09
+*userfunc.txt* For Vim version 9.0. Last change: 2022 Nov 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8,8 +8,8 @@
This is introduced in section |41.7| of the user manual.
-1. Defining a fuction |define-function|
-2. Calling a fuction |:call|
+1. Defining a function |define-function|
+2. Calling a function |:call|
3. Cleaning up in a function |:defer|
4. Automatically loading functions |autoload-functions|
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 5a7820e..086081f 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1,4 +1,4 @@
-*usr_41.txt* For Vim version 9.0. Last change: 2022 Oct 07
+*usr_41.txt* For Vim version 9.0. Last change: 2022 Nov 14
VIM USER MANUAL - by Bram Moolenaar
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index 7c5b2b8..387f9a1 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt* For Vim version 9.0. Last change: 2022 Oct 11
+*vim9.txt* For Vim version 9.0. Last change: 2022 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1950,13 +1950,22 @@
Thoughts:
- `class` / `endclass`, the whole class must be in one file
- Class names are always CamelCase (to avoid a name clash with builtin types)
-- A single constructor called "constructor"
-- Single inheritance with `class ThisClass extends BaseClass`
-- `abstract class` (class with incomplete implementation)
-- `interface` / `endinterface` (abstract class without any implementation)
-- `class SomeClass implements SomeInterface`
+- A single constructor called "constructor" (similar to TypeScript)
+- Single inheritance: `class ThisClass extends BaseClass`
+- `interface` / `endinterface` (looks like a class without any implementation)
+- Explicit declaration that the class supports an interface, so that type
+ checking works properly:
+ `class SomeClass implements SomeInterface, OtherInterface`
+- `abstract class` (class with incomplete implementation) - not really needed?
+- Class (static) methods and Object methods: syntax to be defined.
+- Class (static) members and Object members: syntax to be defined.
+- Access control: private / protected / shared / public ? Keep it simple.
+- Access object members with `this.member` ?
- Generics for class: `class <Tkey, Tentry>`
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
+- Method overloading (two methods with the same name but different argument
+ types): Most likely not
+- Mixins: not sure if that is useful, leave out for simplicity.
Again, much of this is from TypeScript with a slightly different syntax.