mirror of
https://github.com/scopatz/nanorc
synced 2024-11-23 10:50:26 +01:00
36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
## Here is an example for Python.
|
|
##
|
|
syntax "python" "\.py$"
|
|
icolor brightred "def [0-9A-Z_]+"
|
|
|
|
|
|
|
|
#Keyword Color
|
|
color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>"
|
|
color brightmagenta "\<(continue|break|return)\>"
|
|
|
|
# decorator color
|
|
color brightgreen "@.*[(]"
|
|
|
|
#Operator Color
|
|
color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
|
|
|
|
#Parenthetical Color
|
|
color magenta "[(){}]" "\[" "\]"
|
|
|
|
#String Color
|
|
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
|
|
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
|
|
|
|
color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
|
|
#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
|
|
#color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''"
|
|
#color cyan start=""""" end=""""" start="'''" end="'''"
|
|
#color cyan start="("""[^"]|[^"]""")" end="("""[^"]|[^"]""")" start="'''[^']" end="'''"
|
|
#color cyan start="\"\"\"" end="\"\"\""
|
|
|
|
|
|
#Comment Color
|
|
color brightblue "#.*$"
|
|
|