annotate nanorc.d/php.nanorc @ 86:3f3f641d5a8b

Tidy up some tag oddities
author IBBoard <dev@ibboard.co.uk>
date Mon, 02 Apr 2018 16:47:17 +0100
parents ef08bb127ede
children 7d8c0070471c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
85
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
1 ## Here is an example for PHP.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
2
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
3 syntax php "\.(php[23457s~]?|html?)$"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
4 magic "PHP script"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
5 comment "//"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
6
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
7 # PHP code
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
8 color black start="<\?(php|=)?" end="\?>"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
9
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
10
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
11 # Function names.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
12 #color white "\<[A-Za-z_][A-Za-z_0-9]*\("
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
13 # Variable names.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
14 #color cyan "\$[A-Za-z_][A-Za-z_0-9]*"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
15
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
16 # Types.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
17 color cyan "\<(array|bool|callable|const|float|global|int|object|string|var)\>"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
18
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
19 # Directives and structure.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
20 color cyan "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
21 color cyan "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
22 # Operators.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
23 color red "&&|\|\||>=?|<=?|===?|!==?|!"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
24 color black "[-=]>"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
25
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
26 color magenta "\$this"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
27
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
28 # Control flow.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
29 color magenta "\<(break|continue|goto|return)\>"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
30
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
31 # Strings.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
32 color yellow ""(\.|[^"])*"" "'(\.|[^'])*'"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
33
86
3f3f641d5a8b Tidy up some tag oddities
IBBoard <dev@ibboard.co.uk>
parents: 85
diff changeset
34 # Numbers
3f3f641d5a8b Tidy up some tag oddities
IBBoard <dev@ibboard.co.uk>
parents: 85
diff changeset
35 color blue "\b[0-9]+\b"
3f3f641d5a8b Tidy up some tag oddities
IBBoard <dev@ibboard.co.uk>
parents: 85
diff changeset
36
85
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
37 # Comments.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
38 color green "(^|[[:space:]]+)//.*"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
39 color green start="/\*" end="\*/"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
40
84
b989099cde9f Start to update Nano colourisation
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 # General HTML
86
3f3f641d5a8b Tidy up some tag oddities
IBBoard <dev@ibboard.co.uk>
parents: 85
diff changeset
42 color brightblue start="<[a-zA-Z/]" end=">"
85
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
43 color red "&[^;[[:space:]]]*;"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
44 color yellow "[a-zA-Z_-]+=["']?[^"']+["']"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
45 color green start="<!--" end="-->"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
46 color white start="<!DOCTYPE" end=">"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
47 # xhtml
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
48 color white start="<\?xml" end="\?>"
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
49
86
3f3f641d5a8b Tidy up some tag oddities
IBBoard <dev@ibboard.co.uk>
parents: 85
diff changeset
50 # PHP tags
3f3f641d5a8b Tidy up some tag oddities
IBBoard <dev@ibboard.co.uk>
parents: 85
diff changeset
51 color brightblue "<\?(php|=)|\?>"
85
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
52
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
53 # Trailing whitespace.
ef08bb127ede Ditch third-party nanorc configs and just add what we use
IBBoard <dev@ibboard.co.uk>
parents: 84
diff changeset
54 color ,green "[[:space:]]+$"