My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

jellybeans.vim 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. " Vim color file
  2. "
  3. " " __ _ _ _ "
  4. " " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ "
  5. " " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| "
  6. " " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ "
  7. " " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ "
  8. " " \___/ "
  9. "
  10. " "A colorful, dark color scheme for Vim."
  11. "
  12. " File: jellybeans.vim
  13. " URL: github.com/nanotech/jellybeans.vim
  14. " Scripts URL: vim.org/scripts/script.php?script_id=2555
  15. " Maintainer: NanoTech (nanotech.nanotechcorp.net)
  16. " Version: 1.6~git
  17. " Last Change: January 15th, 2012
  18. " License: MIT
  19. " Contributors: Daniel Herbert (pocketninja)
  20. " Henry So, Jr. <henryso@panix.com>
  21. " David Liang <bmdavll at gmail dot com>
  22. " Rich Healey (richo)
  23. " Andrew Wong (w0ng)
  24. "
  25. " Copyright (c) 2009-2012 NanoTech
  26. "
  27. " Permission is hereby granted, free of charge, to any per‐
  28. " son obtaining a copy of this software and associated doc‐
  29. " umentation files (the “Software”), to deal in the Soft‐
  30. " ware without restriction, including without limitation
  31. " the rights to use, copy, modify, merge, publish, distrib‐
  32. " ute, sublicense, and/or sell copies of the Software, and
  33. " to permit persons to whom the Software is furnished to do
  34. " so, subject to the following conditions:
  35. "
  36. " The above copyright notice and this permission notice
  37. " shall be included in all copies or substantial portions
  38. " of the Software.
  39. "
  40. " THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
  41. " KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  42. " THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐
  43. " LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  44. " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  45. " DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐
  46. " TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐
  47. " NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  48. " THE SOFTWARE.
  49. set background=dark
  50. hi clear
  51. if exists("syntax_on")
  52. syntax reset
  53. endif
  54. let colors_name = "jellybeans"
  55. if has("gui_running") || &t_Co == 88 || &t_Co == 256
  56. let s:low_color = 0
  57. else
  58. let s:low_color = 1
  59. endif
  60. " Configuration Variables:
  61. " - g:jellybeans_overrides
  62. " - g:jellybeans_use_lowcolor_black
  63. " - g:jellybeans_use_term_background_color
  64. " - g:jellybeans_use_term_italics
  65. let s:background_color = "151515"
  66. " Backwards compatibility
  67. if exists("g:jellybeans_background_color") || exists("g:jellybeans_background_color_256")
  68. if !exists("g:jellybeans_overrides")
  69. let g:jellybeans_overrides = {}
  70. endif
  71. if !has_key(g:jellybeans_overrides, "background")
  72. let g:jellybeans_overrides["background"] = {}
  73. endif
  74. if exists("g:jellybeans_background_color")
  75. let g:jellybeans_overrides["background"]["guibg"] = g:jellybeans_background_color
  76. endif
  77. if exists("g:jellybeans_background_color_256")
  78. let g:jellybeans_overrides["background"]["256ctermbg"] = g:jellybeans_background_color_256
  79. endif
  80. endif
  81. " Ensure that g:jellybeans_use_term_background_color = 0 works with overrides
  82. if exists("g:jellybeans_overrides")
  83. \ && has_key(g:jellybeans_overrides, "background")
  84. \ && has_key(g:jellybeans_overrides["background"], "guibg")
  85. let s:background_color = g:jellybeans_overrides["background"]["guibg"]
  86. endif
  87. if !exists("g:jellybeans_use_lowcolor_black") || g:jellybeans_use_lowcolor_black
  88. let s:termBlack = "Black"
  89. else
  90. let s:termBlack = "Grey"
  91. endif
  92. if !exists("g:jellybeans_use_term_background_color")
  93. " OS X's Terminal.app and iTerm apply transparency to all
  94. " backgrounds. Other terminals tend to only apply transparency
  95. " to the default unhighlighted background.
  96. "
  97. " has("mac") only detects MacVim, not Apple's /usr/bin/vim.
  98. " We could check system("uname"), but then we're calling
  99. " external programs from a colorscheme.
  100. let g:jellybeans_use_term_background_color = has("mac")
  101. end
  102. " Color approximation functions by Henry So, Jr. and David Liang {{{
  103. " Added to jellybeans.vim by Daniel Herbert
  104. " returns an approximate grey index for the given grey level
  105. fun! s:grey_number(x)
  106. if &t_Co == 88
  107. if a:x < 23
  108. return 0
  109. elseif a:x < 69
  110. return 1
  111. elseif a:x < 103
  112. return 2
  113. elseif a:x < 127
  114. return 3
  115. elseif a:x < 150
  116. return 4
  117. elseif a:x < 173
  118. return 5
  119. elseif a:x < 196
  120. return 6
  121. elseif a:x < 219
  122. return 7
  123. elseif a:x < 243
  124. return 8
  125. else
  126. return 9
  127. endif
  128. else
  129. if a:x < 14
  130. return 0
  131. else
  132. let l:n = (a:x - 8) / 10
  133. let l:m = (a:x - 8) % 10
  134. if l:m < 5
  135. return l:n
  136. else
  137. return l:n + 1
  138. endif
  139. endif
  140. endif
  141. endfun
  142. " returns the actual grey level represented by the grey index
  143. fun! s:grey_level(n)
  144. if &t_Co == 88
  145. if a:n == 0
  146. return 0
  147. elseif a:n == 1
  148. return 46
  149. elseif a:n == 2
  150. return 92
  151. elseif a:n == 3
  152. return 115
  153. elseif a:n == 4
  154. return 139
  155. elseif a:n == 5
  156. return 162
  157. elseif a:n == 6
  158. return 185
  159. elseif a:n == 7
  160. return 208
  161. elseif a:n == 8
  162. return 231
  163. else
  164. return 255
  165. endif
  166. else
  167. if a:n == 0
  168. return 0
  169. else
  170. return 8 + (a:n * 10)
  171. endif
  172. endif
  173. endfun
  174. " returns the palette index for the given grey index
  175. fun! s:grey_color(n)
  176. if &t_Co == 88
  177. if a:n == 0
  178. return 16
  179. elseif a:n == 9
  180. return 79
  181. else
  182. return 79 + a:n
  183. endif
  184. else
  185. if a:n == 0
  186. return 16
  187. elseif a:n == 25
  188. return 231
  189. else
  190. return 231 + a:n
  191. endif
  192. endif
  193. endfun
  194. " returns an approximate color index for the given color level
  195. fun! s:rgb_number(x)
  196. if &t_Co == 88
  197. if a:x < 69
  198. return 0
  199. elseif a:x < 172
  200. return 1
  201. elseif a:x < 230
  202. return 2
  203. else
  204. return 3
  205. endif
  206. else
  207. if a:x < 75
  208. return 0
  209. else
  210. let l:n = (a:x - 55) / 40
  211. let l:m = (a:x - 55) % 40
  212. if l:m < 20
  213. return l:n
  214. else
  215. return l:n + 1
  216. endif
  217. endif
  218. endif
  219. endfun
  220. " returns the actual color level for the given color index
  221. fun! s:rgb_level(n)
  222. if &t_Co == 88
  223. if a:n == 0
  224. return 0
  225. elseif a:n == 1
  226. return 139
  227. elseif a:n == 2
  228. return 205
  229. else
  230. return 255
  231. endif
  232. else
  233. if a:n == 0
  234. return 0
  235. else
  236. return 55 + (a:n * 40)
  237. endif
  238. endif
  239. endfun
  240. " returns the palette index for the given R/G/B color indices
  241. fun! s:rgb_color(x, y, z)
  242. if &t_Co == 88
  243. return 16 + (a:x * 16) + (a:y * 4) + a:z
  244. else
  245. return 16 + (a:x * 36) + (a:y * 6) + a:z
  246. endif
  247. endfun
  248. " returns the palette index to approximate the given R/G/B color levels
  249. fun! s:color(r, g, b)
  250. " map greys directly (see xterm's 256colres.pl)
  251. if &t_Co == 256 && a:r == a:g && a:g == a:b && a:r > 3 && a:r < 243
  252. return float2nr(round(a:r - 8) / 10.0) + 232
  253. endif
  254. " get the closest grey
  255. let l:gx = s:grey_number(a:r)
  256. let l:gy = s:grey_number(a:g)
  257. let l:gz = s:grey_number(a:b)
  258. " get the closest color
  259. let l:x = s:rgb_number(a:r)
  260. let l:y = s:rgb_number(a:g)
  261. let l:z = s:rgb_number(a:b)
  262. if l:gx == l:gy && l:gy == l:gz
  263. " there are two possibilities
  264. let l:dgr = s:grey_level(l:gx) - a:r
  265. let l:dgg = s:grey_level(l:gy) - a:g
  266. let l:dgb = s:grey_level(l:gz) - a:b
  267. let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
  268. let l:dr = s:rgb_level(l:gx) - a:r
  269. let l:dg = s:rgb_level(l:gy) - a:g
  270. let l:db = s:rgb_level(l:gz) - a:b
  271. let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
  272. if l:dgrey < l:drgb
  273. " use the grey
  274. return s:grey_color(l:gx)
  275. else
  276. " use the color
  277. return s:rgb_color(l:x, l:y, l:z)
  278. endif
  279. else
  280. " only one possibility
  281. return s:rgb_color(l:x, l:y, l:z)
  282. endif
  283. endfun
  284. " returns the palette index to approximate the 'rrggbb' hex string
  285. fun! s:rgb(rgb)
  286. let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
  287. let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
  288. let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
  289. return s:color(l:r, l:g, l:b)
  290. endfun
  291. " sets the highlighting for the given group
  292. fun! s:X(group, fg, bg, attr, lcfg, lcbg)
  293. if s:low_color
  294. let l:fge = empty(a:lcfg)
  295. let l:bge = empty(a:lcbg)
  296. if !l:fge && !l:bge
  297. exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=".a:lcbg
  298. elseif !l:fge && l:bge
  299. exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=NONE"
  300. elseif l:fge && !l:bge
  301. exec "hi ".a:group." ctermfg=NONE ctermbg=".a:lcbg
  302. endif
  303. else
  304. let l:fge = empty(a:fg)
  305. let l:bge = empty(a:bg)
  306. if !g:jellybeans_use_term_background_color && a:bg == s:background_color
  307. let l:ctermbg = 'NONE'
  308. else
  309. let l:ctermbg = s:rgb(a:bg)
  310. endif
  311. if !l:fge && !l:bge
  312. exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".l:ctermbg
  313. elseif !l:fge && l:bge
  314. exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE"
  315. elseif l:fge && !l:bge
  316. exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermfg=NONE ctermbg=".l:ctermbg
  317. endif
  318. endif
  319. if empty(a:attr)
  320. let l:attr = "none"
  321. else
  322. let l:attr = a:attr
  323. endif
  324. if exists("g:jellybeans_use_term_italics") && g:jellybeans_use_term_italics
  325. let l:cterm_attr = l:attr
  326. else
  327. let l:cterm_attr = join(filter(split(l:attr, ","), "v:val !=? 'italic'"), ",")
  328. if empty(l:cterm_attr)
  329. let l:cterm_attr = "none"
  330. endif
  331. endif
  332. exec "hi ".a:group." gui=".l:attr." cterm=".l:cterm_attr
  333. endfun
  334. " }}}
  335. call s:X("Normal","e8e8d3",s:background_color,"","White","")
  336. set background=dark
  337. if version >= 700
  338. call s:X("CursorLine","","1c1c1c","","",s:termBlack)
  339. call s:X("CursorColumn","","1c1c1c","","",s:termBlack)
  340. call s:X("MatchParen","ffffff","556779","bold","","DarkCyan")
  341. call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack)
  342. call s:X("TabLineFill","9098a0","","","",s:termBlack)
  343. call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White")
  344. " Auto-completion
  345. call s:X("Pmenu","ffffff","606060","","White",s:termBlack)
  346. call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White")
  347. endif
  348. call s:X("Visual","","404040","","",s:termBlack)
  349. call s:X("Cursor",s:background_color,"b0d0f0","","","")
  350. call s:X("LineNr","605958",s:background_color,"none",s:termBlack,"")
  351. call s:X("CursorLineNr","ccc5c4","","none","White","")
  352. call s:X("Comment","888888","","italic","Grey","")
  353. call s:X("Todo","c7c7c7","","bold","White",s:termBlack)
  354. call s:X("StatusLine","000000","dddddd","italic","","White")
  355. call s:X("StatusLineNC","ffffff","403c41","italic","White","Black")
  356. call s:X("VertSplit","777777","403c41","",s:termBlack,s:termBlack)
  357. call s:X("WildMenu","f0a0c0","302028","","Magenta","")
  358. call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"")
  359. call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack)
  360. call s:X("SignColumn","777777","333333","","",s:termBlack)
  361. call s:X("ColorColumn","","000000","","",s:termBlack)
  362. call s:X("Title","70b950","","bold","Green","")
  363. call s:X("Constant","cf6a4c","","","Red","")
  364. call s:X("Special","799d6a","","","Green","")
  365. call s:X("Delimiter","668799","","","Grey","")
  366. call s:X("String","99ad6a","","","Green","")
  367. call s:X("StringDelimiter","556633","","","DarkGreen","")
  368. call s:X("Identifier","c6b6ee","","","LightCyan","")
  369. call s:X("Structure","8fbfdc","","","LightCyan","")
  370. call s:X("Function","fad07a","","","Yellow","")
  371. call s:X("Statement","8197bf","","","DarkBlue","")
  372. call s:X("PreProc","8fbfdc","","","LightBlue","")
  373. hi! link Operator Structure
  374. call s:X("Type","ffb964","","","Yellow","")
  375. call s:X("NonText","606060",s:background_color,"",s:termBlack,"")
  376. call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"")
  377. call s:X("Search","f0a0c0","302028","underline","Magenta","")
  378. call s:X("Directory","dad085","","","Yellow","")
  379. call s:X("ErrorMsg","","902020","","","DarkRed")
  380. hi! link Error ErrorMsg
  381. hi! link MoreMsg Special
  382. call s:X("Question","65C254","","","Green","")
  383. " Spell Checking
  384. call s:X("SpellBad","","902020","underline","","DarkRed")
  385. call s:X("SpellCap","","0000df","underline","","Blue")
  386. call s:X("SpellRare","","540063","underline","","DarkMagenta")
  387. call s:X("SpellLocal","","2D7067","underline","","Green")
  388. " Diff
  389. hi! link diffRemoved Constant
  390. hi! link diffAdded String
  391. " VimDiff
  392. call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen")
  393. call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed")
  394. call s:X("DiffChange","","2B5B77","","White","DarkBlue")
  395. call s:X("DiffText","8fbfdc","000000","reverse","Yellow","")
  396. " PHP
  397. hi! link phpFunctions Function
  398. call s:X("StorageClass","c59f6f","","","Red","")
  399. hi! link phpSuperglobal Identifier
  400. hi! link phpQuoteSingle StringDelimiter
  401. hi! link phpQuoteDouble StringDelimiter
  402. hi! link phpBoolean Constant
  403. hi! link phpNull Constant
  404. hi! link phpArrayPair Operator
  405. hi! link phpOperator Normal
  406. hi! link phpRelation Normal
  407. hi! link phpVarSelector Identifier
  408. " Python
  409. hi! link pythonOperator Statement
  410. " Ruby
  411. hi! link rubySharpBang Comment
  412. call s:X("rubyClass","447799","","","DarkBlue","")
  413. call s:X("rubyIdentifier","c6b6fe","","","Cyan","")
  414. hi! link rubyConstant Type
  415. hi! link rubyFunction Function
  416. call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","")
  417. call s:X("rubySymbol","7697d6","","","Blue","")
  418. hi! link rubyGlobalVariable rubyInstanceVariable
  419. hi! link rubyModule rubyClass
  420. call s:X("rubyControl","7597c6","","","Blue","")
  421. hi! link rubyString String
  422. hi! link rubyStringDelimiter StringDelimiter
  423. hi! link rubyInterpolationDelimiter Identifier
  424. call s:X("rubyRegexpDelimiter","540063","","","Magenta","")
  425. call s:X("rubyRegexp","dd0093","","","DarkMagenta","")
  426. call s:X("rubyRegexpSpecial","a40073","","","Magenta","")
  427. call s:X("rubyPredefinedIdentifier","de5577","","","Red","")
  428. " Erlang
  429. hi! link erlangAtom rubySymbol
  430. hi! link erlangBIF rubyPredefinedIdentifier
  431. hi! link erlangFunction rubyPredefinedIdentifier
  432. hi! link erlangDirective Statement
  433. hi! link erlangNode Identifier
  434. " Elixir
  435. hi! link elixirAtom rubySymbol
  436. " JavaScript
  437. hi! link javaScriptValue Constant
  438. hi! link javaScriptRegexpString rubyRegexp
  439. hi! link javaScriptTemplateVar StringDelim
  440. hi! link javaScriptTemplateDelim Identifier
  441. hi! link javaScriptTemplateString String
  442. " CoffeeScript
  443. hi! link coffeeRegExp javaScriptRegexpString
  444. " Lua
  445. hi! link luaOperator Conditional
  446. " C
  447. hi! link cFormat Identifier
  448. hi! link cOperator Constant
  449. " Objective-C/Cocoa
  450. hi! link objcClass Type
  451. hi! link cocoaClass objcClass
  452. hi! link objcSubclass objcClass
  453. hi! link objcSuperclass objcClass
  454. hi! link objcDirective rubyClass
  455. hi! link objcStatement Constant
  456. hi! link cocoaFunction Function
  457. hi! link objcMethodName Identifier
  458. hi! link objcMethodArg Normal
  459. hi! link objcMessageName Identifier
  460. " Vimscript
  461. hi! link vimOper Normal
  462. " HTML
  463. hi! link htmlTag Statement
  464. hi! link htmlEndTag htmlTag
  465. hi! link htmlTagName htmlTag
  466. " XML
  467. hi! link xmlTag Statement
  468. hi! link xmlEndTag xmlTag
  469. hi! link xmlTagName xmlTag
  470. hi! link xmlEqual xmlTag
  471. hi! link xmlEntity Special
  472. hi! link xmlEntityPunct xmlEntity
  473. hi! link xmlDocTypeDecl PreProc
  474. hi! link xmlDocTypeKeyword PreProc
  475. hi! link xmlProcessingDelim xmlAttrib
  476. " Debugger.vim
  477. call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue")
  478. call s:X("DbgBreakPt","","4F0037","","","DarkMagenta")
  479. " vim-indent-guides
  480. if !exists("g:indent_guides_auto_colors")
  481. let g:indent_guides_auto_colors = 0
  482. endif
  483. call s:X("IndentGuidesOdd","","232323","","","")
  484. call s:X("IndentGuidesEven","","1b1b1b","","","")
  485. " Plugins, etc.
  486. hi! link TagListFileName Directory
  487. call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green")
  488. " Manual overrides for 256-color terminals. Dark colors auto-map badly.
  489. if !s:low_color
  490. hi StatusLineNC ctermbg=235
  491. hi Folded ctermbg=236
  492. hi DiffText ctermfg=81
  493. hi DbgBreakPt ctermbg=53
  494. hi IndentGuidesOdd ctermbg=235
  495. hi IndentGuidesEven ctermbg=234
  496. endif
  497. if exists("g:jellybeans_overrides")
  498. fun! s:current_attr(group)
  499. let l:synid = synIDtrans(hlID(a:group))
  500. let l:attrs = []
  501. for l:attr in ["bold", "italic", "reverse", "standout", "underline", "undercurl"]
  502. if synIDattr(l:synid, l:attr, "gui") == 1
  503. call add(l:attrs, l:attr)
  504. endif
  505. endfor
  506. return join(l:attrs, ",")
  507. endfun
  508. fun! s:current_color(group, what, mode)
  509. let l:color = synIDattr(synIDtrans(hlID(a:group)), a:what, a:mode)
  510. if l:color == -1
  511. return ""
  512. else
  513. return substitute(l:color, "^#", "", "")
  514. endif
  515. endfun
  516. fun! s:load_color_def(group, def)
  517. call s:X(a:group, get(a:def, "guifg", s:current_color(a:group, "fg", "gui")),
  518. \ get(a:def, "guibg", s:current_color(a:group, "bg", "gui")),
  519. \ get(a:def, "attr", s:current_attr(a:group)),
  520. \ get(a:def, "ctermfg", s:current_color(a:group, "fg", "cterm")),
  521. \ get(a:def, "ctermbg", s:current_color(a:group, "bg", "cterm")))
  522. if !s:low_color
  523. for l:prop in ["ctermfg", "ctermbg"]
  524. let l:override_key = "256".l:prop
  525. if has_key(a:def, l:override_key)
  526. exec "hi ".a:group." ".l:prop."=".a:def[l:override_key]
  527. endif
  528. endfor
  529. endif
  530. endfun
  531. fun! s:load_colors(defs)
  532. for [l:group, l:def] in items(a:defs)
  533. if l:group == "background"
  534. call s:load_color_def("LineNr", l:def)
  535. call s:load_color_def("NonText", l:def)
  536. call s:load_color_def("Normal", l:def)
  537. else
  538. call s:load_color_def(l:group, l:def)
  539. endif
  540. unlet l:group
  541. unlet l:def
  542. endfor
  543. endfun
  544. call s:load_colors(g:jellybeans_overrides)
  545. delf s:load_colors
  546. delf s:load_color_def
  547. delf s:current_color
  548. delf s:current_attr
  549. endif
  550. " delete functions {{{
  551. delf s:X
  552. delf s:rgb
  553. delf s:color
  554. delf s:rgb_color
  555. delf s:rgb_level
  556. delf s:rgb_number
  557. delf s:grey_color
  558. delf s:grey_level
  559. delf s:grey_number
  560. " }}}