1
0
mirror of https://github.com/scopatz/nanorc synced 2024-11-05 09:10:00 +01:00
nanorc/python.nanorc

29 lines
816 B
Plaintext
Raw Normal View History

2010-07-29 00:15:43 +02: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-29 00:15:43 +02:00
color brightmagenta "\<(continue|break|return)\>"
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
2012-02-20 08:08:36 +01:00
#Comment Color
color brightblue "#.*$"
2010-07-29 00:15:43 +02:00
#String Color
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
2012-02-20 08:08:36 +01:00
2012-02-10 23:37:09 +01:00
#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
2012-02-20 08:08:36 +01:00
#color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''"
2010-07-29 00:15:43 +02:00