/
badwolf.vim
504 lines (380 loc) · 14.3 KB
/
badwolf.vim
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
" _ _ _ __
" | |__ __ _ __| | __ _____ | |/ _|
" | '_ \ / _` |/ _` | \ \ /\ / / _ \| | |_
" | |_) | (_| | (_| | \ V V / (_) | | _|
" |_.__/ \__,_|\__,_| \_/\_/ \___/|_|_|
"
" I am the Bad Wolf. I create myself.
" I take the words. I scatter them in time and space.
" A message to lead myself here.
"
" A Vim colorscheme pieced together by Steve Losh.
" Available at http://stevelosh.com/projects/badwolf/
"
" Why? {{{
"
" After using Molokai for quite a long time, I started longing for
" a replacement.
"
" I love Molokai's high contrast and gooey, saturated tones, but it can be
" a little inconsistent at times.
"
" Also it's winter here in Rochester, so I wanted a color scheme that's a bit
" warmer. A little less blue and a bit more red.
"
" And so Bad Wolf was born. I'm no designer, but designers have been scattering
" beautiful colors through time and space long before I came along. I took
" advantage of that and reused some of my favorites to lead me to this scheme.
"
" }}}
" Supporting code -------------------------------------------------------------
" Preamble {{{
set background=dark
if exists("syntax_on")
syntax reset
endif
let colors_name = "badwolf"
" }}}
" Palette {{{
let s:bwc = {}
" The most basic of all our colors is a slightly tweaked version of the Molokai
" Normal text.
let s:bwc.plain = ['f8f6f2', 15]
" Pure and simple.
let s:bwc.snow = ['ffffff', 15]
let s:bwc.coal = ['000000', 0]
" All of the Gravel colors are based on a brown from Clouds Midnight.
let s:bwc.brightgravel = ['d9cec3', 252]
let s:bwc.lightgravel = ['998f84', 245]
let s:bwc.gravel = ['857f78', 243]
let s:bwc.mediumgravel = ['666462', 241]
let s:bwc.deepgravel = ['45413b', 238]
let s:bwc.deepergravel = ['35322d', 236]
let s:bwc.darkgravel = ['242321', 235]
let s:bwc.blackgravel = ['1c1b1a', 233]
let s:bwc.blackestgravel = ['141413', 232]
" A color sampled from a highlight in a photo of a glass of Dale's Pale Ale on
" my desk.
let s:bwc.dalespale = ['fade3e', 221]
" A beautiful tan from Tomorrow Night.
let s:bwc.dirtyblonde = ['f4cf86', 222]
" Delicious, chewy red from Made of Code for the poppiest highlights.
let s:bwc.taffy = ['ff2c4b', 197]
" The star of the show comes straight from Made of Code.
let s:bwc.tardis = ['0a9dff', 39]
" This one's from Mustang, not Florida!
let s:bwc.orange = ['ffa724', 214]
" A limier green from Getafe.
let s:bwc.lime = ['aeee00', 148]
" Rose's dress in The Idiot's Lantern.
let s:bwc.dress = ['ff9eb8', 211]
" Another play on the brown from Clouds Midnight. I love that color.
let s:bwc.toffee = ['b88853', 137]
" Also based on that Clouds Midnight brown.
let s:bwc.coffee = ['c7915b', 173]
let s:bwc.darkroast = ['88633f', 95]
" }}}
" Highlighting Function {{{
function! HL(group, fg, ...)
" Arguments: group, guifg, guibg, gui, guisp
let histring = 'hi ' . a:group . ' '
if strlen(a:fg)
if a:fg == 'fg'
let histring .= 'guifg=fg ctermfg=fg '
else
let c = get(s:bwc, a:fg)
let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
endif
endif
if a:0 >= 1 && strlen(a:1)
if a:1 == 'bg'
let histring .= 'guibg=bg ctermbg=bg '
else
let c = get(s:bwc, a:1)
let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
endif
endif
if a:0 >= 2 && strlen(a:2)
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
endif
if a:0 >= 3 && strlen(a:3)
let c = get(s:bwc, a:3)
let histring .= 'guisp=#' . c[0] . ' '
endif
" echom histring
execute histring
endfunction
" }}}
" Configuration Options {{{
if exists('g:badwolf_darkgutter') && g:badwolf_darkgutter
let s:gutter = 'blackestgravel'
else
let s:gutter = 'blackgravel'
endif
" }}}
" Actual colorscheme ----------------------------------------------------------
" Vanilla Vim {{{
" General/UI {{{
call HL('Normal', 'plain', 'blackgravel')
call HL('Folded', 'mediumgravel', 'bg', 'none')
call HL('VertSplit', 'lightgravel', 'bg', 'none')
call HL('CursorLine', '', 'darkgravel', 'none')
call HL('CursorColumn', '', 'darkgravel')
call HL('ColorColumn', '', 'darkgravel')
call HL('MatchParen', 'dalespale', 'darkgravel', 'bold')
call HL('NonText', 'deepgravel', 'bg')
call HL('SpecialKey', 'deepgravel', 'bg')
call HL('Visual', '', 'deepgravel')
call HL('VisualNOS', '', 'deepgravel')
call HL('Search', 'coal', 'dalespale', 'bold')
call HL('IncSearch', 'coal', 'tardis', 'bold')
call HL('Underlined', 'fg', '', 'underline')
call HL('StatusLine', 'coal', 'tardis', 'bold')
call HL('StatusLineNC', 'snow', 'deepgravel', 'bold')
call HL('Directory', 'dirtyblonde', '', 'bold')
call HL('Title', 'lime')
call HL('ErrorMsg', 'taffy', 'bg', 'bold')
call HL('MoreMsg', 'dalespale', '', 'bold')
call HL('ModeMsg', 'dirtyblonde', '', 'bold')
call HL('Question', 'dirtyblonde', '', 'bold')
call HL('WarningMsg', 'dress', '', 'bold')
" This is a ctags tag, not an HTML one. 'Something you can use c-] on'.
call HL('Tag', '', '', 'bold')
" hi IndentGuides guibg=#373737
" hi WildMenu guifg=#66D9EF guibg=#000000
" }}}
" Gutter {{{
call HL('LineNr', 'mediumgravel', s:gutter)
call HL('SignColumn', '', s:gutter)
call HL('FoldColumn', 'mediumgravel', s:gutter)
" }}}
" Cursor {{{
call HL('Cursor', 'coal', 'tardis', 'bold')
call HL('vCursor', 'coal', 'tardis', 'bold')
call HL('iCursor', 'coal', 'tardis', 'none')
" }}}
" Syntax highlighting {{{
" Start with a simple base.
call HL('Special', 'plain')
" Comments are slightly brighter than folds, to make 'headers' easier to see.
call HL('Comment', 'gravel')
call HL('Todo', 'snow', 'bg', 'bold')
call HL('SpecialComment', 'snow', 'bg', 'bold')
" Strings are a nice, pale straw color. Nothing too fancy.
call HL('String', 'dirtyblonde')
" Control flow stuff is taffy.
call HL('Statement', 'taffy', '', 'bold')
call HL('Keyword', 'taffy', '', 'bold')
call HL('Conditional', 'taffy', '', 'bold')
call HL('Operator', 'taffy', '', 'none')
call HL('Label', 'taffy', '', 'none')
call HL('Repeat', 'taffy', '', 'none')
" Functions and variable declarations are orange, because plain looks weird.
call HL('Identifier', 'orange', '', 'none')
call HL('Function', 'orange', '', 'none')
" Preprocessor stuff is lime, to make it pop.
"
" This includes imports in any given language, because they should usually be
" grouped together at the beginning of a file. If they're in the middle of some
" other code they should stand out, because something tricky is
" probably going on.
call HL('PreProc', 'lime', '', 'none')
call HL('Macro', 'lime', '', 'none')
call HL('Define', 'lime', '', 'none')
call HL('PreCondit', 'lime', '', 'bold')
" Constants of all kinds are colored together.
" I'm not really happy with the color yet...
call HL('Constant', 'toffee', '', 'bold')
call HL('Character', 'toffee', '', 'bold')
call HL('Boolean', 'toffee', '', 'bold')
call HL('Number', 'toffee', '', 'bold')
call HL('Float', 'toffee', '', 'bold')
" Not sure what 'special character in a constant' means, but let's make it pop.
call HL('SpecialChar', 'dress', '', 'bold')
call HL('Type', 'dress', '', 'none')
call HL('StorageClass', 'taffy', '', 'none')
call HL('Structure', 'taffy', '', 'none')
call HL('Typedef', 'taffy', '', 'bold')
" Make try/catch blocks stand out.
call HL('Exception', 'lime', '', 'bold')
" Misc
call HL('Error', 'snow', 'taffy', 'bold')
call HL('Debug', 'snow', '', 'bold')
call HL('Ignore', 'gravel', '', '')
" }}}
" Completion Menu {{{
call HL('Pmenu', 'plain', 'deepergravel')
call HL('PmenuSel', 'coal', 'tardis', 'bold')
call HL('PmenuSbar', '', 'deepergravel')
call HL('PmenuThumb', 'brightgravel')
" }}}
" Diffs {{{
call HL('DiffDelete', 'coal', 'coal')
call HL('DiffAdd', '', 'deepergravel')
call HL('DiffChange', '', 'darkgravel')
call HL('DiffText', 'snow', 'deepergravel', 'bold')
" }}}
" Spelling {{{
if has("spell")
call HL('SpellCap', 'dalespale', '', 'undercurl,bold', 'dalespale')
call HL('SpellBad', '', '', 'undercurl', 'dalespale')
call HL('SpellLocal', '', '', 'undercurl', 'dalespale')
call HL('SpellRare', '', '', 'undercurl', 'dalespale')
endif
" }}}
" }}}
" Plugins {{{
" CtrlP {{{
" the message when no match is found
call HL('CtrlPNoEntries', 'snow', 'taffy', 'bold')
" the matched pattern
call HL('CtrlPMatch', 'orange', 'bg', 'none')
" the line prefix '>' in the match window
call HL('CtrlPLinePre', 'deepgravel', 'bg', 'none')
" the prompt’s base
call HL('CtrlPPrtBase', 'deepgravel', 'bg', 'none')
" the prompt’s text
call HL('CtrlPPrtText', 'plain', 'bg', 'none')
" the prompt’s cursor when moving over the text
call HL('CtrlPPrtCursor', 'coal', 'tardis', 'bold')
" 'prt' or 'win', also for 'regex'
call HL('CtrlPMode1', 'coal', 'tardis', 'bold')
" 'file' or 'path', also for the local working dir
call HL('CtrlPMode2', 'coal', 'tardis', 'bold')
" the scanning status
call HL('CtrlPStats', 'coal', 'tardis', 'bold')
" TODO: CtrlP extensions.
" CtrlPTabExtra : the part of each line that’s not matched against (Comment)
" CtrlPqfLineCol : the line and column numbers in quickfix mode (|hl-Search|)
" CtrlPUndoT : the elapsed time in undo mode (|hl-Directory|)
" CtrlPUndoBr : the square brackets [] in undo mode (Comment)
" CtrlPUndoNr : the undo number inside [] in undo mode (String)
" }}}
" EasyMotion {{{
call HL('EasyMotionTarget', 'tardis', 'bg', 'bold')
call HL('EasyMotionShade', 'deepgravel', 'bg')
" }}}
" Interesting Words {{{
" These are only used if you're me or have copied the <leader>hNUM mappings
" from my Vimrc.
call HL('InterestingWord1', 'coal', 'orange')
call HL('InterestingWord2', 'coal', 'lime')
call HL('InterestingWord3', 'coal', 'taffy')
" }}}
" Makegreen {{{
" hi GreenBar term=reverse ctermfg=white ctermbg=green guifg=coal guibg=#9edf1c
" hi RedBar term=reverse ctermfg=white ctermbg=red guifg=white guibg=#C50048
" }}}
" ShowMarks {{{
call HL('ShowMarksHLl', 'tardis', 'blackgravel')
call HL('ShowMarksHLu', 'tardis', 'blackgravel')
call HL('ShowMarksHLo', 'tardis', 'blackgravel')
call HL('ShowMarksHLm', 'tardis', 'blackgravel')
" }}}
" }}}
" Filetype-specific {{{
" Clojure {{{
call HL('clojureSpecial', 'taffy', '', '')
call HL('clojureDefn', 'taffy', '', '')
call HL('clojureDefMacro', 'taffy', '', '')
call HL('clojureDefine', 'taffy', '', '')
call HL('clojureMacro', 'taffy', '', '')
call HL('clojureCond', 'taffy', '', '')
call HL('clojureKeyword', 'orange', '', 'none')
call HL('clojureFunc', 'dress', '', 'none')
call HL('clojureRepeat', 'dress', '', 'none')
call HL('clojureParen0', 'lightgravel', '', 'none')
call HL('clojureAnonArg', 'snow', '', 'bold')
" }}}
" CSS {{{
call HL('cssColorProp', 'fg', '', 'none')
call HL('cssBoxProp', 'fg', '', 'none')
call HL('cssTextProp', 'fg', '', 'none')
call HL('cssRenderProp', 'fg', '', 'none')
call HL('cssGeneratedContentProp', 'fg', '', 'none')
call HL('cssValueLength', 'toffee', '', 'bold')
call HL('cssColor', 'toffee', '', 'bold')
call HL('cssBraces', 'lightgravel', '', 'none')
call HL('cssIdentifier', 'orange', '', 'bold')
call HL('cssClassName', 'orange', '', 'none')
" }}}
" Django Templates {{{
call HL('djangoArgument', 'dirtyblonde', '',)
call HL('djangoTagBlock', 'orange', '')
call HL('djangoVarBlock', 'orange', '')
" hi djangoStatement guifg=#ff3853 gui=bold
" hi djangoVarBlock guifg=#f4cf86
" }}}
" HTML {{{
" Punctuation
call HL('htmlTag', 'darkroast', 'bg', 'none')
call HL('htmlEndTag', 'darkroast', 'bg', 'none')
" Tag names
call HL('htmlTagName', 'coffee', '', 'bold')
call HL('htmlSpecialTagName', 'coffee', '', 'bold')
" Attributes
call HL('htmlArg', 'coffee', '', 'none')
" Stuff inside an <a> tag
call HL('htmlLink', 'lightgravel', '', 'underline')
" }}}
" Java {{{
call HL('javaClassDecl', 'taffy', '', 'bold')
call HL('javaScopeDecl', 'taffy', '', 'bold')
call HL('javaCommentTitle', 'gravel', '')
call HL('javaDocTags', 'snow', '', 'none')
call HL('javaDocParam', 'dalespale', '', '')
" }}}
" LessCSS {{{
call HL('lessVariable', 'lime', '', 'none')
" }}}
" Mail {{{
call HL('mailSubject', 'orange', '', 'bold')
call HL('mailHeader', 'lightgravel', '', '')
call HL('mailHeaderKey', 'lightgravel', '', '')
call HL('mailHeaderEmail', 'snow', '', '')
call HL('mailURL', 'toffee', '', 'underline')
call HL('mailSignature', 'gravel', '', 'none')
call HL('mailQuoted1', 'gravel', '', 'none')
call HL('mailQuoted2', 'dress', '', 'none')
call HL('mailQuoted3', 'dirtyblonde', '', 'none')
call HL('mailQuoted4', 'orange', '', 'none')
call HL('mailQuoted5', 'lime', '', 'none')
" }}}
" Markdown {{{
call HL('markdownHeadingRule', 'lightgravel', '', 'bold')
call HL('markdownHeadingDelimiter', 'lightgravel', '', 'bold')
call HL('markdownOrderedListMarker', 'lightgravel', '', 'bold')
call HL('markdownListMarker', 'lightgravel', '', 'bold')
call HL('markdownH1', 'orange', '', 'bold')
call HL('markdownH2', 'lime', '', 'bold')
call HL('markdownH3', 'lime', '', 'none')
call HL('markdownH4', 'lime', '', 'none')
call HL('markdownH5', 'lime', '', 'none')
call HL('markdownH6', 'lime', '', 'none')
call HL('markdownLinkText', 'toffee', '', 'underline')
call HL('markdownIdDeclaration', 'toffee')
call HL('markdownAutomaticLink', 'toffee', '', 'bold')
call HL('markdownUrl', 'toffee', '', 'bold')
call HL('markdownUrldelimiter', 'lightgravel', '', 'bold')
call HL('markdownLinkDelimiter', 'lightgravel', '', 'bold')
call HL('markdownLinkTextDelimiter', 'lightgravel', '', 'bold')
call HL('markdownCodeDelimiter', 'dirtyblonde', '', 'bold')
call HL('markdownCode', 'dirtyblonde', '', 'none')
call HL('markdownCodeBlock', 'dirtyblonde', '', 'none')
" }}}
" Python {{{
hi def link pythonOperator Operator
call HL('pythonBuiltin', 'dress')
call HL('pythonEscape', 'dress')
call HL('pythonException', 'lime', '', 'bold')
call HL('pythonExceptions', 'lime', '', 'none')
call HL('pythonDecorator', 'taffy', '', 'none')
" }}}
" Vim {{{
call HL('VimCommentTitle', 'lightgravel', '', 'bold')
call HL('VimMapMod', 'dress', '', 'none')
call HL('VimMapModKey', 'dress', '', 'none')
call HL('VimNotation', 'dress', '', 'none')
call HL('VimBracket', 'dress', '', 'none')
" }}}
" }}}