cobalt2.vim 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. " Vim color file
  2. " Author: Gertjan Reynaert (port from theme of Wes Bos)
  3. " Notes: Cobalt2 color scheme port for VIM
  4. set background=dark
  5. hi clear
  6. if exists("syntax_on")
  7. syntax reset
  8. endif
  9. let colors_name = "cobalt2"
  10. if has("gui_running") || &t_Co == 88 || &t_Co == 256
  11. let s:low_color = 0
  12. else
  13. let s:low_color = 1
  14. endif
  15. " Color approximation functions by Henry So, Jr. and David Liang
  16. " returns an approximate grey index for the given grey level
  17. fun! s:grey_number(x)
  18. if &t_Co == 88
  19. if a:x < 23
  20. return 0
  21. elseif a:x < 69
  22. return 1
  23. elseif a:x < 103
  24. return 2
  25. elseif a:x < 127
  26. return 3
  27. elseif a:x < 150
  28. return 4
  29. elseif a:x < 173
  30. return 5
  31. elseif a:x < 196
  32. return 6
  33. elseif a:x < 219
  34. return 7
  35. elseif a:x < 243
  36. return 8
  37. else
  38. return 9
  39. endif
  40. else
  41. if a:x < 14
  42. return 0
  43. else
  44. let l:n = (a:x - 8) / 10
  45. let l:m = (a:x - 8) % 10
  46. if l:m < 5
  47. return l:n
  48. else
  49. return l:n + 1
  50. endif
  51. endif
  52. endif
  53. endfun
  54. " returns the actual grey level represented by the grey index
  55. fun! s:grey_level(n)
  56. if &t_Co == 88
  57. if a:n == 0
  58. return 0
  59. elseif a:n == 1
  60. return 46
  61. elseif a:n == 2
  62. return 92
  63. elseif a:n == 3
  64. return 115
  65. elseif a:n == 4
  66. return 139
  67. elseif a:n == 5
  68. return 162
  69. elseif a:n == 6
  70. return 185
  71. elseif a:n == 7
  72. return 208
  73. elseif a:n == 8
  74. return 231
  75. else
  76. return 255
  77. endif
  78. else
  79. if a:n == 0
  80. return 0
  81. else
  82. return 8 + (a:n * 10)
  83. endif
  84. endif
  85. endfun
  86. " returns the palette index for the given grey index
  87. fun! s:grey_color(n)
  88. if &t_Co == 88
  89. if a:n == 0
  90. return 16
  91. elseif a:n == 9
  92. return 79
  93. else
  94. return 79 + a:n
  95. endif
  96. else
  97. if a:n == 0
  98. return 16
  99. elseif a:n == 25
  100. return 231
  101. else
  102. return 231 + a:n
  103. endif
  104. endif
  105. endfun
  106. " returns an approximate color index for the given color level
  107. fun! s:rgb_number(x)
  108. if &t_Co == 88
  109. if a:x < 69
  110. return 0
  111. elseif a:x < 172
  112. return 1
  113. elseif a:x < 230
  114. return 2
  115. else
  116. return 3
  117. endif
  118. else
  119. if a:x < 75
  120. return 0
  121. else
  122. let l:n = (a:x - 55) / 40
  123. let l:m = (a:x - 55) % 40
  124. if l:m < 20
  125. return l:n
  126. else
  127. return l:n + 1
  128. endif
  129. endif
  130. endif
  131. endfun
  132. " returns the actual color level for the given color index
  133. fun! s:rgb_level(n)
  134. if &t_Co == 88
  135. if a:n == 0
  136. return 0
  137. elseif a:n == 1
  138. return 139
  139. elseif a:n == 2
  140. return 205
  141. else
  142. return 255
  143. endif
  144. else
  145. if a:n == 0
  146. return 0
  147. else
  148. return 55 + (a:n * 40)
  149. endif
  150. endif
  151. endfun
  152. " returns the palette index for the given R/G/B color indices
  153. fun! s:rgb_color(x, y, z)
  154. if &t_Co == 88
  155. return 16 + (a:x * 16) + (a:y * 4) + a:z
  156. else
  157. return 16 + (a:x * 36) + (a:y * 6) + a:z
  158. endif
  159. endfun
  160. " returns the palette index to approximate the given R/G/B color levels
  161. fun! s:color(r, g, b)
  162. " get the closest grey
  163. let l:gx = s:grey_number(a:r)
  164. let l:gy = s:grey_number(a:g)
  165. let l:gz = s:grey_number(a:b)
  166. " get the closest color
  167. let l:x = s:rgb_number(a:r)
  168. let l:y = s:rgb_number(a:g)
  169. let l:z = s:rgb_number(a:b)
  170. if l:gx == l:gy && l:gy == l:gz
  171. " there are two possibilities
  172. let l:dgr = s:grey_level(l:gx) - a:r
  173. let l:dgg = s:grey_level(l:gy) - a:g
  174. let l:dgb = s:grey_level(l:gz) - a:b
  175. let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
  176. let l:dr = s:rgb_level(l:gx) - a:r
  177. let l:dg = s:rgb_level(l:gy) - a:g
  178. let l:db = s:rgb_level(l:gz) - a:b
  179. let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
  180. if l:dgrey < l:drgb
  181. " use the grey
  182. return s:grey_color(l:gx)
  183. else
  184. " use the color
  185. return s:rgb_color(l:x, l:y, l:z)
  186. endif
  187. else
  188. " only one possibility
  189. return s:rgb_color(l:x, l:y, l:z)
  190. endif
  191. endfun
  192. " returns the palette index to approximate the 'rrggbb' hex string
  193. fun! s:rgb(rgb)
  194. let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
  195. let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
  196. let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
  197. return s:color(l:r, l:g, l:b)
  198. endfun
  199. " sets the highlighting for the given group
  200. fun! s:X(group, fg, bg, attr, lcfg, lcbg)
  201. if s:low_color
  202. let l:fge = empty(a:lcfg)
  203. let l:bge = empty(a:lcbg)
  204. if !l:fge && !l:bge
  205. exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=".a:lcbg
  206. elseif !l:fge && l:bge
  207. exec "hi ".a:group." ctermfg=".a:lcfg." ctermbg=NONE"
  208. elseif l:fge && !l:bge
  209. exec "hi ".a:group." ctermfg=NONE ctermbg=".a:lcbg
  210. endif
  211. else
  212. let l:fge = empty(a:fg)
  213. let l:bge = empty(a:bg)
  214. if !l:fge && !l:bge
  215. exec "hi ".a:group." guifg=#".a:fg." guibg=#".a:bg." ctermfg=".s:rgb(a:fg)." ctermbg=".s:rgb(a:bg)
  216. elseif !l:fge && l:bge
  217. exec "hi ".a:group." guifg=#".a:fg." guibg=NONE ctermfg=".s:rgb(a:fg)." ctermbg=NONE"
  218. elseif l:fge && !l:bge
  219. exec "hi ".a:group." guifg=NONE guibg=#".a:bg." ctermfg=NONE ctermbg=".s:rgb(a:bg)
  220. endif
  221. endif
  222. if a:attr == ""
  223. exec "hi ".a:group." gui=none cterm=none"
  224. else
  225. let l:noitalic = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",")
  226. if empty(l:noitalic)
  227. let l:noitalic = "none"
  228. endif
  229. exec "hi ".a:group." gui=".a:attr." cterm=".l:noitalic
  230. endif
  231. endfun
  232. if !exists("g:cobalt_bg")
  233. let g:cobalt_bg = "193549" "#193549
  234. end
  235. " General colors
  236. let g:black = "1C1C1C" " #1C1C1C
  237. let g:darkest_grey = "3A3A3A" " #303030
  238. let g:darker_grey = "444444" " #444444
  239. let g:dark_grey = "626262" " #626262
  240. let g:grey = "808080" " #808080
  241. let g:light_grey = "9E9E9E" " #9E9E9E
  242. let g:lighter_grey = "BCBCBC" " #BCBCBC
  243. let g:lightest_grey = "CCCCCC" " #CCCCCC
  244. let g:white = "FFFFFF" " #FFFFFF
  245. let g:dark_orange = "FF9A00" " #FF9A00
  246. let g:light_orange = "FF9D00" " #FF9D00
  247. let g:yellow = "FFC600" " #FFC600
  248. let g:light_yellow = "F2ED7F" " #F2ED7F
  249. let g:darkest_green = "2D7067" " #2D7067
  250. let g:dirty_green = "70b950" " #70b950
  251. let g:green = "3AD900" " #3AD900
  252. let g:light_green = "88FF88" " #88FF88
  253. let g:lighter_green = "9EFF80" " #9EFF80
  254. let g:lightest_green = "BBFFDD" " #BBFFDD
  255. let g:dark_purple = "345FA8" " #345FA8
  256. let g:purple = "967EFB" " #967EFB
  257. let g:light_purple = "DEEBFE" " #DEEBFE
  258. let g:darkest_blue = "0000df" " #0000df
  259. let g:darker_blue = "0050A4" " #0050A4
  260. let g:dark_blue = "0088FF" " #0088FF
  261. let g:blue = "00AAFF" " #00AAFF
  262. let g:light_blue = "80FCFF" " #80FCFF
  263. let g:greyish_blue = "8fbfdc" " #8fbfdc
  264. let g:dirty_blue = "668799" " #668799
  265. let g:aubergine = "4F0037" " #4F0037
  266. let g:darker_red = "700009" " #700009
  267. let g:dark_red = "902020" " #902020
  268. let g:red = "FF0000" " #FF0000
  269. let g:dark_pink = "FF628C" " #FF628C
  270. let g:pink = "FF00FF" " #FF00FF
  271. let g:light_pink = "EE80E1" " #EE80E1
  272. let g:lightest_pink = "FFA5F3" " #FFA5F3
  273. let g:pale_pink = "F0A0C0" " #f0a0c0
  274. let g:dirty_pink = "EB939A" " #EB939A
  275. " Regex colors
  276. let g:regex_or = g:green
  277. let g:regex_group = g:green
  278. let g:regex_quantifier = g:light_green
  279. let g:regex_boundary = g:light_green
  280. let g:regex_char_group = g:lighter_green
  281. let g:regex_string = g:lightest_green
  282. let g:regex_escape = g:light_green
  283. " Vim essential color bindings
  284. set background=dark
  285. call s:X("Normal",g:white,g:cobalt_bg,"","","")
  286. call s:X("Comment",g:dark_blue,"","italic","Grey","")
  287. call s:X("Todo",g:dark_blue,"","bold","Grey", "")
  288. call s:X("Constant",g:dark_pink,"","","Red","")
  289. call s:X("Special",g:light_green,"","","Green","")
  290. call s:X("MoreMsg",g:light_green,"","","Green","")
  291. call s:X("Delimiter",g:dirty_blue,"","","Grey","")
  292. call s:X("String",g:green,"","","Green","")
  293. hi! link StringDelimiter Delimiter
  294. call s:X("Identifier",g:dark_orange,"","",g:dark_orange,"")
  295. call s:X("Structure",g:dark_blue,"","italic","Grey","")
  296. call s:X("Function",g:yellow,"","","","")
  297. call s:X("Statement",g:dark_orange,"","","","")
  298. call s:X("PreProc",g:dark_orange,"","",g:dark_orange,"")
  299. call s:X("Operator",g:dark_blue,"","italic","Grey","")
  300. call s:X("Type",g:yellow,"","","Yellow","")
  301. call s:X("NonText",g:dark_grey,g:cobalt_bg,"","Black","")
  302. call s:X("SpecialKey",g:darker_grey,g:black,"","Black","")
  303. call s:X("MatchParen",g:white,g:dark_purple,"bold","","")
  304. call s:X("Directory",g:yellow,"","","Yellow","")
  305. call s:X("ErrorMsg","",g:dark_red,"","","DarkRed")
  306. hi! link Error ErrorMsg
  307. call s:X("Question",g:green,"","","Green","")
  308. call s:X("StorageClass",g:light_orange,"","","","")
  309. " vim tabpane headers
  310. call s:X("TabLine",g:black,g:lighter_grey,"italic","","Black")
  311. call s:X("TabLineFill",g:light_grey,"","","","Black")
  312. call s:X("TabLineSel",g:black,g:yellow,"italic,bold","Black","White")
  313. " Auto-completion
  314. call s:X("PMenu",g:lightest_grey,g:darkest_grey,"","","")
  315. call s:X("PMenuSel",g:darkest_grey,g:yellow,"","","")
  316. call s:X("PMenuSBar","",g:dark_grey,"","","")
  317. call s:X("PMenuThumb","",g:lightest_grey,"","","")
  318. call s:X("Visual","",g:darker_blue,"","","Black")
  319. call s:X("Cursor",g:cobalt_bg,g:yellow,"","","")
  320. call s:X("CursorColumn","",g:yellow,"","","Black")
  321. call s:X("CursorLine","",g:yellow,"","","Black")
  322. call s:X("CursorLineNr",g:light_blue,"","none","White","")
  323. call s:X("LineNr",g:dark_grey,g:cobalt_bg,"none","Black","")
  324. call s:X("StatusLine",g:black,g:lightest_grey,"italic","","White")
  325. call s:X("StatusLineNC",g:white,g:darker_grey,"italic","White","Black")
  326. call s:X("VertSplit",g:yellow,"","","","")
  327. call s:X("WildMenu",g:pale_pink,g:darkest_grey,"","Magenta","")
  328. call s:X("Folded",g:light_grey,g:darker_grey,"italic","Black","")
  329. call s:X("FoldColumn",g:dark_grey,g:black,"","","Black")
  330. call s:X("SignColumn",g:dark_grey,g:darkest_grey,"","","Black")
  331. call s:X("ColorColumn","",g:black,"","","Black")
  332. call s:X("Title",g:dirty_green,"","bold","Green","")
  333. call s:X("Search",g:black,g:light_yellow,"underline","Magenta","")
  334. " Spell Checking
  335. call s:X("SpellBad",g:dark_red,"","underline","","DarkRed")
  336. call s:X("SpellCap","",g:darkest_blue,"underline","","Blue")
  337. call s:X("SpellRare","",g:aubergine,"underline","","DarkMagenta")
  338. call s:X("SpellLocal","",g:darkest_green,"underline","","Green")
  339. " Diff
  340. hi! link diffRemoved Constant
  341. hi! link diffAdded String
  342. call s:X("DiffDelete",g:black,g:darker_red,"","DarkRed","DarkRed")
  343. call s:X("DiffChange","",g:darkest_green,"","White","DarkBlue")
  344. call s:X("DiffText",g:greyish_blue,g:black,"reverse","Yellow","")
  345. " PHP
  346. hi! link phpFunctions Function
  347. hi! link phpSuperglobal Identifier
  348. hi! link phpQuoteSingle StringDelimiter
  349. hi! link phpQuoteDouble StringDelimiter
  350. hi! link phpBoolean Constant
  351. hi! link phpNull Constant
  352. hi! link phpArrayPair Operator
  353. hi! link phpOperator Normal
  354. hi! link phpRelation Normal
  355. hi! link phpVarSelector Identifier
  356. " Python
  357. hi! link pythonOperator Statement
  358. " Ruby
  359. call s:X("rubyClass",g:dark_orange,"","","DarkBlue","")
  360. hi! link rubyModule rubyClass
  361. call s:X("rubyInstanceVariable",g:lightest_grey,"","","Cyan","")
  362. call s:X("rubySymbol",g:dark_pink,"","","Magenta","")
  363. hi! link rubyGlobalVariable rubyInstanceVariable
  364. call s:X("rubyAccess",g:purple,"","","","")
  365. " params between pipes after do, and pipes themselfs
  366. call s:X("rubyBlockParameter",g:lightest_grey,"","","Blue","")
  367. call s:X("rubyBlockParameterList",g:white,"","","Blue","")
  368. call s:X("rubyInterpolation",g:lighter_green,"","","Magenta","")
  369. call s:X("rubyInterpolationDelimiter",g:white,"","","Magenta","")
  370. call s:X("rubyRegexp",g:light_green,"","","","") " usual character
  371. call s:X("rubyRegexpAnchor",g:light_green,"","","","") " ^ and $ indicator
  372. call s:X("rubyRegexpCharClass",g:light_green,"","","","") " \d
  373. call s:X("rubyRegexpDelimiter",g:light_green,"","","","") " open and closing /
  374. call s:X("rubyRegexpEscape",g:light_green,"","","","") " \ and escaped char
  375. call s:X("rubyRegexpQuantifier",g:light_green,"","","","") " ? and {3}
  376. call s:X("rubyRegexpSpecial",g:light_green,"","","","") " () and | char
  377. " JavaScript
  378. hi! link javaScriptValue Constant
  379. hi! link javaScriptRegexpString rubyRegexp
  380. call s:X("jsFunction",g:light_pink,"","","","")
  381. call s:X("jsFuncCall",g:yellow,"","","","")
  382. call s:X("jsOperator",g:light_orange,"","","","")
  383. call s:X("jsStorageClass",g:yellow,"","","","")
  384. call s:X("jsFuncArgs",g:lightest_grey,"","","","")
  385. call s:X("jsBuiltins",g:light_orange,"","","","")
  386. call s:X("jsUndefined",g:dark_pink,"","","","")
  387. call s:X("jsThis",g:light_pink,"","","","")
  388. call s:X("jsPrototype",g:dirty_pink,"","","","")
  389. call s:X("jsRegexpOr",g:regex_or,"","","","") " | highlight
  390. call s:X("jsRegexpQuantifier",g:regex_quantifier,"","","","") " ? and {4}
  391. call s:X("jsRegexpGroup",g:regex_group,"","","","") " ( and )
  392. call s:X("jsRegexpBoundary",g:regex_boundary,"","","","") " start and end of regex
  393. call s:X("jsRegexpCharClass",g:regex_char_group,"","","","") " [A-z]
  394. call s:X("jsRegexpString",g:regex_string,"","","","") " regular text
  395. call s:X("jsRegexpMod",g:pink,"","","","")
  396. call s:X("jsRegexpBackRef",g:light_orange,"","","","")
  397. " CoffeeScript
  398. hi! link coffeeComment comment
  399. hi! link coffeeBlockComment comment
  400. hi! link coffeeTodo todo
  401. hi! link coffeeHeregexComment comment
  402. call s:X("coffeeKeyword",g:dark_orange,"","","","")
  403. call s:X("coffeeObject",g:blue,"","","","")
  404. call s:X("coffeeObjAssign",g:yellow,"","","","")
  405. call s:X("coffeeExtendedOp",g:dark_orange,"","","","")
  406. call s:X("coffeeParen",g:lightest_grey,"","","","")
  407. call s:X("coffeeParens",g:lightest_grey,"","","","")
  408. call s:X("coffeeSpecialOp",g:lightest_grey,"","","","")
  409. call s:X("coffeeStatement",g:dark_orange,"","","","")
  410. hi! link coffeeString String
  411. hi! link coffeeHeredoc String
  412. call s:X("coffeeInterpDelim",g:white,"","","","")
  413. call s:X("coffeeInterp",g:lighter_green,"","","","")
  414. call s:X("coffeeRegex",g:regex_escape,"","","","")
  415. call s:X("coffeeEscape",g:regex_escape,"","","","")
  416. call s:X("coffeeRegexCharSet",g:regex_group,"","","","")
  417. call s:X("coffeeHeregex",g:regex_escape,"","","","")
  418. call s:X("coffeeHeregexCharSet",g:regex_group,"","","","")
  419. call s:X("coffeeSpecialIdent",g:lightest_grey,"","","","")
  420. call s:X("coffeeBracket",g:white,"","","","")
  421. call s:X("coffeeBrackets",g:white,"","","","")
  422. call s:X("coffeeCurly",g:white,"","","","")
  423. call s:X("coffeeCurlies",g:white,"","","","")
  424. hi! link coffeeConditional Conditional
  425. call s:X("coffeeSpecialVar",g:light_pink,"","","","")
  426. call s:X("coffeeDotAccess",g:white,"","","","")
  427. call s:X("coffeeConstant",g:dark_pink,"","","","")
  428. call s:X("coffeeRepeat",g:dark_orange,"","","","")
  429. call s:X("coffeeGlobal",g:dark_pink,"","","","")
  430. call s:X("coffeeOperator",g:dark_orange,"","","","")
  431. hi! link coffeeSemicolonError ErrorMsg
  432. hi! link coffeeReservedError ErrorMsg
  433. hi! link coffeeSpaceError ErrorMsg
  434. " HTML
  435. call s:X("htmlTag",g:lightest_grey,"","","","")
  436. call s:X("htmlEndTag",g:lightest_grey,"","","","")
  437. call s:X("htmlTagName",g:light_blue,"","","","")
  438. call s:X("htmlSpecialTagName",g:blue,"","","","")
  439. call s:X("htmlArg",g:dark_orange,"","","","")
  440. call s:X("htmlEvent",g:dark_orange,"","","","")
  441. call s:X("htmlString",g:yellow,"","","","")
  442. call s:X("htmlTitle",g:purple,"","","","")
  443. call s:X("htmlH1",g:light_orange,"","","","")
  444. call s:X("htmlItalic",g:lightest_grey,"","","","")
  445. " XML
  446. hi! link xmlTag htmlTag
  447. hi! link xmlTagName htmlTagName
  448. hi! link xmlEndTag htmlTagName
  449. hi! link xmlAttrib htmlArg
  450. hi! link xmlEqual htmlString
  451. hi! link xmlString htmlString
  452. hi! link xmlEntityPunct htmlSpecialChar
  453. hi! link xmlEntity htmlSpecialChar
  454. " Haml
  455. hi! link hamlTag htmlTag
  456. hi! link hamlIdChar hamlId
  457. hi! link hamlClassChar hamlClass
  458. call s:X("hamlAttributes",g:pink,"","","","")
  459. call s:X("hamlInterpolationDelimiter",g:green,"","","","")
  460. " Markdown
  461. call s:X("markdownH1",g:yellow,"","","","")
  462. hi! link markdownH2 markdownH1
  463. hi! link markdownH3 markdownH1
  464. hi! link markdownH4 markdownH1
  465. hi! link markdownH5 markdownH1
  466. hi! link markdownH6 markdownH1
  467. call s:X("markdownHeadingRule",g:dark_orange,"","","","")
  468. hi! link markdownHeadingDelimiter markdownHeadingRule
  469. call s:X("markdownRule",g:light_blue,"","","","")
  470. call s:X("markdownCode",g:light_grey,"","","","")
  471. hi! link markdownCodeBlock markdownCode
  472. call s:X("markdownCodeDelimiter",g:dark_blue,"","","","")
  473. call s:X("markdownLinkText",g:green,"","","","")
  474. call s:X("markdownUrl",g:dark_pink,"","","","")
  475. call s:X("markdownId",g:yellow,"","","","")
  476. hi! link markdownIdDeclaration markdownId
  477. " CSS
  478. call s:X("cssIdentifier",g:yellow,"","","","")
  479. call s:X("cssIncludeKeyword",g:dark_orange,"","","","")
  480. call s:X("cssMediaType",g:dirty_pink,"","","","")
  481. call s:X("cssMediaKeyword",g:dark_orange,"","","","")
  482. call s:X("cssInclude",g:white,"","","","")
  483. call s:X("cssMediaProp",g:light_green,"","","","")
  484. call s:X("cssValueLength",g:light_yellow,"","","","")
  485. call s:X("cssUnitDecorators",g:dark_orange,"","","","")
  486. call s:X("cssBraces",g:white,"","","","")
  487. call s:X("cssTagName",g:light_blue,"","","","")
  488. call s:X("cssClassName",g:green,"","","","")
  489. call s:X("cssPseudoClassId",g:light_orange,"","","","")
  490. call s:X("cssPseudoClassFn",g:dark_pink,"","","","")
  491. call s:X("cssBoxAttr",g:light_yellow,"","","","")
  492. hi! link cssValueNumber cssBoxAttr
  493. hi! link cssCommonAttr cssBoxAttr
  494. hi! link cssPositioningAttr cssBoxAttr
  495. hi! link cssFontAttr cssBoxAttr
  496. hi! link cssBorderAttr cssBoxAttr
  497. hi! link cssTextAttr cssBoxAttr
  498. hi! link cssDimensionAttr cssBoxAttr
  499. hi! link cssBackgroundAttr cssBoxAttr
  500. hi! link cssPageAttr cssBoxAttr
  501. hi! link cssColorAttr cssBoxAttr
  502. hi! link cssTransitionAttr cssBoxAttr
  503. hi! link cssUIAttr cssBoxAttr
  504. call s:X("cssBoxProp",g:light_green,"","","","")
  505. hi! link cssTextProp cssBoxProp
  506. hi! link cssDimensionProp cssBoxProp
  507. hi! link cssFontProp cssBoxProp
  508. hi! link cssPositioningProp cssBoxProp
  509. hi! link cssBackgroundProp cssBoxProp
  510. hi! link cssBorderProp cssBoxProp
  511. hi! link cssPageProp cssBoxProp
  512. hi! link cssColorProp cssBoxProp
  513. hi! link cssTransitionProp cssBoxProp
  514. hi! link cssUIProp cssBoxProp
  515. hi! link cssTransformProp cssBoxProp
  516. " SCSS/SASS
  517. hi! link sassIdChar cssIdentifier
  518. hi! link sassId cssIdentifier
  519. hi! link sassClass cssClassName
  520. hi! link sassCssAttribute cssBoxAttr
  521. " JSON
  522. call s:X("jsonBraces",g:purple,"","","","")
  523. call s:X("jsonQuote",g:dark_blue,"","","","")
  524. call s:X("jsonNoise",g:dark_blue,"","","","")
  525. call s:X("jsonKeywordMatch",g:dark_blue,"","","","")
  526. " Erlang
  527. hi! link erlangAtom rubySymbol
  528. hi! link erlangBIF rubyPredefinedIdentifier
  529. hi! link erlangFunction rubyPredefinedIdentifier
  530. hi! link erlangDirective Statement
  531. hi! link erlangNode Identifier
  532. " Lua
  533. hi! link luaOperator Conditional
  534. " C
  535. hi! link cFormat Identifier
  536. hi! link cOperator Constant
  537. " Objective-C/Cocoa
  538. hi! link objcClass Type
  539. hi! link cocoaClass objcClass
  540. hi! link objcSubclass objcClass
  541. hi! link objcSuperclass objcClass
  542. hi! link objcDirective rubyClass
  543. hi! link objcStatement Constant
  544. hi! link cocoaFunction Function
  545. hi! link objcMethodName Identifier
  546. hi! link objcMethodArg Normal
  547. hi! link objcMessageName Identifier
  548. " Vimscript
  549. hi! link vimOper Normal
  550. " Debugger.vim
  551. call s:X("DbgCurrent",g:light_purple,g:dark_purple,"","White","DarkBlue")
  552. call s:X("DbgBreakPt","",g:aubergine,"","","DarkMagenta")
  553. " vim-indent-guides
  554. if !exists("g:indent_guides_auto_colors")
  555. let g:indent_guides_auto_colors = 0
  556. endif
  557. call s:X("IndentGuidesOdd","",g:darkest_grey,"","","")
  558. call s:X("IndentGuidesEven","",g:black,"","","")
  559. " Plugins, etc.
  560. hi! link TagListFileName Directory
  561. call s:X("PreciseJumpTarget",g:lighter_green,g:darker_grey,"","White","Green")
  562. " NERDTree
  563. call s:X("NERDTreeHelp",g:dark_purple,"","","","")
  564. call s:X("NERDTreeUp",g:dark_purple,"","","","")
  565. call s:X("NERDTreeOpenable",g:yellow,"","","","")
  566. call s:X("NERDTreeClosable",g:red,"","","","")
  567. call s:X("NERDTreeDir",g:yellow,"","","","")
  568. hi! link NERDTreeDirSlash Ignore
  569. call s:X("NERDTreeExecFile",g:purple,"","","","")
  570. " Grep search
  571. call s:X("qfLineNr",g:dark_blue,"","","","")
  572. " CTRLP file search
  573. call s:X("CtrlPMatch",g:dark_orange,"","","","")
  574. " Neomake signs
  575. call s:X("NeomakeErrorMsg","",g:red,"","","")
  576. call s:X("NeomakeWarningMsg",g:yellow,"","","","")
  577. let g:neomake_error_sign = {
  578. \ 'text': '✖',
  579. \ 'texthl': 'NeomakeErrorMsg',
  580. \ }
  581. let g:neomake_warning_sign = {
  582. \ 'text': '⚠',
  583. \ 'texthl': 'NeomakeWarningMsg',
  584. \ }
  585. " Manual overrides for 256-color terminals. Dark colors auto-map badly.
  586. if !exists("g:cobalt_bg_256")
  587. let g:cobalt_bg_256="NONE"
  588. end
  589. if !s:low_color
  590. hi StatusLineNC ctermbg=232
  591. hi Folded ctermbg=236
  592. hi FoldColumn ctermbg=234
  593. hi SignColumn ctermbg=236
  594. hi CursorColumn ctermbg=234
  595. hi CursorLine ctermbg=235
  596. hi SpecialKey ctermbg=234
  597. exec "hi NonText ctermbg=".g:cobalt_bg_256
  598. exec "hi LineNr ctermbg=".g:cobalt_bg_256
  599. hi DiffText ctermfg=81
  600. exec "hi Normal ctermbg=".g:cobalt_bg_256
  601. hi DbgBreakPt ctermbg=53
  602. hi IndentGuidesOdd ctermbg=235
  603. hi IndentGuidesEven ctermbg=234
  604. endif
  605. " delete functions
  606. delf s:X
  607. delf s:rgb
  608. delf s:color
  609. delf s:rgb_color
  610. delf s:rgb_level
  611. delf s:rgb_number
  612. delf s:grey_color
  613. delf s:grey_level
  614. delf s:grey_number