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