Vim - listchars
Do you use :set list? I do sometimes - and this for a good reason. I once got from somewhere a code snippet and it was not compileable. It took me a while to figure out what was wrong with the code. You know - one of those moments when you want to smash everything into millions of pieces. Oh no no no, the code was fine, but there was a fucking non-breakable-whitespace somewhere. Looks like a normal whitespace but is a pain in the ass.
Afterwards I figured out that Vim can actually display this type of characters and some more. Check the Vim help for more info.
In the beginning I just extended the listchars string and kept the default $ for eol. Then I realized using a $ as an indicator for the end of a line is weird when your last character in a line is a $ too.
Many moons later I found this symbols overview on my Mac and I thought "Hey, can Vim (MacVim) display them?". Yes, at least some of them.
You can copy the symbols and paste them into a file to see how they look like inside Vim. Here are a bunch of them.
↩ ↵ ↲ ␣ • … → » ∎ ¶ ▶ ▸ ▷ ▹
My current listchars is this.
set listchars=eol:↲,tab:▶▹,nbsp:␣,extends:…,trail:•
And this is how it looks like with :set nolist and with :set list.
Notes:
the extends character is always visible (if :set nowrap)
the tab expects 2 characters
some characters may work better with a different font type but I do not recommend to change your favorite font just for the list characters
try different characters cause they always look different inside Vim

















