Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 start="#" end="$"
color yellow "//.*"
In /etc/nanorc add:
## PHP
include "/usr/share/nano/php.nanorc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.