2006-06-01 17:23:28 +00:00
## Here is an example for Python.
2014-05-16 20:21:34 +00:00
2006-06-01 17:23:28 +00:00
syntax "python" "\.py$"
2014-09-21 15:29:40 +00:00
header "^#!.*python[-0-9._]*"
2014-05-12 16:01:57 +00:00
# Function definitions.
2006-06-01 17:23:28 +00:00
icolor brightblue "def [0-9A-Z_]+"
2014-05-12 16:01:57 +00:00
# Keywords.
2008-10-01 00:55:13 +00:00
color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>"
2014-05-12 18:10:08 +00:00
2014-05-12 16:01:57 +00:00
# Strings.
2006-12-24 18:17:28 +00:00
color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
2014-05-12 16:01:57 +00:00
# Multiline strings.
color brightgreen start="\"\"\"([^"),]|$)" end="(^|[^(])\"\"\""
color brightgreen start="'''([^'),]|$)" end="(^|[^(])'''"
2014-05-12 18:10:08 +00:00
2014-05-12 16:01:57 +00:00
# Comments.
color brightred "(^|[[:blank:]])#.*$"
2014-05-12 18:10:08 +00:00
# Reminders.
color ,yellow "(FIXME|TODO|XXX)"
2014-03-24 12:45:20 +00:00
2014-05-12 16:01:57 +00:00
# Trailing whitespace.
2014-03-24 12:45:20 +00:00
color ,green "[[:space:]]+$"