list feature can be used to reveal hidden characters, such as tabstops and newlines. In this episode, I demonstrate how to customise the appearance of these characters by tweaking the
listchars setting. I go on to show how to make these invisible characters blend in with your colortheme.
Put the following in your
" Shortcut to rapidly toggle `set list` nmap <leader>l :set list!<CR> " Use the same symbols as TextMate for tabstops and EOLs set listchars=tab:▸\ ,eol:¬
If you like, you can customise other invisible characters besides tabs
and end-of-lines. For more information, run
You can customise the syntax highlighting colours of invisible characters with
SpecialKey keywords. In my prefered colourtheme, I have added the following lines:
"Invisible character colors highlight NonText guifg=#4a4a59 highlight SpecialKey guifg=#4a4a59
Unicode characters can be inserted by typing
ctrl-vu followed by the 4 digit hexadecimal code.
|▸||U+25B8||black right-pointing small triangle|
|☠||U+2620||skull and crossbones|
|❤||U+2764||heavy black heart|