comparison rc/vim-base16-default @ 503:e2b52663763b

Replace solarized with base16.
author edogawaconan <me@myconan.net>
date Sat, 15 Mar 2014 22:19:36 +0900
parents
children
comparison
equal deleted inserted replaced
502:535c202bb3db 503:e2b52663763b
1 " Base16 Default (https://github.com/chriskempson/base16)
2 " Scheme: Chris Kempson (http://chriskempson.com)
3
4 " GUI color definitions
5 let s:gui00 = "151515"
6 let s:gui01 = "202020"
7 let s:gui02 = "303030"
8 let s:gui03 = "505050"
9 let s:gui04 = "b0b0b0"
10 let s:gui05 = "d0d0d0"
11 let s:gui06 = "e0e0e0"
12 let s:gui07 = "f5f5f5"
13 let s:gui08 = "ac4142"
14 let s:gui09 = "d28445"
15 let s:gui0A = "f4bf75"
16 let s:gui0B = "90a959"
17 let s:gui0C = "75b5aa"
18 let s:gui0D = "6a9fb5"
19 let s:gui0E = "aa759f"
20 let s:gui0F = "8f5536"
21
22 " Terminal color definitions
23 let s:cterm00 = "00"
24 let s:cterm03 = "08"
25 let s:cterm05 = "07"
26 let s:cterm07 = "15"
27 let s:cterm08 = "01"
28 let s:cterm0A = "03"
29 let s:cterm0B = "02"
30 let s:cterm0C = "06"
31 let s:cterm0D = "04"
32 let s:cterm0E = "05"
33 if exists('base16colorspace') && base16colorspace == "256"
34 let s:cterm01 = "18"
35 let s:cterm02 = "19"
36 let s:cterm04 = "20"
37 let s:cterm06 = "21"
38 let s:cterm09 = "16"
39 let s:cterm0F = "17"
40 else
41 let s:cterm01 = "10"
42 let s:cterm02 = "11"
43 let s:cterm04 = "12"
44 let s:cterm06 = "13"
45 let s:cterm09 = "09"
46 let s:cterm0F = "14"
47 endif
48
49 " Theme setup
50 hi clear
51 syntax reset
52 let g:colors_name = "base16-default"
53
54 " Highlighting function
55 fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr)
56 if a:guifg != ""
57 exec "hi " . a:group . " guifg=#" . s:gui(a:guifg)
58 endif
59 if a:guibg != ""
60 exec "hi " . a:group . " guibg=#" . s:gui(a:guibg)
61 endif
62 if a:ctermfg != ""
63 exec "hi " . a:group . " ctermfg=" . s:cterm(a:ctermfg)
64 endif
65 if a:ctermbg != ""
66 exec "hi " . a:group . " ctermbg=" . s:cterm(a:ctermbg)
67 endif
68 if a:attr != ""
69 exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
70 endif
71 endfun
72
73 " Return GUI color for light/dark variants
74 fun s:gui(color)
75 if &background == "dark"
76 return a:color
77 endif
78
79 if a:color == s:gui00
80 return s:gui07
81 elseif a:color == s:gui01
82 return s:gui06
83 elseif a:color == s:gui02
84 return s:gui05
85 elseif a:color == s:gui03
86 return s:gui04
87 elseif a:color == s:gui04
88 return s:gui03
89 elseif a:color == s:gui05
90 return s:gui02
91 elseif a:color == s:gui06
92 return s:gui01
93 elseif a:color == s:gui07
94 return s:gui00
95 endif
96
97 return a:color
98 endfun
99
100 " Return terminal color for light/dark variants
101 fun s:cterm(color)
102 if &background == "dark"
103 return a:color
104 endif
105
106 if a:color == s:cterm00
107 return s:cterm07
108 elseif a:color == s:cterm01
109 return s:cterm06
110 elseif a:color == s:cterm02
111 return s:cterm05
112 elseif a:color == s:cterm03
113 return s:cterm04
114 elseif a:color == s:cterm04
115 return s:cterm03
116 elseif a:color == s:cterm05
117 return s:cterm02
118 elseif a:color == s:cterm06
119 return s:cterm01
120 elseif a:color == s:cterm07
121 return s:cterm00
122 endif
123
124 return a:color
125 endfun
126
127 " Vim editor colors
128 call <sid>hi("Bold", "", "", "", "", "bold")
129 call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "")
130 call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "")
131 call <sid>hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "")
132 call <sid>hi("Exception", s:gui08, "", s:cterm08, "", "")
133 call <sid>hi("FoldColumn", "", s:gui01, "", s:cterm01, "")
134 call <sid>hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "")
135 call <sid>hi("IncSearch", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "none")
136 call <sid>hi("Italic", "", "", "", "", "none")
137 call <sid>hi("Macro", s:gui08, "", s:cterm08, "", "")
138 call <sid>hi("MatchParen", s:gui00, s:gui03, s:cterm00, s:cterm03, "")
139 call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "")
140 call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "")
141 call <sid>hi("Question", s:gui0A, "", s:cterm0A, "", "")
142 call <sid>hi("Search", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "")
143 call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "")
144 call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "")
145 call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "")
146 call <sid>hi("Visual", "", s:gui02, "", s:cterm02, "")
147 call <sid>hi("VisualNOS", s:gui08, "", s:cterm08, "", "")
148 call <sid>hi("WarningMsg", s:gui08, "", s:cterm08, "", "")
149 call <sid>hi("WildMenu", s:gui08, "", s:cterm08, "", "")
150 call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none")
151 call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "")
152 call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "")
153 call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "")
154 call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "")
155 call <sid>hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "")
156 call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "")
157 call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "")
158 call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none")
159 call <sid>hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none")
160 call <sid>hi("VertSplit", s:gui02, s:gui02, s:cterm02, s:cterm02, "none")
161 call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none")
162 call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none")
163 call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none")
164 call <sid>hi("CursorLineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "")
165 call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none")
166 call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "")
167 call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none")
168 call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none")
169 call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none")
170
171 " Standard syntax highlighting
172 call <sid>hi("Boolean", s:gui09, "", s:cterm09, "", "")
173 call <sid>hi("Character", s:gui08, "", s:cterm08, "", "")
174 call <sid>hi("Comment", s:gui03, "", s:cterm03, "", "")
175 call <sid>hi("Conditional", s:gui0E, "", s:cterm0E, "", "")
176 call <sid>hi("Constant", s:gui09, "", s:cterm09, "", "")
177 call <sid>hi("Define", s:gui0E, "", s:cterm0E, "", "none")
178 call <sid>hi("Delimiter", s:gui0F, "", s:cterm0F, "", "")
179 call <sid>hi("Float", s:gui09, "", s:cterm09, "", "")
180 call <sid>hi("Function", s:gui0D, "", s:cterm0D, "", "")
181 call <sid>hi("Identifier", s:gui08, "", s:cterm08, "", "none")
182 call <sid>hi("Include", s:gui0D, "", s:cterm0D, "", "")
183 call <sid>hi("Keyword", s:gui0E, "", s:cterm0E, "", "")
184 call <sid>hi("Label", s:gui0A, "", s:cterm0A, "", "")
185 call <sid>hi("Number", s:gui09, "", s:cterm09, "", "")
186 call <sid>hi("Operator", s:gui05, "", s:cterm05, "", "none")
187 call <sid>hi("PreProc", s:gui0A, "", s:cterm0A, "", "")
188 call <sid>hi("Repeat", s:gui0A, "", s:cterm0A, "", "")
189 call <sid>hi("Special", s:gui0C, "", s:cterm0C, "", "")
190 call <sid>hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "")
191 call <sid>hi("Statement", s:gui08, "", s:cterm08, "", "")
192 call <sid>hi("StorageClass", s:gui0A, "", s:cterm0A, "", "")
193 call <sid>hi("String", s:gui0B, "", s:cterm0B, "", "")
194 call <sid>hi("Structure", s:gui0E, "", s:cterm0E, "", "")
195 call <sid>hi("Tag", s:gui0A, "", s:cterm0A, "", "")
196 call <sid>hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "")
197 call <sid>hi("Type", s:gui09, "", s:cterm09, "", "none")
198 call <sid>hi("Typedef", s:gui0A, "", s:cterm0A, "", "")
199
200 " Spelling highlighting
201 call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl")
202 call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl")
203 call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl")
204 call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl")
205
206 " Additional diff highlighting
207 call <sid>hi("DiffAdd", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "")
208 call <sid>hi("DiffChange", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "")
209 call <sid>hi("DiffDelete", s:gui08, s:gui00, s:cterm08, s:cterm00, "")
210 call <sid>hi("DiffText", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "")
211 call <sid>hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "")
212 call <sid>hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "")
213 call <sid>hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "")
214 call <sid>hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "")
215 call <sid>hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "")
216
217 " Ruby highlighting
218 call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "")
219 call <sid>hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "")
220 call <sid>hi("rubyInterpolation", s:gui0B, "", s:cterm0B, "", "")
221 call <sid>hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "")
222 call <sid>hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "")
223 call <sid>hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "")
224 call <sid>hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "")
225
226 " PHP highlighting
227 call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "")
228 call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "")
229 call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "")
230
231 " HTML highlighting
232 call <sid>hi("htmlBold", s:gui0A, "", s:cterm0A, "", "")
233 call <sid>hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "")
234 call <sid>hi("htmlEndTag", s:gui05, "", s:cterm05, "", "")
235 call <sid>hi("htmlTag", s:gui05, "", s:cterm05, "", "")
236
237 " CSS highlighting
238 call <sid>hi("cssBraces", s:gui05, "", s:cterm05, "", "")
239 call <sid>hi("cssClassName", s:gui0E, "", s:cterm0E, "", "")
240 call <sid>hi("cssColor", s:gui0C, "", s:cterm0C, "", "")
241
242 " SASS highlighting
243 call <sid>hi("sassidChar", s:gui08, "", s:cterm08, "", "")
244 call <sid>hi("sassClassChar", s:gui09, "", s:cterm09, "", "")
245 call <sid>hi("sassInclude", s:gui0E, "", s:cterm0E, "", "")
246 call <sid>hi("sassMixing", s:gui0E, "", s:cterm0E, "", "")
247 call <sid>hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "")
248
249 " JavaScript highlighting
250 call <sid>hi("javaScript", s:gui05, "", s:cterm05, "", "")
251 call <sid>hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "")
252 call <sid>hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "")
253
254 " Markdown highlighting
255 call <sid>hi("markdownCode", s:gui0B, "", s:cterm0B, "", "")
256 call <sid>hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "")
257 call <sid>hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "")
258
259 " Git highlighting
260 call <sid>hi("gitCommitOverflow", s:gui08, "", s:cterm08, "", "")
261 call <sid>hi("gitCommitSummary", s:gui0B, "", s:cterm0B, "", "")
262
263 " GitGutter highlighting
264 call <sid>hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "")
265 call <sid>hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "")
266 call <sid>hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "")
267 call <sid>hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "")
268
269 " Signify highlighting
270 call <sid>hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "")
271 call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "")
272 call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "")
273
274 " NERDTree highlighting
275 call <sid>hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "")
276 call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "")
277
278 " Remove functions
279 delf <sid>hi
280 delf <sid>gui
281 delf <sid>cterm
282
283 " Remove color variables
284 unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F
285 unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F