Closed tssm closed 1 year ago
Personally I find it useful to see trailing whitespace in read-only buffers (mostly git diffs and files in /etc).
What you're saying does make sense though... I'll leave this open for a while and see if others agree or disagree.
Just as a reference a buffer with an empty buftype
can still be read only, that depends on readonly
and/or modifiable
options. Confusing, I know 😅
Gotcha, because /etc files have an empty buftype, they still show whitespace. That makes sense. Thanks for explaining.
Fugitive buffers have a nowrite
buftype ... I'd expect them to still show extra whitespace.
I understand not caring about whitespace in help
and quickfix
.
But what about prompt
, popup
, and maybe terminal
? It seems like visible whitespace would still be useful there, wouldn't it?
And the last buftype is nofile
... I have no idea how nofile
buffers are used. Not sure if they should show whitespace or not.
this should be made an option at least if you dont want to make it disabled permanently for non writable buffers
Sure, I'd merge a patch to make it an option.
Personally I still want to see whitespace in my Fugitive buffers.
Closing due to lack of progress. I’d still be interested in merging a patch that either works with fugitive or (if it’s simple) makes it configurable.
It doesn't make sense to highlight whitespace on non-writable buffers because they cannot be changed by the user. By
:help buftype
the only buffers we care about are those whose&buftype
is either empty oracwrite