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?

screen of my assignment


You 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


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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.