Nano colors spaces and tabs

user2913690 picture user2913690 · Aug 19, 2014 · Viewed 11.9k times · Source

When I use nano to edit my C file it shows all of the spaces or tabs in green coloring. I thought this may have been an issue with "whitespace display" and tried enabling and disabling it but it didnt work. I have also tried uninstalling and reinstalling nano and that didnt work either.

Any ideas on what this could be and how to fix it?

Answer

user2913690 picture user2913690 · Aug 23, 2014

I just discovered the cause of this. By default in the /usr/share/c.nanorc file "Trailing Whitespace" is turned on all the time. This was annoying to me so I commented it out, ##, do stop it from appearing.