How to disable syntax highlighting in nano

To temporarily disable syntax highlighting in GNU nano, use the -Ynone option:

Instead of

nano myfile.php

use

nano -Ynone myfile.php

In order to permanently disable nano syntax highlighting, run this command**:**

echo "alias nano='nano -Ynone'" >> ~/.$(echo $SHELL | rev | cut -d/ -f1 | rev)rc
source ~/.$(echo $SHELL | rev | cut -d/ -f1 | rev)rc # Reload immediately

This will add nano -Ynone as an alias for nano into your .bashrc or .zshrc