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

For future references, I would add that you can run nano without colors using the command line parameter -Y

nano -Ynone myfile.txt

The "none" syntax is reserved; specifying it on the command line is the same as not having a syntax at all.

You can set an alias in your .bash_profile file:

alias nano='nano -Ynone'

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.


This worked for me better than above since I run a white background terminal. It just makes all the text black again.

set quiet
syntax "disabled" "."
color black "."