0

So I along with a few others are planning to start a company, and we are using an ubuntu server to host our website. Originally we put it on an old laptop and installed Ubuntu server 15.10. Now it is in a desktop server running on 14.04.3 LTS. When we moved our html files over to the desktop, nano stopped highlighting the syntax for the html files, even though the nanorc file in /etc/ has set to include html and so does the user's .nanorc file. This makes it difficult because all of the text is dark blue against a black background.

User's .nanorc file Nano not highlighting

  • It could have to do with the downgrade to 14.04.3 – QwertyChouskie Jan 15 '16 at 20:50
0

Try this:

sudo cp /usr/share/nano/html.nanorc /usr/share/nano/html.nanorc.bak
sudo nano /usr/share/nano/html.nanorc

in this folder replace contents with:

## Here is a short improved example for HTML.
##
syntax "HTML" "\.htm[l]?$"
color brightblue start="<" end=">"
color red "&[^;[[:space:]]]*;"
color yellow ""[^"]*"|qq\|.*\|"
color red "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)="

That code is courtesy of scopatz at github url: https://github.com/scopatz/nanorc

Close and reopen terminal, then try nano into an html file.

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.