nano-syntax-highlighting/python.nanorc

22 lines
604 B
Plaintext

#
# Monokai like theme for python as used in PyCharm IDE
#
syntax python "\.py$"
header "^#!.*python"
magic "Python script"
comment "#"
color white ".*"
color cyan "\w+\("
color orange "def \w+\(.*\):"
color green "def \w+\("
color brightcyan "\b(class|def|import|return|for|while|in|if|elif|else|raise|is|not|and|or|with|continue|break|try|except|finally)(:| )"
color cyan "\b(True|False|None)"
color white ": *\w+ *(,|\))"
color red "(=|·|\/|\+|-|\*|\!|>|<|:)"
color white "(\(|\)|,|\.|->)"
color brightmagenta "([0-9]|[0-9]+\.[0-9]+|self)"
color grey "#.*"
color yellow "(\"|').*?(\"|')"