-filetype: python
+filetype: python2
detect:
- filename: "\\.py$"
- header: "^#!.*/(env +)?python( |$)"
+ filename: "\\.py2$"
+ header: "^#!.*/(env +)?python2$"
rules:
# decorators
- brightgreen: "@.*[(]"
# operators
- - statement: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
+ - symbol.operator: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
# parentheses
- - statement: "([(){}]|\\[|\\])"
+ - symbol.brackets: "([(){}]|\\[|\\])"
# numbers
- constant.number: "\\b[0-9]+\\b"
+ - constant.string:
+ start: "\"\"\""
+ end: "\"\"\""
+ rules: []
+
+ - comment:
+ start: "'''"
+ end: "'''"
+ rules: []
+
- constant.string:
start: "\""
end: "\""
+ skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
+ skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
end: "$"
rules: []
- - comment:
- start: "\"\"\""
- end: "\"\"\""
- rules: []
-
- - comment:
- start: "'''"
- end: "'''"
- rules: []