87f54be13a
Use the 'regexp2' library for lookahead and lookbehind in region start and end regular expressions to support things like closing quotes that aren't preceded by backslashes.
31 lines
694 B
YAML
31 lines
694 B
YAML
filetype: vi
|
|
|
|
detect:
|
|
filename: "(^|/|\\.)(ex|vim)rc$|\\.vim"
|
|
|
|
rules:
|
|
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
|
- statement: "\\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\\b"
|
|
- statement: "\\b(snor|nun|nm|set|if|endif|let|unlet)\\b"
|
|
- statement: "[!&=]"
|
|
- constant.number: "\\b[0-9]+\\b"
|
|
|
|
- constant.string:
|
|
start: "\""
|
|
end: "(?<!\\\\)\""
|
|
rules:
|
|
- constant.specialChar: "\\\\."
|
|
|
|
- constant.string:
|
|
start: "'"
|
|
end: "(?<!\\\\)'"
|
|
rules:
|
|
- constant.specialChar: "\\\\."
|
|
|
|
- constant.comment:
|
|
start: "\""
|
|
end: "$"
|
|
rules: []
|
|
|
|
|