:help hl-NonText
makes it pretty clear that you cannot have different colors for the 'showbreak'
string and other non-text strings, of which eol
is a member (see :help 'listchars'
):
NonText
'~' and '@' 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).
If you're willing to accept this limitation (@elliottcable) hi! link NonText LineNr
will match the 'showbreak'
string to the line number colors.
If you really wanted to get clever, as a compromise you could create a mapping or command to toggle between ':set list'
and ':set nolist'
that would also adjust the NonText
highlight
setting simultaneously.
If you use :set relativenumber
(added in vim 7.3), :set showbreak=↳\ \ \
will reliably keep your 'showbreak'
neatly lined up since the number width will not change as you navigate through the file. (This in addition to the :set cpo+=n
and :set wrap
@Randy Morris mentioned in his answer.)
You'll definitely need UTF-8 for the ↳
character, since it does not appear in other encodings. I'd strongly recommend you carefully document your encoding problems, with details about how to reproduce them along with your OS, its version, and the :version
output of vim, and post them as separate questions. UTF-8 should be helping you wrangle multiple languages rather than being an impediment.