I am using the Nano text editor.
Before, there was color on every command I typed, but now I don't know what buttons I pressed as there are no more colors.
How to bring back on the syntax coloring?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityYou probably pressed Meta+Y, that Meta usually is Right Alt, so Right Alt+Y.
Press it again to undo the change.
You can also force colors temporarily with; taken from the --help
:
-Y <name> --syntax=<name> Syntax definition to use for coloring
Usage:
nano -Y sh assign
Also, implicitly, the file must be marked executable in order for the syntax coloring to come up automatically, so just a quick check:
ls -l assign