mirror of
https://github.com/micro-editor/micro.git
synced 2026-10-12 02:18:55 +00:00
* simplify string highlighting to reduce likelihood of false positive matches * highlight registers * support more keywords
28 lines
894 B
YAML
28 lines
894 B
YAML
filetype: vi
|
|
|
|
detect:
|
|
filename: "(^|/|\\.)(ex|vim)rc$|\\.vim"
|
|
|
|
rules:
|
|
- identifier: "[A-Za-z_][A-Za-z0-9_]*[(]+[A-Za-z0-9_:.,\\s]*[)]+"
|
|
- special: "[()]+"
|
|
- statement: "\\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\\b"
|
|
- statement: "\\b(is|isnot|fu(nc?|nction)?|if|while|for|try|return|throw|end(if|for|while|try|fu(nc?|nction)?|f)?|au(g|group)|else(if)?|do|in|catch|finally)\\b"
|
|
- statement: "\\b(snor|nun|nm|set(l|local|global)?|let|command|filetype|colorscheme|syn(tax)?|exe(c|cute)?|ec(ho)?|au(tocmd)?|source|call)\\b"
|
|
- statement: "[!&=?]|[+<>]="
|
|
- constant.number: "\\b[0-9]+\\b"
|
|
|
|
- identifier:
|
|
start: "@"
|
|
end: ".|$"
|
|
rules: []
|
|
|
|
- comment:
|
|
start: "^[ \t]*\""
|
|
end: "$"
|
|
rules: []
|
|
|
|
- constant.string: '"[^"]*"'
|
|
- constant.string: "'[^']*'"
|
|
- constant.specialChar: "\\\\."
|