Skip to content

Instantly share code, notes, and snippets.

@clemblanco
Created March 10, 2015 10:08
Show Gist options
  • Save clemblanco/461c53aef053fc2aaead to your computer and use it in GitHub Desktop.
Save clemblanco/461c53aef053fc2aaead to your computer and use it in GitHub Desktop.
Nano PHP Color Syntax
# /usr/share/nano/php.nanorc
syntax "php" "\.php[2345s~]?$"
color brightblue start="<\?(php)?" end="\?>"
color blue start="<[^\?]" end="[^\?]>"
color magenta "\$[a-zA-Z_0-9]*"
color cyan "(\[)|(\])"
color cyan "(function|extends|use|namespace|var|class|function|echo|case|break|default|exit|switch|if|else|elseif|@|while)\s"
color cyan "parent\:\:"
color cyan "function\s[a-zA-Z_0-9]*"
color cyan "(return|public|protected|private)\s"
color cyan "="
color cyan "=>"
color white "->"
color white "[,{}()]"
color green "=="
color green "('[^']*')|(\"[^"]*\")"
color yellow start="<!--" end="-->"
color yellow start="/\*" end="\*/"
color yellow start="#" end="$"
color yellow "//.*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment