Is it possible in Vim to have my editor (when editing .c
and .h
files), show via listchars
, a special character only for leading space characters?
I found a separate post that noted, as of version 7.4, Vim now supports highlighting all space characters via listchars
. Here's my current listchars
variable:
set list listchars=tab:>-,trail:.,extends:>,precedes:<,space:.
And here is a render of how it appears on my screen:
However, I would like it to appear like so (below), where only leading spaces are rendered via listchars
, and spaces occurring after indentation-related spaces are not rendered. ie:
Is there a simple way to accomplish this, either via color scheme or .vimrc
changes?
Image diff in case the difference isn't obvious due to low contrast: