-
Notifications
You must be signed in to change notification settings - Fork 0
/
vim.rb
111 lines (108 loc) · 2.43 KB
/
vim.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Custom overrides for colors
overrides = {
:debug => "\e[1;37;44m",
:annotation => "\e[34m",
:attribute_name => "\e[35m",
:attribute_value => "\e[31m",
:binary => {
:self => "\e[31m",
:char => "\e[1;31m",
:delimiter => "\e[1;31m",
},
:char => {
:self => "\e[35m",
:delimiter => "\e[1;35m"
},
:class => "",
:class_variable => "\e[36m",
:color => "\e[32m",
:comment => {
:self => "\e[1;34m",
:char => "\e[36m",
:delimiter => "\e[36m",
},
:constant => "\e[1;34;4m",
:decorator => "\e[35m",
:definition => "\e[1;33m",
:directive => "\e[33m",
:docstring => "\e[31m",
:doctype => "\e[1;34m",
:done => "\e[1;30;2m",
:entity => "\e[31m",
:error => "\e[1;37;41m",
:exception => "\e[1;31m",
:float => "\e[1;35m",
:function => "",
:global_variable => "\e[1;32m",
:hex => "\e[1;36m",
:id => "\e[1;34m",
:include => "\e[31m",
:integer => "\e[1;34m",
:imaginary => "\e[1;34m",
:important => "\e[1;31m",
:key => {
:self => "\e[35m",
:char => "\e[1;35m",
:delimiter => "\e[1;35m",
},
:keyword => "\e[32m", # shared by if, public, static, return
:label => "\e[1;33m",
:local_variable => "\e[36m",
:namespace => "\e[1;35m",
:octal => "\e[1;34m",
:operator => "\e[1;35m",
:predefined => "", # no highlight
:predefined_constant => "\e[1;36m",
:predefined_type => "\e[1;32m",
:preprocessor => "\e[1;36m",
:pseudo_class => "\e[1;34m",
:regexp => {
:self => "\e[35m",
:delimiter => "\e[1;35m",
:modifier => "\e[35m",
:char => "\e[1;35m",
},
:reserved => "\e[32m",
:shell => {
:self => "\e[33m",
:char => "\e[1;33m",
:delimiter => "\e[1;33m",
:escape => "\e[1;33m",
},
:string => {
:self => "\e[35m",
:modifier => "\e[1;35m",
:char => "\e[1;35m",
:delimiter => "\e[1;35m",
:escape => "\e[1;35m",
},
:symbol => {
:self => "\e[33m",
:delimiter => "\e[1;33m",
},
:tag => "\e[32m",
:type => "\e[1;34m",
:value => "\e[36m",
:variable => "\e[34m",
:insert => {
:self => "\e[42m",
:insert => "\e[1;32;42m",
:eyecatcher => "\e[102m",
},
:delete => {
:self => "\e[41m",
:delete => "\e[1;31;41m",
:eyecatcher => "\e[101m",
},
:change => {
:self => "\e[44m",
:change => "\e[37;44m",
},
:head => {
:self => "\e[45m",
:filename => "\e[37;45m"
},
}
overrides.each do |key, value|
CodeRay::Encoders::Terminal::TOKEN_COLORS[key] = value
end