At the moment, I'm trying to highlight the spaces/tabs used for indentation and the end-of-line with special characters.
Although I prefer tabs over spaces I also need the spaces highlighted in order to easily differentiate spaces against tabs if there is an indentation mistake I made or see the spaces when I'm coding in Haskell.
Based on the above, the related configuration in my .vimrc
is:
set tabstop=2▸▸ ▸ ▸ ▸ ▸ " number of visual spaces per TAB¬
set shiftwidth=2▸ ▸ ▸ ▸ " number of space characters inserted for indentation¬
set softtabstop=2▸▸ ▸ ▸ " number of spaces in a tab while editing¬
set noexpandtab▸▸ ▸ ▸ ▸ " tabs are tabs, not spaces¬
set autoindent¬
set list listchars=tab:▸\ ,eol:¬,precedes:• " show invisibles¬
As can be seen, the listchars
options work fine for the tabs and end-of-line but I can't make the preceding space before a line get marked with the character I've defined(I've intentionally left out a preceding space in the above config. In the actual file, a preceding space is just a space but not the character I've defined it to be).
I went through the documentation and tried various options but couldn't get my head around it.
Am I missing something or is there a configuration conflict that I'm not aware of since I'm preferring tabs over spaces?