PageRenderTime 26ms CodeModel.GetById 21ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/syntaxhighlight/pygments/styles/vim.py

http://github.com/plushcms/PlushCMS
Python | 63 lines | 39 code | 11 blank | 13 comment | 0 complexity | 662b532b0339cb1db4b7c633d0823713 MD5 | raw file
 1# -*- coding: utf-8 -*-
 2"""
 3    plushcms.syntaxhighlight.pygments.styles.vim
 4    ~~~~~~~~~~~~~~~~~~~
 5
 6    A highlighting style for Pygments, inspired by vim.
 7
 8    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
 9    :license: BSD, see LICENSE for details.
10"""
11
12from plushcms.syntaxhighlight.pygments.style import Style
13from plushcms.syntaxhighlight.pygments.token import Keyword, Name, Comment, String, Error, \
14     Number, Operator, Generic, Whitespace, Token
15
16
17class VimStyle(Style):
18    """
19    Styles somewhat like vim 7.0
20    """
21
22    background_color = "#000000"
23    highlight_color = "#222222"
24    default_style = "#cccccc"
25
26    styles = {
27        Token:                     "#cccccc",
28        Whitespace:                "",
29        Comment:                   "#000080",
30        Comment.Preproc:           "",
31        Comment.Special:           "bold #cd0000",
32
33        Keyword:                   "#cdcd00",
34        Keyword.Declaration:       "#00cd00",
35        Keyword.Namespace:         "#cd00cd",
36        Keyword.Pseudo:            "",
37        Keyword.Type:              "#00cd00",
38
39        Operator:                  "#3399cc",
40        Operator.Word:             "#cdcd00",
41
42        Name:                      "",
43        Name.Class:                "#00cdcd",
44        Name.Builtin:              "#cd00cd",
45        Name.Exception:            "bold #666699",
46        Name.Variable:             "#00cdcd",
47
48        String:                    "#cd0000",
49        Number:                    "#cd00cd",
50
51        Generic.Heading:           "bold #000080",
52        Generic.Subheading:        "bold #800080",
53        Generic.Deleted:           "#cd0000",
54        Generic.Inserted:          "#00cd00",
55        Generic.Error:             "#FF0000",
56        Generic.Emph:              "italic",
57        Generic.Strong:            "bold",
58        Generic.Prompt:            "bold #000080",
59        Generic.Output:            "#888",
60        Generic.Traceback:         "#04D",
61
62        Error:                     "border:#FF0000"
63    }