From 3e810722934509b93936e9094a6fc381c0bc1c40 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 3 Mar 2026 07:45:33 +0800 Subject: vim-patch:9.2.0088: cannot display tabs for indentation Problem: cannot display tabs for indentation Solution: Add the "leadtab" value to the 'listchars' option to distinguish between tabs used for indentation and tabs used for alignment (HarshK97). closes: vim/vim#19094 https://github.com/vim/vim/commit/8526d32647245b3b623986949e7807b4b353e624 Co-authored-by: HarshK97 --- runtime/lua/vim/_meta/options.lua | 9 +++++++++ 1 file changed, 9 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 e0747c0041..58e3e2c2b5 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -4180,6 +4180,15 @@ vim.wo.list = vim.o.list --- --- Where "XXX" denotes the first non-blank characters in --- the line. +--- *lcs-leadtab* +--- leadtab:xy[z] +--- Like `lcs-tab`, but only for leading tabs. When +--- omitted, the "tab" setting is used for leading tabs. +--- `lcs-tab` must also be set for this to work. *E1572* +--- You can combine it with "tab:", for example: +--- `:set listchars=tab:>-,leadtab:.\ ` +--- This shows leading tabs as periods(.) and other tabs +--- as ">--". --- *lcs-trail* --- trail:c Character to show for trailing spaces. When omitted, --- trailing spaces are blank. Overrides the "space" and -- cgit v1.3-3-g829e From f1c57b39fd5e8abd4dfe276d793450b541f549d5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 3 Mar 2026 08:08:12 +0800 Subject: vim-patch:73f4162: runtime(doc): Tweak doc style in options.txt https://github.com/vim/vim/commit/73f41626df1f1764007f073088048ffea4f970c4 Co-authored-by: Hirohito Higashi --- runtime/doc/options.txt | 8 ++++---- runtime/lua/vim/_meta/options.lua | 9 ++++++--- src/nvim/options.lua | 8 ++++---- 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'runtime/lua/vim/_meta/options.lua') diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 76b982d9d2..92c407406d 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4102,7 +4102,7 @@ A jump table for the options with a short description can be found at |Q_op|. 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: >vim - set list lcs=tab:\ \ + let &list = v:true | let &lcs = 'tab: ' < Note that list mode will also affect formatting (set with 'textwidth' or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for @@ -4175,9 +4175,9 @@ A jump table for the options with a short description can be found at |Q_op|. Like |lcs-tab|, but only for leading tabs. When omitted, the "tab" setting is used for leading tabs. |lcs-tab| must also be set for this to work. *E1572* - You can combine it with "tab:", for example: - `:set listchars=tab:>-,leadtab:.\ ` - This shows leading tabs as periods(.) and other tabs + You can combine it with "tab:", for example: >vim + let &listchars = 'tab:>-,leadtab:. ' +< This shows leading tabs as periods(.) and other tabs as ">--". *lcs-trail* trail:c Character to show for trailing spaces. When omitted, diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 58e3e2c2b5..99bd6ede5d 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -4097,7 +4097,7 @@ vim.go.lw = vim.go.lispwords --- position while displaying Tabs with spaces, use: --- --- ```vim ---- set list lcs=tab:\ \ +--- let &list = v:true | let &lcs = 'tab: ' --- ``` --- --- Note that list mode will also affect formatting (set with 'textwidth' @@ -4186,8 +4186,11 @@ vim.wo.list = vim.o.list --- omitted, the "tab" setting is used for leading tabs. --- `lcs-tab` must also be set for this to work. *E1572* --- You can combine it with "tab:", for example: ---- `:set listchars=tab:>-,leadtab:.\ ` ---- This shows leading tabs as periods(.) and other tabs +--- +--- ```vim +--- let &listchars = 'tab:>-,leadtab:. ' +--- ``` +--- This shows leading tabs as periods(.) and other tabs --- as ">--". --- *lcs-trail* --- trail:c Character to show for trailing spaces. When omitted, diff --git a/src/nvim/options.lua b/src/nvim/options.lua index d818bf0e5f..24acc80202 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -5387,7 +5387,7 @@ local options = { 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: >vim - set list lcs=tab:\ \ + let &list = v:true | let &lcs = 'tab: ' < Note that list mode will also affect formatting (set with 'textwidth' or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for @@ -5469,9 +5469,9 @@ local options = { Like |lcs-tab|, but only for leading tabs. When omitted, the "tab" setting is used for leading tabs. |lcs-tab| must also be set for this to work. *E1572* - You can combine it with "tab:", for example: - `:set listchars=tab:>-,leadtab:.\ ` - This shows leading tabs as periods(.) and other tabs + You can combine it with "tab:", for example: >vim + let &listchars = 'tab:>-,leadtab:. ' + < This shows leading tabs as periods(.) and other tabs as ">--". *lcs-trail* trail:c Character to show for trailing spaces. When omitted, -- cgit v1.3-3-g829e