nanorc/python.nanorc

36 lines
1.0 KiB
Plaintext
Raw Normal View History

2010-07-28 17:15:43 -05:00
## 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)\>"
2010-07-28 17:15:43 -05:00
color brightmagenta "\<(continue|break|return)\>"
2012-08-03 10:24:53 -06:00
# decorator color
2012-12-20 22:44:04 -06:00
color brightgreen "@.*[(]"
2012-08-03 10:24:53 -06:00
2010-07-28 17:15:43 -05:00
#Operator Color
2012-08-03 10:24:53 -06:00
color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
2010-07-28 17:15:43 -05:00
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
#String Color
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
2012-02-20 01:08:36 -06:00
color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
2012-02-10 16:37:09 -06:00
#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="\"\"\""
2010-07-28 17:15:43 -05:00
2012-02-20 13:51:25 -06:00
#Comment Color
color brightblue "#.*$"