16

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?

  • Do you have solarized or another color scheme enabled in the terminal/emulator? – lthreed Aug 19 '14 at 02:41
  • I changed the default background from system to black. It seems to be some setting in nano. –  Aug 20 '14 at 01:02

2 Answers2

18

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.

1

Ctrl + G -> Help

there is:

Alt + Y -> Color syntax highlighting enable/disable

Helps for me. Also many other cool features!

RobC
  • 22,977
  • 20
  • 73
  • 80
nefton
  • 101
  • 3