Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
I indent using spaces and would like the listchars to reflect the current
shiftwidth() setting automatically. This is not impossible to achieve,
everything required is already implemented for other features:
changing indent representation depending on actual indent width and
current indent settings: leadtab, special settings for leading
spaces: lead and leadmultispace
Describe the solution you'd like
I would like to have listchars lead option to optionally accept a
second and optionally third character.
With lcs=lead:x the current behaviour stays unchanged
with lcs=lead:xy and lcs=lead:xyz it behaves like leadtab:xy and leadtab:xyz
respectively but for space indents and with the difference that it uses shiftwidth() as width.
This should not override leadmultispace. I would like to use it temporarily as a
ruler (lcs+=leadmultispace:1234567890) that doesn't require changing the
actual indent width.
Describe alternatives you've considered
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Apparently this has been rediscovered at least once: look at my reddit post, which is even older.
Today I have a different implementation in vim9script, which I think is a bit nicer than the one mentioned by @gcanat
def SetIndentGuides(): void var lm = repeat('\ ', &sw - 1) execute 'setlocal listchars+=leadmultispace:▏' .. lm enddef augroup SetIndentGuides autocmd! autocmd FileType * SetIndentGuides() # add more events if needed augroup END
So, at least a few people like automatic indent guides, and it'd be nice to have it builtin. On the other hand, the autocmd fix is not hard. Someone more familiar with the codebase than me should judge whether implementing this feature is worth the trouble.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Other places where this was rediscovered:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()