From 37aabaca64b091004224f8d6815e6ce2874ec826 Mon Sep 17 00:00:00 2001 From: Girish Palya Date: Sat, 11 Oct 2025 10:06:00 +0000 Subject: [PATCH 01/75] runtime(doc): update credit section for Girish Palya closes: #18544 Signed-off-by: Girish Palya Signed-off-by: Christian Brabandt --- runtime/doc/intro.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index a972d2a1a2..01eccdd8d8 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 9.1. Last change: 2025 Oct 05 +*intro.txt* For Vim version 9.1. Last change: 2025 Oct 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -274,8 +274,8 @@ Vim would never have become what it is now, without the help of these people! Doug Kearns Runtime file maintainer Foxe Chen Wayland support, new features glepnir completion feature - Girish Palya insert & cmdline autocompletion, - search/substitute completion, etc. + Girish Palya autocompletion (ins/cmdline), omnifunc + composing, search/subst completion, and more. Hirohito Higashi lots of patches and fixes Yee Cheng Chin MacVim maintainer and diff improvements zeertzjq many fixes and improvements From c7d6ec713e9a0a4d0d2508072a75c64dbf8aa5a1 Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Sat, 11 Oct 2025 15:29:31 +0000 Subject: [PATCH 02/75] runtime(doc): Update documentation style in gui_w32.txt closes: #18546 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- runtime/doc/gui_w32.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt index f9b187a4ea..1c33ff6962 100644 --- a/runtime/doc/gui_w32.txt +++ b/runtime/doc/gui_w32.txt @@ -1,4 +1,4 @@ -*gui_w32.txt* For Vim version 9.1. Last change: 2025 Oct 07 +*gui_w32.txt* For Vim version 9.1. Last change: 2025 Oct 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -235,7 +235,7 @@ The "* register reflects the contents of the clipboard. |quotestar| When the "unnamed" string is included in the 'clipboard' option, the unnamed register is the same. Thus you can yank to and paste from the clipboard -without prepending "* to commands. If this doesn't work use the "unnamedplus" +without prepending "* to commands. If this doesn't work use the "unnamedplus" string in the 'clipboard' option. The 'a' flag in 'guioptions' is not included by default. This means that text @@ -458,17 +458,17 @@ Keycode translation strategy *w32-experimental-keycode-trans-strategy* In Patch v8.2.4807 W32 GVIM was changed over to experimental keycode translation method with the aim to be able to use more keyboard shortcuts and -especially supporting non-standard keyboard layouts. In order to implement +especially supporting non-standard keyboard layouts. In order to implement this support Win API TranslateMessage() call was dropped, and instead the -recognition of keycode was changed over to ToUnicode() Win API call. This +recognition of keycode was changed over to ToUnicode() Win API call. This approach uncovered numerous corner cases, which are apparently covered by TranslateMessage() implementation, each of it is necessary to be dealt with on -an individual basis. Therefore the decision was taken to declare this +an individual basis. Therefore the decision was taken to declare this functionality experimental for the time being and to recover "classic" keycode translation method as default again. Discussion about use of "experimental" keycode translation method will -probably last some time yet. In the meantime, if you are impacted by this +probably last some time yet. In the meantime, if you are impacted by this change over back to "classic" keycode translation method in W32 GVIM, you can enable "experimental" translation method again in your vimrc using following snippet: @@ -503,5 +503,5 @@ To use the system's default title bar colors, set highlighting groups to hi TitleBar guibg=NONE guifg=NONE hi TitleBarNC guibg=NONE guifg=NONE - +< vim:tw=78:sw=4:ts=8:noet:ft=help:norl: From 6800da6ff115014aa71fdd396cd1496ea0da6509 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 11 Oct 2025 15:51:45 +0000 Subject: [PATCH 03/75] runtime(doc): Add missing optional tail command-name specs - Use the optional tail command-name specs at help entries for :keepalt, :lcd, :cfdo, :lfdo, :wundo, :rundo, :bdelete and :bunload. - Add missing shortname tags. closes: #18547 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/editing.txt | 8 ++++---- runtime/doc/quickfix.txt | 12 ++++++------ runtime/doc/tags | 5 +++++ runtime/doc/undo.txt | 9 +++++---- runtime/doc/windows.txt | 16 +++++++++------- 5 files changed, 29 insertions(+), 21 deletions(-) diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 022bdee1bb..0143e4470f 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 9.1. Last change: 2025 Sep 09 +*editing.txt* For Vim version 9.1. Last change: 2025 Oct 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -40,8 +40,8 @@ the |CTRL-^| command to toggle between the current and the alternate file. However, the alternate file name is not changed when |:keepalt| is used. An alternate file name is remembered for each window. - *:keepalt* *:keepa* -:keepalt {cmd} Execute {cmd} while keeping the current alternate file + *:keepa* *:keepalt* +:keepa[lt] {cmd} Execute {cmd} while keeping the current alternate file name. Note that commands invoked indirectly (e.g., with a function) may still set the alternate file name. @@ -1418,7 +1418,7 @@ present in 'cpoptions' and "!" is not used in the command. to another window will stop using {path}. *:lcd-* -:lcd[!] - Change to the previous current directory, before the +:lc[d][!] - Change to the previous current directory, before the last ":lcd {path}" command. *:lch* *:lchdir* diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 906e98a16f..8e1ffb4c48 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2025 Sep 24 +*quickfix.txt* For Vim version 9.1. Last change: 2025 Oct 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -516,8 +516,8 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|, |:ldo|, |:cfdo| and |:lfdo|. - *:cfdo* -:cfdo[!] {cmd} Execute {cmd} in each file in the quickfix list. + *:cfd* *:cfdo* +:cfd[o][!] {cmd} Execute {cmd} in each file in the quickfix list. It works like doing this: > :cfirst :{cmd} @@ -526,7 +526,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: etc. < Otherwise it works the same as `:cdo`. - *:ldo* + *:ld* *:ldo* :ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list for the current window. It works like doing this: > @@ -538,8 +538,8 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: < Only valid entries in the location list are used. Otherwise it works the same as `:cdo`. - *:lfdo* -:lfdo[!] {cmd} Execute {cmd} in each file in the location list for + *:lfd* *:lfdo* +:lfd[o][!] {cmd} Execute {cmd} in each file in the location list for the current window. It works like doing this: > :lfirst diff --git a/runtime/doc/tags b/runtime/doc/tags index 28d21de707..a3e862521f 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2425,6 +2425,7 @@ $quote eval.txt /*$quote* :cex quickfix.txt /*:cex* :cexpr quickfix.txt /*:cexpr* :cf quickfix.txt /*:cf* +:cfd quickfix.txt /*:cfd* :cfdo quickfix.txt /*:cfdo* :cfi quickfix.txt /*:cfi* :cfile quickfix.txt /*:cfile* @@ -2847,6 +2848,7 @@ $quote eval.txt /*$quote* :lclose quickfix.txt /*:lclose* :lcs if_cscop.txt /*:lcs* :lcscope if_cscop.txt /*:lcscope* +:ld quickfix.txt /*:ld* :ldo quickfix.txt /*:ldo* :le change.txt /*:le* :left change.txt /*:left* @@ -2874,6 +2876,7 @@ $quote eval.txt /*$quote* :lex quickfix.txt /*:lex* :lexpr quickfix.txt /*:lexpr* :lf quickfix.txt /*:lf* +:lfd quickfix.txt /*:lfd* :lfdo quickfix.txt /*:lfdo* :lfi quickfix.txt /*:lfi* :lfile quickfix.txt /*:lfile* @@ -3227,6 +3230,7 @@ $quote eval.txt /*$quote* :rubydo if_ruby.txt /*:rubydo* :rubyf if_ruby.txt /*:rubyf* :rubyfile if_ruby.txt /*:rubyfile* +:rund undo.txt /*:rund* :rundo undo.txt /*:rundo* :runtime repeat.txt /*:runtime* :rv starting.txt /*:rv* @@ -3720,6 +3724,7 @@ $quote eval.txt /*$quote* :write_a editing.txt /*:write_a* :write_c editing.txt /*:write_c* :write_f editing.txt /*:write_f* +:wu undo.txt /*:wu* :wundo undo.txt /*:wundo* :wv starting.txt /*:wv* :wviminfo starting.txt /*:wviminfo* diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt index 1d6a481c6e..058675056a 100644 --- a/runtime/doc/undo.txt +++ b/runtime/doc/undo.txt @@ -1,4 +1,4 @@ -*undo.txt* For Vim version 9.1. Last change: 2024 Nov 09 +*undo.txt* For Vim version 9.1. Last change: 2025 Oct 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -278,8 +278,8 @@ guaranteed. You can also save and restore undo histories by using ":wundo" and ":rundo" respectively: - *:wundo* *:rundo* -:wundo[!] {file} + *:wu* *:wundo* +:wu[ndo][!] {file} Write undo history to {file}. When {file} exists and it does not look like an undo file (the magic number at the start of the file is wrong), then @@ -292,7 +292,8 @@ respectively: name. So it is not possible to overwrite an existing undofile in a write-protected directory. -:rundo {file} Read undo history from {file}. + *:rund* *:rundo* +:rund[o] {file} Read undo history from {file}. You can use these in autocommands to explicitly specify the name of the history file. E.g.: > diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 545a44b3b2..5c947a5fbe 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 9.1. Last change: 2025 Apr 30 +*windows.txt* For Vim version 9.1. Last change: 2025 Oct 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1223,17 +1223,18 @@ list of buffers. |unlisted-buffer| :%bdelete " delete all buffers < -:bdelete[!] {bufname} *E93* *E94* +:bd[elete][!] {bufname} *E93* *E94* Like ":bdelete[!] [N]", but buffer given by name, see |{bufname}|. -:bdelete[!] N1 N2 ... +:bd[elete][!] N1 N2 ... Do ":bdelete[!]" for buffer N1, N2, etc. The arguments can be buffer numbers or buffer names (but not buffer names that are a number). Insert a backslash before a space in a buffer name. -:N,Mbdelete[!] Do ":bdelete[!]" for all buffers in the range N to M +:N,Mbd[elete][!] + Do ":bdelete[!]" for all buffers in the range N to M |inclusive|. :[N]bw[ipeout][!] *:bw* *:bwipe* *:bwipeout* *E517* @@ -1262,14 +1263,15 @@ list of buffers. |unlisted-buffer| This is the most recent entry in the jump list that points into a loaded buffer. -:bunload[!] {bufname} +:bun[load][!] {bufname} Like ":bunload[!] [N]", but buffer given by name. Also see |{bufname}|. -:N,Mbunload[!] Do ":bunload[!]" for all buffers in the range N to M +:N,Mbun[load][!] + Do ":bunload[!]" for all buffers in the range N to M |inclusive|. -:bunload[!] N1 N2 ... +:bun[load][!] N1 N2 ... Do ":bunload[!]" for buffer N1, N2, etc. The arguments can be buffer numbers or buffer names (but not buffer names that are a number). Insert a backslash before a space in a buffer From 37c8ce7fac3b60457382aeb7573766177e4df269 Mon Sep 17 00:00:00 2001 From: Wu Junkai Date: Sun, 12 Oct 2025 14:10:34 +0000 Subject: [PATCH 04/75] runtime(cangjie): Fixes and improvements for syntax script Housekeeping: - Add GitHub repository link - Update Last Change date Style: - Add Vim modeline for consistent formatting - Unify indentation style (spaces to tabs) - Wrap long cluster definitions for readability New Features: - Add highlighting for escape sequences - Add error highlighting for invalid rune literals - Add syntax-based folding support Fixes: - Fix rune matching to allow only a single character/escape - Fix highlighting for double-quoted rune literals - Fix highlighting for floats with exponents and type suffixes Co-authored-by: dkearns Signed-off-by: Wu Junkai Signed-off-by: Christian Brabandt --- runtime/syntax/cangjie.vim | 110 +++++++++++++++++++++++++------------ 1 file changed, 75 insertions(+), 35 deletions(-) diff --git a/runtime/syntax/cangjie.vim b/runtime/syntax/cangjie.vim index 8438a16e97..1e8b872198 100644 --- a/runtime/syntax/cangjie.vim +++ b/runtime/syntax/cangjie.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Cangjie " Maintainer: Wu Junkai -" Last Change: 2025 Aug 17 +" URL: https://github.com/WuJunkai2004/cangjie.vim +" Last Change: 2025 Oct 12 " " The Cangjie programming language is a new-generation programming " language oriented to full-scenario intelligence. It features @@ -33,7 +34,7 @@ syn case match " 1. comments syn keyword cangjieTodo TODO FIXME XXX NOTE BUG contained -syn match cangjieComment /\v\/\/.*/ contains=cangjieTodo +syn match cangjieComment /\v\/\/.*/ contains=cangjieTodo syn region cangjieComment start=/\/\*/ end=/\*\// contains=cangjieTodo,@Spell " 2. keywords @@ -44,10 +45,15 @@ syn keyword cangjieStatement as break case catch continue do else finally for in syn keyword cangjieStatement if in is match quote return spawn super synchronized syn keyword cangjieStatement throw try unsafe where while syn keyword cangjieIdentlike false init main this true -syn keyword cangjieVariable const let var -syn keyword cangjieOption Option Some None +syn keyword cangjieVariable const let var +syn keyword cangjieOption Option Some None syn keyword cangjieDeclaration func struct class enum import package nextgroup=cangjieTypeName skipwhite -syn cluster cangjieKeywordCluster contains=cangjieDeclaration,cangjieStatement,cangjieIdentlike,cangjieVariable,cangjieOption +syn cluster cangjieKeywordCluster contains= + \ cangjieDeclaration, + \ cangjieStatement, + \ cangjieIdentlike, + \ cangjieVariable, + \ cangjieOption " 3. macro (e.g., @override) syn match cangjieMacro /@\h\w*/ @@ -59,37 +65,61 @@ syn match cangjieTypeName /\h\w*/ contained syn region cangjieSpIdentifier start=/`/ end=/`/ oneline " 6. types -syn keyword cangjieSpType Any Nothing Range Unit Iterable +syn keyword cangjieSpType Any Nothing Range Unit Iterable syn keyword cangjieArrayType Array ArrayList VArray -syn keyword cangjieHashType HashMap HashSet +syn keyword cangjieHashType HashMap HashSet syn keyword cangjieCommonType Bool Byte Rune String syn keyword cangjieFloatType Float16 Float32 Float64 -syn keyword cangjieIntType Int8 Int16 Int32 Int64 IntNative -syn keyword cangjieUIntType UInt8 UInt16 UInt32 UInt64 UIntNative -syn cluster cangjieTypeCluster contains=cangjieSpType,cangjieArrayType,cangjieHashType,cangjieCommonType,cangjieFloatType,cangjieIntType,cangjieUIntType +syn keyword cangjieIntType Int8 Int16 Int32 Int64 IntNative +syn keyword cangjieUIntType UInt8 UInt16 UInt32 UInt64 UIntNative +syn cluster cangjieTypeCluster contains= + \ cangjieSpType, + \ cangjieArrayType, + \ cangjieHashType, + \ cangjieCommonType, + \ cangjieFloatType, + \ cangjieIntType, + \ cangjieUIntType " 7. character and strings -syn cluster cangjieInterpolatedPart contains=@cangjieKeywordCluster,cangjieSpIdentifier,@cangjieTypeCluster,@cangjieNumberCluster,cangjieOperator -syn region cangjieInterpolation contained keepend start=/\${/ end=/}/ contains=@cangjieInterpolatedPart matchgroup=cangjieInterpolationDelimiter -syn region cangjieRune start=/r'/ skip=/\\\\\|\\'/ end=/'/ oneline -syn region cangjieRune start=/b'/ skip=/\\\\\|\\'/ end=/'/ oneline -syn region cangjieString start=/"/ skip=/\\\\\|\\"/ end=/"/ oneline contains=cangjieInterpolation -syn region cangjieString start=/'/ skip=/\\\\\|\\'/ end=/'/ oneline contains=cangjieInterpolation -syn region cangjieString start=/"""/ skip=/\\\\\|\\"/ end=/"""/ contains=cangjieInterpolation keepend -syn region cangjieString start=/'''/ skip=/\\\\\|\\'/ end=/'''/ contains=cangjieInterpolation keepend +syn cluster cangjieInterpolatedPart contains= + \ @cangjieKeywordCluster, + \ cangjieSpIdentifier, + \ @cangjieTypeCluster, + \ @cangjieNumberCluster, + \ cangjieOperator +syn region cangjieInterpolation contained keepend start=/\${/ end=/}/ contains=@cangjieInterpolatedPart +syn match cangjieEscape /\v\\u\{[0-9a-fA-F]{1,8}\}|\\./ contained +syn match cangjieRuneError /\v[rb]'([^'\\]|\\.)*'/ +syn match cangjieRuneError /\v[rb]"([^"\\]|\\.)*"/ +syn match cangjieRune /\vr'(\\u\{[0-9a-fA-F]{1,8}\}|\\.|[^'\\])'/ contains=cangjieEscape +syn match cangjieRune /\vr"(\\u\{[0-9a-fA-F]{1,8}\}|\\.|[^"\\])"/ contains=cangjieEscape +syn match cangjieRune /\vb'(\\u\{[0-9a-fA-F]{1,8}\}|\\.|[^'\\])'/ contains=cangjieEscape +syn region cangjieString start=/"/ skip=/\\\\\|\\"/ end=/"/ oneline contains=cangjieInterpolation,cangjieEscape +syn region cangjieString start=/'/ skip=/\\\\\|\\'/ end=/'/ oneline contains=cangjieInterpolation,cangjieEscape +syn region cangjieString start=/"""/ skip=/\\\\\|\\"/ end=/"""/ contains=cangjieInterpolation,cangjieEscape keepend +syn region cangjieString start=/'''/ skip=/\\\\\|\\'/ end=/'''/ contains=cangjieInterpolation,cangjieEscape keepend syn region cangjieRawString start='\z(#*\)#"' end='"#\z1' syn region cangjieRawString start='\z(#*\)#\'' end='\'#\z1' " 8. number +syn match cangjieHexFloatNumber /\v\c<0x([0-9a-f_]+\.?|[0-9a-f_]*\.[0-9a-f_]+)[p][-+]?\d[0-9_]*>/ syn match cangjieFloatNumber /\v\c<\d[0-9_]*\.\d[0-9_]*([ep][-+]?\d[0-9_]*)?(f(16|32|64))?>/ syn match cangjieFloatNumber /\v\c<\d[0-9_]*\.([ep][-+]?\d[0-9_]*)?(f(16|32|64))?>/ syn match cangjieFloatNumber /\v\c\.\d[0-9_]*([ep][-+]?\d[0-9_]*)?(f(16|32|64))?>/ -syn match cangjieScienceNumber /\v\c<\d[0-9_]*[e][-+]?\d[0-9_]*>/ -syn match cangjieHexNumber /\v\c<0x[0-9a-f_]+([iu](8|16|32|64))?>/ +syn match cangjieScienceNumber /\v\c<\d[0-9_]*[e][-+]?\d[0-9_]*(f(16|32|64))?>/ +syn match cangjieHexNumber /\v\c<0x[0-9a-f_]+([iu](8|16|32|64))?>/ syn match cangjieOctalNumber /\v\c<0o[0-7_]+([iu](8|16|32|64))?>/ syn match cangjieBinaryNumber /\v\c<0b[01_]+([iu](8|16|32|64))?>/ syn match cangjieDecimalNumber /\v\c<\d[0-9_]*([iu](8|16|32|64))?>/ -syn cluster cangjieNumberCluster contains=cangjieFloatNumber,cangjieScienceNumber,cangjieHexNumber,cangjieOctalNumber,cangjieBinaryNumber,cangjieDecimalNumber +syn cluster cangjieNumberCluster contains= + \ cangjieHexFloatNumber, + \ cangjieFloatNumber, + \ cangjieScienceNumber, + \ cangjieHexNumber, + \ cangjieOctalNumber, + \ cangjieBinaryNumber, + \ cangjieDecimalNumber " 9. operators syn match cangjieOperator /[-+%<>!&|^*=]=\?/ @@ -101,10 +131,15 @@ syn match cangjieOperator /[:]/ syn match cangjieOperator /\.\./ syn match cangjieVarArgs /\.\.\./ +" 10. folding +syn region cangjieFoldBraces transparent fold start='{' end='}' contains=ALLBUT,cangjieComment +syn region cangjieFoldParens transparent fold start='(' end=')' contains=ALLBUT,cangjieComment +syn region cangjieFoldBrackets transparent fold start='\[' end='\]' contains=ALLBUT,cangjieComment + " finally, link the syntax groups to the highlight groups if s:enabled('comment') - hi def link cangjieTodo Todo - hi def link cangjieComment Comment + hi def link cangjieTodo Todo + hi def link cangjieComment Comment endif if s:enabled('identifier') hi def link cangjieSpIdentifier Identifier @@ -113,13 +148,14 @@ if s:enabled('keyword') hi def link cangjieDeclaration Keyword hi def link cangjieStatement Statement hi def link cangjieIdentlike Keyword - hi def link cangjieVariable Keyword - hi def link cangjieOption Keyword + hi def link cangjieVariable Keyword + hi def link cangjieOption Keyword endif if s:enabled('macro') - hi def link cangjieMacro PreProc + hi def link cangjieMacro PreProc endif if s:enabled('number') + hi def link cangjieHexFloatNumber Number hi def link cangjieFloatNumber Float hi def link cangjieScienceNumber Float hi def link cangjieHexNumber Number @@ -128,26 +164,30 @@ if s:enabled('number') hi def link cangjieDecimalNumber Number endif if s:enabled('operator') - hi def link cangjieOperator Operator - hi def link cangjieVarArgs Operator + hi def link cangjieOperator Operator + hi def link cangjieVarArgs Operator endif if s:enabled('string') - hi def link cangjieRune Character - hi def link cangjieString String + hi def link cangjieRune Character + hi def link cangjieRuneError Error + hi def link cangjieString String hi def link cangjieRawString String + hi def link cangjieEscape SpecialChar endif if s:enabled('type') - hi def link cangjieTypeName Type - hi def link cangjieSpType Type + hi def link cangjieTypeName Type + hi def link cangjieSpType Type hi def link cangjieArrayType Type - hi def link cangjieHashType Type + hi def link cangjieHashType Type hi def link cangjieCommonType Type hi def link cangjieFloatType Type - hi def link cangjieIntType Type - hi def link cangjieUIntType Type + hi def link cangjieIntType Type + hi def link cangjieUIntType Type endif let b:current_syntax = "cangjie" let &cpo = s:save_cpo unlet s:save_cpo + +" vim: ts=8 sw=8 noet From 7aaca97fc5154bb2f2483237b49e25786a061379 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 12 Oct 2025 14:12:41 +0000 Subject: [PATCH 05/75] patch 9.1.1847: No cmdline completion for :echoconsole and :echowindow Problem: No cmdline completion for :echoconsole, :echowindow and second expression after :echoerr. Solution: Set EXPAND_EXPRESSION for :echoconsole and :echowindow, and check for multiple expressions after :echoerr (zeertzjq). closes: #18552 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/cmdexpand.c | 2 ++ src/eval.c | 2 ++ src/testdir/test_cmdline.vim | 7 ++++--- src/version.c | 2 ++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 0e24d29da4..104fe08ae8 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -2482,6 +2482,8 @@ set_context_by_cmdname( case CMD_execute: case CMD_echomsg: case CMD_echoerr: + case CMD_echoconsole: + case CMD_echowindow: case CMD_call: case CMD_return: case CMD_cexpr: diff --git a/src/eval.c b/src/eval.c index 38979b0822..b3bf9d5931 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3113,6 +3113,8 @@ set_context_for_expression( || cmdidx == CMD_echo || cmdidx == CMD_echon || cmdidx == CMD_echomsg + || cmdidx == CMD_echoerr + || cmdidx == CMD_echoconsole || cmdidx == CMD_echowindow) && xp->xp_context == EXPAND_EXPRESSION) { diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index bdba4abff1..58629b5fdd 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -1333,11 +1333,12 @@ endfunc func Test_cmdline_complete_expression() let g:SomeVar = 'blah' - for cmd in ['exe', 'echo', 'echon', 'echomsg'] + for cmd in ['exe', 'echo', 'echon', 'echomsg', 'echoerr', + \ 'echoconsole', 'echowindow'] call feedkeys(":" .. cmd .. " SomeV\\\"\", 'tx') - call assert_match('"' .. cmd .. ' SomeVar', @:) + call assert_match('"' .. cmd .. ' SomeVar', @:, cmd) call feedkeys(":" .. cmd .. " foo SomeV\\\"\", 'tx') - call assert_match('"' .. cmd .. ' foo SomeVar', @:) + call assert_match('"' .. cmd .. ' foo SomeVar', @:, cmd) endfor unlet g:SomeVar endfunc diff --git a/src/version.c b/src/version.c index 47d7e9f758..2dd8c9764a 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1847, /**/ 1846, /**/ From fa8879d7e028f9689bc20db9a3e28615a2100e91 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 12 Oct 2025 14:14:46 +0000 Subject: [PATCH 06/75] patch 9.1.1848: A few typos in the code Problem: A few typos in the code Solution: Fix typos (zeertzjq) closes: #18550 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/change.c | 14 +++++++------- src/insexpand.c | 2 +- src/version.c | 2 ++ src/wayland.c | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/change.c b/src/change.c index 527d2cc8c0..eadcfd0e24 100644 --- a/src/change.c +++ b/src/change.c @@ -156,7 +156,7 @@ static long next_listener_id = 0; // A flag that is set when any buffer listener housekeeping is required. // Currently the only condition is when a listener is marked for removal. -static bool houskeeping_required; +static bool housekeeping_required; /* * Remove a given listener_T entry from its containing list. @@ -212,23 +212,23 @@ clean_listener_list(buf_T *buf, listener_T **list, bool all) } /* - * Perform houskeeping tasks for buffer change listeners. + * Perform housekeeping tasks for buffer change listeners. * - * This does nothing unless the "houskeeping_required" flag has been set. + * This does nothing unless the "housekeeping_required" flag has been set. */ static void perform_listener_housekeeping(void) { buf_T *buf; - if (houskeeping_required) + if (housekeeping_required) { FOR_ALL_BUFFERS(buf) { clean_listener_list(buf, &buf->b_listener, FALSE); clean_listener_list(NULL, &buf->b_sync_listener, FALSE); } - houskeeping_required = FALSE; + housekeeping_required = FALSE; } } @@ -453,9 +453,9 @@ f_listener_remove(typval_T *argvars, typval_T *rettv) if (lnr != NULL) { // Clear the ID to indicate that the listener is unused flag - // houskeeping. + // housekeeping. lnr->lr_id = 0; - houskeeping_required = TRUE; + housekeeping_required = TRUE; rettv->vval.v_number = 1; return; } diff --git a/src/insexpand.c b/src/insexpand.c index 42da99ad66..214395f55e 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -2489,7 +2489,7 @@ ins_compl_has_autocomplete(void) } /* - * Cacluate fuzzy score and sort completion matches unless sorting is disabled. + * Calculate fuzzy score and sort completion matches unless sorting is disabled. */ static void ins_compl_fuzzy_sort(void) diff --git a/src/version.c b/src/version.c index 2dd8c9764a..a2f10f9114 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1848, /**/ 1847, /**/ diff --git a/src/wayland.c b/src/wayland.c index 6d28cbc257..36ccf66682 100644 --- a/src/wayland.c +++ b/src/wayland.c @@ -738,7 +738,7 @@ wayland_prepare_read(void) } /* - * Catch up on any qeueued events + * Catch up on any queued events */ int wayland_update(void) @@ -866,7 +866,7 @@ ex_wlrestore(exarg_T *eap) /* * Get a suitable data device manager from connection. "supported" should be - * iniitialized to VWL_DATA_PROTOCOL_NONE beforehand. Returns NULL if there are + * initialized to VWL_DATA_PROTOCOL_NONE beforehand. Returns NULL if there are * no data device manager available with the required selection. */ vwl_data_device_manager_T * From 40dec4609d73c7ba2068aa3b4cea9d003bec5545 Mon Sep 17 00:00:00 2001 From: Aliaksei Budavei <0x000c70@gmail.com> Date: Sun, 12 Oct 2025 14:17:57 +0000 Subject: [PATCH 07/75] runtime(doc): Replace rotted URL links Both links to libXpm and mysyntax.vim are up but the listed libXpm version is not offered anymore and mysyntax.vim is no longer served at all. The link for searching dictionary extensions of Apache OpenOffice is broken; an alternative link can be discovered from the home page. Finally, the English dictionaries Apache OpenOffice extension is probably gone for good (is it incompatible with more recent versions of the suite?) as its page neither available directly nor discoverable through search. closes: 18549 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt --- runtime/doc/netbeans.txt | 12 ++++++------ runtime/doc/spell.txt | 4 ++-- runtime/doc/syntax.txt | 4 ++-- runtime/spell/README_en.txt | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index ca32f06f66..e5aa7dffb9 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -1,4 +1,4 @@ -*netbeans.txt* For Vim version 9.1. Last change: 2025 Aug 10 +*netbeans.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Gordon Prieur et al. @@ -134,11 +134,11 @@ Without it the toolbar and signs will be disabled. The XPM library is provided by Arnaud Le Hors of the French National Institute for Research in Computer Science and Control. It can be downloaded from -http://cgit.freedesktop.org/xorg/lib/libXpm. The current release, as of this -writing, is xpm-3.4k-solaris.tgz, which is a gzip'ed tar file. If you create -the directory /usr/local/xpm and untar the file there you can use the -uncommented lines in the Makefile without changing them. If you use another -xpm directory you will need to change the XPM_DIR in src/Makefile. +https://ftp.nluug.nl/ftp/windowing/X/contrib/libraries/. The current release, +as of this writing, is xpm-3.4k-solaris.tgz, which is a gzip'ed tar file. If +you create the directory /usr/local/xpm and untar the file there you can use +the uncommented lines in the Makefile without changing them. If you use +another xpm directory you will need to change the XPM_DIR in src/Makefile. On MS-Windows: diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index a1ca399079..9c8a5aa38f 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 9.1. Last change: 2025 Sep 02 +*spell.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -510,7 +510,7 @@ You can create a Vim spell file from the .aff and .dic files that Myspell uses. Myspell is used by OpenOffice.org and Mozilla. The OpenOffice .oxt files are zip files which contain the .aff and .dic files. You should be able to find them here: - http://extensions.services.openoffice.org/dictionary + https://extensions.openoffice.org/en/search@f[0]=field_project_application%253A1&f[1]=field_project_tags%253A94.html The older, OpenOffice 2 files may be used if this doesn't work: http://wiki.services.openoffice.org/wiki/Dictionaries You can also use a plain word list. The results are the same, the choice diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 1dd486bb35..522f7cac8f 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2025 Oct 09 +*syntax.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1979,7 +1979,7 @@ are read during initialization) > :let html_my_rendering=1 If you'd like to see an example download mysyntax.vim at -https://www.fleiner.com/vim/download.html +https://web.archive.org/web/20241129015117/https://www.fleiner.com/vim/download.html You can also disable this rendering by adding the following line to your vimrc file: > diff --git a/runtime/spell/README_en.txt b/runtime/spell/README_en.txt index d715867cdc..b5b9fb6ed1 100644 --- a/runtime/spell/README_en.txt +++ b/runtime/spell/README_en.txt @@ -709,7 +709,7 @@ English. --- This is a locally hosted copy of the English dictionaries with fixed dash handling and new ligature and phonetic suggestion support extension: -http://extensions.openoffice.org/en/node/3785 +https://web.archive.org/web/20250830102911/http://extensions.openoffice.org/en/node/3785 Original version of the en_GB dictionary: http://www.openoffice.org/issues/show_bug.cgi/id=72145 From fcf4c435af6fe00348506860c1433414d35223a7 Mon Sep 17 00:00:00 2001 From: bfoersterling Date: Sun, 12 Oct 2025 14:26:34 +0000 Subject: [PATCH 08/75] patch 9.1.1849: CTRL-F and CTRL-B don't work in more prompt Problem: CTRL-F and CTRL-B don't work in more prompt Solution: Make CTRL-F and CTRL-B scroll by a screen down/up (Bjoern Foersterling) closes: #18545 Signed-off-by: bfoersterling Signed-off-by: Christian Brabandt --- runtime/doc/message.txt | 39 ++++++++++++++++++----------------- runtime/doc/version9.txt | 3 ++- src/message.c | 6 ++++-- src/testdir/test_messages.vim | 28 ++++++++++++++++++------- src/version.c | 2 ++ 5 files changed, 48 insertions(+), 30 deletions(-) diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 048f428cbe..1c9de0cbc2 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 9.1. Last change: 2025 Aug 06 +*message.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -859,26 +859,27 @@ This message is given when the screen is filled with messages. It is only given when the 'more' option is on. It is highlighted with the |hl-MoreMsg| group. -Type effect ~ - or or j or one more line - d down a page (half a screen) - or f or down a screen - G down all the way, until the hit-enter - prompt +Type effect ~ + or or j or one more line + d down a page (half a screen) + or f or or CTRL-F down a screen + G down all the way, until the + hit-enter prompt - or k or one line back - u up a page (half a screen) - b or back a screen - g back to the start + or k or one line back + u up a page (half a screen) + b or or CTRL-B back a screen + g back to the start - q, or CTRL-C stop the listing - : stop the listing and enter a - command-line - yank (copy) a modeless selection to - the clipboard ("* and "+ registers) - {menu-entry} what the menu is defined to in - Cmdline-mode. - next page (*) + q, or CTRL-C stop the listing + : stop the listing and enter a + command-line + yank (copy) a modeless + selection to the clipboard + ("* and "+ registers) + {menu-entry} what the menu is defined to + in Cmdline-mode. + next page (*) Any other key causes the meaning of the keys to be displayed. diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 0a662f7ccd..90cd5c4c72 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2025 Oct 07 +*version9.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41780,6 +41780,7 @@ Others: ~ Command-line. - |min()|/|max()| can handle all comparable data types. - Vim triggers the |TermResponseAll| autocommand for any terminal OSC value. +- Support CTRL-B and CTRL-F in the |more-prompt|. *added-9.2* Added ~ diff --git a/src/message.c b/src/message.c index 5ec5c59a99..d4ebc8e68f 100644 --- a/src/message.c +++ b/src/message.c @@ -1356,7 +1356,7 @@ wait_return(int redraw) */ if (p_more && !p_cp) { - if (c == 'b' || c == 'k' || c == 'u' || c == 'g' + if (c == 'b' || c == Ctrl_B || c == 'k' || c == 'u' || c == 'g' || c == K_UP || c == K_PAGEUP) { if (msg_scrolled > Rows) @@ -1385,7 +1385,7 @@ wait_return(int redraw) } } else if (msg_scrolled > Rows - 2 - && (c == 'j' || c == 'd' || c == 'f' + && (c == 'j' || c == 'd' || c == 'f' || c == Ctrl_F || c == K_DOWN || c == K_PAGEDOWN)) c = K_IGNORE; } @@ -3318,12 +3318,14 @@ do_more_prompt(int typed_char) break; case 'b': // one page back + case Ctrl_B: case K_PAGEUP: toscroll = -(Rows - 1); break; case ' ': // one extra page case 'f': + case Ctrl_F: case K_PAGEDOWN: case K_LEFTMOUSE: toscroll = Rows - 1; diff --git a/src/testdir/test_messages.vim b/src/testdir/test_messages.vim index 61193dfd3d..b1dfa7075a 100644 --- a/src/testdir/test_messages.vim +++ b/src/testdir/test_messages.vim @@ -232,18 +232,20 @@ func Test_message_more() call term_sendkeys(buf, "\") call WaitForAssert({-> assert_equal(' 9 9', term_getline(buf, 5))}) - " Down a screen with , f, or . + " Down a screen with , f, or . call term_sendkeys(buf, 'f') call WaitForAssert({-> assert_equal(' 14 14', term_getline(buf, 5))}) call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) - call term_sendkeys(buf, ' ') + call term_sendkeys(buf, "\") call WaitForAssert({-> assert_equal(' 19 19', term_getline(buf, 5))}) - call term_sendkeys(buf, "\") + call term_sendkeys(buf, ' ') call WaitForAssert({-> assert_equal(' 24 24', term_getline(buf, 5))}) + call term_sendkeys(buf, "\") + call WaitForAssert({-> assert_equal(' 29 29', term_getline(buf, 5))}) " Down a page (half a screen) with d. call term_sendkeys(buf, 'd') - call WaitForAssert({-> assert_equal(' 27 27', term_getline(buf, 5))}) + call WaitForAssert({-> assert_equal(' 32 32', term_getline(buf, 5))}) " Down all the way with 'G'. call term_sendkeys(buf, 'G') @@ -258,15 +260,17 @@ func Test_message_more() call term_sendkeys(buf, "\") call WaitForAssert({-> assert_equal(' 97 97', term_getline(buf, 5))}) - " Up a screen with b or . + " Up a screen with b, or . call term_sendkeys(buf, 'b') call WaitForAssert({-> assert_equal(' 92 92', term_getline(buf, 5))}) - call term_sendkeys(buf, "\") + call term_sendkeys(buf, "\") call WaitForAssert({-> assert_equal(' 87 87', term_getline(buf, 5))}) + call term_sendkeys(buf, "\") + call WaitForAssert({-> assert_equal(' 82 82', term_getline(buf, 5))}) " Up a page (half a screen) with u. call term_sendkeys(buf, 'u') - call WaitForAssert({-> assert_equal(' 84 84', term_getline(buf, 5))}) + call WaitForAssert({-> assert_equal(' 79 79', term_getline(buf, 5))}) " Up all the way with 'g'. call term_sendkeys(buf, 'g') @@ -274,13 +278,16 @@ func Test_message_more() call WaitForAssert({-> assert_equal(':%p#', term_getline(buf, 1))}) call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) - " All the way down. Pressing f should do nothing but pressing + " All the way down. Pressing f or Ctrl-F should do nothing but pressing " space should end the more prompt. call term_sendkeys(buf, 'G') call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))}) call term_sendkeys(buf, 'f') call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) + call term_sendkeys(buf, "\") + call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) + call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))}) call term_sendkeys(buf, ' ') call WaitForAssert({-> assert_equal('100', term_getline(buf, 5))}) @@ -339,6 +346,11 @@ func Test_message_more_scrollback() call term_sendkeys(buf, 'b') call VerifyScreenDump(buf, 'Test_more_scrollback_2', {}) + call term_sendkeys(buf, "\") + call TermWait(buf) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_more_scrollback_2', {}) + call term_sendkeys(buf, 'q') call TermWait(buf) call StopVimInTerminal(buf) diff --git a/src/version.c b/src/version.c index a2f10f9114..c28ce040a6 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1849, /**/ 1848, /**/ From da2dabc6f740b1ed3397797af8a8b0b2ec02bc31 Mon Sep 17 00:00:00 2001 From: Girish Palya Date: Sun, 12 Oct 2025 14:37:02 +0000 Subject: [PATCH 09/75] patch 9.1.1850: completion: not triggered after i_Ctrl-W/i_Ctrl-U Problem: completion: not triggered after i_Ctrl-W/i_Ctrl-U Solution: Trigger autocomplete when entering Insert mode (Girish Palya). fixes: #18535 closes: #18543 Signed-off-by: Girish Palya Signed-off-by: Christian Brabandt --- runtime/doc/insert.txt | 11 ++--- src/edit.c | 70 +++++++++++++++++++++++-------- src/testdir/test_ins_complete.vim | 25 ++++++++++- src/version.c | 2 + 4 files changed, 84 insertions(+), 24 deletions(-) diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 914e9fc83a..5ed3e803a7 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 9.1. Last change: 2025 Sep 16 +*insert.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -80,10 +80,11 @@ CTRL-W Delete the word before the cursor (see |i_backspacing| about joining lines). See the section "word motions", |word-motions|, for the definition of a word. *i_CTRL-U* -CTRL-U Delete all entered characters before the cursor in the current - line. If there are no newly entered characters and - 'backspace' is not empty, delete all characters before the - cursor in the current line. +CTRL-U Delete all characters that were entered after starting Insert + mode and before the cursor in the current line. + If there are no newly entered characters and 'backspace' is + not empty, delete all characters before the cursor in the + current line. If C-indenting is enabled the indent will be adjusted if the line becomes blank. See |i_backspacing| about joining lines. diff --git a/src/edit.c b/src/edit.c index 2a765467d6..891d51cf95 100644 --- a/src/edit.c +++ b/src/edit.c @@ -100,6 +100,25 @@ static int ins_need_undo; // call u_save() before inserting a static int dont_sync_undo = FALSE; // CTRL-G U prevents syncing undo for // the next left/right cursor key +#define TRIGGER_AUTOCOMPLETE() \ + do { \ + update_screen(UPD_VALID); /* Show char (deletion) immediately */ \ + out_flush(); \ + ins_compl_enable_autocomplete(); \ + goto docomplete; \ + } while (0) + +#define MAY_TRIGGER_AUTOCOMPLETE(c) \ + do { \ + if (ins_compl_has_autocomplete() && !char_avail() \ + && curwin->w_cursor.col > 0) \ + { \ + (c) = char_before_cursor(); \ + if (vim_isprintc(c)) \ + TRIGGER_AUTOCOMPLETE(); \ + } \ + } while (0) + /* * edit(): Start inserting text. * @@ -146,6 +165,7 @@ edit( #ifdef FEAT_CONCEAL int cursor_line_was_concealed; #endif + int ins_just_started = TRUE; // Remember whether editing was restarted after CTRL-O. did_restart_edit = restart_edit; @@ -593,6 +613,30 @@ edit( // Got here from normal mode when bracketed paste started. c = K_PS; else + { + // Trigger autocomplete when entering Insert mode, either directly + // or via change commands like 'ciw', 'cw', etc., before the first + // character is typed. + if (ins_just_started) + { + ins_just_started = FALSE; + if (ins_compl_has_autocomplete() && !char_avail() + && curwin->w_cursor.col > 0) + { + c = char_before_cursor(); + if (vim_isprintc(c)) + { + ins_compl_enable_autocomplete(); + ins_compl_init_get_longest(); +#ifdef FEAT_RIGHTLEFT + if (p_hkmap) + c = hkmap(c); // Hebrew mode mapping +#endif + goto docomplete; + } + } + } + do { c = safe_vgetc(); @@ -622,6 +666,7 @@ edit( goto doESCkey; } } while (c == K_IGNORE || c == K_NOP); + } // Don't want K_CURSORHOLD for the second key, e.g., after CTRL-V. did_cursorhold = TRUE; @@ -991,18 +1036,8 @@ doESCkey: case Ctrl_H: did_backspace = ins_bs(c, BACKSPACE_CHAR, &inserted_space); auto_format(FALSE, TRUE); - if (did_backspace && ins_compl_has_autocomplete() && !char_avail() - && curwin->w_cursor.col > 0) - { - c = char_before_cursor(); - if (vim_isprintc(c)) - { - update_screen(UPD_VALID); // Show char deletion immediately - out_flush(); - ins_compl_enable_autocomplete(); - goto docomplete; // Trigger autocompletion - } - } + if (did_backspace) + MAY_TRIGGER_AUTOCOMPLETE(c); break; case Ctrl_W: // delete word before the cursor @@ -1020,6 +1055,8 @@ doESCkey: #endif did_backspace = ins_bs(c, BACKSPACE_WORD, &inserted_space); auto_format(FALSE, TRUE); + if (did_backspace) + MAY_TRIGGER_AUTOCOMPLETE(c); break; case Ctrl_U: // delete all inserted text in current line @@ -1031,6 +1068,8 @@ doESCkey: did_backspace = ins_bs(c, BACKSPACE_LINE, &inserted_space); auto_format(FALSE, TRUE); inserted_space = FALSE; + if (did_backspace) + MAY_TRIGGER_AUTOCOMPLETE(c); break; case K_LEFTMOUSE: // mouse keys @@ -1424,12 +1463,7 @@ normalchar: // Trigger autocompletion if (ins_compl_has_autocomplete() && !char_avail() && vim_isprintc(c)) - { - update_screen(UPD_VALID); // Show character immediately - out_flush(); - ins_compl_enable_autocomplete(); - goto docomplete; - } + TRIGGER_AUTOCOMPLETE(); break; } // end of switch (c) diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 23c84b28b1..6d492373c4 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -5416,10 +5416,33 @@ func Test_autocomplete_trigger() call assert_equal(['fodabc', 'fodxyz'], b:matches->mapnew('v:val.word')) call assert_equal(-1, b:selected) + " Test 8: Ctrl_W / Ctrl_U (delete word/line) should restart autocompletion + func! TestComplete(findstart, base) + if a:findstart + return col('.') - 1 + endif + return ['fooze', 'faberge'] + endfunc + set omnifunc=TestComplete + set complete+=o + call feedkeys("Sprefix->fo\\0", 'tx!') + call assert_equal(['fodabc', 'fodxyz', 'foobar', 'fooze'], b:matches->mapnew('v:val.word')) + call feedkeys("Sprefix->fo\\\0", 'tx!') + call assert_equal(['fooze', 'faberge'], b:matches->mapnew('v:val.word')) + call feedkeys("Sprefix->\afo\\\0", 'tx!') + call assert_equal(['fooze', 'faberge'], b:matches->mapnew('v:val.word')) + + " Test 9: Trigger autocomplete immediately upon entering Insert mode + call feedkeys("Sprefix->foo\a\\0", 'tx!') + call assert_equal(['foobar', 'fooze', 'faberge'], b:matches->mapnew('v:val.word')) + call feedkeys("Sprefix->fooxx\hcw\\0", 'tx!') + call assert_equal(['foobar', 'fooze', 'faberge'], b:matches->mapnew('v:val.word')) + bw! call test_override("char_avail", 0) delfunc NonKeywordComplete - set autocomplete& + delfunc TestComplete + set autocomplete& omnifunc& complete& unlet g:CallCount endfunc diff --git a/src/version.c b/src/version.c index c28ce040a6..3f6baf6bb2 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1850, /**/ 1849, /**/ From dc75a204f187176cec038a274e7920837029a56b Mon Sep 17 00:00:00 2001 From: Lidong Yan <502024330056@smail.nju.edu.cn> Date: Sun, 12 Oct 2025 15:05:11 +0000 Subject: [PATCH 10/75] patch 9.1.1851: memory leak in heredoc_get() Problem: memory leak in heredoc_get() Solution: Free "str" if list_append_string() fails (Lidong Yan). In heredoc_get(), eval_all_expr_in_str() allocates a new string and assign it to local variable "str". When list_append_string() failed the memory pointed to by "str" leaks. Free "str" if list_append_string() failed. related: #18533 Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Christian Brabandt --- src/evalvars.c | 4 ++++ src/version.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/evalvars.c b/src/evalvars.c index e529758ef3..c840d872bd 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -968,7 +968,11 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get, int vim9compile) } if (list_append_string(l, str, -1) == FAIL) + { + if (free_str) + vim_free(str); break; + } if (free_str) vim_free(str); } diff --git a/src/version.c b/src/version.c index 3f6baf6bb2..d46906ab27 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1851, /**/ 1850, /**/ From 4b9896ce9de20a83a09ccb37d884a9921d2a2529 Mon Sep 17 00:00:00 2001 From: Lidong Yan <502024330056@smail.nju.edu.cn> Date: Sun, 12 Oct 2025 15:10:09 +0000 Subject: [PATCH 11/75] patch 9.1.1852: vim9class: memory leak in parse_member() Problem: vim9class: fix memory leak in parse_member() Solution: Free evalarg before returning (Lidong Yan) In parse_member(), skip_expr_concatenate() allocates memory in evalarg. However parse_member() forgets to free evalarg at early return-fail point. Add clear_evalarg() at early return-fail point. closes: #18533 Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Christian Brabandt --- src/version.c | 2 ++ src/vim9class.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/version.c b/src/version.c index d46906ab27..95f88fcb84 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1852, /**/ 1851, /**/ diff --git a/src/vim9class.c b/src/vim9class.c index 09d9dffb6b..d5c3615dc9 100644 --- a/src/vim9class.c +++ b/src/vim9class.c @@ -135,6 +135,7 @@ parse_member( if (*init_arg != NUL && !vim9_comment_start(init_arg)) { semsg(_(e_trailing_characters_str), init_arg); + clear_evalarg(&evalarg, NULL); return FAIL; } From 7e9ccdd3f21c11b3627adbaab891284bfb946aa7 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 12 Oct 2025 15:15:00 +0000 Subject: [PATCH 12/75] runtime(vim): Update syntax, add missing commands to generator exclusion list closes: #18548 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/syntax/generator/gen_syntax_vim.vim | 14 +++++++++++++- .../syntax/testdir/dumps/vim9_ex_commands_66.dump | 2 +- .../syntax/testdir/dumps/vim_ex_commands_36.dump | 2 +- runtime/syntax/vim.vim | 12 ++++++------ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index 57b89c8b5c..579dbbc396 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -1,7 +1,7 @@ " Vim syntax file generator " Language: Vim script " Maintainer: Hirohito Higashi (h_east) -" Last Change: 2025 Sep 27 +" Last Change: 2025 Oct 11 let s:keepcpo= &cpo set cpo&vim @@ -303,11 +303,15 @@ function s:get_vim_command_type(cmd_name) augroup autocmd behave + browse call catch chdir + change class command + confirm + const copy debuggreedy def @@ -344,6 +348,7 @@ function s:get_vim_command_type(cmd_name) grep grepadd helpgrep + highlight if import interface @@ -353,6 +358,8 @@ function s:get_vim_command_type(cmd_name) let loadkeymap lhelpgrep + lgrep + lgrepadd lvimgrep lvimgrepadd make @@ -363,6 +370,7 @@ function s:get_vim_command_type(cmd_name) mapclear mark match + menutranslate mzscheme mzfile noremap @@ -387,6 +395,9 @@ function s:get_vim_command_type(cmd_name) pyxfile redir return + ruby + rubydo + rubyfile set setglobal setlocal @@ -409,6 +420,7 @@ function s:get_vim_command_type(cmd_name) type uniq unlet + unlockvar unmap var vim9script diff --git a/runtime/syntax/testdir/dumps/vim9_ex_commands_66.dump b/runtime/syntax/testdir/dumps/vim9_ex_commands_66.dump index d42a1536fa..5553301525 100644 --- a/runtime/syntax/testdir/dumps/vim9_ex_commands_66.dump +++ b/runtime/syntax/testdir/dumps/vim9_ex_commands_66.dump @@ -12,7 +12,7 @@ |F|o@1|(+0#e000e06&|)| +0#0000000&||| |a|p@1|e|n|d| @60 @4|t|e|x|t| @66 |.+0#af5f00255&| +0#0000000&@73 -|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|h|a|n|g|e| +0#0000000&@60 +|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c|h|a|n|g|e| @60 @4|t|e|x|t| @66 |.+0#af5f00255&| +0#0000000&@73 |F|o@1|(+0#e000e06&|)| +0#0000000&||| |i|n|s|e|r|t| @60 diff --git a/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump b/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump index b805d6e43b..031dcb1588 100644 --- a/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump +++ b/runtime/syntax/testdir/dumps/vim_ex_commands_36.dump @@ -3,7 +3,7 @@ |c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|u|n|l|o|a|d| +0#0000000&@54 |c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |b+0#af5f00255&|w|i|p|e|o|u|t| +0#0000000&@53 |"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@67 ->c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|h|a|n|g|e| +0#0000000&@55 +>c+0#af5f00255&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c|h|a|n|g|e| @55 @4|t|e|x|t| @66 |.+0#af5f00255&| +0#0000000&@73 |c+0#00e0e07&|a|l@1| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&||| |c+0#af5f00255&|N|e|x|t| +0#0000000&@56 diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 05d8454f07..89940ab303 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Oct 09 +" Last Change: 2025 Oct 11 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -34,11 +34,11 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang' -syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] changes che[ckpath] checkt[ime] chi[story] cl[ist] clip[reset] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] col[der] colo[rscheme] comc[lear] comp[iler] con[tinue] conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] nextgroup=vimBang -syn keyword vimCommand contained cr[ewind] cs[cope] cst[ag] cw[indow] delm[arks] deb[ug] defc[ompile] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] hi[ghlight] his[tory] ij[ump] il[ist] int[ro] ip[ut] is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] nextgroup=vimBang -syn keyword vimCommand contained lcl[ose] lcs[cope] ld[o] le[ft] lex[pr] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] nextgroup=vimBang -syn keyword vimCommand contained red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabd[o] tabe[dit] tabf[ind] nextgroup=vimBang -syn keyword vimCommand contained tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] wind[o] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang +syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] buffers bufd[o] bun[load] bw[ipeout] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] changes che[ckpath] checkt[ime] chi[story] cl[ist] clip[reset] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] col[der] colo[rscheme] comc[lear] comp[iler] con[tinue] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] nextgroup=vimBang +syn keyword vimCommand contained delm[arks] deb[ug] defc[ompile] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] his[tory] ij[ump] il[ist] int[ro] ip[ut] is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lex[pr] lf[ile] lfd[o] nextgroup=vimBang +syn keyword vimCommand contained lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] nextgroup=vimBang +syn keyword vimCommand contained ret[ab] rew[ind] ri[ght] ru[ntime] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] nextgroup=vimBang +syn keyword vimCommand contained te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] wind[o] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang " Lower priority :syn-match to allow for :command/function() distinction syn match vimCommand "\" nextgroup=vimBang From 2a33b499a3d7f46dc307234847a6562cef6cf1d8 Mon Sep 17 00:00:00 2001 From: Yiyang Wu Date: Sun, 12 Oct 2025 15:20:28 +0000 Subject: [PATCH 13/75] runtime(make): syntax highlighting update for makeDefine Previously contents in makeDefine are nearly highlighted as Define, so comments and targets shares the same color as Define, making it hard to distinguish if someone write large block of targets-recipes as defined function. Such scenario is common in building data analysis pipeline. Recipes are reused and targets may have multiple variables, and a single % implicit rule is not enough. closes: #18403 Signed-off-by: Yiyang Wu Signed-off-by: Christian Brabandt --- runtime/syntax/make.vim | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index a6d8ad47e3..8b6f04cbcf 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -5,6 +5,7 @@ " URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim " Last Change: 2022 Nov 06 " 2025 Apr 15 by Vim project: rework Make flavor detection (#17089) +" 2025 Oct 12 by Vim project: update makeDefine highlighting (#18403) " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -23,7 +24,7 @@ syn match makeNextLine "\\\n\s*" " catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" - \ contains=makeStatement,makeIdent,makePreCondit,makeDefine + \ contains=makeStatement,makeIdent,makePreCondit,makeDefine,makeComment,makeTargetinDefine if get(b:, 'make_flavor', s:make_flavor) == 'microsoft' " Microsoft Makefile specials @@ -33,20 +34,26 @@ if get(b:, 'make_flavor', s:make_flavor) == 'microsoft' syn case match endif -" identifiers -if get(b:, 'make_flavor', s:make_flavor) == 'microsoft' - syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent - syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent -else - syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent - syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent -endif +" identifiers; treat $$X like $X inside makeDefine syn match makeIdent "\$\$\w*" +syn match makeIdent "\$\$\$\$\w*" containedin=makeDefine syn match makeIdent "\$[^({]" +syn match makeIdent "\$\$[^({]" containedin=makeDefine syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2 syn match makeIdent "^ *[^:#= \t]*\s*::="me=e-3 syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1 syn match makeIdent "%" +if get(b:, 'make_flavor', s:make_flavor) == 'microsoft' + syn region makeIdent start="\$(" end=")" contains=makeStatement,makeIdent + syn region makeIdent start="\${" end="}" contains=makeStatement,makeIdent + syn region makeIdent start="\$\$(" end=")" containedin=makeDefine contains=makeStatement,makeIdent + syn region makeIdent start="\$\${" end="}" containedin=makeDefine contains=makeStatement,makeIdent +else + syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent + syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent + syn region makeIdent start="\$\$(" skip="\\)\|\\\\" end=")" containedin=makeDefine contains=makeStatement,makeIdent + syn region makeIdent start="\$\${" skip="\\}\|\\\\" end="}" containedin=makeDefine contains=makeStatement,makeIdent +endif " Makefile.in variables syn match makeConfig "@[A-Za-z0-9_]\+@" @@ -55,6 +62,12 @@ syn match makeConfig "@[A-Za-z0-9_]\+@" syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 +syn region makeTargetinDefine transparent matchgroup=makeTargetinDefine + \ start="^[~A-Za-z0-9_./$(){}%-][A-Za-z0-9_./\t ${}()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1 + \ end="[^\\]$" +syn match makeTargetinDefine "^[~A-Za-z0-9_./$(){}%*@-][A-Za-z0-9_./\t $(){}%*@-]*&\?::\=\s*$" + \ contains=makeIdent,makeSpecTarget,makeComment + syn region makeTarget transparent matchgroup=makeTarget \ start="^[~A-Za-z0-9_./$(){}%-][A-Za-z0-9_./\t ${}()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1 \ end="[^\\]$" @@ -155,6 +168,7 @@ hi def link makeCommands Number endif hi def link makeImplicit Function hi def link makeTarget Function +hi def link makeTargetinDefine Function hi def link makeInclude Include hi def link makePreCondit PreCondit hi def link makeStatement Statement From c58f91c035db09358c282f2a908e2aea4287785e Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 12 Oct 2025 15:31:11 +0000 Subject: [PATCH 14/75] runtime(doc): Whitespace updates Use double sentence spacing and wrap lines at 'textwidth'. Code examples and tables were not wrapped unless this had already been done locally. closes: #18453 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/autocmd.txt | 49 +-- runtime/doc/builtin.txt | 643 ++++++++++++++++++++------------------- runtime/doc/change.txt | 64 ++-- runtime/doc/channel.txt | 64 ++-- runtime/doc/cmdline.txt | 27 +- runtime/doc/debug.txt | 34 +-- runtime/doc/debugger.txt | 8 +- runtime/doc/diff.txt | 13 +- runtime/doc/digraph.txt | 4 +- runtime/doc/editing.txt | 54 ++-- runtime/doc/eval.txt | 106 +++---- runtime/doc/filetype.txt | 39 +-- runtime/doc/gui.txt | 20 +- runtime/doc/gui_x11.txt | 4 +- runtime/doc/helphelp.txt | 12 +- runtime/doc/if_cscop.txt | 4 +- runtime/doc/if_lua.txt | 101 +++--- runtime/doc/if_mzsch.txt | 47 +-- runtime/doc/if_perl.txt | 18 +- runtime/doc/if_pyth.txt | 73 ++--- runtime/doc/if_ruby.txt | 26 +- runtime/doc/if_tcl.txt | 17 +- runtime/doc/indent.txt | 75 ++--- runtime/doc/insert.txt | 85 +++--- runtime/doc/intro.txt | 12 +- runtime/doc/map.txt | 60 ++-- runtime/doc/mbyte.txt | 12 +- runtime/doc/message.txt | 2 +- runtime/doc/mlang.txt | 4 +- runtime/doc/motion.txt | 49 +-- runtime/doc/netbeans.txt | 38 +-- runtime/doc/options.txt | 60 ++-- runtime/doc/os_amiga.txt | 6 +- runtime/doc/os_haiku.txt | 22 +- runtime/doc/os_mac.txt | 4 +- runtime/doc/os_mint.txt | 4 +- runtime/doc/os_qnx.txt | 6 +- runtime/doc/os_vms.txt | 60 ++-- runtime/doc/os_win32.txt | 12 +- runtime/doc/pattern.txt | 19 +- runtime/doc/popup.txt | 26 +- runtime/doc/print.txt | 9 +- runtime/doc/quickfix.txt | 171 ++++++----- runtime/doc/recover.txt | 4 +- runtime/doc/repeat.txt | 92 +++--- runtime/doc/sign.txt | 105 +++---- runtime/doc/spell.txt | 21 +- runtime/doc/sponsor.txt | 4 +- runtime/doc/starting.txt | 30 +- runtime/doc/syntax.txt | 317 +++++++++---------- runtime/doc/tabpage.txt | 6 +- runtime/doc/tagsrch.txt | 27 +- runtime/doc/term.txt | 19 +- runtime/doc/terminal.txt | 91 +++--- runtime/doc/testing.txt | 66 ++-- runtime/doc/textprop.txt | 12 +- runtime/doc/tips.txt | 10 +- runtime/doc/undo.txt | 23 +- runtime/doc/userfunc.txt | 4 +- runtime/doc/various.txt | 31 +- runtime/doc/vi_diff.txt | 7 +- runtime/doc/visual.txt | 14 +- runtime/doc/wayland.txt | 7 +- runtime/doc/windows.txt | 20 +- 64 files changed, 1576 insertions(+), 1497 deletions(-) diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 24dbca49cc..134d914772 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 14 +*autocmd.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -236,7 +236,7 @@ autocmds. *:autocmd-verbose* When 'verbose' is non-zero, listing an autocommand will also display where it -was last defined. Example: > +was last defined. Example: > :verbose autocmd BufEnter FileExplorer BufEnter @@ -344,7 +344,8 @@ Name triggered by ~ |GUIEnter| after starting the GUI successfully |GUIFailed| after starting the GUI failed |TermResponse| after the terminal response to |t_RV| is received -|TermResponseAll| after the terminal response to |t_RV| and others is received +|TermResponseAll| after the terminal response to |t_RV| and others is + received |QuitPre| when using `:quit`, before deciding whether to exit |ExitPre| when using a command that may make Vim exit @@ -381,7 +382,8 @@ Name triggered by ~ |FocusGained| Vim got input focus |FocusLost| Vim lost input focus |CursorHold| the user doesn't press a key for a while -|CursorHoldI| the user doesn't press a key for a while in Insert mode +|CursorHoldI| the user doesn't press a key for a while in Insert + mode |CursorMoved| the cursor was moved in Normal mode |CursorMovedC| the cursor was moved in the |Command-line| |CursorMovedI| the cursor was moved in Insert mode @@ -566,7 +568,8 @@ BufWinEnter After a buffer is displayed in a window. This since it reloads that buffer. Does not happen for a terminal window, because it starts in Terminal-Job mode and Normal mode - commands won't work. Use |TerminalOpen| instead. + commands won't work. Use |TerminalOpen| + instead. *BufWinLeave* BufWinLeave Before a buffer is removed from a window. Not when it's still visible in another window. @@ -679,7 +682,7 @@ ColorScheme After loading a color scheme. |:colorscheme| Not triggered if the color scheme is not found. The pattern is matched against the - colorscheme name. can be used for the + colorscheme name. can be used for the name of the actual file where this option was set, and for the new colorscheme name. @@ -748,7 +751,7 @@ CursorHold When the user doesn't press a key for the time triggered. |q| ** Internally the autocommand is triggered by the - key. In an expression mapping + key. In an expression mapping |getchar()| may see this character. Note: Interactive commands cannot be used for @@ -1014,7 +1017,7 @@ InsertLeave Just after leaving Insert mode. Also when using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|. *KeyInputPre* KeyInputPre Just before a key is processed after mappings - have been applied. The pattern is matched + have been applied. The pattern is matched against a string that indicates the current mode, which is the same as what is returned by `mode(1)`. @@ -1046,7 +1049,7 @@ MenuPopup Just before showing the popup menu (under the c Command line tl Terminal *ModeChanged* -ModeChanged After changing the mode. The pattern is +ModeChanged After changing the mode. The pattern is matched against `'old_mode:new_mode'`, for example match against `*:c*` to simulate |CmdlineEnter|. @@ -1082,7 +1085,7 @@ OptionSet After setting an option. The pattern is |v:option_oldlocal| is only set when |:set| or |:setlocal| or a |modeline| was used to set - the option. Similarly |v:option_oldglobal| is + the option. Similarly |v:option_oldglobal| is only set when |:set| or |:setglobal| was used. This does not set ||, you could use @@ -1090,10 +1093,10 @@ OptionSet After setting an option. The pattern is Note that when setting a |global-local| string option with |:set|, then |v:option_old| is the - old global value. However, for all other kinds - of options (local string options, global-local - number options, ...) it is the old local - value. + old global value. However, for all other + kinds of options (local string options, + global-local number options, ...) it is the + old local value. OptionSet is not triggered on startup and for the 'key' option for obvious reasons. @@ -1105,7 +1108,7 @@ OptionSet After setting an option. The pattern is Note: It's a bad idea to reset an option during this autocommand, this may break a - plugin. You can always use `:noa` to prevent + plugin. You can always use `:noa` to prevent triggering this autocommand. When using |:set| in the autocommand the event @@ -1130,7 +1133,7 @@ QuickFixCmdPre Before a quickfix command is run (|:make|, *QuickFixCmdPost* QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix command is run, before jumping to the first - location. For |:cfile| and |:lfile| commands + location. For |:cfile| and |:lfile| commands it is run after the error file is read and before moving to the first error. See |QuickFixCmdPost-example|. @@ -1174,7 +1177,7 @@ SafeState When nothing is pending, going to wait for the screen was scrolled for messages. *SafeStateAgain* SafeStateAgain Like SafeState but after processing any - messages and invoking callbacks. This may be + messages and invoking callbacks. This may be triggered often, don't do something that takes time. @@ -1278,12 +1281,12 @@ TermChanged After the value of 'term' has changed. Useful settings. Executed for all loaded buffers. *TerminalOpen* TerminalOpen Just after a terminal buffer was created, with - `:terminal` or |term_start()|. This event is + `:terminal` or |term_start()|. This event is triggered even if the buffer is created without a window, with the ++hidden option. *TerminalWinOpen* TerminalWinOpen Just after a terminal buffer was created, with - `:terminal` or |term_start()|. This event is + `:terminal` or |term_start()|. This event is triggered only if the buffer is created with a window. Can be used to set window local options for the terminal window. @@ -1480,7 +1483,7 @@ WinLeave Before leaving a window. If the window to be Not used for ":qa" or ":q" when exiting Vim. *WinNewPre* -WinNewPre Before creating a new window. Triggered +WinNewPre Before creating a new window. Triggered before commands that modify window layout by creating a split. Not done when creating tab pages and for the @@ -1789,8 +1792,8 @@ option will not cause any commands to be executed. After applying the autocommands the modelines are processed, so that their settings overrule the settings from autocommands, like what happens when - editing a file. This is skipped when the - argument is present. You probably want to use + editing a file. This is skipped when the + argument is present. You probably want to use for events that are not used when loading a buffer, such as |User|. Processing modelines is also skipped when no @@ -1802,7 +1805,7 @@ option will not cause any commands to be executed. loaded buffer. The current buffer is done last. Note that [fname] is used to select the autocommands, - not the buffers to which they are applied. Example: > + not the buffers to which they are applied. Example: > augroup mine autocmd! autocmd FileType * echo expand('') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 46450685aa..f36688832a 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 01 +*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -889,7 +889,7 @@ append({lnum}, {text}) *append()* appendbufline({buf}, {lnum}, {text}) *appendbufline()* Like |append()| but append the text in buffer {buf}. - This function works only for loaded buffers. First call + This function works only for loaded buffers. First call |bufload()| if needed. For the use of {buf}, see |bufname()|. @@ -903,7 +903,7 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()* In |Vim9| script an error is given for an invalid {lnum}. If {buf} is not a valid buffer or {lnum} is not valid, an - error message is given. Example: > + error message is given. Example: > :let failed = appendbufline(13, 0, "# THE START") < However, when {text} is an empty list then no error is given for an invalid {lnum}, since {lnum} isn't actually used. @@ -1036,19 +1036,19 @@ autocmd_add({acmds}) *autocmd_add()* If this item is specified, then the "pattern" item is ignored. cmd Ex command to execute for this autocmd event - event autocmd event name. Refer to |autocmd-events|. + event autocmd event name. Refer to |autocmd-events|. This can be either a String with a single event name or a List of event names. - group autocmd group name. Refer to |autocmd-groups|. + group autocmd group name. Refer to |autocmd-groups|. If this group doesn't exist then it is created. If not specified or empty, then the default group is used. nested boolean flag, set to v:true to add a nested autocmd. Refer to |autocmd-nested|. once boolean flag, set to v:true to add an autocmd - which executes only once. Refer to + which executes only once. Refer to |autocmd-once|. - pattern autocmd pattern string. Refer to + pattern autocmd pattern string. Refer to |autocmd-patterns|. If "bufnr" item is present, then this item is ignored. This can be a String with a single pattern or a List of @@ -1057,7 +1057,8 @@ autocmd_add({acmds}) *autocmd_add()* commands associated with the specified autocmd event and group and add the {cmd}. This is useful to avoid adding the same command - multiple times for an autocmd event in a group. + multiple times for an autocmd event in a + group. Returns v:true on success and v:false on failure. Examples: > @@ -1080,21 +1081,21 @@ autocmd_delete({acmds}) *autocmd_delete()* The {acmds} argument is a List where each item is a Dict with the following optional items: - bufnr buffer number to delete a buffer-local autocmd. - If this item is specified, then the "pattern" - item is ignored. + bufnr buffer number to delete a buffer-local + autocmd. If this item is specified, then the + "pattern" item is ignored. cmd Ex command for this autocmd event - event autocmd event name. Refer to |autocmd-events|. + event autocmd event name. Refer to |autocmd-events|. If '*' then all the autocmd events in this group are deleted. - group autocmd group name. Refer to |autocmd-groups|. + group autocmd group name. Refer to |autocmd-groups|. If not specified or empty, then the default group is used. nested set to v:true for a nested autocmd. Refer to |autocmd-nested|. once set to v:true for an autocmd which executes - only once. Refer to |autocmd-once|. - pattern autocmd pattern string. Refer to + only once. Refer to |autocmd-once|. + pattern autocmd pattern string. Refer to |autocmd-patterns|. If "bufnr" item is present, then this item is ignored. @@ -1128,22 +1129,22 @@ autocmd_delete({acmds}) *autocmd_delete()* autocmd_get([{opts}]) *autocmd_get()* - Returns a |List| of autocmds. If {opts} is not supplied, then + Returns a |List| of autocmds. If {opts} is not supplied, then returns the autocmds for all the events in all the groups. The optional {opts} Dict argument supports the following items: - group Autocmd group name. If specified, returns only - the autocmds defined in this group. If the - specified group doesn't exist, results in an - error message. If set to an empty string, + group Autocmd group name. If specified, returns + only the autocmds defined in this group. If + the specified group doesn't exist, results in + an error message. If set to an empty string, then the default autocmd group is used. - event Autocmd event name. If specified, returns only - the autocmds defined for this event. If set - to "*", then returns autocmds for all the + event Autocmd event name. If specified, returns + only the autocmds defined for this event. If + set to "*", then returns autocmds for all the events. If the specified event doesn't exist, results in an error message. - pattern Autocmd pattern. If specified, returns only + pattern Autocmd pattern. If specified, returns only the autocmds defined for this pattern. A combination of the above three times can be supplied in {opts}. @@ -1155,11 +1156,12 @@ autocmd_get([{opts}]) *autocmd_get()* event Autocmd event name. group Autocmd group name. nested Boolean flag, set to v:true for a nested - autocmd. See |autocmd-nested|. + autocmd. See |autocmd-nested|. once Boolean flag, set to v:true, if the autocmd - will be executed only once. See |autocmd-once|. + will be executed only once. See |autocmd-once|. pattern Autocmd pattern. For a buffer-local - autocmd, this will be of the form "". + autocmd, this will be of the form + "". If there are multiple commands for an autocmd event in a group, then separate items are returned for each command. @@ -1510,7 +1512,7 @@ bufnr([{buf} [, {create}]]) *bufnr()* {create} argument is present and TRUE, a new, unlisted, buffer is created and its number is returned. Example: > let newbuf = bufnr('Scratch001', 1) -< Using an empty name uses the current buffer. To create a new +< Using an empty name uses the current buffer. To create a new buffer with an empty name use |bufadd()|. bufnr("$") is the last buffer: > @@ -1698,7 +1700,8 @@ char2nr({string} [, {utf8}]) *char2nr()* Examples: > char2nr(" ") returns 32 char2nr("ABC") returns 65 -< When {utf8} is omitted or zero, the current 'encoding' is used. +< When {utf8} is omitted or zero, the current 'encoding' is + used. Example for "utf-8": > char2nr("á") returns 225 char2nr("á"[0]) returns 195 @@ -1763,7 +1766,7 @@ charidx({string}, {idx} [, {countcc} [, {utf16}]]) index in the String {expr} instead of as the byte index. Returns -1 if the arguments are invalid or if there are less - than {idx} bytes. If there are exactly {idx} bytes the length + than {idx} bytes. If there are exactly {idx} bytes the length of the string in characters is returned. An error is given and -1 is returned if the first argument is @@ -1855,7 +1858,7 @@ cmdcomplete_info() *cmdcomplete_info()* completion began. pum_visible |TRUE| if popup menu is visible. See |pumvisible()|. - matches List of all completion candidates. Each item + matches List of all completion candidates. Each item is a string. selected Selected item index. First index is zero. Index is -1 if no item is selected (showing @@ -1877,7 +1880,7 @@ col({expr} [, {winid}]) *col()* When {expr} is "$", it means the end of the cursor line, so the result is the number of bytes in the cursor line plus one. Additionally {expr} can be [lnum, col]: a |List| with the line - and column number. Most useful when the column is "$", to get + and column number. Most useful when the column is "$", to get the last column of a specific line. When "lnum" or "col" is out of range then col() returns zero. @@ -1914,7 +1917,7 @@ col({expr} [, {winid}]) *col()* complete({startcol}, {matches}) *complete()* *E785* - Set the matches for Insert mode completion. Can only be + Set the matches for Insert mode completion. Can only be used in Insert mode. Typically invoked from a mapping with CTRL-R = (see |i_CTRL-R|), but may also be called from a || or || mapping. It does not work after @@ -2001,12 +2004,13 @@ complete_info([{what}]) *complete_info()* See |complete_info_mode| for the values. pum_visible |TRUE| if popup menu is visible. See |pumvisible()|. - items List of all completion candidates. Each item + items List of all completion candidates. Each item is a dictionary containing the entries "word", - "abbr", "menu", "kind", "info" and "user_data". + "abbr", "menu", "kind", "info" and + "user_data". See |complete-items|. matches Same as "items", but only returns items that - are matching current query. If both "matches" + are matching current query. If both "matches" and "items" are in "what", the returned list will still be named "items", but each item will have an additional "match" field. @@ -2045,7 +2049,7 @@ complete_info([{what}]) *complete_info()* {what} are silently ignored. To get the position and size of the popup menu, see - |pum_getpos()|. It's also available in |v:event| during the + |pum_getpos()|. It's also available in |v:event| during the |CompleteChanged| event. Returns an empty |Dictionary| on error. @@ -2065,13 +2069,13 @@ complete_info([{what}]) *complete_info()* complete_match([{lnum}, {col}]) *complete_match()* Searches backward from the given position and returns a List - of matches according to the 'isexpand' option. When no + of matches according to the 'isexpand' option. When no arguments are provided, uses the current cursor position. Each match is represented as a List containing [startcol, trigger_text] where: - startcol: column position where completion should start, - or -1 if no trigger position is found. For multi-character + or -1 if no trigger position is found. For multi-character triggers, returns the column of the first character. - trigger_text: the matching trigger string from 'isexpand', or empty string if no match was found or when using the @@ -2228,7 +2232,7 @@ count({comp}, {expr} [, {ic} [, {start}]]) *count()* *E706* When {ic} is given and it's |TRUE| then case is ignored. When {comp} is a string then the number of not overlapping - occurrences of {expr} is returned. Zero is returned when + occurrences of {expr} is returned. Zero is returned when {expr} is an empty string. Can also be used as a |method|: > @@ -2322,7 +2326,7 @@ cursor({list}) debugbreak({pid}) *debugbreak()* Specifically used to interrupt a program being debugged. It will cause process {pid} to get a SIGTRAP. Behavior for other - processes is undefined. See |terminal-debugger|. + processes is undefined. See |terminal-debugger|. {only available on MS-Windows} Returns |TRUE| if successfully interrupted the program. @@ -2397,13 +2401,13 @@ deletebufline({buf}, {first} [, {last}]) *deletebufline()* If {last} is omitted then delete line {first} only. On success 0 is returned, on failure 1 is returned. - This function works only for loaded buffers. First call + This function works only for loaded buffers. First call |bufload()| if needed. For the use of {buf}, see |bufname()| above. - {first} and {last} are used like with |getline()|. Note that - when using |line()| this refers to the current buffer. Use "$" + {first} and {last} are used like with |getline()|. Note that + when using |line()| this refers to the current buffer. Use "$" to refer to the last line in buffer {buf}. Can also be used as a |method|: > @@ -2640,7 +2644,7 @@ digraph_setlist({digraphlist}) *digraph_setlist()* echoraw({string}) *echoraw()* Output {string} as-is, including unprintable characters. - This can be used to output a terminal code. For example, to + This can be used to output a terminal code. For example, to disable modifyOtherKeys: > call echoraw(&t_TE) < and to enable it again: > @@ -2673,7 +2677,7 @@ empty({expr}) *empty()* environ() *environ()* - Return all of environment variables as dictionary. You can + Return all of environment variables as dictionary. You can check if an environment variable exists like this: > :echo has_key(environ(), 'HOME') < Note that the variable name may be CamelCase; to ignore case @@ -3157,21 +3161,21 @@ feedkeys({string} [, {mode}]) *feedkeys()* {string}. To include special keys into {string}, use double-quotes - and "\..." notation |expr-quote|. For example, - feedkeys("\") simulates pressing of the key. But + and "\..." notation |expr-quote|. For example, + feedkeys("\") simulates pressing of the key. But feedkeys('\') pushes 5 characters. A special code that might be useful is , it exits the wait for a character without doing anything. ** {mode} is a String, which can contain these character flags: - 'm' Remap keys. This is default. If {mode} is absent, + 'm' Remap keys. This is default. If {mode} is absent, keys are remapped. 'n' Do not remap keys. 't' Handle keys as if typed; otherwise they are handled as if coming from a mapping. This matters for undo, opening folds, etc. 'L' Lowlevel input. Only works for Unix or when using the - GUI. Keys are used as if they were coming from the + GUI. Keys are used as if they were coming from the terminal. Other flags are not used. *E980* When a CTRL-C interrupts and 't' is included it sets the internal "got_int" flag. @@ -3191,7 +3195,7 @@ feedkeys({string} [, {mode}]) *feedkeys()* legacy script syntax applies, "s:var" does not work, etc. Note that if the string being fed sets a script context this still applies. - '!' When used with 'x' will not end Insert mode. Can be + '!' When used with 'x' will not end Insert mode. Can be used in a test when a timer is set to exit Insert mode a little later. Useful for testing CursorHoldI. @@ -3204,7 +3208,7 @@ feedkeys({string} [, {mode}]) *feedkeys()* filecopy({from}, {to}) *filecopy()* - Copy the file pointed to by the name {from} to {to}. The + Copy the file pointed to by the name {from} to {to}. The result is a Number, which is |TRUE| if the file was copied successfully, and |FALSE| when it failed. If a file with name {to} already exists, it will fail. @@ -3265,7 +3269,7 @@ filter({expr1}, {expr2}) *filter()* of the current item. For a |Dictionary| |v:key| has the key of the current item and for a |List| |v:key| has the index of the current item. For a |Blob| |v:key| has the index of the - current byte. For a |String| |v:key| has the index of the + current byte. For a |String| |v:key| has the index of the current character. Examples: > call filter(mylist, 'v:val !~ "OLD"') @@ -3307,8 +3311,8 @@ filter({expr1}, {expr2}) *filter()* or a new |Blob| or |String|. When an error is encountered while evaluating {expr2} no further items in {expr1} are processed. - When {expr2} is a Funcref errors inside a function are ignored, - unless it was defined with the "abort" flag. + When {expr2} is a Funcref errors inside a function are + ignored, unless it was defined with the "abort" flag. Can also be used as a |method|: > mylist->filter(expr2) @@ -3588,7 +3592,7 @@ foldtextresult({lnum}) *foldtextresult()* foreach({expr1}, {expr2}) *foreach()* *E1525* {expr1} must be a |List|, |Tuple|, |String|, |Blob| or |Dictionary|. - For each item in {expr1} execute {expr2}. {expr1} is not + For each item in {expr1} execute {expr2}. {expr1} is not modified; its values may be, as with |:lockvar| 1. |E741| See |map()| and |filter()| to modify {expr1}. @@ -3598,7 +3602,7 @@ foreach({expr1}, {expr2}) *foreach()* *E1525* of the current item. For a |Dictionary| |v:key| has the key of the current item and for a |List| or a |Tuple| |v:key| has the index of the current item. For a |Blob| |v:key| has the - index of the current byte. For a |String| |v:key| has the + index of the current byte. For a |String| |v:key| has the index of the current character. Examples: > call foreach(mylist, 'used[v:val] = true') @@ -3619,8 +3623,8 @@ foreach({expr1}, {expr2}) *foreach()* *E1525* Returns {expr1} in all cases. When an error is encountered while executing {expr2} no further items in {expr1} are processed. - When {expr2} is a Funcref errors inside a function are ignored, - unless it was defined with the "abort" flag. + When {expr2} is a Funcref errors inside a function are + ignored, unless it was defined with the "abort" flag. Can also be used as a |method|: > mylist->foreach(expr2) @@ -3672,7 +3676,7 @@ funcref({name} [, {arglist}] [, {dict}]) *funcref()* It only works for an autoloaded function if it has already been loaded (to avoid mistakenly loading the autoload script when only intending to use the function name, use |function()| - instead). {name} cannot be a builtin function. + instead). {name} cannot be a builtin function. Returns 0 on error. Can also be used as a |method|: > @@ -3688,7 +3692,7 @@ function({name} [, {arglist}] [, {dict}]) {name} can also be a Funcref or a partial. When it is a partial the dict stored in it will be used and the {dict} - argument is not allowed. E.g.: > + argument is not allowed. E.g.: > let FuncWithArg = function(dict.Func, [arg]) let Broken = function(dict.Func, [arg], dict) < @@ -3697,8 +3701,8 @@ function({name} [, {arglist}] [, {dict}]) same function. When {arglist} or {dict} is present this creates a partial. - That means the argument list and/or the dictionary is stored in - the Funcref and will be used when the Funcref is called. + That means the argument list and/or the dictionary is stored + in the Funcref and will be used when the Funcref is called. The arguments are passed to the function in front of other arguments, but after any argument from |method|. Example: > @@ -3732,7 +3736,7 @@ function({name} [, {arglist}] [, {dict}]) call Callback('one', 'two', 'name') < The Dictionary is only useful when calling a "dict" function. - In that case the {dict} is passed in as "self". Example: > + In that case the {dict} is passed in as "self". Example: > function Callback() dict echo "called for " .. self.name endfunction @@ -4004,12 +4008,14 @@ getcellpixels() *getcellpixels()* Returns a |List| of terminal cell pixel size. List format is [xpixel, ypixel]. - Only works on Unix (terminal and gVim) and Windows (gVim only). + Only works on Unix (terminal and gVim) and Windows (gVim + only). Returns [] on other systems or on failure. - Note that there could be variations across different terminals. + Note that there could be variations across different + terminals. On macOS, system Terminal.app returns sizes in points (before - Retina scaling), whereas third-party terminals return raw pixel - sizes (post Retina scaling). + Retina scaling), whereas third-party terminals return raw + pixel sizes (post Retina scaling). Return type: list @@ -4024,8 +4030,8 @@ getcellwidths() *getcellwidths()* getchangelist([{buf}]) *getchangelist()* - Returns the |changelist| for the buffer {buf}. For the use - of {buf}, see |bufname()| above. If buffer {buf} doesn't + Returns the |changelist| for the buffer {buf}. For the use + of {buf}, see |bufname()| above. If buffer {buf} doesn't exist, an empty list is returned. The returned list contains two entries: a list with the change @@ -4036,7 +4042,7 @@ getchangelist([{buf}]) *getchangelist()* coladd column offset for 'virtualedit' lnum line number If buffer {buf} is the current buffer, then the current - position refers to the position in the list. For other + position refers to the position in the list. For other buffers, it is set to the length of the list. Can also be used as a |method|: > @@ -4143,7 +4149,7 @@ getchar([{expr} [, {opts}]]) *getchar()* :endfunction < You may also receive synthetic characters, such as - ||. Often you will want to ignore this and get + ||. Often you will want to ignore this and get another character: > :function GetKey() : let c = getchar() @@ -4176,7 +4182,7 @@ getcharmod() *getcharmod()* getcharpos({expr}) *getcharpos()* - Get the position for String {expr}. Same as |getpos()| but the + Get the position for String {expr}. Same as |getpos()| but the column number in the returned List is a character index instead of a byte index. If |getpos()| returns a very large column number, equal to @@ -4300,7 +4306,7 @@ getcmdscreenpos() *getcmdscreenpos()* getcmdtype() *getcmdtype()* - Return the current command-line type. Possible return values + Return the current command-line type. Possible return values are: : normal Ex command > debug mode command |debug-mode| @@ -4318,15 +4324,15 @@ getcmdtype() *getcmdtype()* getcmdwintype() *getcmdwintype()* - Return the current |command-line-window| type. Possible return - values are the same as |getcmdtype()|. Returns an empty string + Return the current |command-line-window| type. Possible return + values are the same as |getcmdtype()|. Returns an empty string when not in the command-line window. Return type: |String| getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* - Return a list of command-line completion matches. The String + Return a list of command-line completion matches. The String {type} argument specifies what for. The following completion types are supported: @@ -4383,10 +4389,10 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* If the optional {filtered} flag is set to 1, then 'wildignore' is applied to filter the results. Otherwise all the matches - are returned. The 'wildignorecase' option always applies. + are returned. The 'wildignorecase' option always applies. If the 'wildoptions' option contains 'fuzzy', then fuzzy - matching is used to get the completion matches. Otherwise + matching is used to get the completion matches. Otherwise regular expression matching is used. Thus this function follows the user preference, what happens on the command line. If you do not want this you can make 'wildoptions' empty @@ -4423,8 +4429,8 @@ getcurpos([{winid}]) cursor vertically. After |$| command it will be a very large number equal to |v:maxcol|. Also see |getcursorcharpos()| and |getpos()|. - The first "bufnum" item is always zero. The byte position of - the cursor is returned in 'col'. To get the character + The first "bufnum" item is always zero. The byte position of + the cursor is returned in 'col'. To get the character position, use |getcursorcharpos()|. The optional {winid} argument can specify the window. It can @@ -4472,7 +4478,7 @@ getcwd([{winnr} [, {tabnr}]]) *getcwd()* directory. See also |haslocaldir()|. With {winnr} and {tabnr} return the local current directory of - the window in the specified tab page. If {winnr} is -1 return + the window in the specified tab page. If {winnr} is -1 return the working directory of the tabpage. If {winnr} is zero use the current window, if {tabnr} is zero use the current tabpage. @@ -4679,19 +4685,19 @@ getloclist({nr} [, {what}]) *getloclist()* For a location list window, the displayed location list is returned. For an invalid window number {nr}, an empty list is - returned. Otherwise, same as |getqflist()|. + returned. Otherwise, same as |getqflist()|. If the optional {what} dictionary argument is supplied, then - returns the items listed in {what} as a dictionary. Refer to + returns the items listed in {what} as a dictionary. Refer to |getqflist()| for the supported items in {what}. In addition to the items supported by |getqflist()| in {what}, the following item is supported by |getloclist()|: filewinid id of the window used to display files - from the location list. This field is + from the location list. This field is applicable only when called from a - location list window. See + location list window. See |location-list-file-window| for more details. @@ -4852,7 +4858,7 @@ getpos({expr}) *getpos()* For getting the cursor position see |getcurpos()|. The column number in the returned List is the byte position - within the line. To get the character position in the line, + within the line. To get the character position in the line, use |getcharpos()|. Note that for '< and '> Visual mode matters: when it is "V" @@ -4898,7 +4904,7 @@ getqflist([{what}]) *getqflist()* any type. When there is no error list or it's empty, an empty list is - returned. Quickfix list entries with a non-existing buffer + returned. Quickfix list entries with a non-existing buffer number are returned with "bufnr" set to zero (Note: some functions accept buffer number zero for the alternate buffer, you may need to explicitly check for zero). @@ -4911,12 +4917,12 @@ getqflist([{what}]) *getqflist()* :endfor < If the optional {what} dictionary argument is supplied, then - returns only the items listed in {what} as a dictionary. The + returns only the items listed in {what} as a dictionary. The following string items are supported in {what}: changedtick get the total number of changes made to the list |quickfix-changedtick| context get the |quickfix-context| - efm errorformat to use when parsing "lines". If + efm errorformat to use when parsing "lines". If not present, then the 'errorformat' option value is used. id get information for the quickfix list with @@ -4930,24 +4936,24 @@ getqflist([{what}]) *getqflist()* lines parse a list of lines using 'efm' and return the resulting entries. Only a |List| type is accepted. The current quickfix list is not - modified. See |quickfix-parse|. + modified. See |quickfix-parse|. nr get information for this quickfix list; zero means the current quickfix list and "$" means the last quickfix list qfbufnr number of the buffer displayed in the quickfix - window. Returns 0 if the quickfix buffer is - not present. See |quickfix-buffer|. + window. Returns 0 if the quickfix buffer is + not present. See |quickfix-buffer|. size number of entries in the quickfix list title get the list title |quickfix-title| winid get the quickfix |window-ID| all all of the above quickfix properties - Non-string items in {what} are ignored. To get the value of a + Non-string items in {what} are ignored. To get the value of a particular item, set it to zero. If "nr" is not present then the current quickfix list is used. If both "nr" and a non-zero "id" are specified, then the list specified by "id" is used. To get the number of lists in the quickfix stack, set "nr" to - "$" in {what}. The "nr" value in the returned dictionary + "$" in {what}. The "nr" value in the returned dictionary contains the quickfix stack size. When "lines" is specified, all the other items except "efm" are ignored. The returned dictionary contains the entry @@ -4956,22 +4962,23 @@ getqflist([{what}]) *getqflist()* The returned dictionary contains the following entries: changedtick total number of changes made to the list |quickfix-changedtick| - context quickfix list context. See |quickfix-context| + context quickfix list context. See |quickfix-context| If not present, set to "". - id quickfix list ID |quickfix-ID|. If not + id quickfix list ID |quickfix-ID|. If not present, set to 0. - idx index of the quickfix entry in the list. If not - present, set to 0. - items quickfix list entries. If not present, set to + idx index of the quickfix entry in the list. If + not present, set to 0. + items quickfix list entries. If not present, set to an empty list. - nr quickfix list number. If not present, set to 0 + nr quickfix list number. If not present, set to + 0 qfbufnr number of the buffer displayed in the quickfix - window. If not present, set to 0. - size number of entries in the quickfix list. If not - present, set to 0. - title quickfix list title text. If not present, set + window. If not present, set to 0. + size number of entries in the quickfix list. If + not present, set to 0. + title quickfix list title text. If not present, set to "". - winid quickfix |window-ID|. If not present, set to 0 + winid quickfix |window-ID|. If not present, set to 0 Examples (See also |getqflist-examples|): > :echo getqflist({'all': 1}) @@ -4996,7 +5003,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()* argument is ignored, thus you can always give it. If {list} is present and |TRUE|, the result type is changed - to |List|. Each list item is one text line. Use it if you care + to |List|. Each list item is one text line. Use it if you care about zero bytes possibly present inside register: without third argument both NLs and zero bytes are represented as NLs (see |NL-used-for-Nul|). @@ -5170,7 +5177,7 @@ getscriptinfo([{opts}]) *getscriptinfo()* The optional Dict argument {opts} supports the following optional items: - name Script name match pattern. If specified, + name Script name match pattern. If specified, and "sid" is not specified, information about scripts with a name that match the pattern "name" are returned. @@ -5224,7 +5231,7 @@ getstacktrace() *getstacktrace()* gettabinfo([{tabnr}]) *gettabinfo()* If {tabnr} is not specified, then information about all the - tab pages is returned as a |List|. Each List item is a + tab pages is returned as a |List|. Each List item is a |Dictionary|. Otherwise, {tabnr} specifies the tab page number and information about that one is returned. If the tab page does not exist an empty List is returned. @@ -5290,16 +5297,17 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* gettagstack([{winnr}]) *gettagstack()* - The result is a Dict, which is the tag stack of window {winnr}. + The result is a Dict, which is the tag stack of window + {winnr}. {winnr} can be the window number or the |window-ID|. When {winnr} is not specified, the current window is used. When window {winnr} doesn't exist, an empty Dict is returned. The returned dictionary contains the following entries: - curidx Current index in the stack. When at + curidx Current index in the stack. When at top of the stack, set to (length + 1). Index of bottom of the stack is 1. - items List of items in the stack. Each item + items List of items in the stack. Each item is a dictionary containing the entries described below. length Number of entries in the stack. @@ -5310,9 +5318,9 @@ gettagstack([{winnr}]) *gettagstack()* from cursor position before the tag jump. See |getpos()| for the format of the returned list. - matchnr current matching tag number. Used when - multiple matching tags are found for a - name. + matchnr current matching tag number. Used + when multiple matching tags are found + for a name. tagname name of the tag See |tagstack| for more information about the tag stack. @@ -5417,7 +5425,7 @@ getwinpos([{timeout}]) *getwinpos()* getwinposx() *getwinposx()* The result is a Number, which is the X coordinate in pixels of - the left hand side of the GUI Vim window. Also works for an + the left hand side of the GUI Vim window. Also works for an xterm (uses a timeout of 100 msec). The result will be -1 if the information is not available (e.g. on the Wayland backend). @@ -5460,7 +5468,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* 'wildignorecase' always applies. When {list} is present and it is |TRUE| the result is a |List| - with all matching files. The advantage of using a List is, + with all matching files. The advantage of using a List is, you also get filenames containing newlines correctly. Otherwise the result is a String and when there are several matches, they are separated by characters. @@ -5530,10 +5538,10 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) 'suffixes' affect the ordering of matches. When {list} is present and it is |TRUE| the result is a |List| - with all matching files. The advantage of using a List is, you - also get filenames containing newlines correctly. Otherwise - the result is a String and when there are several matches, - they are separated by characters. Example: > + with all matching files. The advantage of using a List is, + you also get filenames containing newlines correctly. + Otherwise the result is a String and when there are several + matches, they are separated by characters. Example: > :echo globpath(&rtp, "syntax/c.vim", 0, 1) < {alllinks} is used as with |glob()|. @@ -5804,24 +5812,24 @@ hlget([{name} [, {resolve}]]) *hlget()* cleared boolean flag, set to v:true if the highlight group attributes are cleared or not yet specified. See |highlight-clear|. - cterm cterm attributes. See |highlight-cterm|. + cterm cterm attributes. See |highlight-cterm|. ctermbg cterm background color. See |highlight-ctermbg|. ctermfg cterm foreground color. See |highlight-ctermfg|. ctermul cterm underline color. See |highlight-ctermul|. default boolean flag, set to v:true if the highlight - group link is a default link. See + group link is a default link. See |highlight-default|. font highlight group font. See |highlight-font|. - gui gui attributes. See |highlight-gui|. + gui gui attributes. See |highlight-gui|. guibg gui background color. See |highlight-guibg|. guifg gui foreground color. See |highlight-guifg|. guisp gui special color. See |highlight-guisp|. id highlight group ID. linksto linked highlight group name. See |:highlight-link|. - name highlight group name. See |group-name|. + name highlight group name. See |group-name|. start start terminal keycode. See |highlight-start|. stop stop terminal keycode. See |highlight-stop|. term term attributes. See |highlight-term|. @@ -5845,7 +5853,7 @@ hlget([{name} [, {resolve}]]) *hlget()* hlset({list}) *hlset()* Creates or modifies the attributes of a List of highlight groups. Each item in {list} is a dictionary containing the - attributes of a highlight group. See |hlget()| for the list of + attributes of a highlight group. See |hlget()| for the list of supported items in this dictionary. In addition to the items described in |hlget()|, the following @@ -5947,16 +5955,16 @@ iconv({string}, {from}, {to}) *iconv()* id({item}) *id()* The result is a unique String associated with the {item} and - not with the {item}'s contents. It is only valid while the - {item} exists and is referenced. It is valid only in the - instance of vim that produces the result. The whole idea is + not with the {item}'s contents. It is only valid while the + {item} exists and is referenced. It is valid only in the + instance of vim that produces the result. The whole idea is that `id({item})` does not change if the contents of {item} - changes. This is useful as a `key` for creating an identity + changes. This is useful as a `key` for creating an identity dictionary, rather than one based on equals. This operation does not reference {item} and there is no - function to convert the `id` to the {item}. It may be useful to - have a map of `id` to {item}. The following > + function to convert the `id` to the {item}. It may be useful to + have a map of `id` to {item}. The following > var referenceMap: dict var id = item->id() referenceMap[id] = item @@ -5964,7 +5972,7 @@ id({item}) *id()* way to get the {item} from the `id`. {item} may be a List, Tuple, Dictionary, Object, Job, Channel - or Blob. If the item is not a permitted type, or it is a null + or Blob. If the item is not a permitted type, or it is a null value, then an empty String is returned. Can also be used as a |method|: > @@ -6160,7 +6168,8 @@ inputrestore() *inputrestore()* Restore typeahead that was saved with a previous |inputsave()|. Should be called the same number of times inputsave() is called. Calling it more often is harmless though. - Returns TRUE when there is nothing to restore, FALSE otherwise. + Returns TRUE when there is nothing to restore, FALSE + otherwise. Return type: |Number| @@ -6259,10 +6268,11 @@ invert({expr}) *invert()* isabsolutepath({path}) *isabsolutepath()* The result is a Number, which is |TRUE| when {path} is an absolute path. - On Unix, a path is considered absolute when it starts with '/'. - On MS-Windows, it is considered absolute when it starts with an - optional drive prefix and is followed by a '\' or '/'. UNC paths - are always absolute. + On Unix, a path is considered absolute when it starts with + '/'. + On MS-Windows, it is considered absolute when it starts with + an optional drive prefix and is followed by a '\' or '/'. UNC + paths are always absolute. Example: > echo isabsolutepath('/usr/share/') " 1 echo isabsolutepath('./foobar') " 0 @@ -6408,7 +6418,7 @@ js_encode({expr}) *js_encode()* [1,,{one:1},,] ~ While json_encode() would produce: [1,null,{"one":1},null] ~ - This encoding is valid for JavaScript. It is more efficient + This encoding is valid for JavaScript. It is more efficient than JSON, especially when using an array with optional items. Can also be used as a |method|: > @@ -6427,7 +6437,7 @@ json_decode({string}) *json_decode()* *E491* - Integer keys are accepted in objects, e.g. {1:2} is the same as {"1":2}. - More floating point numbers are recognized, e.g. "1." for - "1.0", or "001.2" for "1.2". Special floating point values + "1.0", or "001.2" for "1.2". Special floating point values "Infinity", "-Infinity" and "NaN" (capitalization ignored) are accepted. - Leading zeroes in integer numbers are ignored, e.g. "012" @@ -6690,7 +6700,8 @@ list2str({list} [, {utf8}]) *list2str()* join(map(list, {nr, val -> nr2char(val)}), '') < |str2list()| does the opposite. - When {utf8} is omitted or zero, the current 'encoding' is used. + When {utf8} is omitted or zero, the current 'encoding' is + used. When {utf8} is TRUE, always return UTF-8 characters. With UTF-8 composing characters work as expected: > list2str([97, 769]) returns "á" @@ -6725,7 +6736,7 @@ list2tuple({list}) *list2tuple()* listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()* Add a callback function that will be invoked when changes have been made to buffer {buf}. - {buf} refers to a buffer name or number. For the accepted + {buf} refers to a buffer name or number. For the accepted values, see |bufname()|. When {buf} is omitted the current buffer is used. Returns a unique ID that can be passed to |listener_remove()|. @@ -6791,16 +6802,16 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()* Because of the third trigger reason for triggering a callback listed above, the line numbers passed to the callback are not - guaranteed to be valid. If this is a problem then make + guaranteed to be valid. If this is a problem then make {unbuffered} |TRUE|. When {unbuffered} is |TRUE| the {callback} is invoked for every - single change. The changes list only holds a single dictionary - and the "start", "end" and "added" values in the dictionary are - the same as the corresponding callback arguments. The line - numbers are valid when the callback is invoked, but later - changes may make them invalid, thus keeping a copy for later - might not work. + single change. The changes list only holds a single + dictionary and the "start", "end" and "added" values in the + dictionary are the same as the corresponding callback + arguments. The line numbers are valid when the callback is + invoked, but later changes may make them invalid, thus keeping + a copy for later might not work. The {callback} is invoked with the text locked, see |textlock|. If you do need to make changes to the buffer, use @@ -6827,7 +6838,7 @@ listener_flush([{buf}]) *listener_flush()* Invoke listener callbacks for buffer {buf}. If there are no pending changes then no callbacks are invoked. - {buf} refers to a buffer name or number. For the accepted + {buf} refers to a buffer name or number. For the accepted values, see |bufname()|. When {buf} is omitted the current buffer is used. @@ -6890,7 +6901,7 @@ log10({expr}) *log10()* luaeval({expr} [, {expr}]) *luaeval()* Evaluate Lua expression {expr} and return its result converted - to Vim data structures. Second {expr} may hold additional + to Vim data structures. Second {expr} may hold additional argument accessible as _A inside first {expr}. Strings are returned as they are. Boolean objects are converted to numbers. @@ -6927,7 +6938,7 @@ map({expr1}, {expr2}) *map()* of the current item. For a |Dictionary| |v:key| has the key of the current item and for a |List| |v:key| has the index of the current item. For a |Blob| |v:key| has the index of the - current byte. For a |String| |v:key| has the index of the + current byte. For a |String| |v:key| has the index of the current character. Example: > :call map(mylist, '"> " .. v:val .. " <"') @@ -6945,7 +6956,7 @@ map({expr1}, {expr2}) *map()* accepts one argument, but with a Vim9 lambda you get "E1106: One argument too many", the number of arguments must match. - The function must return the new value of the item. Example + The function must return the new value of the item. Example that changes each value by "key-value": > func KeyValue(key, val) return a:key .. '-' .. a:val @@ -6966,8 +6977,8 @@ map({expr1}, {expr2}) *map()* or a new |Blob| or |String|. When an error is encountered while evaluating {expr2} no further items in {expr1} are processed. - When {expr2} is a Funcref errors inside a function are ignored, - unless it was defined with the "abort" flag. + When {expr2} is a Funcref errors inside a function are + ignored, unless it was defined with the "abort" flag. Can also be used as a |method|: > mylist->map(expr2) @@ -6980,8 +6991,8 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* When {dict} is omitted or zero: Return the rhs of mapping {name} in mode {mode}. The returned String has special characters translated like in the output of the ":map" command - listing. When {dict} is TRUE a dictionary is returned, see - below. To get a list of all mappings see |maplist()|. + listing. When {dict} is TRUE a dictionary is returned, see + below. To get a list of all mappings see |maplist()|. When there is no mapping for {name}, an empty String is returned if {dict} is FALSE, otherwise returns an empty Dict. @@ -7020,7 +7031,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* "script" 1 if mapping was defined with