tab and eol should be with guifg=red
but tab with guifg=red, eol with guifg=green

with the latest vim downloaed via choco install vim
gvim under Windows
Another things I found that highlight **SpecialKey** and **NonText** behavior different between vim and nvim ## vim - `:help SpecialKey` *hl-SpecialKey* SpecialKey Meta and special keys listed with ":map", also for text used to show unprintable characters in the text, 'listchars'. Generally: Text that is displayed differently from what it really is.
:help NonTextNonText '@' at the end of the window, "<<<" at the start of the window
for 'smoothscroll', characters from 'showbreak' and other
characters that do not really exist in the text, such as the
">" displayed when a double-wide character doesn't fit at the
end of the line.
:help SpecialKey *hl-SpecialKey*
SpecialKey Unprintable characters: Text displayed differently from what
it really is. But not 'listchars' whitespace. |hl-Whitespace|
:help NonText *hl-NonText*
NonText '@' at the end of the window, characters from 'showbreak'
and other characters that do not really exist in the text
(e.g., ">" displayed when a double-wide character doesn't
fit at the end of the line). See also |hl-EndOfBuffer|.
vim treats both keys listed with :map and listchars as SpecialKey. Sometimes we want color of listchars lighter (since tab,eol in source code should be lighter), but with keys listed with :map with darker color.
Personally I prefer nvim's solution to SpecialKey (without listchars) and NonText
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I might be missing something, but Vim is exactly behaving like what is documented, isn't it? I am sure, if we change it, people will also complain, so that may not be the best idea.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Hi, @chrisbra
I think both tab and eol are listchars. And according :help SpecialKey, the color of all listchars are set by highlight SpecialKey guifg=red gui=NONE. It should be expected that both tab and eol are in Red color. But it seems that the color of eol is indicated by setting of NonText which is green.
About the difference between vim and nvim, it's a suggestion that I think vim can take into consideration.
:help listchars *'listchars'* *'lcs'*
'listchars' 'lcs' string (default "eol:$")
global or local to window |global-local|
Strings to use in 'list' mode and for the |:list| command. It is a
comma-separated list of string settings.
*lcs-eol*
eol:c Character to show at the end of each line. When
omitted, there is no extra character at the end of the
line.
*lcs-tab*
tab:xy[z] Two or three characters to be used to show a tab.
The third character is optional.
...
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
yes, but there is a difference between unprintable characters in the text and characters that do not really exist in the text. So in this case it makes sense to distinguish between NonText and SpecialKey, because the eol char is not really there in the text.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks for you explanation.
From this perspective, I can understand why color of eol is green.
But I think it is a little bit confusion that not all listchars with the same color.
And keys listed with :map and some of listchars have the same color is not a good choice.
In pracice, I would set color of tab in lighter color (without setting any other listchars) than the normal source code, but this setting will also cause keys listed with :map in lighter color which is not what I wanted.
Anyway, this should not a bug, just an improvement or suggestion.
Thanks for your time.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #12472 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
In case someone has interest in this.
Just add a link to nvim's implementation about adding new higlight ground Whitespace for listchars
[RDY] new highlight group Whitespace for 'listchars'
:help hl-Whitespace *hl-Whitespace*
Whitespace "nbsp", "space", "tab", "multispace", "lead" and "trail"
in 'listchars'.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()