From 7a8f42dc036f3bc6e8b106c580e0cd50dbed465e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 2 Jun 2024 06:06:12 +0800 Subject: vim-patch:e299591: runtime(doc): clarify 'shortmess' flag "S" (#29131) fixes: vim/vim#14893 https://github.com/vim/vim/commit/e299591498a20c5c587364e4df57f947dfc02897 Co-authored-by: Christian Brabandt --- runtime/lua/vim/_meta/options.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 428b7c4d4f..2eae0d27a7 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -5781,8 +5781,8 @@ vim.bo.sw = vim.bo.shiftwidth --- message; also for quickfix message (e.g., ":cn") --- s don't give "search hit BOTTOM, continuing at TOP" or *shm-s* --- "search hit TOP, continuing at BOTTOM" messages; when using ---- the search count do not show "W" after the count message (see ---- S below) +--- the search count do not show "W" before the count message +--- (see `shm-S` below) --- t truncate file message at the start if it is too long *shm-t* --- to fit on the command-line, "<" will appear in the left most --- column; ignored in Ex mode @@ -5804,7 +5804,11 @@ vim.bo.sw = vim.bo.shiftwidth --- `:silent` was used for the command; note that this also --- affects messages from 'autoread' reloading --- S do not show search count message when searching, e.g. *shm-S* ---- "[1/5]" +--- "[1/5]". When the "S" flag is not present (e.g. search count +--- is shown), the "search hit BOTTOM, continuing at TOP" and +--- "search hit TOP, continuing at BOTTOM" messages are only +--- indicated by a "W" (Mnemonic: Wrapped) letter before the +--- search count statistics. --- --- This gives you the opportunity to avoid that a change between buffers --- requires you to hit , but still gives as useful a message as -- cgit From 2f5b8a009280eba995aecf67d1e8d99b7c72c51c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 4 Jun 2024 09:39:28 +0200 Subject: vim-patch:9.1.0464: no whitespace padding in commentstring option in ftplugins Problem: no whitespace padding in commentstring option in ftplugins Solution: Change default to include whitespace padding, update existing filetype plugins with the new default value (Riley Bruins) closes: vim/vim#14843 https://github.com/vim/vim/commit/0a0830624a260660c7fa692ecb7e6e5de09114ba Co-authored-by: Riley Bruins --- runtime/lua/vim/_meta/options.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 2eae0d27a7..93ef75aeb3 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -974,8 +974,8 @@ vim.bo.comments = vim.o.comments vim.bo.com = vim.bo.comments --- A template for a comment. The "%s" in the value is replaced with the ---- comment text. For example, C uses "/*%s*/". Used for `commenting` and to ---- add markers for folding, see `fold-marker`. +--- comment text, and should be padded with a space when possible. +--- Used for `commenting` and to add markers for folding, see `fold-marker`. --- --- @type string vim.o.commentstring = "" -- cgit From 164338330b74e6e7c7cbb61e49c810dd82599236 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 5 Jun 2024 14:44:31 +0800 Subject: vim-patch:9.1.0463: no fuzzy-matching support for insert-completion Problem: no fuzzy-matching support for insert-completion Solution: enable insert-mode completion with fuzzy-matching using :set completopt+=fuzzy (glepnir). closes: vim/vim#14878 https://github.com/vim/vim/commit/a218cc6cdabae1113647b817c4eefc2b60a6902f Co-authored-by: glepnir --- runtime/lua/vim/_meta/options.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 93ef75aeb3..92c54c397f 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1061,6 +1061,10 @@ vim.bo.cfu = vim.bo.completefunc --- completion in the preview window. Only works in --- combination with "menu" or "menuone". --- +--- popup Show extra information about the currently selected +--- completion in a popup window. Only works in combination +--- with "menu" or "menuone". Overrides "preview". +--- --- noinsert Do not insert any text for a match until the user selects --- a match from the menu. Only works in combination with --- "menu" or "menuone". No effect if "longest" is present. @@ -1069,9 +1073,10 @@ vim.bo.cfu = vim.bo.completefunc --- select one from the menu. Only works in combination with --- "menu" or "menuone". --- ---- popup Show extra information about the currently selected ---- completion in a popup window. Only works in combination ---- with "menu" or "menuone". Overrides "preview". +--- fuzzy Enable `fuzzy-matching` for completion candidates. This +--- allows for more flexible and intuitive matching, where +--- characters can be skipped and matches can be found even +--- if the exact sequence is not typed. --- --- @type string vim.o.completeopt = "menu,preview" -- cgit From c2e836c41cabef3c5e269b5f6401f272112c75e1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 5 Jun 2024 15:01:23 +0800 Subject: vim-patch:2a2c4ff: runtime(doc): clarify how fuzzy 'completeopt' should work related: vim/vim#14912 https://github.com/vim/vim/commit/2a2c4fffd7e04f74b316209404767f128684a9e1 Co-authored-by: Christian Brabandt --- runtime/lua/vim/_meta/options.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 92c54c397f..0b4294ae4b 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1076,7 +1076,10 @@ vim.bo.cfu = vim.bo.completefunc --- fuzzy Enable `fuzzy-matching` for completion candidates. This --- allows for more flexible and intuitive matching, where --- characters can be skipped and matches can be found even ---- if the exact sequence is not typed. +--- if the exact sequence is not typed. Only makes a +--- difference how completion candidates are reduced from the +--- list of alternatives, but not how the candidates are +--- collected (using different completion types). --- --- @type string vim.o.completeopt = "menu,preview" -- cgit From 1d4e894403638a94ac58766cdcbc7f3128db318b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 6 Jun 2024 05:50:44 +0800 Subject: vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt' Problem: Cannot have buffer-local value for 'completeopt' (Nick Jensen). Solution: Make 'completeopt' global-local (zeertzjq). Also for some reason test Test_ColonEight_MultiByte seems to be failing sporadically now. Let's mark it as flaky. fixes: vim/vim#5487 closes: vim/vim#14922 https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8 --- runtime/lua/vim/_meta/options.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 0b4294ae4b..155c93726b 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1084,6 +1084,8 @@ vim.bo.cfu = vim.bo.completefunc --- @type string vim.o.completeopt = "menu,preview" vim.o.cot = vim.o.completeopt +vim.bo.completeopt = vim.o.completeopt +vim.bo.cot = vim.bo.completeopt vim.go.completeopt = vim.o.completeopt vim.go.cot = vim.go.completeopt -- cgit From 7e65f3757bdbe41bbf022b05b6869ad6e7febe0d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 16 Jun 2024 06:08:36 +0800 Subject: docs: document 'list' behavior when 'listchars' excludes "tab" (#29360) --- runtime/lua/vim/_meta/options.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 155c93726b..27534789b3 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -3830,6 +3830,9 @@ vim.go.lw = vim.go.lispwords --- between tabs and spaces and for trailing blanks. Further changed by --- the 'listchars' option. --- +--- When 'listchars' does not contain "tab" field, tabs are shown as "^I" +--- or "<09>", like how unprintable characters are displayed. +--- --- The cursor is displayed at the start of the space a Tab character --- occupies, not at the end as usual in Normal mode. To get this cursor --- position while displaying Tabs with spaces, use: -- cgit From ad70c9892d5b5ebcc106742386c99524f074bcea Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Sat, 15 Jun 2024 05:46:43 +0200 Subject: feat(column)!: rework 'statuscolumn' %r/l items Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item. --- runtime/lua/vim/_meta/options.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 155c93726b..befb56d3d5 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -6373,8 +6373,7 @@ vim.go.sol = vim.go.startofline --- Some of the items from the 'statusline' format are different for --- 'statuscolumn': --- ---- %l line number of currently drawn line ---- %r relative line number of currently drawn line +--- %l line number column for currently drawn line --- %s sign column for currently drawn line --- %C fold column for currently drawn line --- @@ -6403,11 +6402,8 @@ vim.go.sol = vim.go.startofline --- Examples: --- --- ```vim ---- " Relative number with bar separator and click handlers: ---- set statuscolumn=%@SignCb@%s%=%T%@NumCb@%r│%T ---- ---- " Right aligned relative cursor line number: ---- let &stc='%=%{v:relnum?v:relnum:v:lnum} ' +--- " Line number with bar separator and click handlers: +--- set statuscolumn=%@SignCb@%s%=%T%@NumCb@%l│%T --- --- " Line numbers in hexadecimal for non wrapped part of lines: --- let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} ' -- cgit From e7020306a19a5211c834966ec067fff3b981bdb9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 30 Jun 2024 06:40:31 +0800 Subject: feat(jumplist): allow opting out of removing unloaded buffers (#29347) Problem: Cannot opt out of removing unloaded buffers from the jumplist. Solution: Only enable that with "unload" flag in 'jumpoptions'. --- runtime/lua/vim/_meta/options.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 902df8f7d6..fb04da14a5 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -3551,8 +3551,11 @@ vim.go.js = vim.go.joinspaces --- |alternate-file` or using `mark-motions` try to --- restore the `mark-view` in which the action occurred. --- +--- unload Remove unloaded buffers from the jumplist. +--- EXPERIMENTAL: this flag may change in the future. +--- --- @type string -vim.o.jumpoptions = "" +vim.o.jumpoptions = "unload" vim.o.jop = vim.o.jumpoptions vim.go.jumpoptions = vim.o.jumpoptions vim.go.jop = vim.go.jumpoptions -- cgit From 5da9b49b19240bb00f338249fef84a2bf1212b49 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 7 Jul 2024 06:32:54 +0800 Subject: vim-patch:9.1.0537: signed number detection for CTRL-X/A can be improved (#29590) Problem: signed number detection for CTRL-X/A can be improved (Chris Patuzzo) Solution: Add the new "blank" value for the 'nrformat' setting. This will make Vim assume a signed number only if there is a blank in front of the sign. (distobs) fixes: vim/vim#15033 closes: vim/vim#15110 https://github.com/vim/vim/commit/25ac6d67d92e0adda53b8d44b81c15031643ca1e Co-authored-by: distobs --- runtime/lua/vim/_meta/options.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index fb04da14a5..40c12d94fd 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -4549,6 +4549,20 @@ vim.go.mouset = vim.go.mousetime --- (without "unsigned" it would become "9-2019"). --- Using CTRL-X on "0" or CTRL-A on "18446744073709551615" --- (2^64 - 1) has no effect, overflow is prevented. +--- blank If included, treat numbers as signed or unsigned based on +--- preceding whitespace. If a number with a leading dash has its +--- dash immediately preceded by a non-whitespace character (i.e., +--- not a tab or a " "), the negative sign won't be considered as +--- part of the number. For example: +--- Using CTRL-A on "14" in "Carbon-14" results in "Carbon-15" +--- (without "blank" it would become "Carbon-13"). +--- Using CTRL-X on "8" in "Carbon -8" results in "Carbon -9" +--- (because -8 is preceded by whitespace. If "unsigned" was +--- set, it would result in "Carbon -7"). +--- If this format is included, overflow is prevented as if +--- "unsigned" were set. If both this format and "unsigned" are +--- included, "unsigned" will take precedence. +--- --- Numbers which simply begin with a digit in the range 1-9 are always --- considered decimal. This also happens for numbers that are not --- recognized as octal or hex. -- cgit From b1aa8f5eb8a5407e869335e9987b73f8515c37e5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 Jul 2024 08:56:58 +0800 Subject: vim-patch:9.1.0572: cannot specify tab page closing behaviour (#29682) Problem: cannot specify tab page closing behaviour (Gianluca Pacchiella) Solution: Add the 'tabclose' option (LemonBoy). fixes: vim/vim#5967 closes: vim/vim#15204 https://github.com/vim/vim/commit/5247b0b92e191a046b034171a3b34031e317735f Co-authored-by: LemonBoy --- runtime/lua/vim/_meta/options.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 40c12d94fd..332dbda6e9 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -6837,6 +6837,22 @@ vim.o.syn = vim.o.syntax vim.bo.syntax = vim.o.syntax vim.bo.syn = vim.bo.syntax +--- This option controls the behavior when closing tab pages (e.g., using +--- `:tabclose`). When empty Vim goes to the next (right) tab page. +--- +--- Possible values (comma-separated list): +--- left If included, go to the previous tab page instead of +--- the next one. +--- uselast If included, go to the previously used tab page if +--- possible. This option takes precedence over the +--- others. +--- +--- @type string +vim.o.tabclose = "" +vim.o.tcl = vim.o.tabclose +vim.go.tabclose = vim.o.tabclose +vim.go.tcl = vim.go.tabclose + --- When non-empty, this option determines the content of the tab pages --- line at the top of the Vim window. When empty Vim will use a default --- tab pages line. See `setting-tabline` for more info. -- cgit From c2b51e6c41c5230af21dc4d978e896ef9e8b922a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Jul 2024 06:24:02 +0800 Subject: vim-patch:df62c62: runtime(doc): grammar fixes in options.txt (#29729) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes: vim/vim#15265 https://github.com/vim/vim/commit/df62c62177bd4dffce880b7a5711594865090953 Co-authored-by: Dominique Pellé --- runtime/lua/vim/_meta/options.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 332dbda6e9..25654e287d 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -544,7 +544,7 @@ vim.wo.bri = vim.wo.breakindent --- applying 'breakindent', even if the resulting --- text should normally be narrower. This prevents --- text indented almost to the right window border ---- occupying lot of vertical space when broken. +--- occupying lots of vertical space when broken. --- (default: 20) --- shift:{n} After applying 'breakindent', the wrapped line's --- beginning will be shifted by the given number of @@ -3340,7 +3340,7 @@ vim.go.is = vim.go.incsearch --- in Insert mode as specified with the 'indentkeys' option. --- When this option is not empty, it overrules the 'cindent' and --- 'smartindent' indenting. When 'lisp' is set, this option is ---- is only used when 'lispoptions' contains "expr:1". +--- only used when 'lispoptions' contains "expr:1". --- The expression is evaluated with `v:lnum` set to the line number for --- which the indent is to be computed. The cursor is also in this line --- when the expression is evaluated (but it may be moved around). @@ -3641,7 +3641,7 @@ vim.go.kp = vim.go.keywordprg --- part can be in one of two forms: --- 1. A list of pairs. Each pair is a "from" character immediately --- followed by the "to" character. Examples: "aA", "aAbBcC". ---- 2. A list of "from" characters, a semi-colon and a list of "to" +--- 2. A list of "from" characters, a semicolon and a list of "to" --- characters. Example: "abc;ABC" --- Example: "aA,fgh;FGH,cCdDeE" --- Special characters need to be preceded with a backslash. These are @@ -3733,7 +3733,7 @@ vim.go.ls = vim.go.laststatus --- update use `:redraw`. --- This may occasionally cause display errors. It is only meant to be set --- temporarily when performing an operation where redrawing may cause ---- flickering or cause a slow down. +--- flickering or cause a slowdown. --- --- @type boolean vim.o.lazyredraw = false @@ -4787,7 +4787,7 @@ vim.go.pm = vim.go.patchmode --- ``` --- To use an environment variable, you probably need to replace the --- separator. Here is an example to append $INCL, in which directory ---- names are separated with a semi-colon: +--- names are separated with a semicolon: --- --- ```vim --- let &path = &path .. "," .. substitute($INCL, ';', ',', 'g') @@ -5794,7 +5794,7 @@ vim.bo.shiftwidth = vim.o.shiftwidth vim.bo.sw = vim.bo.shiftwidth --- This option helps to avoid all the `hit-enter` prompts caused by file ---- messages, for example with CTRL-G, and to avoid some other messages. +--- messages, for example with CTRL-G, and to avoid some other messages. --- It is a list of flags: --- flag meaning when present ~ --- l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l* @@ -6283,7 +6283,7 @@ vim.bo.spo = vim.bo.spelloptions --- minus two. --- --- timeout:{millisec} Limit the time searching for suggestions to ---- {millisec} milli seconds. Applies to the following +--- {millisec} milliseconds. Applies to the following --- methods. When omitted the limit is 5000. When --- negative there is no limit. --- -- cgit From fe5030c05ec52cab7de03a9ee9150e855b9eefa1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 29 Jul 2024 08:02:31 +0800 Subject: vim-patch:partial:52e7cc2: runtime(doc): tweak documentation style a bit (#29897) closes: vim/vim#15371 https://github.com/vim/vim/commit/52e7cc26d81c61fff1b2e3b32e8b9b04347be1d3 Co-authored-by: h-east --- runtime/lua/vim/_meta/options.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 25654e287d..fffc561604 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -4550,17 +4550,17 @@ vim.go.mouset = vim.go.mousetime --- Using CTRL-X on "0" or CTRL-A on "18446744073709551615" --- (2^64 - 1) has no effect, overflow is prevented. --- blank If included, treat numbers as signed or unsigned based on ---- preceding whitespace. If a number with a leading dash has its +--- preceding whitespace. If a number with a leading dash has its --- dash immediately preceded by a non-whitespace character (i.e., --- not a tab or a " "), the negative sign won't be considered as --- part of the number. For example: --- Using CTRL-A on "14" in "Carbon-14" results in "Carbon-15" --- (without "blank" it would become "Carbon-13"). --- Using CTRL-X on "8" in "Carbon -8" results in "Carbon -9" ---- (because -8 is preceded by whitespace. If "unsigned" was +--- (because -8 is preceded by whitespace. If "unsigned" was --- set, it would result in "Carbon -7"). --- If this format is included, overflow is prevented as if ---- "unsigned" were set. If both this format and "unsigned" are +--- "unsigned" were set. If both this format and "unsigned" are --- included, "unsigned" will take precedence. --- --- Numbers which simply begin with a digit in the range 1-9 are always -- cgit From 2b4049719ab6cc01afcde3b5be7ba33fd1e33ab4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 1 Aug 2024 11:50:38 +0800 Subject: vim-patch:partial:f10911e: Update runtime files (#29936) https://github.com/vim/vim/commit/f10911e5db16f1fe6ab519c5d091ad0c1df0d063 Also cherry-pick E1142 and E1156 tags from Vim. Co-authored-by: Bram Moolenaar --- runtime/lua/vim/_meta/options.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index fffc561604..ebb6ee2329 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -785,6 +785,17 @@ vim.bo.channel = vim.o.channel --- v:fname_in name of the input file --- v:fname_out name of the output file --- Note that v:fname_in and v:fname_out will never be the same. +--- +--- If the 'charconvert' expression starts with s: or ``, then it is +--- replaced with the script ID (`local-function`). Example: +--- +--- ```vim +--- set charconvert=s:MyConvert() +--- set charconvert=SomeConvert() +--- ``` +--- Otherwise the expression is evaluated in the context of the script +--- where the option was set, thus script-local items are available. +--- --- This option cannot be set from a `modeline` or in the `sandbox`, for --- security reasons. --- -- cgit From 582bf4f1e15988565da53a91395e2d0131628fbb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 1 Aug 2024 10:41:08 +0800 Subject: vim-patch:9.0.0634: evaluating "expr" options has more overhead than needed Problem: Evaluating "expr" options has more overhead than needed. Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr', "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr', 'formatexpr', 'indentexpr' and 'charconvert'. https://github.com/vim/vim/commit/a4e0b9785e409e9e660171cea76dfcc5fdafad9b vim-patch:9.0.0635: build error and compiler warnings Problem: Build error and compiler warnings. Solution: Add missing change. Add type casts. https://github.com/vim/vim/commit/3292a229402c9892f5ab90645fbfe2b1db342f5b Co-authored-by: Bram Moolenaar --- runtime/lua/vim/_meta/options.lua | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index ebb6ee2329..10c888548c 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -786,6 +786,9 @@ vim.bo.channel = vim.o.channel --- v:fname_out name of the output file --- Note that v:fname_in and v:fname_out will never be the same. --- +--- The advantage of using a function call without arguments is that it is +--- faster, see `expr-option-function`. +--- --- If the 'charconvert' expression starts with s: or ``, then it is --- replaced with the script ID (`local-function`). Example: --- @@ -2521,6 +2524,9 @@ vim.wo.fdt = vim.wo.foldtext --- This will invoke the mylang#Format() function in the --- autoload/mylang.vim file in 'runtimepath'. `autoload` --- +--- The advantage of using a function call without arguments is that it is +--- faster, see `expr-option-function`. +--- --- The expression is also evaluated when 'textwidth' is set and adding --- text beyond that limit. This happens under the same conditions as --- when internal formatting is used. Make sure the cursor is kept in the @@ -3286,12 +3292,15 @@ vim.go.inc = vim.go.include --- the script ID (`local-function`). Example: --- --- ```vim ---- setlocal includeexpr=s:MyIncludeExpr(v:fname) ---- setlocal includeexpr=SomeIncludeExpr(v:fname) +--- setlocal includeexpr=s:MyIncludeExpr() +--- setlocal includeexpr=SomeIncludeExpr() --- ``` --- Otherwise, the expression is evaluated in the context of the script --- where the option was set, thus script-local items are available. --- +--- It is more efficient if the value is just a function call without +--- arguments, see `expr-option-function`. +--- --- The expression will be evaluated in the `sandbox` when set from a --- modeline, see `sandbox-option`. --- This option cannot be set in a modeline when 'modelineexpr' is off. @@ -3366,6 +3375,9 @@ vim.go.is = vim.go.incsearch --- Otherwise, the expression is evaluated in the context of the script --- where the option was set, thus script-local items are available. --- +--- The advantage of using a function call without arguments is that it is +--- faster, see `expr-option-function`. +--- --- The expression must return the number of spaces worth of indent. It --- can return "-1" to keep the current indent (this means 'autoindent' is --- used for the indent). @@ -6314,9 +6326,11 @@ vim.bo.spo = vim.bo.spelloptions --- The file is used for all languages. --- --- expr:{expr} Evaluate expression {expr}. Use a function to avoid ---- trouble with spaces. `v:val` holds the badly spelled ---- word. The expression must evaluate to a List of ---- Lists, each with a suggestion and a score. +--- trouble with spaces. Best is to call a function +--- without arguments, see `expr-option-function|. +--- |v:val` holds the badly spelled word. The expression +--- must evaluate to a List of Lists, each with a +--- suggestion and a score. --- Example: --- [['the', 33], ['that', 44]] ~ --- Set 'verbose' and use `z=` to see the scores that the -- cgit From 8df6736ca14d09f87cf0a8486758ac5708819434 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 24 May 2023 10:04:49 +0200 Subject: feat(term): enable reflow by default (#21124) Problem: Contents of terminal buffer are not reflown when Nvim is resized. Solution: Enable reflow in libvterm by default. Now that libvterm is vendored, also fix "TUI rapid resize" test failures there. Note: Neovim's scrollback buffer does not support reflow (yet), so lines vanishing into the buffer due to a too small window will be restored without reflow. --- runtime/lua/vim/_meta/options.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 10c888548c..b4ac478b61 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -5253,6 +5253,9 @@ vim.wo.scr = vim.wo.scroll --- Minimum is 1, maximum is 100000. --- Only in `terminal` buffers. --- +--- Note: Lines that are not visible and kept in scrollback are not +--- reflown when the terminal buffer is resized horizontally. +--- --- @type integer vim.o.scrollback = -1 vim.o.scbk = vim.o.scrollback -- cgit From cfdf68a7acde16597fbd896674af68c42361102c Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 8 Aug 2024 10:42:08 +0200 Subject: feat(mbyte): support extended grapheme clusters including more emoji Use the grapheme break algorithm from utf8proc to support grapheme clusters from recent unicode versions. Handle variant selector VS16 turning some codepoints into double-width emoji. This means we need to use ptr2cells rather than char2cells when possible. --- runtime/lua/vim/_meta/options.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index b4ac478b61..05c9b89d77 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1829,9 +1829,12 @@ vim.go.ead = vim.go.eadirection --- When on all Unicode emoji characters are considered to be full width. --- This excludes "text emoji" characters, which are normally displayed as ---- single width. Unfortunately there is no good specification for this ---- and it has been determined on trial-and-error basis. Use the ---- `setcellwidths()` function to change the behavior. +--- single width. However, such "text emoji" are treated as full-width +--- emoji if they are followed by the U+FE0F variant selector. +--- +--- Unfortunately there is no good specification for this and it has been +--- determined on trial-and-error basis. Use the `setcellwidths()` +--- function to change the behavior. --- --- @type boolean vim.o.emoji = true -- cgit From 3d1110674ec330138ad6675f828673ca32575d4b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 7 Sep 2024 18:50:52 +0800 Subject: vim-patch:9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs (#30293) Problem: Wrong breakindentopt=list:-1 with multibyte chars or TABs in text matched by 'formatlistpat' (John M Devin) Solution: Use the width of the match text (zeertzjq) fixes: vim/vim#15634 closes: vim/vim#15635 https://github.com/vim/vim/commit/61a6ac4d0066317131528f1b3ecc3b3a2599a75c --- runtime/lua/vim/_meta/options.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 05c9b89d77..787e661402 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -558,9 +558,9 @@ vim.wo.bri = vim.wo.breakindent --- list:{n} Adds an additional indent for lines that match a --- numbered or bulleted list (using the --- 'formatlistpat' setting). ---- list:-1 Uses the length of a match with 'formatlistpat' ---- for indentation. --- (default: 0) +--- list:-1 Uses the width of a match with 'formatlistpat' for +--- indentation. --- column:{n} Indent at column {n}. Will overrule the other --- sub-options. Note: an additional indent may be --- added for the 'showbreak' setting. -- cgit From 98ba65b8be8cb2dde839502357e70916c4a3e37a Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Wed, 11 Sep 2024 15:32:08 -0500 Subject: fix: replace NVIM with Nvim in default titlestring (#30348) --- runtime/lua/vim/_meta/options.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 787e661402..7456be0ae0 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -7255,7 +7255,7 @@ vim.go.tm = vim.go.timeoutlen --- When on, the title of the window will be set to the value of --- 'titlestring' (if it is not empty), or to: ---- filename [+=-] (path) - NVIM +--- filename [+=-] (path) - Nvim --- Where: --- filename the name of the file being edited --- - indicates the file cannot be modified, 'ma' off @@ -7263,7 +7263,7 @@ vim.go.tm = vim.go.timeoutlen --- = indicates the file is read-only --- =+ indicates the file is read-only and modified --- (path) is the path of the file being edited ---- - NVIM the server name `v:servername` or "NVIM" +--- - Nvim the server name `v:servername` or "Nvim" --- --- @type boolean vim.o.title = false -- cgit From 7dbbaaec3fae62667b273c4c2d362bee91316083 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 19 Sep 2024 18:05:27 +0800 Subject: refactor!: rename 'jumpoptions' flag "unload" to "clean" (#30418) Follow-up to #29347 --- runtime/lua/vim/_meta/options.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 7456be0ae0..923d279887 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -3577,11 +3577,11 @@ vim.go.js = vim.go.joinspaces --- |alternate-file` or using `mark-motions` try to --- restore the `mark-view` in which the action occurred. --- ---- unload Remove unloaded buffers from the jumplist. +--- clean Remove unloaded buffers from the jumplist. --- EXPERIMENTAL: this flag may change in the future. --- --- @type string -vim.o.jumpoptions = "unload" +vim.o.jumpoptions = "clean" vim.o.jop = vim.o.jumpoptions vim.go.jumpoptions = vim.o.jumpoptions vim.go.jop = vim.go.jumpoptions -- cgit From 2168d772b864fd05109fb4299e409d4bdc1df39d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 2 Oct 2024 07:39:28 +0800 Subject: vim-patch:9.1.0752: can set 'cedit' to an invalid value (#30616) Problem: can set cedit to an invalid value Solution: Check that the value is a valid key name (Milly) closes: vim/vim#15778 https://github.com/vim/vim/commit/25732435c56d762abb260499680939bd8882c708 Co-authored-by: Milly --- runtime/lua/vim/_meta/options.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 923d279887..76715e1d9b 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -731,11 +731,12 @@ vim.go.cd = vim.go.cdpath --- The key used in Command-line Mode to open the command-line window. --- Only non-printable keys are allowed. --- The key can be specified as a single character, but it is difficult to ---- type. The preferred way is to use the <> notation. Examples: +--- type. The preferred way is to use `key-notation` (e.g. , ) or +--- a letter preceded with a caret (e.g. `^F` is CTRL-F). Examples: --- --- ```vim ---- exe "set cedit=\\" ---- exe "set cedit=\\" +--- set cedit=^Y +--- set cedit= --- ``` --- `Nvi` also has this option, but it only uses the first character. --- See `cmdwin`. -- cgit From 6a2f8958e832aebc20cf42d8ade4cb58fe33df9e Mon Sep 17 00:00:00 2001 From: glepnir Date: Thu, 3 Oct 2024 06:45:01 +0800 Subject: vim-patch:9.1.0754: fixed order of items in insert-mode completion menu (#30619) Problem: fixed order of items in insert-mode completion menu Solution: Introduce the 'completeitemalign' option with default value "abbr,kind,menu" (glepnir). Adding an new option `completeitemalign` abbr is `cia` to custom the complete-item order in popupmenu. closes: vim/vim#14006 closes: vim/vim#15760 https://github.com/vim/vim/commit/6a89c94a9eeee53481ced1a1260a177bffde4c0f --- runtime/lua/vim/_meta/options.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 76715e1d9b..04e573c3ed 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -1055,6 +1055,19 @@ vim.o.cfu = vim.o.completefunc vim.bo.completefunc = vim.o.completefunc vim.bo.cfu = vim.bo.completefunc +--- A comma-separated list of `complete-items` that controls the alignment +--- and display order of items in the popup menu during Insert mode +--- completion. The supported values are abbr, kind, and menu. These +--- options allow to customize how the completion items are shown in the +--- popup menu. Note: must always contain those three values in any +--- order. +--- +--- @type string +vim.o.completeitemalign = "abbr,kind,menu" +vim.o.cia = vim.o.completeitemalign +vim.go.completeitemalign = vim.o.completeitemalign +vim.go.cia = vim.go.completeitemalign + --- A comma-separated list of options for Insert mode completion --- `ins-completion`. The supported values are: --- -- cgit From aeea63081c8095f4a40a2c0ef6f4038c065d4714 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 3 Oct 2024 06:58:31 +0800 Subject: vim-patch:ae62fe5: runtime(doc): 'filetype', 'syntax' and 'keymap' only allow alphanumeric + some characters (#30630) closes: vim/vim#15783 https://github.com/vim/vim/commit/ae62fe5c289e148b92b1d0bb912dcce7ebe14602 Co-authored-by: Milly --- runtime/lua/vim/_meta/options.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 04e573c3ed..c48fbab431 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -2218,7 +2218,7 @@ vim.go.fic = vim.go.fileignorecase --- ``` --- `FileType` `filetypes` --- When a dot appears in the value then this separates two filetype ---- names. Example: >c +--- names, it should therefore not be used for a filetype. Example: >c --- /* vim: set filetype=c.doxygen : */ --- ``` --- This will use the "c" filetype first, then the "doxygen" filetype. @@ -2226,7 +2226,7 @@ vim.go.fic = vim.go.fileignorecase --- one dot may appear. --- This option is not copied to another buffer, independent of the 's' or --- 'S' flag in 'cpoptions'. ---- Only normal file name characters can be used, `/\*?[|<>` are illegal. +--- Only alphanumeric characters, '-' and '_' can be used. --- --- @type string vim.o.filetype = "" @@ -3604,7 +3604,7 @@ vim.go.jop = vim.go.jumpoptions --- Setting this option to a valid keymap name has the side effect of --- setting 'iminsert' to one, so that the keymap becomes effective. --- 'imsearch' is also set to one, unless it was -1 ---- Only normal file name characters can be used, `/\*?[|<>` are illegal. +--- Only alphanumeric characters, '.', '-' and '_' can be used. --- --- @type string vim.o.keymap = "" @@ -6874,7 +6874,7 @@ vim.bo.smc = vim.bo.synmaxcol --- Syntax autocommand event is triggered with the value as argument. --- This option is not copied to another buffer, independent of the 's' or --- 'S' flag in 'cpoptions'. ---- Only normal file name characters can be used, `/\*?[|<>` are illegal. +--- Only alphanumeric characters, '.', '-' and '_' can be used. --- --- @type string vim.o.syntax = "" -- cgit From d0dc2920e11363ead767c438f2785c73853bdc46 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 7 Oct 2024 07:30:50 +0800 Subject: vim-patch:fd4e47e: runtime(doc): clarify the effect of 'startofline' option (#30701) fixes: vim/vim#15794 https://github.com/vim/vim/commit/fd4e47e06b77fa26cb38f057aba950449e1f47f6 Co-authored-by: Christian Brabandt --- runtime/lua/vim/_meta/options.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index c48fbab431..27384dbccc 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -6417,7 +6417,8 @@ vim.go.spr = vim.go.splitright --- non-blank of the line. When off the cursor is kept in the same column --- (if possible). This applies to the commands: --- - CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", "gg" ---- - "d", "<<" and ">>" with a linewise operator +--- - "d", "<<", "==" and ">>" with a linewise operator +--- (`operator-resulting-pos`) --- - "%" with a count --- - buffer changing commands (CTRL-^, :bnext, :bNext, etc.) --- - Ex commands that only have a line number, e.g., ":25" or ":+". -- cgit From bf868e76e14447c7fed0c9a778f2e0ec4cb5011a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 7 Oct 2024 10:22:52 +0800 Subject: vim-patch:9.1.0762: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly (#30704) Problem: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly Solution: improve string_to_key() function in option.c (Milly) - Problem: `^@` raises an error. Solution: Store as ``. - Problem: `` is missing. - Problem: Single `<` or `^` raises an error. It is inconvenient for users. Solution: They are stored as a single character. closes: vim/vim#15811 https://github.com/vim/vim/commit/a9c6f90918d0012d1b8c8c5c1dccb77407f553fb Co-authored-by: Milly --- runtime/lua/vim/_meta/options.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 27384dbccc..2bff777899 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -7699,9 +7699,14 @@ vim.go.ww = vim.go.whichwrap --- Some keys will not work, such as CTRL-C, and Enter. --- can be used, but hitting it twice in a row will still exit --- command-line as a failsafe measure. ---- Although 'wc' is a number option, you can set it to a special key: +--- Although 'wc' is a number option, it can be specified as a number, a +--- single character, a `key-notation` (e.g. , ) or a letter +--- preceded with a caret (e.g. `^F` is CTRL-F): --- --- ```vim +--- :set wc=27 +--- :set wc=X +--- :set wc=^I --- set wc= --- ``` --- -- cgit From 61f1b091ea97793f9b644cebf6c84cf6bbb4f0bc Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 7 Oct 2024 08:27:38 -0700 Subject: docs: dev-arch, focusable windows #30510 - 'statuscolumn' is no longer experimental - add tags for popular searches on neovim.io --- runtime/lua/vim/_meta/options.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 2bff777899..ce3ff4f861 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -914,11 +914,10 @@ vim.go.cb = vim.go.clipboard --- used. The command-line will cover the last line of the screen when --- shown. --- ---- WARNING: `cmdheight=0` is considered experimental. Expect some ---- unwanted behaviour. Some 'shortmess' flags and similar ---- mechanism might fail to take effect, causing unwanted hit-enter ---- prompts. Some informative messages, both from Nvim itself and ---- plugins, will not be displayed. +--- WARNING: `cmdheight=0` is EXPERIMENTAL. Expect some unwanted behaviour. +--- Some 'shortmess' flags and similar mechanism might fail to take effect, +--- causing unwanted hit-enter prompts. Some informative messages, both +--- from Nvim itself and plugins, will not be displayed. --- --- @type integer vim.o.cmdheight = 1 @@ -6431,7 +6430,6 @@ vim.o.sol = vim.o.startofline vim.go.startofline = vim.o.startofline vim.go.sol = vim.go.startofline ---- EXPERIMENTAL --- When non-empty, this option determines the content of the area to the --- side of a window, normally containing the fold, sign and number columns. --- The format of this option is like that of 'statusline'. -- cgit