Show trailing whitespace in Vim

A small snippet of code showing trailing whitespace being shown in vim
A small snippet of code showing trailing whitespace being shown in vim

Vim is a wonderful command line text editor with syntax highlighting and everything you could ask for provided you turn on the functionality. Recently i was shown that it was also show trailing whitespace with a quick addition to the .vimrc file.

All you need to do is add the following:

set list
set listchars=tab:→\ ,trail:☃

Thanks to Sam for showing me this, Here is his full vimrc or a directory of all of his settings files. Have a browse!

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.