The trail
, tab
and nbsp
listchars use the SpecialKey
highlight group, so you can use this:
highlight SpecialKey ctermfg=8
to make the $
symbol grey. If you have 256 colors enabled, you can use a different shade of grey, like 243, etc.
The trail
, tab
and nbsp
listchars use the SpecialKey
highlight group, so you can use this:
highlight SpecialKey ctermfg=8
to make the $
symbol grey. If you have 256 colors enabled, you can use a different shade of grey, like 243, etc.
There are two highlighting groups: SpecialKey and NonText. The trailing characters you mention belong to the NonText one.
Try something like this (y/pasted):
set list
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
hi NonText ctermfg=7 guifg=gray
Does that work for you, or did I understand the question wrong (quite possible).
If you want the eol to be gray, specify the eol suboption of listchars
instead of trail:
set list listchars=tab:>>,eol:$
trail shows the unnecessary whitespace characters at the end of the lines, not the end of lines themselves.
If you want to set the color of eol, you have to set the highlighting of the NonText
group:
highlight NonText ctermfg=8 guifg=gray
If you specify both ctermfg
and guifg
, the highlighting will work both in the GUI and in a terminal.
I have to point out though some shortcomings:
NonText
. So if you set gray eols, you will be gray tildes.ctermfg=8
makes red and not gray text.