yaml.syntax 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # YAML syntax highlighting
  2. # Reference:
  3. # https://en.wikipedia.org/wiki/YAML
  4. # http://yaml.org/refcard.html
  5. context default
  6. spellcheck
  7. keyword #*\n brown
  8. keyword {{*}} brightred
  9. keyword linestart --- brightcyan
  10. keyword linestart \[\s\]-\s brightcyan
  11. # "YAML requires that colons and commas used as list separators be followed by a space [...]"
  12. keyword ,\{\s\n\} brightcyan
  13. keyword , red
  14. # Below, we can get by with just "*:\{\s\n\}", but we prefer to restrict the
  15. # key names in order not to grab too much (e.g., "{one: 1, two: 2}", "one: 1 # possibilities: 1 or 2").
  16. keyword \{0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\}\[\s-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]:\{\s\n\} yellow
  17. keyword [ brightcyan
  18. keyword ] brightcyan
  19. keyword { brightcyan
  20. keyword } brightcyan
  21. keyword whole true brightmagenta
  22. keyword whole false brightmagenta
  23. keyword whole null brightmagenta
  24. context " " green
  25. spellcheck
  26. keyword {{*}} brightred
  27. keyword \\" brightgreen
  28. keyword \\\\ brightgreen
  29. keyword \\\{xuU\}\[0123456789\] brightgreen
  30. keyword \\\{0abfnrtve_NLP\} brightgreen
  31. context ' ' green
  32. spellcheck
  33. keyword {{*}} brightred
  34. # The last word below may be: "\n*:\{\s\n\}", but used strict version suitable for more cases
  35. context exclusive |\[123456789\+\-\s\t\]\n \n\n\[\s-\]\[-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]:\{\s\n\} brown
  36. context exclusive >\[123456789\+\-\s\t\]\n \n\n\[\s-\]\[-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]:\{\s\n\} brown