vim.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. """
  2. pygments.styles.vim
  3. ~~~~~~~~~~~~~~~~~~~
  4. A highlighting style for Pygments, inspired by vim.
  5. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
  6. :license: BSD, see LICENSE for details.
  7. """
  8. from pygments.style import Style
  9. from pygments.token import Keyword, Name, Comment, String, Error, \
  10. Number, Operator, Generic, Whitespace, Token
  11. __all__ = ['VimStyle']
  12. class VimStyle(Style):
  13. """
  14. Styles somewhat like vim 7.0
  15. """
  16. name = 'vim'
  17. background_color = "#000000"
  18. highlight_color = "#222222"
  19. styles = {
  20. Token: "#cccccc",
  21. Whitespace: "",
  22. Comment: "#000080",
  23. Comment.Preproc: "",
  24. Comment.Special: "bold #cd0000",
  25. Keyword: "#cdcd00",
  26. Keyword.Declaration: "#00cd00",
  27. Keyword.Namespace: "#cd00cd",
  28. Keyword.Pseudo: "",
  29. Keyword.Type: "#00cd00",
  30. Operator: "#3399cc",
  31. Operator.Word: "#cdcd00",
  32. Name: "",
  33. Name.Class: "#00cdcd",
  34. Name.Builtin: "#cd00cd",
  35. Name.Exception: "bold #666699",
  36. Name.Variable: "#00cdcd",
  37. String: "#cd0000",
  38. Number: "#cd00cd",
  39. Generic.Heading: "bold #000080",
  40. Generic.Subheading: "bold #800080",
  41. Generic.Deleted: "#cd0000",
  42. Generic.Inserted: "#00cd00",
  43. Generic.Error: "#FF0000",
  44. Generic.Emph: "italic",
  45. Generic.Strong: "bold",
  46. Generic.EmphStrong: "bold italic",
  47. Generic.Prompt: "bold #000080",
  48. Generic.Output: "#888",
  49. Generic.Traceback: "#04D",
  50. Error: "border:#FF0000"
  51. }