Add syntax support to nano

sudo nano /usr/share/nano/php.nanorc
syntax "php" "\.php|\.inc$"
color white start="<\?(php)?" end="\?>"
color magenta start="<[^\?]" end="[^\?]>"
color magenta "\$[a-zA-Z_0-9]*"
color brightblue "\->[a-zA-Z_0-9]*"
color cyan "(\[)|(\])"
color brightyellow "(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while|return|public|private|proteted|static)\s"
color brightyellow "\<(try|throw|catch|operator|new)\>"
color white "="
color green "[,{}()]"
color green "=="
color brightgreen "('[^']*')|(\"[^"]*\")"
color yellow start="/\*" end="\*/"
color yellow start="#" end="$"
color yellow "//.*"

Get themes

You can download themes from here Then, with this

Now, if you want to add syntax highlighting.

# sudo mkdir ~/.nano/
ls ~/.nano/*.nanorc | xargs -I {} echo 'include "{}"' >> ~/.nanorc