2 " | |__ __ _ __| | __ _____ | |/ _|
3 " | '_ \ / _` |/ _` | \ \ /\ / / _ \| | |_
4 " | |_) | (_| | (_| | \ V V / (_) | | _|
5 " |_.__/ \__,_|\__,_| \_/\_/ \___/|_|_|
7 " I am the Bad Wolf. I create myself.
8 " I take the words. I scatter them in time and space.
9 " A message to lead myself here.
11 " A Vim colorscheme pieced together by Steve Losh.
12 " Available at http://stevelosh.com/projects/badwolf/
16 " After using Molokai for quite a long time, I started longing for
19 " I love Molokai's high contrast and gooey, saturated tones, but it can be
20 " a little inconsistent at times.
22 " Also it's winter here in Rochester, so I wanted a color scheme that's a bit
23 " warmer. A little less blue and a bit more red.
25 " And so Bad Wolf was born. I'm no designer, but designers have been scattering
26 " beautiful colors through time and space long before I came along. I took
27 " advantage of that and reused some of my favorites to lead me to this scheme.
31 " Supporting code -------------------------------------------------------------
34 if !has("gui_running") && &t_Co != 88 && &t_Co != 256
40 if exists("syntax_on")
44 let colors_name = "badwolf"
46 if !exists("g:badwolf_html_link_underline") " {{{
47 let g:badwolf_html_link_underline = 1
50 if !exists("g:badwolf_css_props_highlight") " {{{
51 let g:badwolf_css_props_highlight = 0
59 " The most basic of all our colors is a slightly tweaked version of the Molokai
61 let s:bwc.plain = ['f8f6f2', 15]
64 let s:bwc.snow = ['ffffff', 15]
65 let s:bwc.coal = ['000000', 16]
67 " All of the Gravel colors are based on a brown from Clouds Midnight.
68 let s:bwc.brightgravel = ['d9cec3', 252]
69 let s:bwc.lightgravel = ['998f84', 245]
70 let s:bwc.gravel = ['857f78', 243]
71 let s:bwc.mediumgravel = ['666462', 241]
72 let s:bwc.deepgravel = ['45413b', 238]
73 let s:bwc.deepergravel = ['35322d', 236]
74 let s:bwc.darkgravel = ['242321', 235]
75 let s:bwc.blackgravel = ['1c1b1a', 233]
76 let s:bwc.blackestgravel = ['141413', 232]
78 " A color sampled from a highlight in a photo of a glass of Dale's Pale Ale on
80 let s:bwc.dalespale = ['fade3e', 221]
82 " A beautiful tan from Tomorrow Night.
83 let s:bwc.dirtyblonde = ['f4cf86', 222]
85 " Delicious, chewy red from Made of Code for the poppiest highlights.
86 let s:bwc.taffy = ['ff2c4b', 178]
88 " Another chewy accent, but use sparingly!
89 let s:bwc.saltwatertaffy = ['8cffba', 121]
91 " The star of the show comes straight from Made of Code.
92 let s:bwc.tardis = ['0a9dff', 39]
94 " This one's from Mustang, not Florida!
95 let s:bwc.orange = ['ffa724', 214]
97 " A limier green from Getafe.
98 let s:bwc.lime = ['aeee00', 154]
100 " Rose's dress in The Idiot's Lantern.
101 let s:bwc.dress = ['ff9eb8', 211]
103 " Another play on the brown from Clouds Midnight. I love that color.
104 let s:bwc.toffee = ['b88853', 137]
106 " Also based on that Clouds Midnight brown.
107 let s:bwc.coffee = ['c7915b', 173]
108 let s:bwc.darkroast = ['88633f', 95]
110 " I'm not as creative to name colours
111 let s:bwc.green = ['005f00', 22]
112 let s:bwc.red = ['5f0000', 52]
113 let s:bwc.lightblue = ['0000ff', 21]
114 let s:bwc.blue = ['00005f', 17]
116 " Highlighting Function {{{
117 function! s:HL(group, fg, ...)
118 " Arguments: group, guifg, guibg, gui, guisp
120 let histring = 'hi ' . a:group . ' '
124 let histring .= 'guifg=fg ctermfg=fg '
126 let c = get(s:bwc, a:fg)
127 let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
131 if a:0 >= 1 && strlen(a:1)
133 let histring .= 'guibg=bg ctermbg=bg '
135 let c = get(s:bwc, a:1)
136 let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
140 if a:0 >= 2 && strlen(a:2)
141 let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
144 if a:0 >= 3 && strlen(a:3)
145 let c = get(s:bwc, a:3)
146 let histring .= 'guisp=#' . c[0] . ' '
154 " Configuration Options {{{
156 if exists('g:badwolf_darkgutter') && g:badwolf_darkgutter
157 let s:gutter = 'blackestgravel'
159 let s:gutter = 'blackgravel'
162 if exists('g:badwolf_tabline')
163 if g:badwolf_tabline == 0
164 let s:tabline = 'blackestgravel'
165 elseif g:badwolf_tabline == 1
166 let s:tabline = 'blackgravel'
167 elseif g:badwolf_tabline == 2
168 let s:tabline = 'darkgravel'
169 elseif g:badwolf_tabline == 3
170 let s:tabline = 'deepgravel'
172 let s:tabline = 'blackestgravel'
175 let s:tabline = 'blackgravel'
180 " Actual colorscheme ----------------------------------------------------------
185 call s:HL('Normal', 'plain')
187 " Folded needs a background for some weird reason
188 call s:HL('Folded', 'lightgravel', 'darkgravel', 'none')
190 call s:HL('VertSplit', 'lightgravel', '', 'none')
192 call s:HL('CursorLine', '', 'darkgravel', 'none')
193 call s:HL('CursorColumn', '', 'darkgravel')
194 call s:HL('ColorColumn', '', 'darkgravel')
196 call s:HL('TabLine', 'plain', s:tabline, 'none')
197 call s:HL('TabLineFill', 'plain', s:tabline, 'none')
198 call s:HL('TabLineSel', 'coal', 'tardis', 'none')
200 call s:HL('MatchParen', 'dalespale', 'darkgravel', 'bold')
202 call s:HL('NonText', 'deepgravel', '')
203 call s:HL('SpecialKey', 'dress', '')
205 call s:HL('Visual', '', 'deepgravel')
206 call s:HL('VisualNOS', '', 'deepgravel')
208 call s:HL('Search', 'coal', 'dalespale', 'bold')
209 call s:HL('IncSearch', 'coal', 'tardis', 'bold')
211 call s:HL('Underlined', 'fg', '', 'underline')
213 call s:HL('StatusLine', 'coal', 'tardis', 'bold')
214 call s:HL('StatusLineNC', 'snow', 'deepgravel', 'bold')
216 call s:HL('Directory', 'dirtyblonde', '', 'bold')
218 call s:HL('Title', 'lime')
220 call s:HL('ErrorMsg', 'taffy', '', 'bold')
221 call s:HL('MoreMsg', 'dalespale', '', 'bold')
222 call s:HL('ModeMsg', 'dirtyblonde', '', 'bold')
223 call s:HL('Question', 'dirtyblonde', '', 'bold')
224 call s:HL('WarningMsg', 'dress', '', 'bold')
226 " This is a ctags tag, not an HTML one. 'Something you can use c-] on'.
227 call s:HL('Tag', '', '', 'bold')
229 " hi IndentGuides guibg=#373737
230 " hi WildMenu guifg=#66D9EF guibg=#000000
235 call s:HL('LineNr', 'mediumgravel', s:gutter)
236 call s:HL('SignColumn', '', s:gutter)
237 call s:HL('FoldColumn', 'mediumgravel', s:gutter)
242 call s:HL('Cursor', 'coal', 'tardis', 'bold')
243 call s:HL('vCursor', 'coal', 'tardis', 'bold')
244 call s:HL('iCursor', 'coal', 'tardis', 'none')
247 " Syntax highlighting {{{
249 " Start with a simple base.
250 call s:HL('Special', 'plain')
252 " Comments are slightly brighter than folds, to make 'headers' easier to see.
253 call s:HL('Comment', 'gravel')
254 call s:HL('Todo', 'snow', '', 'bold')
255 call s:HL('SpecialComment', 'snow', '', 'bold')
257 " Strings are a nice, pale straw color. Nothing too fancy.
258 call s:HL('String', 'dirtyblonde')
260 " Control flow stuff is taffy.
261 call s:HL('Statement', 'taffy', '', 'bold')
262 call s:HL('Keyword', 'taffy', '', 'bold')
263 call s:HL('Conditional', 'taffy', '', 'bold')
264 call s:HL('Operator', 'taffy', '', 'none')
265 call s:HL('Label', 'taffy', '', 'none')
266 call s:HL('Repeat', 'taffy', '', 'none')
268 " Functions and variable declarations are orange, because plain looks weird.
269 call s:HL('Identifier', 'orange', '', 'none')
270 call s:HL('Function', 'orange', '', 'none')
272 " Preprocessor stuff is lime, to make it pop.
274 " This includes imports in any given language, because they should usually be
275 " grouped together at the beginning of a file. If they're in the middle of some
276 " other code they should stand out, because something tricky is
278 call s:HL('PreProc', 'lime', '', 'none')
279 call s:HL('Macro', 'lime', '', 'none')
280 call s:HL('Define', 'lime', '', 'none')
281 call s:HL('PreCondit', 'lime', '', 'bold')
283 " Constants of all kinds are colored together.
284 " I'm not really happy with the color yet...
285 call s:HL('Constant', 'toffee', '', 'bold')
286 call s:HL('Character', 'toffee', '', 'bold')
287 call s:HL('Boolean', 'toffee', '', 'bold')
289 call s:HL('Number', 'toffee', '', 'bold')
290 call s:HL('Float', 'toffee', '', 'bold')
292 " Not sure what 'special character in a constant' means, but let's make it pop.
293 call s:HL('SpecialChar', 'dress', '', 'bold')
295 call s:HL('Type', 'dress', '', 'none')
296 call s:HL('StorageClass', 'taffy', '', 'none')
297 call s:HL('Structure', 'taffy', '', 'none')
298 call s:HL('Typedef', 'taffy', '', 'bold')
300 " Make try/catch blocks stand out.
301 call s:HL('Exception', 'lime', '', 'bold')
304 call s:HL('Error', 'snow', 'taffy', 'bold')
305 call s:HL('Debug', 'snow', '', 'bold')
306 call s:HL('Ignore', 'gravel', '', '')
309 " Completion Menu {{{
311 call s:HL('Pmenu', 'plain', 'deepergravel')
312 call s:HL('PmenuSel', 'coal', 'tardis', 'bold')
313 call s:HL('PmenuSbar', '', 'deepergravel')
314 call s:HL('PmenuThumb', 'brightgravel')
319 call s:HL('DiffDelete', 'coal', 'red')
320 call s:HL('DiffAdd', '', 'green')
321 call s:HL('DiffChange', '', 'lightblue')
322 call s:HL('DiffText', 'fg', 'blue', 'bold')
328 call s:HL('SpellCap', 'dalespale', '', 'undercurl,bold', 'dalespale')
329 call s:HL('SpellBad', '', '', 'undercurl', 'dalespale')
330 call s:HL('SpellLocal', '', '', 'undercurl', 'dalespale')
331 call s:HL('SpellRare', '', '', 'undercurl', 'dalespale')
341 " the message when no match is found
342 call s:HL('CtrlPNoEntries', 'snow', 'taffy', 'bold')
344 " the matched pattern
345 call s:HL('CtrlPMatch', 'orange', '', 'none')
347 " the line prefix '>' in the match window
348 call s:HL('CtrlPLinePre', 'deepgravel', '', 'none')
351 call s:HL('CtrlPPrtBase', 'deepgravel', '', 'none')
354 call s:HL('CtrlPPrtText', 'plain', '', 'none')
356 " the prompt’s cursor when moving over the text
357 call s:HL('CtrlPPrtCursor', 'coal', 'tardis', 'bold')
359 " 'prt' or 'win', also for 'regex'
360 call s:HL('CtrlPMode1', 'coal', 'tardis', 'bold')
362 " 'file' or 'path', also for the local working dir
363 call s:HL('CtrlPMode2', 'coal', 'tardis', 'bold')
365 " the scanning status
366 call s:HL('CtrlPStats', 'coal', 'tardis', 'bold')
368 " TODO: CtrlP extensions.
369 " CtrlPTabExtra : the part of each line that’s not matched against (Comment)
370 " CtrlPqfLineCol : the line and column numbers in quickfix mode (|s:HL-Search|)
371 " CtrlPUndoT : the elapsed time in undo mode (|s:HL-Directory|)
372 " CtrlPUndoBr : the square brackets [] in undo mode (Comment)
373 " CtrlPUndoNr : the undo number inside [] in undo mode (String)
378 call s:HL('EasyMotionTarget', 'tardis', '', 'bold')
379 call s:HL('EasyMotionShade', 'deepgravel', '')
382 " Interesting Words {{{
384 " These are only used if you're me or have copied the <leader>hNUM mappings
386 call s:HL('InterestingWord1', 'coal', 'orange')
387 call s:HL('InterestingWord2', 'coal', 'lime')
388 call s:HL('InterestingWord3', 'coal', 'saltwatertaffy')
389 call s:HL('InterestingWord4', 'coal', 'toffee')
390 call s:HL('InterestingWord5', 'coal', 'dress')
391 call s:HL('InterestingWord6', 'coal', 'taffy')
397 " hi GreenBar term=reverse ctermfg=white ctermbg=green guifg=coal guibg=#9edf1c
398 " hi RedBar term=reverse ctermfg=white ctermbg=red guifg=white guibg=#C50048
401 " Rainbow Parentheses {{{
403 call s:HL('level16c', 'mediumgravel', '', 'bold')
404 call s:HL('level15c', 'dalespale', '', '')
405 call s:HL('level14c', 'dress', '', '')
406 call s:HL('level13c', 'orange', '', '')
407 call s:HL('level12c', 'tardis', '', '')
408 call s:HL('level11c', 'lime', '', '')
409 call s:HL('level10c', 'toffee', '', '')
410 call s:HL('level9c', 'saltwatertaffy', '', '')
411 call s:HL('level8c', 'coffee', '', '')
412 call s:HL('level7c', 'dalespale', '', '')
413 call s:HL('level6c', 'dress', '', '')
414 call s:HL('level5c', 'orange', '', '')
415 call s:HL('level4c', 'tardis', '', '')
416 call s:HL('level3c', 'lime', '', '')
417 call s:HL('level2c', 'toffee', '', '')
418 call s:HL('level1c', 'saltwatertaffy', '', '')
423 call s:HL('ShowMarksHLl', 'tardis', 'blackgravel')
424 call s:HL('ShowMarksHLu', 'tardis', 'blackgravel')
425 call s:HL('ShowMarksHLo', 'tardis', 'blackgravel')
426 call s:HL('ShowMarksHLm', 'tardis', 'blackgravel')
431 " Filetype-specific {{{
435 call s:HL('clojureSpecial', 'taffy', '', '')
436 call s:HL('clojureDefn', 'taffy', '', '')
437 call s:HL('clojureDefMacro', 'taffy', '', '')
438 call s:HL('clojureDefine', 'taffy', '', '')
439 call s:HL('clojureMacro', 'taffy', '', '')
440 call s:HL('clojureCond', 'taffy', '', '')
442 call s:HL('clojureKeyword', 'orange', '', 'none')
444 call s:HL('clojureFunc', 'dress', '', 'none')
445 call s:HL('clojureRepeat', 'dress', '', 'none')
447 call s:HL('clojureParen0', 'lightgravel', '', 'none')
449 call s:HL('clojureAnonArg', 'snow', '', 'bold')
454 if g:badwolf_css_props_highlight
455 call s:HL('cssColorProp', 'dirtyblonde', '', 'none')
456 call s:HL('cssBoxProp', 'dirtyblonde', '', 'none')
457 call s:HL('cssTextProp', 'dirtyblonde', '', 'none')
458 call s:HL('cssRenderProp', 'dirtyblonde', '', 'none')
459 call s:HL('cssGeneratedContentProp', 'dirtyblonde', '', 'none')
461 call s:HL('cssColorProp', 'fg', '', 'none')
462 call s:HL('cssBoxProp', 'fg', '', 'none')
463 call s:HL('cssTextProp', 'fg', '', 'none')
464 call s:HL('cssRenderProp', 'fg', '', 'none')
465 call s:HL('cssGeneratedContentProp', 'fg', '', 'none')
468 call s:HL('cssValueLength', 'toffee', '', 'bold')
469 call s:HL('cssColor', 'toffee', '', 'bold')
470 call s:HL('cssBraces', 'lightgravel', '', 'none')
471 call s:HL('cssIdentifier', 'orange', '', 'bold')
472 call s:HL('cssClassName', 'orange', '', 'none')
477 call s:HL('gitDiff', 'lightgravel', '',)
479 call s:HL('diffRemoved', 'dress', '',)
480 call s:HL('diffAdded', 'lime', '',)
481 call s:HL('diffFile', 'coal', 'taffy', 'bold')
482 call s:HL('diffNewFile', 'coal', 'taffy', 'bold')
484 call s:HL('diffLine', 'coal', 'orange', 'bold')
485 call s:HL('diffSubname', 'orange', '', 'none')
488 " Django Templates {{{
490 call s:HL('djangoArgument', 'dirtyblonde', '',)
491 call s:HL('djangoTagBlock', 'orange', '')
492 call s:HL('djangoVarBlock', 'orange', '')
493 " hi djangoStatement guifg=#ff3853 gui=bold
494 " hi djangoVarBlock guifg=#f4cf86
500 call s:HL('htmlTag', 'darkroast', '', 'none')
501 call s:HL('htmlEndTag', 'darkroast', '', 'none')
504 call s:HL('htmlTagName', 'coffee', '', 'bold')
505 call s:HL('htmlSpecialTagName', 'coffee', '', 'bold')
506 call s:HL('htmlSpecialChar', 'lime', '', 'none')
509 call s:HL('htmlArg', 'coffee', '', 'none')
511 " Stuff inside an <a> tag
513 if g:badwolf_html_link_underline
514 call s:HL('htmlLink', 'lightgravel', '', 'underline')
516 call s:HL('htmlLink', 'lightgravel', '', 'none')
522 call s:HL('javaClassDecl', 'taffy', '', 'bold')
523 call s:HL('javaScopeDecl', 'taffy', '', 'bold')
524 call s:HL('javaCommentTitle', 'gravel', '')
525 call s:HL('javaDocTags', 'snow', '', 'none')
526 call s:HL('javaDocParam', 'dalespale', '', '')
531 call s:HL('texStatement', 'tardis', '', 'none')
532 call s:HL('texMathZoneX', 'orange', '', 'none')
533 call s:HL('texMathZoneA', 'orange', '', 'none')
534 call s:HL('texMathZoneB', 'orange', '', 'none')
535 call s:HL('texMathZoneC', 'orange', '', 'none')
536 call s:HL('texMathZoneD', 'orange', '', 'none')
537 call s:HL('texMathZoneE', 'orange', '', 'none')
538 call s:HL('texMathZoneV', 'orange', '', 'none')
539 call s:HL('texMathZoneX', 'orange', '', 'none')
540 call s:HL('texMath', 'orange', '', 'none')
541 call s:HL('texMathMatcher', 'orange', '', 'none')
542 call s:HL('texRefLabel', 'dirtyblonde', '', 'none')
543 call s:HL('texRefZone', 'lime', '', 'none')
544 call s:HL('texComment', 'darkroast', '', 'none')
545 call s:HL('texDelimiter', 'orange', '', 'none')
546 call s:HL('texZone', 'brightgravel', '', 'none')
551 au BufRead,BufNewFile *.tex syn region texMathZoneV start="\\(" end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
552 au BufRead,BufNewFile *.tex syn region texMathZoneX start="\$" skip="\\\\\|\\\$" end="\$\|%stopzone\>" keepend contains=@texMathZoneGroup
558 call s:HL('lessVariable', 'lime', '', 'none')
563 call s:HL('lispyscriptDefMacro', 'lime', '', '')
564 call s:HL('lispyscriptRepeat', 'dress', '', 'none')
569 call s:HL('mailSubject', 'orange', '', 'bold')
570 call s:HL('mailHeader', 'lightgravel', '', '')
571 call s:HL('mailHeaderKey', 'lightgravel', '', '')
572 call s:HL('mailHeaderEmail', 'snow', '', '')
573 call s:HL('mailURL', 'toffee', '', 'underline')
574 call s:HL('mailSignature', 'gravel', '', 'none')
576 call s:HL('mailQuoted1', 'gravel', '', 'none')
577 call s:HL('mailQuoted2', 'dress', '', 'none')
578 call s:HL('mailQuoted3', 'dirtyblonde', '', 'none')
579 call s:HL('mailQuoted4', 'orange', '', 'none')
580 call s:HL('mailQuoted5', 'lime', '', 'none')
585 call s:HL('markdownHeadingRule', 'lightgravel', '', 'bold')
586 call s:HL('markdownHeadingDelimiter', 'lightgravel', '', 'bold')
587 call s:HL('markdownOrderedListMarker', 'lightgravel', '', 'bold')
588 call s:HL('markdownListMarker', 'lightgravel', '', 'bold')
589 call s:HL('markdownItalic', 'snow', '', 'bold')
590 call s:HL('markdownBold', 'snow', '', 'bold')
591 call s:HL('markdownH1', 'orange', '', 'bold')
592 call s:HL('markdownH2', 'lime', '', 'bold')
593 call s:HL('markdownH3', 'lime', '', 'none')
594 call s:HL('markdownH4', 'lime', '', 'none')
595 call s:HL('markdownH5', 'lime', '', 'none')
596 call s:HL('markdownH6', 'lime', '', 'none')
597 call s:HL('markdownLinkText', 'toffee', '', 'underline')
598 call s:HL('markdownIdDeclaration', 'toffee')
599 call s:HL('markdownAutomaticLink', 'toffee', '', 'bold')
600 call s:HL('markdownUrl', 'toffee', '', 'bold')
601 call s:HL('markdownUrldelimiter', 'lightgravel', '', 'bold')
602 call s:HL('markdownLinkDelimiter', 'lightgravel', '', 'bold')
603 call s:HL('markdownLinkTextDelimiter', 'lightgravel', '', 'bold')
604 call s:HL('markdownCodeDelimiter', 'dirtyblonde', '', 'bold')
605 call s:HL('markdownCode', 'dirtyblonde', '', 'none')
606 call s:HL('markdownCodeBlock', 'dirtyblonde', '', 'none')
611 call s:HL('mysqlSpecial', 'dress', '', 'bold')
616 hi def link pythonOperator Operator
617 call s:HL('pythonBuiltin', 'dress')
618 call s:HL('pythonBuiltinObj', 'dress')
619 call s:HL('pythonBuiltinFunc', 'dress')
620 call s:HL('pythonEscape', 'dress')
621 call s:HL('pythonException', 'lime', '', 'bold')
622 call s:HL('pythonExceptions', 'lime', '', 'none')
623 call s:HL('pythonPrecondit', 'lime', '', 'none')
624 call s:HL('pythonDecorator', 'taffy', '', 'none')
625 call s:HL('pythonRun', 'gravel', '', 'bold')
626 call s:HL('pythonCoding', 'gravel', '', 'bold')
631 " Rainbow parentheses
632 call s:HL('hlLevel0', 'gravel')
633 call s:HL('hlLevel1', 'orange')
634 call s:HL('hlLevel2', 'saltwatertaffy')
635 call s:HL('hlLevel3', 'dress')
636 call s:HL('hlLevel4', 'coffee')
637 call s:HL('hlLevel5', 'dirtyblonde')
638 call s:HL('hlLevel6', 'orange')
639 call s:HL('hlLevel7', 'saltwatertaffy')
640 call s:HL('hlLevel8', 'dress')
641 call s:HL('hlLevel9', 'coffee')
646 call s:HL('VimCommentTitle', 'lightgravel', '', 'bold')
648 call s:HL('VimMapMod', 'dress', '', 'none')
649 call s:HL('VimMapModKey', 'dress', '', 'none')
650 call s:HL('VimNotation', 'dress', '', 'none')
651 call s:HL('VimBracket', 'dress', '', 'none')