How to turn OFF (or at least override) syntax highlighting in nano via ~/.nanorc?

seanomlor picture seanomlor · Nov 3, 2012 · Viewed 14.8k times · Source

I am struggling finding a clear answer on disabling or overriding the color settings for the nano editor.

By default color syntax highlighting is enabled on my system. Clicking ALT+Y disables this, which is exactly what I want my default to be.

Any ideas?

Answer

Jürgen G. picture Jürgen G. · Apr 29, 2013

To disable syntax highlighting write following lines into ~/.nanorc:

set quiet
syntax "disabled" "."

The first line prevent error reporting. The second line defines a new color syntax.

You can also define a single syntax containing your favorite color in your ~/.nanorc:

syntax "disabled" "."
color brightgreen,black "."

I hope this helps.