How to disable syntax highlighting in nano
To temporarily disable syntax highlighting in GNU nano, use the -Ynone option:
Instead of
nano_open.sh
nano myfile.phpuse
nano_disable_syntax.sh
nano -Ynone myfile.phpIn order to permanently disable nano syntax highlighting, run this command**:**
nano_disable_persist.sh
echo "alias nano='nano -Ynone'" >> ~/.$(echo $SHELL | rev | cut -d/ -f1 | rev)rc
source ~/.$(echo $SHELL | rev | cut -d/ -f1 | rev)rc # Reload immediatelyThis will add nano -Ynone as an alias for nano into your .bashrc or .zshrc
Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow