My nano editor can’t read tags

nanowindows-subsystem-for-linux

I normally use nano edit, however, today when I open it, it didn't show "<>" and character next to it. I have reinstalled Ubuntu and the problem is still there.

In the image below it doesn't show "<role" for example:

Screenshot showing error

I know they are missing because when I add a comment "<role" shows up:

Screenshot showing expected output

Best Answer

Now that we have established that you have black text on black background, I imagine there are 2 possible solutions:

  1. Either it's the color settings in your terminal application
  2. Or a problem with the color settings in your <fileformat>.nanorc files

For 1, you have to explore the settings of your terminal application, and see it the colors are defined in such a way that one of the foreground colors are set to black.

For 2, go to this directory:

cd /usr/share/nano/

Here you will find a number of syntax highlighting files, especially check out html.nanorc and xml.nanorc.

By adjusting these, you should be able to test if you can set different colors, so that it works for you.

Please try the above 2 things, I'm pretty sure at least one of them can fix your issue.

Related Question