I can't find a way to make Vim show all white spaces as a character. All I found was about tabs, trailing spaces etc.
I can't find a way to make Vim show all white spaces as a character. All I found was about tabs, trailing spaces etc.
To cover Unicode whitespace characters:
set list
set listchars=tab:│\ ,nbsp:·
highlight StrangeWhitespace guibg=Red ctermbg=Red
" The list is from https://stackoverflow.com/a/37903645 (with `\t`, `\n`, ` `, `\xa0` removed):
call matchadd('StrangeWhitespace', '[\x0b\x0c\r\x1c\x1d\x1e\x1f\x85\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]')
The result:
").│ " (two characters: a long pipe and then an ordinal space; they are gray in colorscheme murphy).·" (one character; it's gray in colorscheme murphy). ").Keep those hacks in the .vimrc as comments, so in the shell, simply :
echo '
" how-to see the non-visible while spaces
" :set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣
" set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
" :set list
" but hei how-to unset the visible tabs ?!
" :set nolist
' >> ~/.vimrc