blob: 7d4c40bfa5d6107f02d904b8097fe08df552bc5e [file] [log] [blame]
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +00001## Here is an example for Python.
Benno Schulenbergfe9da942014-05-16 20:21:34 +00002
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +00003syntax "python" "\.py$"
Benno Schulenbergedabd272014-09-21 15:29:40 +00004header "^#!.*python[-0-9._]*"
Benno Schulenberg3de2c702015-04-18 11:35:23 +00005linter pyflakes
Mike Scalora6a2032f2016-05-25 22:13:50 +02006comment "#"
Benno Schulenbergd17b4802014-05-12 16:01:57 +00007
8# Function definitions.
David Lawrence Ramsey5e6434c2006-06-01 17:23:28 +00009icolor brightblue "def [0-9A-Z_]+"
Benno Schulenbergd17b4802014-05-12 16:01:57 +000010# Keywords.
Benno Schulenberged2f0b32015-02-21 10:34:15 +000011color brightcyan "\<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from)\>"
12color brightcyan "\<(global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>"
Benno Schulenberg4e628422014-05-12 18:10:08 +000013
Benno Schulenberg1ea76eb2015-12-02 10:29:18 +000014# Single-quoted strings.
15color brightgreen "'([^'\]|\\.)+'"
16color brightgreen ""([^"\]|\\.)+""
Benno Schulenberge39cf372015-03-25 13:50:12 +000017# Comments.
18color brightred "(^|[[:blank:]])#.*$"
Benno Schulenberg1ea76eb2015-12-02 10:29:18 +000019# Triple-quoted strings.
20color brightgreen start="'''[^'),]" end="(^|[^(\])'''"
21color brightgreen start="\"\"\"[^"),]" end="(^|[^(\])\"\"\""
Benno Schulenberg4e628422014-05-12 18:10:08 +000022
Benno Schulenberg4e628422014-05-12 18:10:08 +000023# Reminders.
24color ,yellow "(FIXME|TODO|XXX)"
Benno Schulenberg27975212014-03-24 12:45:20 +000025
Benno Schulenbergd17b4802014-05-12 16:01:57 +000026# Trailing whitespace.
Benno Schulenberg27975212014-03-24 12:45:20 +000027color ,green "[[:space:]]+$"