PaperColor.vim 85 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231
  1. " Theme: PaperColor
  2. " Author: Nikyle Nguyen <NLKNguyen@MSN.com>
  3. " License: MIT
  4. " Source: http://github.com/NLKNguyen/papercolor-theme
  5. let s:version = '0.9.x'
  6. " Note on navigating this source code:
  7. " - Use folding feature to collapse/uncollapse blocks of marked code
  8. " zM to fold all markers in this file to see the structure of the source code
  9. " zR to unfold all recursively
  10. " za to toggle a fold
  11. " See: http://vim.wikia.com/wiki/Folding
  12. " - The main section is at the end where the functions are called in order.
  13. " Theme Repository: {{{
  14. let s:themes = {}
  15. " }}}
  16. fun! s:register_default_theme()
  17. " Theme name should be lowercase
  18. let s:themes['default'] = {
  19. \ 'maintainer' : 'Nikyle Nguyen <me@Nikyle.com>',
  20. \ 'source' : 'http://github.com/NLKNguyen/papercolor-theme',
  21. \ 'description' : 'The original PaperColor Theme, inspired by Google Material Design',
  22. \ 'options' : {
  23. \ 'allow_bold': 1
  24. \ }
  25. \ }
  26. " Theme can have 'light' and/or 'dark' color palette.
  27. " Color values can be HEX and/or 256-color. Use empty string '' if not provided.
  28. " Only color00 -> color15 are required. The rest are optional.
  29. let s:themes['default'].light = {
  30. \ 'NO_CONVERSION': 1,
  31. \ 'TEST_256_COLOR_CONSISTENCY' : 1,
  32. \ 'palette' : {
  33. \ 'color00' : ['#eeeeee', '255'],
  34. \ 'color01' : ['#af0000', '124'],
  35. \ 'color02' : ['#008700', '28'],
  36. \ 'color03' : ['#5f8700', '64'],
  37. \ 'color04' : ['#0087af', '31'],
  38. \ 'color05' : ['#878787', '102'],
  39. \ 'color06' : ['#005f87', '24'],
  40. \ 'color07' : ['#444444', '238'],
  41. \ 'color08' : ['#bcbcbc', '250'],
  42. \ 'color09' : ['#d70000', '160'],
  43. \ 'color10' : ['#d70087', '162'],
  44. \ 'color11' : ['#8700af', '91'],
  45. \ 'color12' : ['#d75f00', '166'],
  46. \ 'color13' : ['#d75f00', '166'],
  47. \ 'color14' : ['#005faf', '25'],
  48. \ 'color15' : ['#005f87', '24'],
  49. \ 'color16' : ['#0087af', '31'],
  50. \ 'color17' : ['#008700', '28'],
  51. \ 'cursor_fg' : ['#eeeeee', '255'],
  52. \ 'cursor_bg' : ['#005f87', '24'],
  53. \ 'cursorline' : ['#e4e4e4', '254'],
  54. \ 'cursorcolumn' : ['#e4e4e4', '254'],
  55. \ 'cursorlinenr_fg' : ['#af5f00', '130'],
  56. \ 'cursorlinenr_bg' : ['#eeeeee', '255'],
  57. \ 'popupmenu_fg' : ['#444444', '238'],
  58. \ 'popupmenu_bg' : ['#d0d0d0', '252'],
  59. \ 'search_fg' : ['#444444', '238'],
  60. \ 'search_bg' : ['#ffff5f', '227'],
  61. \ 'linenumber_fg' : ['#b2b2b2', '249'],
  62. \ 'linenumber_bg' : ['#eeeeee', '255'],
  63. \ 'vertsplit_fg' : ['#005f87', '24'],
  64. \ 'vertsplit_bg' : ['#eeeeee', '255'],
  65. \ 'statusline_active_fg' : ['#e4e4e4', '254'],
  66. \ 'statusline_active_bg' : ['#005f87', '24'],
  67. \ 'statusline_inactive_fg' : ['#444444', '238'],
  68. \ 'statusline_inactive_bg' : ['#d0d0d0', '252'],
  69. \ 'todo_fg' : ['#00af5f', '35'],
  70. \ 'todo_bg' : ['#eeeeee', '255'],
  71. \ 'error_fg' : ['#af0000', '124'],
  72. \ 'error_bg' : ['#ffd7ff', '225'],
  73. \ 'matchparen_bg' : ['#c6c6c6', '251'],
  74. \ 'matchparen_fg' : ['#005f87', '24'],
  75. \ 'visual_fg' : ['#eeeeee', '255'],
  76. \ 'visual_bg' : ['#0087af', '31'],
  77. \ 'folded_fg' : ['#0087af', '31'],
  78. \ 'folded_bg' : ['#afd7ff', '153'],
  79. \ 'wildmenu_fg': ['#444444', '238'],
  80. \ 'wildmenu_bg': ['#ffff00', '226'],
  81. \ 'spellbad': ['#ffafd7', '218'],
  82. \ 'spellcap': ['#ffffaf', '229'],
  83. \ 'spellrare': ['#afff87', '156'],
  84. \ 'spelllocal': ['#d7d7ff', '189'],
  85. \ 'diffadd_fg': ['#008700', '28'],
  86. \ 'diffadd_bg': ['#afffaf', '157'],
  87. \ 'diffdelete_fg': ['#af0000', '124'],
  88. \ 'diffdelete_bg': ['#ffd7ff', '225'],
  89. \ 'difftext_fg': ['#0087af', '31'],
  90. \ 'difftext_bg': ['#ffffd7', '230'],
  91. \ 'diffchange_fg': ['#444444', '238'],
  92. \ 'diffchange_bg': ['#ffd787', '222'],
  93. \ 'tabline_bg': ['#005f87', '24'],
  94. \ 'tabline_active_fg': ['#444444', '238'],
  95. \ 'tabline_active_bg': ['#e4e4e4', '254'],
  96. \ 'tabline_inactive_fg': ['#eeeeee', '255'],
  97. \ 'tabline_inactive_bg': ['#0087af', '31'],
  98. \ 'buftabline_bg': ['#005f87', '24'],
  99. \ 'buftabline_current_fg': ['#444444', '238'],
  100. \ 'buftabline_current_bg': ['#e4e4e4', '254'],
  101. \ 'buftabline_active_fg': ['#eeeeee', '255'],
  102. \ 'buftabline_active_bg': ['#005faf', '25'],
  103. \ 'buftabline_inactive_fg': ['#eeeeee', '255'],
  104. \ 'buftabline_inactive_bg': ['#0087af', '31']
  105. \ }
  106. \ }
  107. " TODO: idea for subtheme options
  108. " let s:themes['default'].light.subtheme = {
  109. " \ 'alternative' : {
  110. " \ 'options' : {
  111. " \ 'transparent_background': 1
  112. " \ },
  113. " \ 'palette' : {
  114. " \ }
  115. " \ }
  116. " \ }
  117. let s:themes['default'].dark = {
  118. \ 'NO_CONVERSION': 1,
  119. \ 'TEST_256_COLOR_CONSISTENCY' : 1,
  120. \ 'palette' : {
  121. \ 'color00' : ['#1c1c1c', '234'],
  122. \ 'color01' : ['#af005f', '125'],
  123. \ 'color02' : ['#5faf00', '70'],
  124. \ 'color03' : ['#d7af5f', '179'],
  125. \ 'color04' : ['#5fafd7', '74'],
  126. \ 'color05' : ['#808080', '244'],
  127. \ 'color06' : ['#d7875f', '173'],
  128. \ 'color07' : ['#d0d0d0', '252'],
  129. \ 'color08' : ['#585858', '240'],
  130. \ 'color09' : ['#5faf5f', '71'],
  131. \ 'color10' : ['#afd700', '148'],
  132. \ 'color11' : ['#af87d7', '140'],
  133. \ 'color12' : ['#ffaf00', '214'],
  134. \ 'color13' : ['#ff5faf', '205'],
  135. \ 'color14' : ['#00afaf', '37'],
  136. \ 'color15' : ['#5f8787', '66'],
  137. \ 'color16' : ['#5fafd7', '74'],
  138. \ 'color17' : ['#d7af00', '178'],
  139. \ 'cursor_fg' : ['#1c1c1c', '234'],
  140. \ 'cursor_bg' : ['#c6c6c6', '251'],
  141. \ 'cursorline' : ['#303030', '236'],
  142. \ 'cursorcolumn' : ['#303030', '236'],
  143. \ 'cursorlinenr_fg' : ['#ffff00', '226'],
  144. \ 'cursorlinenr_bg' : ['#1c1c1c', '234'],
  145. \ 'popupmenu_fg' : ['#c6c6c6', '251'],
  146. \ 'popupmenu_bg' : ['#303030', '236'],
  147. \ 'search_fg' : ['#000000', '16'],
  148. \ 'search_bg' : ['#00875f', '29'],
  149. \ 'linenumber_fg' : ['#585858', '240'],
  150. \ 'linenumber_bg' : ['#1c1c1c', '234'],
  151. \ 'vertsplit_fg' : ['#5f8787', '66'],
  152. \ 'vertsplit_bg' : ['#1c1c1c', '234'],
  153. \ 'statusline_active_fg' : ['#1c1c1c', '234'],
  154. \ 'statusline_active_bg' : ['#5f8787', '66'],
  155. \ 'statusline_inactive_fg' : ['#bcbcbc', '250'],
  156. \ 'statusline_inactive_bg' : ['#3a3a3a', '237'],
  157. \ 'todo_fg' : ['#ff8700', '208'],
  158. \ 'todo_bg' : ['#1c1c1c', '234'],
  159. \ 'error_fg' : ['#af005f', '125'],
  160. \ 'error_bg' : ['#5f0000', '52'],
  161. \ 'matchparen_bg' : ['#4e4e4e', '239'],
  162. \ 'matchparen_fg' : ['#c6c6c6', '251'],
  163. \ 'visual_fg' : ['#000000', '16'],
  164. \ 'visual_bg' : ['#8787af', '103'],
  165. \ 'folded_fg' : ['#d787ff', '177'],
  166. \ 'folded_bg' : ['#5f005f', '53'],
  167. \ 'wildmenu_fg': ['#1c1c1c', '234'],
  168. \ 'wildmenu_bg': ['#afd700', '148'],
  169. \ 'spellbad': ['#5f0000', '52'],
  170. \ 'spellcap': ['#5f005f', '53'],
  171. \ 'spellrare': ['#005f00', '22'],
  172. \ 'spelllocal': ['#00005f', '17'],
  173. \ 'diffadd_fg': ['#87d700', '112'],
  174. \ 'diffadd_bg': ['#005f00', '22'],
  175. \ 'diffdelete_fg': ['#af005f', '125'],
  176. \ 'diffdelete_bg': ['#5f0000', '52'],
  177. \ 'difftext_fg': ['#5fffff', '87'],
  178. \ 'difftext_bg': ['#008787', '30'],
  179. \ 'diffchange_fg': ['#d0d0d0', '252'],
  180. \ 'diffchange_bg': ['#005f5f', '23'],
  181. \ 'tabline_bg': ['#262626', '235'],
  182. \ 'tabline_active_fg': ['#121212', '233'],
  183. \ 'tabline_active_bg': ['#00afaf', '37'],
  184. \ 'tabline_inactive_fg': ['#bcbcbc', '250'],
  185. \ 'tabline_inactive_bg': ['#585858', '240'],
  186. \ 'buftabline_bg': ['#262626', '235'],
  187. \ 'buftabline_current_fg': ['#121212', '233'],
  188. \ 'buftabline_current_bg': ['#00afaf', '37'],
  189. \ 'buftabline_active_fg': ['#00afaf', '37'],
  190. \ 'buftabline_active_bg': ['#585858', '240'],
  191. \ 'buftabline_inactive_fg': ['#bcbcbc', '250'],
  192. \ 'buftabline_inactive_bg': ['#585858', '240']
  193. \ }
  194. \ }
  195. endfun
  196. " ============================ THEME REGISTER =================================
  197. " Acquire Theme Data: {{{
  198. " Brief:
  199. " Function to get theme information and store in variables for other
  200. " functions to use
  201. "
  202. " Require:
  203. " s:themes <dictionary> collection of all theme palettes
  204. "
  205. " Require Optionally:
  206. " {g:PaperColor_Theme_[s:theme_name]} <dictionary> user custom theme palette
  207. " g:PaperColor_Theme_Options <dictionary> user options
  208. "
  209. " Expose:
  210. " s:theme_name <string> the name of the selected theme
  211. " s:selected_theme <dictionary> the selected theme object (contains palette, etc.)
  212. " s:selected_variant <string> 'light' or 'dark'
  213. " s:palette <dictionary> the palette of selected theme
  214. " s:options <dictionary> user options
  215. fun! s:acquire_theme_data()
  216. " Get theme name: {{{
  217. let s:theme_name = 'default'
  218. if exists("g:PaperColor_Theme") " Users expressed theme preference
  219. let lowercase_theme_name = tolower(g:PaperColor_Theme)
  220. if lowercase_theme_name !=? 'default'
  221. let theme_identifier = 'PaperColor_' . lowercase_theme_name
  222. let autoload_function = theme_identifier . '#register'
  223. call {autoload_function}()
  224. let theme_variable = 'g:' . theme_identifier
  225. if exists(theme_variable)
  226. let s:theme_name = lowercase_theme_name
  227. let s:themes[s:theme_name] = {theme_variable}
  228. endif
  229. endif
  230. endif
  231. " }}}
  232. if s:theme_name ==? 'default'
  233. " Either no other theme is specified or they failed to load
  234. " Defer loading default theme until now
  235. call s:register_default_theme()
  236. endif
  237. let s:selected_theme = s:themes[s:theme_name]
  238. " Get Theme Variant: either dark or light {{{
  239. let s:selected_variant = 'dark'
  240. let s:is_dark=(&background == 'dark')
  241. if s:is_dark
  242. if has_key(s:selected_theme, 'dark')
  243. let s:selected_variant = 'dark'
  244. else " in case the theme only provides the other variant
  245. let s:selected_variant = 'light'
  246. endif
  247. else " is light background
  248. if has_key(s:selected_theme, 'light')
  249. let s:selected_variant = 'light'
  250. else " in case the theme only provides the other variant
  251. let s:selected_variant = 'dark'
  252. endif
  253. endif
  254. let s:palette = s:selected_theme[s:selected_variant].palette
  255. " Systematic User-Config Options: {{{
  256. " Example config in .vimrc
  257. " let g:PaperColor_Theme_Options = {
  258. " \ 'theme': {
  259. " \ 'default': {
  260. " \ 'allow_bold': 1,
  261. " \ 'allow_italic': 0,
  262. " \ 'transparent_background': 1
  263. " \ }
  264. " \ },
  265. " \ 'language': {
  266. " \ 'python': {
  267. " \ 'highlight_builtins' : 1
  268. " \ },
  269. " \ 'c': {
  270. " \ 'highlight_builtins' : 1
  271. " \ },
  272. " \ 'cpp': {
  273. " \ 'highlight_standard_library': 1
  274. " \ }
  275. " \ }
  276. " \ }
  277. "
  278. let s:options = {}
  279. if exists("g:PaperColor_Theme_Options")
  280. let s:options = g:PaperColor_Theme_Options
  281. endif
  282. " }}}
  283. " }}}
  284. endfun
  285. " }}}
  286. " Identify Color Mode: {{{
  287. fun! s:identify_color_mode()
  288. let s:MODE_16_COLOR = 0
  289. let s:MODE_256_COLOR = 1
  290. let s:MODE_GUI_COLOR = 2
  291. if has("gui_running") || has('termguicolors') && &termguicolors || has('nvim') && $NVIM_TUI_ENABLE_TRUE_COLOR
  292. let s:mode = s:MODE_GUI_COLOR
  293. elseif (&t_Co >= 256)
  294. let s:mode = s:MODE_256_COLOR
  295. else
  296. let s:mode = s:MODE_16_COLOR
  297. endif
  298. endfun
  299. " }}}
  300. " ============================ OPTION HANDLER =================================
  301. " Generate Them Option Variables: {{{
  302. fun! s:generate_theme_option_variables()
  303. " 0. All possible theme option names must be registered here
  304. let l:available_theme_options = [
  305. \ 'allow_bold',
  306. \ 'allow_italic',
  307. \ 'transparent_background',
  308. \ ]
  309. " 1. Generate variables and set to default value
  310. for l:option in l:available_theme_options
  311. let s:{'themeOpt_' . l:option} = 0
  312. endfor
  313. let s:themeOpt_override = {} " special case, this has to be a dictionary
  314. " 2. Reassign value to the above variables based on theme settings
  315. " 2.1 In case the theme has top-level options
  316. if has_key(s:selected_theme, 'options')
  317. let l:theme_options = s:selected_theme['options']
  318. for l:opt_name in keys(l:theme_options)
  319. let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
  320. " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
  321. endfor
  322. endif
  323. " 2.2 In case the theme has specific variant options
  324. if has_key(s:selected_theme[s:selected_variant], 'options')
  325. let l:theme_options = s:selected_theme[s:selected_variant]['options']
  326. for l:opt_name in keys(l:theme_options)
  327. let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
  328. " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
  329. endfor
  330. endif
  331. " 3. Reassign value to the above variables which the user customizes
  332. " Part of user-config options
  333. let s:theme_options = {}
  334. if has_key(s:options, 'theme')
  335. let s:theme_options = s:options['theme']
  336. endif
  337. " 3.1 In case user sets for a theme without specifying which variant
  338. if has_key(s:theme_options, s:theme_name)
  339. let l:theme_options = s:theme_options[s:theme_name]
  340. for l:opt_name in keys(l:theme_options)
  341. let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
  342. " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
  343. endfor
  344. endif
  345. " 3.2 In case user sets for a specific variant of a theme
  346. " Create the string that the user might have set for this theme variant
  347. " for example, 'default.dark'
  348. let l:specific_theme_variant = s:theme_name . '.' . s:selected_variant
  349. if has_key(s:theme_options, l:specific_theme_variant)
  350. let l:theme_options = s:theme_options[l:specific_theme_variant]
  351. for l:opt_name in keys(l:theme_options)
  352. let s:{'themeOpt_' . l:opt_name} = l:theme_options[l:opt_name]
  353. " echo 's:themeOpt_' . l:opt_name . ' = ' . s:{'themeOpt_' . l:opt_name}
  354. endfor
  355. endif
  356. endfun
  357. " }}}
  358. " Check If Theme Has Hint: {{{
  359. "
  360. " Brief:
  361. " Function to Check if the selected theme and variant has a hint
  362. "
  363. " Details:
  364. " A hint is a known key that has value 1
  365. " It is not part of theme design but is used for technical purposes
  366. "
  367. " Example:
  368. " If a theme has hint 'NO_CONVERSION', then we can assume that every
  369. " color value is a complete pair, so we don't have to check.
  370. fun! s:theme_has_hint(hint)
  371. return has_key(s:selected_theme[s:selected_variant], a:hint) &&
  372. \ s:selected_theme[s:selected_variant][a:hint] == 1
  373. endfun
  374. " }}}
  375. " Set Overriding Colors: {{{
  376. fun! s:set_overriding_colors()
  377. if s:theme_has_hint('NO_CONVERSION')
  378. " s:convert_colors will not do anything, so we take care of conversion
  379. " for the overriding colors that need to be converted
  380. if s:mode == s:MODE_GUI_COLOR
  381. " if GUI color is not provided, convert from 256 color that must be available
  382. if !empty(s:themeOpt_override)
  383. call s:load_256_to_GUI_converter()
  384. endif
  385. for l:color in keys(s:themeOpt_override)
  386. let l:value = s:themeOpt_override[l:color]
  387. if l:value[0] == ''
  388. let l:value[0] = s:to_HEX[l:value[1]]
  389. endif
  390. let s:palette[l:color] = l:value
  391. endfor
  392. elseif s:mode == s:MODE_256_COLOR
  393. " if 256 color is not provided, convert from GUI color that must be available
  394. if !empty(s:themeOpt_override)
  395. call s:load_GUI_to_256_converter()
  396. endif
  397. for l:color in keys(s:themeOpt_override)
  398. let l:value = s:themeOpt_override[l:color]
  399. if l:value[1] == ''
  400. let l:value[1] = s:to_256(l:value[0])
  401. endif
  402. let s:palette[l:color] = l:value
  403. endfor
  404. endif
  405. else " simply set the colors and let s:convert_colors() take care of conversion
  406. for l:color in keys(s:themeOpt_override)
  407. let s:palette[l:color] = s:themeOpt_override[l:color]
  408. endfor
  409. endif
  410. endfun
  411. " }}}
  412. " Generate Language Option Variables: {{{
  413. " Brief:
  414. " Function to generate language option variables so that there is no need to
  415. " look up from the dictionary every time the option value is checked in the
  416. " function s:apply_syntax_highlightings()
  417. "
  418. " Require:
  419. " s:options <dictionary> user options
  420. "
  421. " Require Optionally:
  422. " g:PaperColor_Theme_Options <dictionary> user option config in .vimrc
  423. "
  424. " Expose:
  425. " s:langOpt_[LANGUAGE]__[OPTION] <any> variables for language options
  426. "
  427. " Example:
  428. " g:PaperColor_Theme_Options has something like this:
  429. " 'language': {
  430. " \ 'python': {
  431. " \ 'highlight_builtins': 1
  432. " \ }
  433. " }
  434. " The following variable will be generated:
  435. " s:langOpt_python__highlight_builtins = 1
  436. fun! s:generate_language_option_variables()
  437. " 0. All possible theme option names must be registered here
  438. let l:available_language_options = [
  439. \ 'c__highlight_builtins',
  440. \ 'cpp__highlight_standard_library',
  441. \ 'python__highlight_builtins'
  442. \ ]
  443. " 1. Generate variables and set to default value
  444. for l:option in l:available_language_options
  445. let s:{'langOpt_' . l:option} = 0
  446. endfor
  447. " Part of user-config options
  448. if has_key(s:options, 'language')
  449. let l:language_options = s:options['language']
  450. " echo l:language_options
  451. for l:lang in keys(l:language_options)
  452. let l:options = l:language_options[l:lang]
  453. " echo l:lang
  454. " echo l:options
  455. for l:option in keys(l:options)
  456. let s:{'langOpt_' . l:lang . '__' . l:option} = l:options[l:option]
  457. " echo 's:langOpt_' . l:lang . '__' . l:option . ' = ' . l:options[l:option]
  458. endfor
  459. endfor
  460. endif
  461. endfun
  462. " }}}
  463. " =========================== COLOR CONVERTER =================================
  464. fun! s:load_GUI_to_256_converter()
  465. " GUI-color To 256-color: {{{
  466. " Returns an approximate grey index for the given grey level
  467. fun! s:grey_number(x)
  468. if &t_Co == 88
  469. if a:x < 23
  470. return 0
  471. elseif a:x < 69
  472. return 1
  473. elseif a:x < 103
  474. return 2
  475. elseif a:x < 127
  476. return 3
  477. elseif a:x < 150
  478. return 4
  479. elseif a:x < 173
  480. return 5
  481. elseif a:x < 196
  482. return 6
  483. elseif a:x < 219
  484. return 7
  485. elseif a:x < 243
  486. return 8
  487. else
  488. return 9
  489. endif
  490. else
  491. if a:x < 14
  492. return 0
  493. else
  494. let l:n = (a:x - 8) / 10
  495. let l:m = (a:x - 8) % 10
  496. if l:m < 5
  497. return l:n
  498. else
  499. return l:n + 1
  500. endif
  501. endif
  502. endif
  503. endfun
  504. " Returns the actual grey level represented by the grey index
  505. fun! s:grey_level(n)
  506. if &t_Co == 88
  507. if a:n == 0
  508. return 0
  509. elseif a:n == 1
  510. return 46
  511. elseif a:n == 2
  512. return 92
  513. elseif a:n == 3
  514. return 115
  515. elseif a:n == 4
  516. return 139
  517. elseif a:n == 5
  518. return 162
  519. elseif a:n == 6
  520. return 185
  521. elseif a:n == 7
  522. return 208
  523. elseif a:n == 8
  524. return 231
  525. else
  526. return 255
  527. endif
  528. else
  529. if a:n == 0
  530. return 0
  531. else
  532. return 8 + (a:n * 10)
  533. endif
  534. endif
  535. endfun
  536. " Returns the palette index for the given grey index
  537. fun! s:grey_colour(n)
  538. if &t_Co == 88
  539. if a:n == 0
  540. return 16
  541. elseif a:n == 9
  542. return 79
  543. else
  544. return 79 + a:n
  545. endif
  546. else
  547. if a:n == 0
  548. return 16
  549. elseif a:n == 25
  550. return 231
  551. else
  552. return 231 + a:n
  553. endif
  554. endif
  555. endfun
  556. " Returns an approximate colour index for the given colour level
  557. fun! s:rgb_number(x)
  558. if &t_Co == 88
  559. if a:x < 69
  560. return 0
  561. elseif a:x < 172
  562. return 1
  563. elseif a:x < 230
  564. return 2
  565. else
  566. return 3
  567. endif
  568. else
  569. if a:x < 75
  570. return 0
  571. else
  572. let l:n = (a:x - 55) / 40
  573. let l:m = (a:x - 55) % 40
  574. if l:m < 20
  575. return l:n
  576. else
  577. return l:n + 1
  578. endif
  579. endif
  580. endif
  581. endfun
  582. " Returns the actual colour level for the given colour index
  583. fun! s:rgb_level(n)
  584. if &t_Co == 88
  585. if a:n == 0
  586. return 0
  587. elseif a:n == 1
  588. return 139
  589. elseif a:n == 2
  590. return 205
  591. else
  592. return 255
  593. endif
  594. else
  595. if a:n == 0
  596. return 0
  597. else
  598. return 55 + (a:n * 40)
  599. endif
  600. endif
  601. endfun
  602. " Returns the palette index for the given R/G/B colour indices
  603. fun! s:rgb_colour(x, y, z)
  604. if &t_Co == 88
  605. return 16 + (a:x * 16) + (a:y * 4) + a:z
  606. else
  607. return 16 + (a:x * 36) + (a:y * 6) + a:z
  608. endif
  609. endfun
  610. " Returns the palette index to approximate the given R/G/B colour levels
  611. fun! s:colour(r, g, b)
  612. " Get the closest grey
  613. let l:gx = s:grey_number(a:r)
  614. let l:gy = s:grey_number(a:g)
  615. let l:gz = s:grey_number(a:b)
  616. " Get the closest colour
  617. let l:x = s:rgb_number(a:r)
  618. let l:y = s:rgb_number(a:g)
  619. let l:z = s:rgb_number(a:b)
  620. if l:gx == l:gy && l:gy == l:gz
  621. " There are two possibilities
  622. let l:dgr = s:grey_level(l:gx) - a:r
  623. let l:dgg = s:grey_level(l:gy) - a:g
  624. let l:dgb = s:grey_level(l:gz) - a:b
  625. let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
  626. let l:dr = s:rgb_level(l:gx) - a:r
  627. let l:dg = s:rgb_level(l:gy) - a:g
  628. let l:db = s:rgb_level(l:gz) - a:b
  629. let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
  630. if l:dgrey < l:drgb
  631. " Use the grey
  632. return s:grey_colour(l:gx)
  633. else
  634. " Use the colour
  635. return s:rgb_colour(l:x, l:y, l:z)
  636. endif
  637. else
  638. " Only one possibility
  639. return s:rgb_colour(l:x, l:y, l:z)
  640. endif
  641. endfun
  642. " Returns the palette index to approximate the '#rrggbb' hex string
  643. fun! s:to_256(rgb)
  644. let l:r = ("0x" . strpart(a:rgb, 1, 2)) + 0
  645. let l:g = ("0x" . strpart(a:rgb, 3, 2)) + 0
  646. let l:b = ("0x" . strpart(a:rgb, 5, 2)) + 0
  647. return s:colour(l:r, l:g, l:b)
  648. endfun
  649. " }}}
  650. endfun
  651. fun! s:load_256_to_GUI_converter()
  652. " 256-color To GUI-color: {{{
  653. """ Xterm 256 color dictionary
  654. " See: http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
  655. "
  656. let s:to_HEX = {
  657. \ '00': '#000000', '01': '#800000', '02': '#008000', '03': '#808000', '04': '#000080',
  658. \ '05': '#800080', '06': '#008080', '07': '#c0c0c0', '08': '#808080', '09': '#ff0000',
  659. \ '10': '#00ff00', '11': '#ffff00', '12': '#0000ff', '13': '#ff00ff', '14': '#00ffff',
  660. \ '15': '#ffffff', '16': '#000000', '17': '#00005f', '18': '#000087', '19': '#0000af',
  661. \ '20': '#0000d7', '21': '#0000ff', '22': '#005f00', '23': '#005f5f', '24': '#005f87',
  662. \ '25': '#005faf', '26': '#005fd7', '27': '#005fff', '28': '#008700', '29': '#00875f',
  663. \ '30': '#008787', '31': '#0087af', '32': '#0087d7', '33': '#0087ff', '34': '#00af00',
  664. \ '35': '#00af5f', '36': '#00af87', '37': '#00afaf', '38': '#00afd7', '39': '#00afff',
  665. \ '40': '#00d700', '41': '#00d75f', '42': '#00d787', '43': '#00d7af', '44': '#00d7d7',
  666. \ '45': '#00d7ff', '46': '#00ff00', '47': '#00ff5f', '48': '#00ff87', '49': '#00ffaf',
  667. \ '50': '#00ffd7', '51': '#00ffff', '52': '#5f0000', '53': '#5f005f', '54': '#5f0087',
  668. \ '55': '#5f00af', '56': '#5f00d7', '57': '#5f00ff', '58': '#5f5f00', '59': '#5f5f5f',
  669. \ '60': '#5f5f87', '61': '#5f5faf', '62': '#5f5fd7', '63': '#5f5fff', '64': '#5f8700',
  670. \ '65': '#5f875f', '66': '#5f8787', '67': '#5f87af', '68': '#5f87d7', '69': '#5f87ff',
  671. \ '70': '#5faf00', '71': '#5faf5f', '72': '#5faf87', '73': '#5fafaf', '74': '#5fafd7',
  672. \ '75': '#5fafff', '76': '#5fd700', '77': '#5fd75f', '78': '#5fd787', '79': '#5fd7af',
  673. \ '80': '#5fd7d7', '81': '#5fd7ff', '82': '#5fff00', '83': '#5fff5f', '84': '#5fff87',
  674. \ '85': '#5fffaf', '86': '#5fffd7', '87': '#5fffff', '88': '#870000', '89': '#87005f',
  675. \ '90': '#870087', '91': '#8700af', '92': '#8700d7', '93': '#8700ff', '94': '#875f00',
  676. \ '95': '#875f5f', '96': '#875f87', '97': '#875faf', '98': '#875fd7', '99': '#875fff',
  677. \ '100': '#878700', '101': '#87875f', '102': '#878787', '103': '#8787af', '104': '#8787d7',
  678. \ '105': '#8787ff', '106': '#87af00', '107': '#87af5f', '108': '#87af87', '109': '#87afaf',
  679. \ '110': '#87afd7', '111': '#87afff', '112': '#87d700', '113': '#87d75f', '114': '#87d787',
  680. \ '115': '#87d7af', '116': '#87d7d7', '117': '#87d7ff', '118': '#87ff00', '119': '#87ff5f',
  681. \ '120': '#87ff87', '121': '#87ffaf', '122': '#87ffd7', '123': '#87ffff', '124': '#af0000',
  682. \ '125': '#af005f', '126': '#af0087', '127': '#af00af', '128': '#af00d7', '129': '#af00ff',
  683. \ '130': '#af5f00', '131': '#af5f5f', '132': '#af5f87', '133': '#af5faf', '134': '#af5fd7',
  684. \ '135': '#af5fff', '136': '#af8700', '137': '#af875f', '138': '#af8787', '139': '#af87af',
  685. \ '140': '#af87d7', '141': '#af87ff', '142': '#afaf00', '143': '#afaf5f', '144': '#afaf87',
  686. \ '145': '#afafaf', '146': '#afafd7', '147': '#afafff', '148': '#afd700', '149': '#afd75f',
  687. \ '150': '#afd787', '151': '#afd7af', '152': '#afd7d7', '153': '#afd7ff', '154': '#afff00',
  688. \ '155': '#afff5f', '156': '#afff87', '157': '#afffaf', '158': '#afffd7', '159': '#afffff',
  689. \ '160': '#d70000', '161': '#d7005f', '162': '#d70087', '163': '#d700af', '164': '#d700d7',
  690. \ '165': '#d700ff', '166': '#d75f00', '167': '#d75f5f', '168': '#d75f87', '169': '#d75faf',
  691. \ '170': '#d75fd7', '171': '#d75fff', '172': '#d78700', '173': '#d7875f', '174': '#d78787',
  692. \ '175': '#d787af', '176': '#d787d7', '177': '#d787ff', '178': '#d7af00', '179': '#d7af5f',
  693. \ '180': '#d7af87', '181': '#d7afaf', '182': '#d7afd7', '183': '#d7afff', '184': '#d7d700',
  694. \ '185': '#d7d75f', '186': '#d7d787', '187': '#d7d7af', '188': '#d7d7d7', '189': '#d7d7ff',
  695. \ '190': '#d7ff00', '191': '#d7ff5f', '192': '#d7ff87', '193': '#d7ffaf', '194': '#d7ffd7',
  696. \ '195': '#d7ffff', '196': '#ff0000', '197': '#ff005f', '198': '#ff0087', '199': '#ff00af',
  697. \ '200': '#ff00d7', '201': '#ff00ff', '202': '#ff5f00', '203': '#ff5f5f', '204': '#ff5f87',
  698. \ '205': '#ff5faf', '206': '#ff5fd7', '207': '#ff5fff', '208': '#ff8700', '209': '#ff875f',
  699. \ '210': '#ff8787', '211': '#ff87af', '212': '#ff87d7', '213': '#ff87ff', '214': '#ffaf00',
  700. \ '215': '#ffaf5f', '216': '#ffaf87', '217': '#ffafaf', '218': '#ffafd7', '219': '#ffafff',
  701. \ '220': '#ffd700', '221': '#ffd75f', '222': '#ffd787', '223': '#ffd7af', '224': '#ffd7d7',
  702. \ '225': '#ffd7ff', '226': '#ffff00', '227': '#ffff5f', '228': '#ffff87', '229': '#ffffaf',
  703. \ '230': '#ffffd7', '231': '#ffffff', '232': '#080808', '233': '#121212', '234': '#1c1c1c',
  704. \ '235': '#262626', '236': '#303030', '237': '#3a3a3a', '238': '#444444', '239': '#4e4e4e',
  705. \ '240': '#585858', '241': '#626262', '242': '#6c6c6c', '243': '#767676', '244': '#808080',
  706. \ '245': '#8a8a8a', '246': '#949494', '247': '#9e9e9e', '248': '#a8a8a8', '249': '#b2b2b2',
  707. \ '250': '#bcbcbc', '251': '#c6c6c6', '252': '#d0d0d0', '253': '#dadada', '254': '#e4e4e4',
  708. \ '255': '#eeeeee' }
  709. " }}}
  710. endfun
  711. " ========================== ENVIRONMENT ADAPTER ==============================
  712. " Set Format Attributes: {{{
  713. fun! s:set_format_attributes()
  714. " These are the default
  715. if s:mode == s:MODE_GUI_COLOR
  716. let s:ft_bold = " cterm=bold gui=bold "
  717. let s:ft_none = " cterm=none gui=none "
  718. let s:ft_reverse = " cterm=reverse gui=reverse "
  719. let s:ft_italic = " cterm=italic gui=italic "
  720. let s:ft_italic_bold = " cterm=italic,bold gui=italic,bold "
  721. elseif s:mode == s:MODE_256_COLOR
  722. let s:ft_bold = " cterm=bold "
  723. let s:ft_none = " cterm=none "
  724. let s:ft_reverse = " cterm=reverse "
  725. let s:ft_italic = " cterm=italic "
  726. let s:ft_italic_bold = " cterm=italic,bold "
  727. else
  728. let s:ft_bold = ""
  729. let s:ft_none = " cterm=none "
  730. let s:ft_reverse = " cterm=reverse "
  731. let s:ft_italic = ""
  732. let s:ft_italic_bold = ""
  733. endif
  734. " Unless instructed otherwise either by theme setting or user overriding
  735. if s:themeOpt_allow_bold == 0
  736. let s:ft_bold = ""
  737. endif
  738. if s:themeOpt_allow_italic == 0
  739. let s:ft_italic = ""
  740. let s:ft_italic_bold = s:ft_bold
  741. endif
  742. endfun
  743. " }}}
  744. " Convert Colors If Needed: {{{
  745. fun! s:convert_colors()
  746. if s:theme_has_hint('NO_CONVERSION')
  747. return
  748. endif
  749. if s:mode == s:MODE_GUI_COLOR
  750. " if GUI color is not provided, convert from 256 color that must be available
  751. call s:load_256_to_GUI_converter()
  752. for l:color in keys(s:palette)
  753. let l:value = s:palette[l:color]
  754. if l:value[0] == ''
  755. let l:value[0] = s:to_HEX[l:value[1]]
  756. endif
  757. let s:palette[l:color] = l:value
  758. endfor
  759. elseif s:mode == s:MODE_256_COLOR
  760. " if 256 color is not provided, convert from GUI color that must be available
  761. call s:load_GUI_to_256_converter()
  762. for l:color in keys(s:palette)
  763. let l:value = s:palette[l:color]
  764. if l:value[1] == ''
  765. let l:value[1] = s:to_256(l:value[0])
  766. endif
  767. let s:palette[l:color] = l:value
  768. endfor
  769. endif
  770. " otherwise use the terminal colors and none of the theme colors are used
  771. endfun
  772. " }}}
  773. " ============================ COLOR POPULARIZER ===============================
  774. " Set Color Variables: {{{
  775. fun! s:set_color_variables()
  776. " Helper: {{{
  777. " -------
  778. " Function to dynamically generate variables that store the color strings
  779. " for setting highlighting. Each color name will have 2 variables with prefix
  780. " s:fg_ and s:bg_. For example:
  781. " if a:color_name is 'Normal' and a:color_value is ['#000000', '0', 'Black'],
  782. " the following 2 variables will be created:
  783. " s:fg_Normal that stores the string ' guifg=#000000 '
  784. " s:bg_Normal that stores the string ' guibg=#000000 '
  785. " Depending on the color mode, ctermfg and ctermbg will be either 0 or Black
  786. "
  787. " Rationale:
  788. " The whole purpose is for speed. We generate these ahead of time so that we
  789. " don't have to do look up or do any if-branch when we set the highlightings.
  790. "
  791. " Furthermore, multiple function definitions for each mode actually reduces
  792. " the need for multiple if-branches inside a single function. This is not
  793. " pretty, but Vim Script is slow, so reducing if-branches in function that is
  794. " often called helps speeding things up quite a bit. Think of this like macro.
  795. "
  796. " If you are familiar with the old code base (v0.9 and ealier), this way of
  797. " generate variables dramatically reduces the loading speed.
  798. " None of previous optimization tricks gets anywhere near this.
  799. if s:mode == s:MODE_GUI_COLOR
  800. fun! s:create_color_variables(color_name, rich_color, term_color)
  801. let {'s:fg_' . a:color_name} = ' guifg=' . a:rich_color[0] . ' '
  802. let {'s:bg_' . a:color_name} = ' guibg=' . a:rich_color[0] . ' '
  803. endfun
  804. elseif s:mode == s:MODE_256_COLOR
  805. fun! s:create_color_variables(color_name, rich_color, term_color)
  806. let {'s:fg_' . a:color_name} = ' ctermfg=' . a:rich_color[1] . ' '
  807. let {'s:bg_' . a:color_name} = ' ctermbg=' . a:rich_color[1] . ' '
  808. endfun
  809. else
  810. fun! s:create_color_variables(color_name, rich_color, term_color)
  811. let {'s:fg_' . a:color_name} = ' ctermfg=' . a:term_color . ' '
  812. let {'s:bg_' . a:color_name} = ' ctermbg=' . a:term_color . ' '
  813. endfun
  814. endif
  815. " }}}
  816. " Color value format: Array [<GUI COLOR/HEX >, <256-Base>, <16-Base>]
  817. " 16-Base is terminal's native color palette that can be alternated through
  818. " the terminal settings. The 16-color names are according to `:h cterm-colors`
  819. " BASIC COLORS:
  820. " color00-15 are required by all themes.
  821. " These are also how the terminal color palette for the target theme should be.
  822. " See README for theme design guideline
  823. "
  824. " An example format of the below variable's value: ['#262626', '234', 'Black']
  825. " Where the 1st value is HEX color for GUI Vim, 2nd value is for 256-color terminal,
  826. " and the color name on the right is for 16-color terminal (the actual terminal colors
  827. " can be different from what the color names suggest). See :h cterm-colors
  828. "
  829. " Depending on the provided color palette and current Vim, the 1st and 2nd
  830. " parameter might not exist, for example, on 16-color terminal, the variables below
  831. " only store the color names to use the terminal color palette which is the only
  832. " thing available therefore no need for GUI-color or 256-color.
  833. let color00 = get(s:palette, 'color00')
  834. let color01 = get(s:palette, 'color01')
  835. let color02 = get(s:palette, 'color02')
  836. let color03 = get(s:palette, 'color03')
  837. let color04 = get(s:palette, 'color04')
  838. let color05 = get(s:palette, 'color05')
  839. let color06 = get(s:palette, 'color06')
  840. let color07 = get(s:palette, 'color07')
  841. let color08 = get(s:palette, 'color08')
  842. let color09 = get(s:palette, 'color09')
  843. let color10 = get(s:palette, 'color10')
  844. let color11 = get(s:palette, 'color11')
  845. let color12 = get(s:palette, 'color12')
  846. let color13 = get(s:palette, 'color13')
  847. let color14 = get(s:palette, 'color14')
  848. let color15 = get(s:palette, 'color15')
  849. call s:create_color_variables('background', color00 , 'Black')
  850. call s:create_color_variables('negative', color01 , 'DarkRed')
  851. call s:create_color_variables('positive', color02 , 'DarkGreen')
  852. call s:create_color_variables('olive', color03 , 'DarkYellow') " string
  853. call s:create_color_variables('neutral', color04 , 'DarkBlue')
  854. call s:create_color_variables('comment', color05 , 'DarkMagenta')
  855. call s:create_color_variables('navy', color06 , 'DarkCyan') " storageclass
  856. call s:create_color_variables('foreground', color07 , 'LightGray')
  857. call s:create_color_variables('nontext', color08 , 'DarkGray')
  858. call s:create_color_variables('red', color09 , 'LightRed') " import / try/catch
  859. call s:create_color_variables('pink', color10 , 'LightGreen') " statement, type
  860. call s:create_color_variables('purple', color11 , 'LightYellow') " if / conditional
  861. call s:create_color_variables('accent', color12 , 'LightBlue')
  862. call s:create_color_variables('orange', color13 , 'LightMagenta') " number
  863. call s:create_color_variables('blue', color14 , 'LightCyan') " other keyword
  864. call s:create_color_variables('highlight', color15 , 'White')
  865. " Note: special case for FoldColumn group. I want to get rid of this case.
  866. call s:create_color_variables('transparent', [color00[0], 'none'], 'none')
  867. " EXTENDED COLORS:
  868. " From here on, all colors are optional and must have default values (3rd parameter of the
  869. " `get` command) that point to the above basic colors in case the target theme doesn't
  870. " provide the extended colors. The default values should be reasonably sensible.
  871. " The terminal color must be provided also.
  872. call s:create_color_variables('aqua', get(s:palette, 'color16', color14) , 'LightCyan')
  873. call s:create_color_variables('green', get(s:palette, 'color17', color13) , 'LightMagenta')
  874. call s:create_color_variables('wine', get(s:palette, 'color18', color11) , 'LightYellow')
  875. " LineNumber: when set number
  876. call s:create_color_variables('linenumber_fg', get(s:palette, 'linenumber_fg', color08) , 'DarkGray')
  877. call s:create_color_variables('linenumber_bg', get(s:palette, 'linenumber_bg', color00) , 'Black')
  878. " Vertical Split: when there are more than 1 window side by side, ex: <C-W><C-V>
  879. call s:create_color_variables('vertsplit_fg', get(s:palette, 'vertsplit_fg', color15) , 'White')
  880. call s:create_color_variables('vertsplit_bg', get(s:palette, 'vertsplit_bg', color00) , 'Black')
  881. " Statusline: when set status=2
  882. call s:create_color_variables('statusline_active_fg', get(s:palette, 'statusline_active_fg', color00) , 'Black')
  883. call s:create_color_variables('statusline_active_bg', get(s:palette, 'statusline_active_bg', color15) , 'White')
  884. call s:create_color_variables('statusline_inactive_fg', get(s:palette, 'statusline_inactive_fg', color07) , 'LightGray')
  885. call s:create_color_variables('statusline_inactive_bg', get(s:palette, 'statusline_inactive_bg', color08) , 'DarkGray')
  886. " Cursor: in normal mode
  887. call s:create_color_variables('cursor_fg', get(s:palette, 'cursor_fg', color00) , 'Black')
  888. call s:create_color_variables('cursor_bg', get(s:palette, 'cursor_bg', color07) , 'LightGray')
  889. call s:create_color_variables('cursorline', get(s:palette, 'cursorline', color00) , 'Black')
  890. " CursorColumn: when set cursorcolumn
  891. call s:create_color_variables('cursorcolumn', get(s:palette, 'cursorcolumn', color00) , 'Black')
  892. " CursorLine Number: when set cursorline number
  893. call s:create_color_variables('cursorlinenr_fg', get(s:palette, 'cursorlinenr_fg', color13) , 'LightMagenta')
  894. call s:create_color_variables('cursorlinenr_bg', get(s:palette, 'cursorlinenr_bg', color00) , 'Black')
  895. " Popup Menu: when <C-X><C-N> for autocomplete
  896. call s:create_color_variables('popupmenu_fg', get(s:palette, 'popupmenu_fg', color07) , 'LightGray')
  897. call s:create_color_variables('popupmenu_bg', get(s:palette, 'popupmenu_bg', color08) , 'DarkGray') " TODO: double check this, might resolve an issue
  898. " Search: ex: when * on a word
  899. call s:create_color_variables('search_fg', get(s:palette, 'search_fg', color00) , 'Black')
  900. call s:create_color_variables('search_bg', get(s:palette, 'search_bg', color15) , 'Yellow')
  901. " Todo: ex: TODO
  902. call s:create_color_variables('todo_fg', get(s:palette, 'todo_fg', color05) , 'LightYellow')
  903. call s:create_color_variables('todo_bg', get(s:palette, 'todo_bg', color00) , 'Black')
  904. " Error: ex: turn spell on and have invalid words
  905. call s:create_color_variables('error_fg', get(s:palette, 'error_fg', color01) , 'DarkRed')
  906. call s:create_color_variables('error_bg', get(s:palette, 'error_bg', color00) , 'Black')
  907. " Match Parenthesis: selecting an opening/closing pair and the other one will be highlighted
  908. call s:create_color_variables('matchparen_fg', get(s:palette, 'matchparen_fg', color00) , 'LightMagenta')
  909. call s:create_color_variables('matchparen_bg', get(s:palette, 'matchparen_bg', color05) , 'Black')
  910. " Visual:
  911. call s:create_color_variables('visual_fg', get(s:palette, 'visual_fg', color08) , 'Black')
  912. call s:create_color_variables('visual_bg', get(s:palette, 'visual_bg', color07) , 'White')
  913. " Folded:
  914. call s:create_color_variables('folded_fg', get(s:palette, 'folded_fg', color00) , 'Black')
  915. call s:create_color_variables('folded_bg', get(s:palette, 'folded_bg', color05) , 'DarkYellow')
  916. " WildMenu: Autocomplete command, ex: :color <tab><tab>
  917. call s:create_color_variables('wildmenu_fg', get(s:palette, 'wildmenu_fg', color00) , 'Black')
  918. call s:create_color_variables('wildmenu_bg', get(s:palette, 'wildmenu_bg', color06) , 'LightGray')
  919. " Spelling: when spell on and there are spelling problems like this for example: papercolor. a vim color scheme
  920. call s:create_color_variables('spellbad', get(s:palette, 'spellbad', color04) , 'DarkRed')
  921. call s:create_color_variables('spellcap', get(s:palette, 'spellcap', color05) , 'DarkMagenta')
  922. call s:create_color_variables('spellrare', get(s:palette, 'spellrare', color06) , 'DarkYellow')
  923. call s:create_color_variables('spelllocal', get(s:palette, 'spelllocal', color01) , 'DarkBlue')
  924. " Diff:
  925. call s:create_color_variables('diffadd_fg', get(s:palette, 'diffadd_fg', color00) , 'Black')
  926. call s:create_color_variables('diffadd_bg', get(s:palette, 'diffadd_bg', color02) , 'DarkGreen')
  927. call s:create_color_variables('diffdelete_fg', get(s:palette, 'diffdelete_fg', color00) , 'Black')
  928. call s:create_color_variables('diffdelete_bg', get(s:palette, 'diffdelete_bg', color04) , 'DarkRed')
  929. call s:create_color_variables('difftext_fg', get(s:palette, 'difftext_fg', color00) , 'Black')
  930. call s:create_color_variables('difftext_bg', get(s:palette, 'difftext_bg', color06) , 'DarkYellow')
  931. call s:create_color_variables('diffchange_fg', get(s:palette, 'diffchange_fg', color00) , 'Black')
  932. call s:create_color_variables('diffchange_bg', get(s:palette, 'diffchange_bg', color14) , 'LightYellow')
  933. " Tabline: when having tabs, ex: :tabnew
  934. call s:create_color_variables('tabline_bg', get(s:palette, 'tabline_bg', color00) , 'Black')
  935. call s:create_color_variables('tabline_active_fg', get(s:palette, 'tabline_active_fg', color07) , 'LightGray')
  936. call s:create_color_variables('tabline_active_bg', get(s:palette, 'tabline_active_bg', color00) , 'Black')
  937. call s:create_color_variables('tabline_inactive_fg', get(s:palette, 'tabline_inactive_fg', color07) , 'Black')
  938. call s:create_color_variables('tabline_inactive_bg', get(s:palette, 'tabline_inactive_bg', color08) , 'DarkMagenta')
  939. " Plugin: BufTabLine https://github.com/ap/vim-buftabline
  940. call s:create_color_variables('buftabline_bg', get(s:palette, 'buftabline_bg', color00) , 'Black')
  941. call s:create_color_variables('buftabline_current_fg', get(s:palette, 'buftabline_current_fg', color07) , 'LightGray')
  942. call s:create_color_variables('buftabline_current_bg', get(s:palette, 'buftabline_current_bg', color05) , 'DarkMagenta')
  943. call s:create_color_variables('buftabline_active_fg', get(s:palette, 'buftabline_active_fg', color07) , 'LightGray')
  944. call s:create_color_variables('buftabline_active_bg', get(s:palette, 'buftabline_active_bg', color12) , 'LightBlue')
  945. call s:create_color_variables('buftabline_inactive_fg', get(s:palette, 'buftabline_inactive_fg', color07) , 'LightGray')
  946. call s:create_color_variables('buftabline_inactive_bg', get(s:palette, 'buftabline_inactive_bg', color00) , 'Black')
  947. " Neovim terminal colors https://neovim.io/doc/user/nvim_terminal_emulator.html#nvim-terminal-emulator-configuration
  948. " TODO: Fix this
  949. let g:terminal_color_0 = color00[0]
  950. let g:terminal_color_1 = color01[0]
  951. let g:terminal_color_2 = color02[0]
  952. let g:terminal_color_3 = color03[0]
  953. let g:terminal_color_4 = color04[0]
  954. let g:terminal_color_5 = color05[0]
  955. let g:terminal_color_6 = color06[0]
  956. let g:terminal_color_7 = color07[0]
  957. let g:terminal_color_8 = color08[0]
  958. let g:terminal_color_9 = color09[0]
  959. let g:terminal_color_10 = color10[0]
  960. let g:terminal_color_11 = color11[0]
  961. let g:terminal_color_12 = color12[0]
  962. let g:terminal_color_13 = color13[0]
  963. let g:terminal_color_14 = color14[0]
  964. let g:terminal_color_15 = color15[0]
  965. endfun
  966. " }}}
  967. " Apply Syntax Highlightings: {{{
  968. fun! s:apply_syntax_highlightings()
  969. if s:themeOpt_transparent_background
  970. exec 'hi Normal' . s:fg_foreground
  971. " Switching between dark & light variant through `set background`
  972. " NOTE: Handle background switching right after `Normal` group because of
  973. " God-know-why reason. Not doing this way had caused issue before
  974. if s:is_dark " DARK VARIANT
  975. set background=dark
  976. else " LIGHT VARIANT
  977. set background=light
  978. endif
  979. exec 'hi NonText' . s:fg_nontext
  980. exec 'hi LineNr' . s:fg_linenumber_fg
  981. exec 'hi Conceal' . s:fg_linenumber_fg
  982. exec 'hi VertSplit' . s:fg_vertsplit_fg . s:ft_none
  983. exec 'hi FoldColumn' . s:fg_folded_fg . s:bg_transparent . s:ft_none
  984. else
  985. exec 'hi Normal' . s:fg_foreground . s:bg_background
  986. " Switching between dark & light variant through `set background`
  987. if s:is_dark " DARK VARIANT
  988. set background=dark
  989. else " LIGHT VARIANT
  990. set background=light
  991. endif
  992. exec 'hi NonText' . s:fg_nontext . s:bg_background
  993. exec 'hi LineNr' . s:fg_linenumber_fg . s:bg_linenumber_bg
  994. exec 'hi Conceal' . s:fg_linenumber_fg . s:bg_linenumber_bg
  995. exec 'hi VertSplit' . s:fg_vertsplit_bg . s:bg_vertsplit_fg
  996. exec 'hi FoldColumn' . s:fg_folded_fg . s:bg_background . s:ft_none
  997. endif
  998. exec 'hi Cursor' . s:fg_cursor_fg . s:bg_cursor_bg
  999. exec 'hi SpecialKey' . s:fg_nontext
  1000. exec 'hi Search' . s:fg_search_fg . s:bg_search_bg
  1001. exec 'hi StatusLine' . s:fg_statusline_active_bg . s:bg_statusline_active_fg
  1002. exec 'hi StatusLineNC' . s:fg_statusline_inactive_bg . s:bg_statusline_inactive_fg
  1003. exec 'hi StatusLineTerm' . s:fg_statusline_active_bg . s:bg_statusline_active_fg
  1004. exec 'hi StatusLineTermNC' . s:fg_statusline_inactive_bg . s:bg_statusline_inactive_fg
  1005. exec 'hi Visual' . s:fg_visual_fg . s:bg_visual_bg
  1006. exec 'hi Directory' . s:fg_blue
  1007. exec 'hi ModeMsg' . s:fg_olive
  1008. exec 'hi MoreMsg' . s:fg_olive
  1009. exec 'hi Question' . s:fg_olive
  1010. exec 'hi WarningMsg' . s:fg_pink
  1011. exec 'hi MatchParen' . s:fg_matchparen_fg . s:bg_matchparen_bg
  1012. exec 'hi Folded' . s:fg_folded_fg . s:bg_folded_bg
  1013. exec 'hi WildMenu' . s:fg_wildmenu_fg . s:bg_wildmenu_bg . s:ft_bold
  1014. if version >= 700
  1015. exec 'hi CursorLine' . s:bg_cursorline . s:ft_none
  1016. if s:mode == s:MODE_16_COLOR
  1017. exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg
  1018. else
  1019. exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg . s:ft_none
  1020. endif
  1021. exec 'hi CursorColumn' . s:bg_cursorcolumn . s:ft_none
  1022. exec 'hi PMenu' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
  1023. exec 'hi PMenuSel' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_reverse
  1024. if s:themeOpt_transparent_background
  1025. exec 'hi SignColumn' . s:fg_green . s:ft_none
  1026. else
  1027. exec 'hi SignColumn' . s:fg_green . s:bg_background . s:ft_none
  1028. endif
  1029. end
  1030. if version >= 703
  1031. exec 'hi ColorColumn' . s:bg_cursorcolumn . s:ft_none
  1032. end
  1033. exec 'hi TabLine' . s:fg_tabline_inactive_fg . s:bg_tabline_inactive_bg . s:ft_none
  1034. exec 'hi TabLineFill' . s:fg_tabline_bg . s:bg_tabline_bg . s:ft_none
  1035. exec 'hi TabLineSel' . s:fg_tabline_active_fg . s:bg_tabline_active_bg . s:ft_none
  1036. exec 'hi BufTabLineCurrent' . s:fg_buftabline_current_fg . s:bg_buftabline_current_bg . s:ft_none
  1037. exec 'hi BufTabLineActive' . s:fg_buftabline_active_fg . s:bg_buftabline_active_bg . s:ft_none
  1038. exec 'hi BufTabLineHidden' . s:fg_buftabline_inactive_fg . s:bg_buftabline_inactive_bg . s:ft_none
  1039. exec 'hi BufTabLineFill' . s:bg_buftabline_bg . s:ft_none
  1040. " Standard Group Highlighting:
  1041. exec 'hi Comment' . s:fg_comment . s:ft_italic
  1042. exec 'hi Constant' . s:fg_orange
  1043. exec 'hi String' . s:fg_olive
  1044. exec 'hi Character' . s:fg_olive
  1045. exec 'hi Number' . s:fg_orange
  1046. exec 'hi Boolean' . s:fg_green . s:ft_bold
  1047. exec 'hi Float' . s:fg_orange
  1048. exec 'hi Identifier' . s:fg_navy
  1049. exec 'hi Function' . s:fg_foreground
  1050. exec 'hi Statement' . s:fg_pink . s:ft_none
  1051. exec 'hi Conditional' . s:fg_purple . s:ft_bold
  1052. exec 'hi Repeat' . s:fg_purple . s:ft_bold
  1053. exec 'hi Label' . s:fg_blue
  1054. exec 'hi Operator' . s:fg_aqua . s:ft_none
  1055. exec 'hi Keyword' . s:fg_blue
  1056. exec 'hi Exception' . s:fg_red
  1057. exec 'hi PreProc' . s:fg_blue
  1058. exec 'hi Include' . s:fg_red
  1059. exec 'hi Define' . s:fg_blue
  1060. exec 'hi Macro' . s:fg_blue
  1061. exec 'hi PreCondit' . s:fg_aqua
  1062. exec 'hi Type' . s:fg_pink . s:ft_bold
  1063. exec 'hi StorageClass' . s:fg_navy . s:ft_bold
  1064. exec 'hi Structure' . s:fg_blue . s:ft_bold
  1065. exec 'hi Typedef' . s:fg_pink . s:ft_bold
  1066. exec 'hi Special' . s:fg_foreground
  1067. exec 'hi SpecialChar' . s:fg_foreground
  1068. exec 'hi Tag' . s:fg_green
  1069. exec 'hi Delimiter' . s:fg_aqua
  1070. exec 'hi SpecialComment' . s:fg_comment . s:ft_bold
  1071. exec 'hi Debug' . s:fg_orange
  1072. exec 'hi Error' . s:fg_error_fg . s:bg_error_bg
  1073. exec 'hi Todo' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
  1074. exec 'hi Title' . s:fg_comment
  1075. exec 'hi Global' . s:fg_blue
  1076. " Extension {{{
  1077. " VimL Highlighting
  1078. exec 'hi vimCommand' . s:fg_pink
  1079. exec 'hi vimVar' . s:fg_navy
  1080. exec 'hi vimFuncKey' . s:fg_pink
  1081. exec 'hi vimFunction' . s:fg_blue . s:ft_bold
  1082. exec 'hi vimNotFunc' . s:fg_pink
  1083. exec 'hi vimMap' . s:fg_red
  1084. exec 'hi vimAutoEvent' . s:fg_aqua . s:ft_bold
  1085. exec 'hi vimMapModKey' . s:fg_aqua
  1086. exec 'hi vimFuncName' . s:fg_purple
  1087. exec 'hi vimIsCommand' . s:fg_foreground
  1088. exec 'hi vimFuncVar' . s:fg_aqua
  1089. exec 'hi vimLet' . s:fg_red
  1090. exec 'hi vimContinue' . s:fg_aqua
  1091. exec 'hi vimMapRhsExtend' . s:fg_foreground
  1092. exec 'hi vimCommentTitle' . s:fg_comment . s:ft_italic_bold
  1093. exec 'hi vimBracket' . s:fg_aqua
  1094. exec 'hi vimParenSep' . s:fg_aqua
  1095. exec 'hi vimNotation' . s:fg_aqua
  1096. exec 'hi vimOper' . s:fg_foreground
  1097. exec 'hi vimOperParen' . s:fg_foreground
  1098. exec 'hi vimSynType' . s:fg_purple
  1099. exec 'hi vimSynReg' . s:fg_pink . s:ft_none
  1100. exec 'hi vimSynRegion' . s:fg_foreground
  1101. exec 'hi vimSynMtchGrp' . s:fg_pink
  1102. exec 'hi vimSynNextgroup' . s:fg_pink
  1103. exec 'hi vimSynKeyRegion' . s:fg_green
  1104. exec 'hi vimSynRegOpt' . s:fg_blue
  1105. exec 'hi vimSynMtchOpt' . s:fg_blue
  1106. exec 'hi vimSynContains' . s:fg_pink
  1107. exec 'hi vimGroupName' . s:fg_foreground
  1108. exec 'hi vimGroupList' . s:fg_foreground
  1109. exec 'hi vimHiGroup' . s:fg_foreground
  1110. exec 'hi vimGroup' . s:fg_navy . s:ft_bold
  1111. exec 'hi vimOnlyOption' . s:fg_blue
  1112. " Makefile Highlighting
  1113. exec 'hi makeIdent' . s:fg_blue
  1114. exec 'hi makeSpecTarget' . s:fg_olive
  1115. exec 'hi makeTarget' . s:fg_red
  1116. exec 'hi makeStatement' . s:fg_aqua . s:ft_bold
  1117. exec 'hi makeCommands' . s:fg_foreground
  1118. exec 'hi makeSpecial' . s:fg_orange . s:ft_bold
  1119. " CMake Highlighting (Builtin)
  1120. exec 'hi cmakeStatement' . s:fg_blue
  1121. exec 'hi cmakeArguments' . s:fg_foreground
  1122. exec 'hi cmakeVariableValue' . s:fg_pink
  1123. " CMake Highlighting (Plugin: https://github.com/pboettch/vim-cmake-syntax)
  1124. exec 'hi cmakeCommand' . s:fg_blue
  1125. exec 'hi cmakeCommandConditional' . s:fg_purple . s:ft_bold
  1126. exec 'hi cmakeKWset' . s:fg_orange
  1127. exec 'hi cmakeKWvariable_watch' . s:fg_orange
  1128. exec 'hi cmakeKWif' . s:fg_orange
  1129. exec 'hi cmakeArguments' . s:fg_foreground
  1130. exec 'hi cmakeKWproject' . s:fg_pink
  1131. exec 'hi cmakeGeneratorExpressions' . s:fg_orange
  1132. exec 'hi cmakeGeneratorExpression' . s:fg_aqua
  1133. exec 'hi cmakeVariable' . s:fg_pink
  1134. exec 'hi cmakeProperty' . s:fg_aqua
  1135. exec 'hi cmakeKWforeach' . s:fg_aqua
  1136. exec 'hi cmakeKWunset' . s:fg_aqua
  1137. exec 'hi cmakeKWmacro' . s:fg_aqua
  1138. exec 'hi cmakeKWget_property' . s:fg_aqua
  1139. exec 'hi cmakeKWset_tests_properties' . s:fg_aqua
  1140. exec 'hi cmakeKWmessage' . s:fg_aqua
  1141. exec 'hi cmakeKWinstall_targets' . s:fg_orange
  1142. exec 'hi cmakeKWsource_group' . s:fg_orange
  1143. exec 'hi cmakeKWfind_package' . s:fg_aqua
  1144. exec 'hi cmakeKWstring' . s:fg_olive
  1145. exec 'hi cmakeKWinstall' . s:fg_aqua
  1146. exec 'hi cmakeKWtarget_sources' . s:fg_orange
  1147. " C Highlighting
  1148. exec 'hi cType' . s:fg_pink . s:ft_bold
  1149. exec 'hi cFormat' . s:fg_olive
  1150. exec 'hi cStorageClass' . s:fg_navy . s:ft_bold
  1151. exec 'hi cBoolean' . s:fg_green . s:ft_bold
  1152. exec 'hi cCharacter' . s:fg_olive
  1153. exec 'hi cConstant' . s:fg_green . s:ft_bold
  1154. exec 'hi cConditional' . s:fg_purple . s:ft_bold
  1155. exec 'hi cSpecial' . s:fg_olive . s:ft_bold
  1156. exec 'hi cDefine' . s:fg_blue
  1157. exec 'hi cNumber' . s:fg_orange
  1158. exec 'hi cPreCondit' . s:fg_aqua
  1159. exec 'hi cRepeat' . s:fg_purple . s:ft_bold
  1160. exec 'hi cLabel' . s:fg_aqua
  1161. " exec 'hi cAnsiFunction' . s:fg_aqua . s:ft_bold
  1162. " exec 'hi cAnsiName' . s:fg_pink
  1163. exec 'hi cDelimiter' . s:fg_blue
  1164. " exec 'hi cBraces' . s:fg_foreground
  1165. " exec 'hi cIdentifier' . s:fg_blue . s:bg_pink
  1166. " exec 'hi cSemiColon' . s:bg_blue
  1167. exec 'hi cOperator' . s:fg_aqua
  1168. " exec 'hi cStatement' . s:fg_pink
  1169. " exec 'hi cTodo' . s:fg_comment . s:ft_bold
  1170. " exec 'hi cStructure' . s:fg_blue . s:ft_bold
  1171. exec 'hi cCustomParen' . s:fg_foreground
  1172. " exec 'hi cCustomFunc' . s:fg_foreground
  1173. " exec 'hi cUserFunction' . s:fg_blue . s:ft_bold
  1174. exec 'hi cOctalZero' . s:fg_purple . s:ft_bold
  1175. if s:langOpt_c__highlight_builtins == 1
  1176. exec 'hi cFunction' . s:fg_blue
  1177. else
  1178. exec 'hi cFunction' . s:fg_foreground
  1179. endif
  1180. " CPP highlighting
  1181. exec 'hi cppBoolean' . s:fg_green . s:ft_bold
  1182. exec 'hi cppSTLnamespace' . s:fg_purple
  1183. exec 'hi cppSTLexception' . s:fg_pink
  1184. exec 'hi cppSTLfunctional' . s:fg_foreground . s:ft_bold
  1185. exec 'hi cppSTLiterator' . s:fg_foreground . s:ft_bold
  1186. exec 'hi cppExceptions' . s:fg_red
  1187. exec 'hi cppStatement' . s:fg_blue
  1188. exec 'hi cppStorageClass' . s:fg_navy . s:ft_bold
  1189. exec 'hi cppAccess' . s:fg_orange . s:ft_bold
  1190. if s:langOpt_cpp__highlight_standard_library == 1
  1191. exec 'hi cppSTLconstant' . s:fg_green . s:ft_bold
  1192. exec 'hi cppSTLtype' . s:fg_pink . s:ft_bold
  1193. exec 'hi cppSTLfunction' . s:fg_blue
  1194. exec 'hi cppSTLios' . s:fg_olive . s:ft_bold
  1195. else
  1196. exec 'hi cppSTLconstant' . s:fg_foreground
  1197. exec 'hi cppSTLtype' . s:fg_foreground
  1198. exec 'hi cppSTLfunction' . s:fg_foreground
  1199. exec 'hi cppSTLios' . s:fg_foreground
  1200. endif
  1201. " exec 'hi cppSTL' . s:fg_blue
  1202. " Rust highlighting
  1203. exec 'hi rustKeyword' . s:fg_pink
  1204. exec 'hi rustModPath' . s:fg_blue
  1205. exec 'hi rustModPathSep' . s:fg_blue
  1206. exec 'hi rustLifetime' . s:fg_purple
  1207. exec 'hi rustStructure' . s:fg_aqua . s:ft_bold
  1208. exec 'hi rustAttribute' . s:fg_aqua . s:ft_bold
  1209. exec 'hi rustPanic' . s:fg_olive . s:ft_bold
  1210. exec 'hi rustTrait' . s:fg_blue . s:ft_bold
  1211. exec 'hi rustEnum' . s:fg_green . s:ft_bold
  1212. exec 'hi rustEnumVariant' . s:fg_green
  1213. exec 'hi rustSelf' . s:fg_orange
  1214. exec 'hi rustSigil' . s:fg_aqua . s:ft_bold
  1215. exec 'hi rustOperator' . s:fg_aqua . s:ft_bold
  1216. exec 'hi rustMacro' . s:fg_olive . s:ft_bold
  1217. exec 'hi rustMacroVariable' . s:fg_olive
  1218. exec 'hi rustAssert' . s:fg_olive . s:ft_bold
  1219. exec 'hi rustConditional' . s:fg_purple . s:ft_bold
  1220. " Lex highlighting
  1221. exec 'hi lexCFunctions' . s:fg_foreground
  1222. exec 'hi lexAbbrv' . s:fg_purple
  1223. exec 'hi lexAbbrvRegExp' . s:fg_aqua
  1224. exec 'hi lexAbbrvComment' . s:fg_comment
  1225. exec 'hi lexBrace' . s:fg_navy
  1226. exec 'hi lexPat' . s:fg_aqua
  1227. exec 'hi lexPatComment' . s:fg_comment
  1228. exec 'hi lexPatTag' . s:fg_orange
  1229. " exec 'hi lexPatBlock' . s:fg_foreground . s:ft_bold
  1230. exec 'hi lexSlashQuote' . s:fg_foreground
  1231. exec 'hi lexSep' . s:fg_foreground
  1232. exec 'hi lexStartState' . s:fg_orange
  1233. exec 'hi lexPatTagZone' . s:fg_olive . s:ft_bold
  1234. exec 'hi lexMorePat' . s:fg_olive . s:ft_bold
  1235. exec 'hi lexOptions' . s:fg_olive . s:ft_bold
  1236. exec 'hi lexPatString' . s:fg_olive
  1237. " Yacc highlighting
  1238. exec 'hi yaccNonterminal' . s:fg_navy
  1239. exec 'hi yaccDelim' . s:fg_orange
  1240. exec 'hi yaccInitKey' . s:fg_aqua
  1241. exec 'hi yaccInit' . s:fg_navy
  1242. exec 'hi yaccKey' . s:fg_purple
  1243. exec 'hi yaccVar' . s:fg_aqua
  1244. " NASM highlighting
  1245. exec 'hi nasmStdInstruction' . s:fg_navy
  1246. exec 'hi nasmGen08Register' . s:fg_aqua
  1247. exec 'hi nasmGen16Register' . s:fg_aqua
  1248. exec 'hi nasmGen32Register' . s:fg_aqua
  1249. exec 'hi nasmGen64Register' . s:fg_aqua
  1250. exec 'hi nasmHexNumber' . s:fg_purple
  1251. exec 'hi nasmStorage' . s:fg_aqua . s:ft_bold
  1252. exec 'hi nasmLabel' . s:fg_pink
  1253. exec 'hi nasmDirective' . s:fg_blue . s:ft_bold
  1254. exec 'hi nasmLocalLabel' . s:fg_orange
  1255. " GAS highlighting
  1256. exec 'hi gasSymbol' . s:fg_pink
  1257. exec 'hi gasDirective' . s:fg_blue . s:ft_bold
  1258. exec 'hi gasOpcode_386_Base' . s:fg_navy
  1259. exec 'hi gasDecimalNumber' . s:fg_purple
  1260. exec 'hi gasSymbolRef' . s:fg_pink
  1261. exec 'hi gasRegisterX86' . s:fg_blue
  1262. exec 'hi gasOpcode_P6_Base' . s:fg_navy
  1263. exec 'hi gasDirectiveStore' . s:fg_foreground . s:ft_bold
  1264. " MIPS highlighting
  1265. exec 'hi mipsInstruction' . s:fg_pink
  1266. exec 'hi mipsRegister' . s:fg_navy
  1267. exec 'hi mipsLabel' . s:fg_aqua . s:ft_bold
  1268. exec 'hi mipsDirective' . s:fg_purple . s:ft_bold
  1269. " Shell/Bash highlighting
  1270. exec 'hi bashStatement' . s:fg_foreground . s:ft_bold
  1271. exec 'hi shDerefVar' . s:fg_aqua . s:ft_bold
  1272. exec 'hi shDerefSimple' . s:fg_aqua
  1273. exec 'hi shFunction' . s:fg_orange . s:ft_bold
  1274. exec 'hi shStatement' . s:fg_foreground
  1275. exec 'hi shLoop' . s:fg_purple . s:ft_bold
  1276. exec 'hi shQuote' . s:fg_olive
  1277. exec 'hi shCaseEsac' . s:fg_aqua . s:ft_bold
  1278. exec 'hi shSnglCase' . s:fg_purple . s:ft_none
  1279. exec 'hi shFunctionOne' . s:fg_navy
  1280. exec 'hi shCase' . s:fg_navy
  1281. exec 'hi shSetList' . s:fg_navy
  1282. " @see Dockerfile Highlighting section for more sh*
  1283. " PowerShell Highlighting
  1284. exec 'hi ps1Type' . s:fg_green . s:ft_bold
  1285. exec 'hi ps1Variable' . s:fg_navy
  1286. exec 'hi ps1Boolean' . s:fg_navy . s:ft_bold
  1287. exec 'hi ps1FunctionInvocation' . s:fg_pink
  1288. exec 'hi ps1FunctionDeclaration' . s:fg_pink
  1289. exec 'hi ps1Keyword' . s:fg_blue . s:ft_bold
  1290. exec 'hi ps1Exception' . s:fg_red
  1291. exec 'hi ps1Operator' . s:fg_aqua . s:ft_bold
  1292. exec 'hi ps1CommentDoc' . s:fg_purple
  1293. exec 'hi ps1CDocParam' . s:fg_orange
  1294. " HTML Highlighting
  1295. exec 'hi htmlTitle' . s:fg_green . s:ft_bold
  1296. exec 'hi htmlH1' . s:fg_green . s:ft_bold
  1297. exec 'hi htmlH2' . s:fg_aqua . s:ft_bold
  1298. exec 'hi htmlH3' . s:fg_purple . s:ft_bold
  1299. exec 'hi htmlH4' . s:fg_orange . s:ft_bold
  1300. exec 'hi htmlTag' . s:fg_comment
  1301. exec 'hi htmlTagName' . s:fg_wine
  1302. exec 'hi htmlArg' . s:fg_pink
  1303. exec 'hi htmlEndTag' . s:fg_comment
  1304. exec 'hi htmlString' . s:fg_blue
  1305. exec 'hi htmlScriptTag' . s:fg_comment
  1306. exec 'hi htmlBold' . s:fg_foreground . s:ft_bold
  1307. exec 'hi htmlItalic' . s:fg_comment . s:ft_italic
  1308. exec 'hi htmlBoldItalic' . s:fg_navy . s:ft_italic_bold
  1309. " exec 'hi htmlLink' . s:fg_blue . s:ft_bold
  1310. exec 'hi htmlTagN' . s:fg_wine . s:ft_bold
  1311. exec 'hi htmlSpecialTagName' . s:fg_wine
  1312. exec 'hi htmlComment' . s:fg_comment . s:ft_italic
  1313. exec 'hi htmlCommentPart' . s:fg_comment . s:ft_italic
  1314. " CSS Highlighting
  1315. exec 'hi cssIdentifier' . s:fg_pink
  1316. exec 'hi cssPositioningProp' . s:fg_foreground
  1317. exec 'hi cssNoise' . s:fg_foreground
  1318. exec 'hi cssBoxProp' . s:fg_foreground
  1319. exec 'hi cssTableAttr' . s:fg_purple
  1320. exec 'hi cssPositioningAttr' . s:fg_navy
  1321. exec 'hi cssValueLength' . s:fg_orange
  1322. exec 'hi cssFunctionName' . s:fg_blue
  1323. exec 'hi cssUnitDecorators' . s:fg_aqua
  1324. exec 'hi cssColor' . s:fg_blue . s:ft_bold
  1325. exec 'hi cssBraces' . s:fg_pink
  1326. exec 'hi cssBackgroundProp' . s:fg_foreground
  1327. exec 'hi cssTextProp' . s:fg_foreground
  1328. exec 'hi cssDimensionProp' . s:fg_foreground
  1329. exec 'hi cssClassName' . s:fg_pink
  1330. " Markdown Highlighting
  1331. exec 'hi markdownHeadingRule' . s:fg_pink . s:ft_bold
  1332. exec 'hi markdownH1' . s:fg_pink . s:ft_bold
  1333. exec 'hi markdownH2' . s:fg_orange . s:ft_bold
  1334. exec 'hi markdownBlockquote' . s:fg_pink
  1335. exec 'hi markdownCodeBlock' . s:fg_olive
  1336. exec 'hi markdownCode' . s:fg_olive
  1337. exec 'hi markdownLink' . s:fg_blue . s:ft_bold
  1338. exec 'hi markdownUrl' . s:fg_blue
  1339. exec 'hi markdownLinkText' . s:fg_pink
  1340. exec 'hi markdownLinkTextDelimiter' . s:fg_purple
  1341. exec 'hi markdownLinkDelimiter' . s:fg_purple
  1342. exec 'hi markdownCodeDelimiter' . s:fg_blue
  1343. exec 'hi mkdCode' . s:fg_olive
  1344. exec 'hi mkdLink' . s:fg_blue . s:ft_bold
  1345. exec 'hi mkdURL' . s:fg_comment
  1346. exec 'hi mkdString' . s:fg_foreground
  1347. exec 'hi mkdBlockQuote' . s:fg_foreground . s:bg_popupmenu_bg
  1348. exec 'hi mkdLinkTitle' . s:fg_pink
  1349. exec 'hi mkdDelimiter' . s:fg_aqua
  1350. exec 'hi mkdRule' . s:fg_pink
  1351. " reStructuredText Highlighting
  1352. exec 'hi rstSections' . s:fg_pink . s:ft_bold
  1353. exec 'hi rstDelimiter' . s:fg_pink . s:ft_bold
  1354. exec 'hi rstExplicitMarkup' . s:fg_pink . s:ft_bold
  1355. exec 'hi rstDirective' . s:fg_blue
  1356. exec 'hi rstHyperlinkTarget' . s:fg_green
  1357. exec 'hi rstExDirective' . s:fg_foreground
  1358. exec 'hi rstInlineLiteral' . s:fg_olive
  1359. exec 'hi rstInterpretedTextOrHyperlinkReference' . s:fg_blue
  1360. " Python Highlighting
  1361. exec 'hi pythonImport' . s:fg_pink . s:ft_bold
  1362. exec 'hi pythonExceptions' . s:fg_red
  1363. exec 'hi pythonException' . s:fg_purple . s:ft_bold
  1364. exec 'hi pythonInclude' . s:fg_red
  1365. exec 'hi pythonStatement' . s:fg_pink
  1366. exec 'hi pythonConditional' . s:fg_purple . s:ft_bold
  1367. exec 'hi pythonRepeat' . s:fg_purple . s:ft_bold
  1368. exec 'hi pythonFunction' . s:fg_aqua . s:ft_bold
  1369. exec 'hi pythonPreCondit' . s:fg_purple
  1370. exec 'hi pythonExClass' . s:fg_orange
  1371. exec 'hi pythonOperator' . s:fg_purple . s:ft_bold
  1372. exec 'hi pythonBuiltin' . s:fg_foreground
  1373. exec 'hi pythonDecorator' . s:fg_orange
  1374. exec 'hi pythonString' . s:fg_olive
  1375. exec 'hi pythonEscape' . s:fg_olive . s:ft_bold
  1376. exec 'hi pythonStrFormatting' . s:fg_olive . s:ft_bold
  1377. exec 'hi pythonBoolean' . s:fg_green . s:ft_bold
  1378. exec 'hi pythonExClass' . s:fg_red
  1379. exec 'hi pythonBytesEscape' . s:fg_olive . s:ft_bold
  1380. exec 'hi pythonDottedName' . s:fg_purple
  1381. exec 'hi pythonStrFormat' . s:fg_foreground
  1382. if s:langOpt_python__highlight_builtins == 1
  1383. exec 'hi pythonBuiltinFunc' . s:fg_blue
  1384. exec 'hi pythonBuiltinObj' . s:fg_red
  1385. else
  1386. exec 'hi pythonBuiltinFunc' . s:fg_foreground
  1387. exec 'hi pythonBuiltinObj' . s:fg_foreground
  1388. endif
  1389. " Java Highlighting
  1390. exec 'hi javaExternal' . s:fg_pink
  1391. exec 'hi javaAnnotation' . s:fg_orange
  1392. exec 'hi javaTypedef' . s:fg_aqua
  1393. exec 'hi javaClassDecl' . s:fg_aqua . s:ft_bold
  1394. exec 'hi javaScopeDecl' . s:fg_blue . s:ft_bold
  1395. exec 'hi javaStorageClass' . s:fg_navy . s:ft_bold
  1396. exec 'hi javaBoolean' . s:fg_green . s:ft_bold
  1397. exec 'hi javaConstant' . s:fg_blue
  1398. exec 'hi javaCommentTitle' . s:fg_wine
  1399. exec 'hi javaDocTags' . s:fg_aqua
  1400. exec 'hi javaDocComment' . s:fg_comment
  1401. exec 'hi javaDocParam' . s:fg_foreground
  1402. exec 'hi javaStatement' . s:fg_pink
  1403. " JavaScript Highlighting
  1404. exec 'hi javaScriptBraces' . s:fg_blue
  1405. exec 'hi javaScriptParens' . s:fg_blue
  1406. exec 'hi javaScriptIdentifier' . s:fg_pink
  1407. exec 'hi javaScriptFunction' . s:fg_blue . s:ft_bold
  1408. exec 'hi javaScriptConditional' . s:fg_purple . s:ft_bold
  1409. exec 'hi javaScriptRepeat' . s:fg_purple . s:ft_bold
  1410. exec 'hi javaScriptBoolean' . s:fg_green . s:ft_bold
  1411. exec 'hi javaScriptNumber' . s:fg_orange
  1412. exec 'hi javaScriptMember' . s:fg_navy
  1413. exec 'hi javaScriptReserved' . s:fg_navy
  1414. exec 'hi javascriptNull' . s:fg_comment . s:ft_bold
  1415. exec 'hi javascriptGlobal' . s:fg_foreground
  1416. exec 'hi javascriptStatement' . s:fg_pink
  1417. exec 'hi javaScriptMessage' . s:fg_foreground
  1418. exec 'hi javaScriptMember' . s:fg_foreground
  1419. " @target https://github.com/pangloss/vim-javascript
  1420. exec 'hi jsFuncParens' . s:fg_blue
  1421. exec 'hi jsFuncBraces' . s:fg_blue
  1422. exec 'hi jsParens' . s:fg_blue
  1423. exec 'hi jsBraces' . s:fg_blue
  1424. exec 'hi jsNoise' . s:fg_blue
  1425. " Jsx Highlighting
  1426. " @target https://github.com/MaxMEllon/vim-jsx-pretty
  1427. exec 'hi jsxTagName' . s:fg_wine
  1428. exec 'hi jsxComponentName' . s:fg_wine
  1429. exec 'hi jsxAttrib' . s:fg_pink
  1430. exec 'hi jsxEqual' . s:fg_comment
  1431. exec 'hi jsxString' . s:fg_blue
  1432. exec 'hi jsxCloseTag' . s:fg_comment
  1433. exec 'hi jsxCloseString' . s:fg_comment
  1434. exec 'hi jsxDot' . s:fg_wine
  1435. exec 'hi jsxNamespace' . s:fg_wine
  1436. exec 'hi jsxPunct' . s:fg_comment
  1437. " Json Highlighting
  1438. " @target https://github.com/elzr/vim-json
  1439. exec 'hi jsonKeyword' . s:fg_blue
  1440. exec 'hi jsonString' . s:fg_olive
  1441. exec 'hi jsonQuote' . s:fg_comment
  1442. exec 'hi jsonNoise' . s:fg_foreground
  1443. exec 'hi jsonKeywordMatch' . s:fg_foreground
  1444. exec 'hi jsonBraces' . s:fg_foreground
  1445. exec 'hi jsonNumber' . s:fg_orange
  1446. exec 'hi jsonNull' . s:fg_purple . s:ft_bold
  1447. exec 'hi jsonBoolean' . s:fg_green . s:ft_bold
  1448. exec 'hi jsonCommentError' . s:fg_pink . s:bg_background
  1449. " Go Highlighting
  1450. exec 'hi goDirective' . s:fg_red
  1451. exec 'hi goDeclaration' . s:fg_blue . s:ft_bold
  1452. exec 'hi goStatement' . s:fg_pink
  1453. exec 'hi goConditional' . s:fg_purple . s:ft_bold
  1454. exec 'hi goConstants' . s:fg_orange
  1455. exec 'hi goFunction' . s:fg_orange
  1456. " exec 'hi goTodo' . s:fg_comment . s:ft_bold
  1457. exec 'hi goDeclType' . s:fg_blue
  1458. exec 'hi goBuiltins' . s:fg_purple
  1459. " Systemtap Highlighting
  1460. " exec 'hi stapBlock' . s:fg_comment . s:ft_none
  1461. exec 'hi stapComment' . s:fg_comment . s:ft_none
  1462. exec 'hi stapProbe' . s:fg_aqua . s:ft_bold
  1463. exec 'hi stapStat' . s:fg_navy . s:ft_bold
  1464. exec 'hi stapFunc' . s:fg_foreground
  1465. exec 'hi stapString' . s:fg_olive
  1466. exec 'hi stapTarget' . s:fg_navy
  1467. exec 'hi stapStatement' . s:fg_pink
  1468. exec 'hi stapType' . s:fg_pink . s:ft_bold
  1469. exec 'hi stapSharpBang' . s:fg_comment
  1470. exec 'hi stapDeclaration' . s:fg_pink
  1471. exec 'hi stapCMacro' . s:fg_blue
  1472. " DTrace Highlighting
  1473. exec 'hi dtraceProbe' . s:fg_blue
  1474. exec 'hi dtracePredicate' . s:fg_purple . s:ft_bold
  1475. exec 'hi dtraceComment' . s:fg_comment
  1476. exec 'hi dtraceFunction' . s:fg_foreground
  1477. exec 'hi dtraceAggregatingFunction' . s:fg_blue . s:ft_bold
  1478. exec 'hi dtraceStatement' . s:fg_navy . s:ft_bold
  1479. exec 'hi dtraceIdentifier' . s:fg_pink
  1480. exec 'hi dtraceOption' . s:fg_pink
  1481. exec 'hi dtraceConstant' . s:fg_orange
  1482. exec 'hi dtraceType' . s:fg_pink . s:ft_bold
  1483. " PlantUML Highlighting
  1484. exec 'hi plantumlPreProc' . s:fg_orange . s:ft_bold
  1485. exec 'hi plantumlDirectedOrVerticalArrowRL' . s:fg_pink
  1486. exec 'hi plantumlDirectedOrVerticalArrowLR' . s:fg_pink
  1487. exec 'hi plantumlString' . s:fg_olive
  1488. exec 'hi plantumlActivityThing' . s:fg_purple
  1489. exec 'hi plantumlText' . s:fg_navy
  1490. exec 'hi plantumlClassPublic' . s:fg_olive . s:ft_bold
  1491. exec 'hi plantumlClassPrivate' . s:fg_red
  1492. exec 'hi plantumlColonLine' . s:fg_orange
  1493. exec 'hi plantumlClass' . s:fg_navy
  1494. exec 'hi plantumlHorizontalArrow' . s:fg_pink
  1495. exec 'hi plantumlTypeKeyword' . s:fg_blue . s:ft_bold
  1496. exec 'hi plantumlKeyword' . s:fg_pink . s:ft_bold
  1497. exec 'hi plantumlType' . s:fg_blue . s:ft_bold
  1498. exec 'hi plantumlBlock' . s:fg_pink . s:ft_bold
  1499. exec 'hi plantumlPreposition' . s:fg_orange
  1500. exec 'hi plantumlLayout' . s:fg_blue . s:ft_bold
  1501. exec 'hi plantumlNote' . s:fg_orange
  1502. exec 'hi plantumlLifecycle' . s:fg_aqua
  1503. exec 'hi plantumlParticipant' . s:fg_foreground . s:ft_bold
  1504. " Haskell Highlighting
  1505. exec 'hi haskellType' . s:fg_aqua . s:ft_bold
  1506. exec 'hi haskellIdentifier' . s:fg_orange . s:ft_bold
  1507. exec 'hi haskellOperators' . s:fg_pink
  1508. exec 'hi haskellWhere' . s:fg_foreground . s:ft_bold
  1509. exec 'hi haskellDelimiter' . s:fg_aqua
  1510. exec 'hi haskellImportKeywords' . s:fg_pink
  1511. exec 'hi haskellStatement' . s:fg_purple . s:ft_bold
  1512. " SQL/MySQL Highlighting
  1513. exec 'hi sqlStatement' . s:fg_pink . s:ft_bold
  1514. exec 'hi sqlType' . s:fg_blue . s:ft_bold
  1515. exec 'hi sqlKeyword' . s:fg_pink
  1516. exec 'hi sqlOperator' . s:fg_aqua
  1517. exec 'hi sqlSpecial' . s:fg_green . s:ft_bold
  1518. exec 'hi mysqlVariable' . s:fg_olive . s:ft_bold
  1519. exec 'hi mysqlType' . s:fg_blue . s:ft_bold
  1520. exec 'hi mysqlKeyword' . s:fg_pink
  1521. exec 'hi mysqlOperator' . s:fg_aqua
  1522. exec 'hi mysqlSpecial' . s:fg_green . s:ft_bold
  1523. " Octave/MATLAB Highlighting
  1524. exec 'hi octaveVariable' . s:fg_foreground
  1525. exec 'hi octaveDelimiter' . s:fg_pink
  1526. exec 'hi octaveQueryVar' . s:fg_foreground
  1527. exec 'hi octaveSemicolon' . s:fg_purple
  1528. exec 'hi octaveFunction' . s:fg_navy
  1529. exec 'hi octaveSetVar' . s:fg_blue
  1530. exec 'hi octaveUserVar' . s:fg_foreground
  1531. exec 'hi octaveArithmeticOperator' . s:fg_aqua
  1532. exec 'hi octaveBeginKeyword' . s:fg_purple . s:ft_bold
  1533. exec 'hi octaveElseKeyword' . s:fg_purple . s:ft_bold
  1534. exec 'hi octaveEndKeyword' . s:fg_purple . s:ft_bold
  1535. exec 'hi octaveStatement' . s:fg_pink
  1536. " Ruby Highlighting
  1537. exec 'hi rubyModule' . s:fg_navy . s:ft_bold
  1538. exec 'hi rubyClass' . s:fg_pink . s:ft_bold
  1539. exec 'hi rubyPseudoVariable' . s:fg_comment . s:ft_bold
  1540. exec 'hi rubyKeyword' . s:fg_pink
  1541. exec 'hi rubyInstanceVariable' . s:fg_purple
  1542. exec 'hi rubyFunction' . s:fg_foreground . s:ft_bold
  1543. exec 'hi rubyDefine' . s:fg_pink
  1544. exec 'hi rubySymbol' . s:fg_aqua
  1545. exec 'hi rubyConstant' . s:fg_blue
  1546. exec 'hi rubyAccess' . s:fg_navy
  1547. exec 'hi rubyAttribute' . s:fg_green
  1548. exec 'hi rubyInclude' . s:fg_red
  1549. exec 'hi rubyLocalVariableOrMethod' . s:fg_orange
  1550. exec 'hi rubyCurlyBlock' . s:fg_foreground
  1551. exec 'hi rubyCurlyBlockDelimiter' . s:fg_aqua
  1552. exec 'hi rubyArrayDelimiter' . s:fg_aqua
  1553. exec 'hi rubyStringDelimiter' . s:fg_olive
  1554. exec 'hi rubyInterpolationDelimiter' . s:fg_orange
  1555. exec 'hi rubyConditional' . s:fg_purple . s:ft_bold
  1556. exec 'hi rubyRepeat' . s:fg_purple . s:ft_bold
  1557. exec 'hi rubyControl' . s:fg_purple . s:ft_bold
  1558. exec 'hi rubyException' . s:fg_purple . s:ft_bold
  1559. exec 'hi rubyExceptional' . s:fg_purple . s:ft_bold
  1560. exec 'hi rubyBoolean' . s:fg_green . s:ft_bold
  1561. " Fortran Highlighting
  1562. exec 'hi fortranUnitHeader' . s:fg_blue . s:ft_bold
  1563. exec 'hi fortranIntrinsic' . s:fg_blue . s:bg_background . s:ft_none
  1564. exec 'hi fortranType' . s:fg_pink . s:ft_bold
  1565. exec 'hi fortranTypeOb' . s:fg_pink . s:ft_bold
  1566. exec 'hi fortranStructure' . s:fg_aqua
  1567. exec 'hi fortranStorageClass' . s:fg_navy . s:ft_bold
  1568. exec 'hi fortranStorageClassR' . s:fg_navy . s:ft_bold
  1569. exec 'hi fortranKeyword' . s:fg_pink
  1570. exec 'hi fortranReadWrite' . s:fg_aqua . s:ft_bold
  1571. exec 'hi fortranIO' . s:fg_navy
  1572. exec 'hi fortranOperator' . s:fg_aqua . s:ft_bold
  1573. exec 'hi fortranCall' . s:fg_aqua . s:ft_bold
  1574. exec 'hi fortranContinueMark' . s:fg_green
  1575. " ALGOL Highlighting (Plugin: https://github.com/sterpe/vim-algol68)
  1576. exec 'hi algol68Statement' . s:fg_blue . s:ft_bold
  1577. exec 'hi algol68Operator' . s:fg_aqua . s:ft_bold
  1578. exec 'hi algol68PreProc' . s:fg_green
  1579. exec 'hi algol68Function' . s:fg_blue
  1580. " R Highlighting
  1581. exec 'hi rType' . s:fg_blue
  1582. exec 'hi rArrow' . s:fg_pink
  1583. exec 'hi rDollar' . s:fg_blue
  1584. " XXD Highlighting
  1585. exec 'hi xxdAddress' . s:fg_navy
  1586. exec 'hi xxdSep' . s:fg_pink
  1587. exec 'hi xxdAscii' . s:fg_pink
  1588. exec 'hi xxdDot' . s:fg_aqua
  1589. " PHP Highlighting
  1590. exec 'hi phpIdentifier' . s:fg_foreground
  1591. exec 'hi phpVarSelector' . s:fg_pink
  1592. exec 'hi phpKeyword' . s:fg_blue
  1593. exec 'hi phpRepeat' . s:fg_purple . s:ft_bold
  1594. exec 'hi phpConditional' . s:fg_purple . s:ft_bold
  1595. exec 'hi phpStatement' . s:fg_pink
  1596. exec 'hi phpAssignByRef' . s:fg_aqua . s:ft_bold
  1597. exec 'hi phpSpecialFunction' . s:fg_blue
  1598. exec 'hi phpFunctions' . s:fg_blue
  1599. exec 'hi phpComparison' . s:fg_aqua
  1600. exec 'hi phpBackslashSequences' . s:fg_olive . s:ft_bold
  1601. exec 'hi phpMemberSelector' . s:fg_blue
  1602. exec 'hi phpStorageClass' . s:fg_purple . s:ft_bold
  1603. exec 'hi phpDefine' . s:fg_navy
  1604. exec 'hi phpIntVar' . s:fg_navy . s:ft_bold
  1605. " Perl Highlighting
  1606. exec 'hi perlFiledescRead' . s:fg_green
  1607. exec 'hi perlMatchStartEnd' . s:fg_pink
  1608. exec 'hi perlStatementFlow' . s:fg_pink
  1609. exec 'hi perlStatementStorage' . s:fg_pink
  1610. exec 'hi perlFunction' . s:fg_pink . s:ft_bold
  1611. exec 'hi perlMethod' . s:fg_foreground
  1612. exec 'hi perlStatementFiledesc' . s:fg_orange
  1613. exec 'hi perlVarPlain' . s:fg_navy
  1614. exec 'hi perlSharpBang' . s:fg_comment
  1615. exec 'hi perlStatementInclude' . s:fg_aqua . s:ft_bold
  1616. exec 'hi perlStatementScalar' . s:fg_purple
  1617. exec 'hi perlSubName' . s:fg_aqua . s:ft_bold
  1618. exec 'hi perlSpecialString' . s:fg_olive . s:ft_bold
  1619. " Pascal Highlighting
  1620. exec 'hi pascalType' . s:fg_pink . s:ft_bold
  1621. exec 'hi pascalStatement' . s:fg_blue . s:ft_bold
  1622. exec 'hi pascalPredefined' . s:fg_pink
  1623. exec 'hi pascalFunction' . s:fg_foreground
  1624. exec 'hi pascalStruct' . s:fg_navy . s:ft_bold
  1625. exec 'hi pascalOperator' . s:fg_aqua . s:ft_bold
  1626. exec 'hi pascalPreProc' . s:fg_green
  1627. exec 'hi pascalAcces' . s:fg_navy . s:ft_bold
  1628. " Lua Highlighting
  1629. exec 'hi luaFunc' . s:fg_foreground
  1630. exec 'hi luaIn' . s:fg_blue . s:ft_bold
  1631. exec 'hi luaFunction' . s:fg_pink
  1632. exec 'hi luaStatement' . s:fg_blue
  1633. exec 'hi luaRepeat' . s:fg_blue . s:ft_bold
  1634. exec 'hi luaCondStart' . s:fg_purple . s:ft_bold
  1635. exec 'hi luaTable' . s:fg_aqua . s:ft_bold
  1636. exec 'hi luaConstant' . s:fg_green . s:ft_bold
  1637. exec 'hi luaElse' . s:fg_purple . s:ft_bold
  1638. exec 'hi luaCondElseif' . s:fg_purple . s:ft_bold
  1639. exec 'hi luaCond' . s:fg_purple . s:ft_bold
  1640. exec 'hi luaCondEnd' . s:fg_purple
  1641. " Clojure highlighting:
  1642. exec 'hi clojureConstant' . s:fg_blue
  1643. exec 'hi clojureBoolean' . s:fg_orange
  1644. exec 'hi clojureCharacter' . s:fg_olive
  1645. exec 'hi clojureKeyword' . s:fg_pink
  1646. exec 'hi clojureNumber' . s:fg_orange
  1647. exec 'hi clojureString' . s:fg_olive
  1648. exec 'hi clojureRegexp' . s:fg_purple
  1649. exec 'hi clojureRegexpEscape' . s:fg_pink
  1650. exec 'hi clojureParen' . s:fg_aqua
  1651. exec 'hi clojureVariable' . s:fg_olive
  1652. exec 'hi clojureCond' . s:fg_blue
  1653. exec 'hi clojureDefine' . s:fg_blue . s:ft_bold
  1654. exec 'hi clojureException' . s:fg_red
  1655. exec 'hi clojureFunc' . s:fg_navy
  1656. exec 'hi clojureMacro' . s:fg_blue
  1657. exec 'hi clojureRepeat' . s:fg_blue
  1658. exec 'hi clojureSpecial' . s:fg_blue . s:ft_bold
  1659. exec 'hi clojureQuote' . s:fg_blue
  1660. exec 'hi clojureUnquote' . s:fg_blue
  1661. exec 'hi clojureMeta' . s:fg_blue
  1662. exec 'hi clojureDeref' . s:fg_blue
  1663. exec 'hi clojureAnonArg' . s:fg_blue
  1664. exec 'hi clojureRepeat' . s:fg_blue
  1665. exec 'hi clojureDispatch' . s:fg_aqua
  1666. " Dockerfile Highlighting
  1667. " @target https://github.com/docker/docker/tree/master/contrib/syntax/vim
  1668. exec 'hi dockerfileKeyword' . s:fg_blue
  1669. exec 'hi shDerefVar' . s:fg_purple . s:ft_bold
  1670. exec 'hi shOperator' . s:fg_aqua
  1671. exec 'hi shOption' . s:fg_navy
  1672. exec 'hi shLine' . s:fg_foreground
  1673. exec 'hi shWrapLineOperator' . s:fg_pink
  1674. " NGINX Highlighting
  1675. " @target https://github.com/evanmiller/nginx-vim-syntax
  1676. exec 'hi ngxDirectiveBlock' . s:fg_pink . s:ft_bold
  1677. exec 'hi ngxDirective' . s:fg_blue . s:ft_none
  1678. exec 'hi ngxDirectiveImportant' . s:fg_blue . s:ft_bold
  1679. exec 'hi ngxString' . s:fg_olive
  1680. exec 'hi ngxVariableString' . s:fg_purple
  1681. exec 'hi ngxVariable' . s:fg_purple . s:ft_none
  1682. " Yaml Highlighting
  1683. exec 'hi yamlBlockMappingKey' . s:fg_blue
  1684. exec 'hi yamlKeyValueDelimiter' . s:fg_pink
  1685. exec 'hi yamlBlockCollectionItemStart' . s:fg_pink
  1686. " Qt QML Highlighting
  1687. exec 'hi qmlObjectLiteralType' . s:fg_pink
  1688. exec 'hi qmlReserved' . s:fg_purple
  1689. exec 'hi qmlBindingProperty' . s:fg_navy
  1690. exec 'hi qmlType' . s:fg_navy
  1691. " Dosini Highlighting
  1692. exec 'hi dosiniHeader' . s:fg_pink
  1693. exec 'hi dosiniLabel' . s:fg_blue
  1694. " Mail highlighting
  1695. exec 'hi mailHeaderKey' . s:fg_blue
  1696. exec 'hi mailHeaderEmail' . s:fg_purple
  1697. exec 'hi mailSubject' . s:fg_pink
  1698. exec 'hi mailHeader' . s:fg_comment
  1699. exec 'hi mailURL' . s:fg_aqua
  1700. exec 'hi mailEmail' . s:fg_purple
  1701. exec 'hi mailQuoted1' . s:fg_olive
  1702. exec 'hi mailQuoted2' . s:fg_navy
  1703. " XML Highlighting
  1704. exec 'hi xmlProcessingDelim' . s:fg_pink
  1705. exec 'hi xmlString' . s:fg_olive
  1706. exec 'hi xmlEqual' . s:fg_orange
  1707. exec 'hi xmlAttrib' . s:fg_navy
  1708. exec 'hi xmlAttribPunct' . s:fg_pink
  1709. exec 'hi xmlTag' . s:fg_blue
  1710. exec 'hi xmlTagName' . s:fg_blue
  1711. exec 'hi xmlEndTag' . s:fg_blue
  1712. exec 'hi xmlNamespace' . s:fg_orange
  1713. " Exlixir Highlighting
  1714. " @target https://github.com/elixir-lang/vim-elixir
  1715. exec 'hi elixirAlias' . s:fg_blue . s:ft_bold
  1716. exec 'hi elixirAtom' . s:fg_navy
  1717. exec 'hi elixirVariable' . s:fg_navy
  1718. exec 'hi elixirUnusedVariable' . s:fg_foreground . s:ft_bold
  1719. exec 'hi elixirInclude' . s:fg_purple
  1720. exec 'hi elixirStringDelimiter' . s:fg_olive
  1721. exec 'hi elixirKeyword' . s:fg_purple . s:ft_bold
  1722. exec 'hi elixirFunctionDeclaration' . s:fg_aqua . s:ft_bold
  1723. exec 'hi elixirBlockDefinition' . s:fg_pink
  1724. exec 'hi elixirDefine' . s:fg_pink
  1725. exec 'hi elixirStructDefine' . s:fg_pink
  1726. exec 'hi elixirPrivateDefine' . s:fg_pink
  1727. exec 'hi elixirModuleDefine' . s:fg_pink
  1728. exec 'hi elixirProtocolDefine' . s:fg_pink
  1729. exec 'hi elixirImplDefine' . s:fg_pink
  1730. exec 'hi elixirModuleDeclaration' . s:fg_aqua . s:ft_bold
  1731. exec 'hi elixirDocString' . s:fg_olive
  1732. exec 'hi elixirDocTest' . s:fg_green . s:ft_bold
  1733. " Erlang Highlighting
  1734. exec 'hi erlangBIF' . s:fg_purple . s:ft_bold
  1735. exec 'hi erlangBracket' . s:fg_pink
  1736. exec 'hi erlangLocalFuncCall' . s:fg_foreground
  1737. exec 'hi erlangVariable' . s:fg_foreground
  1738. exec 'hi erlangAtom' . s:fg_navy
  1739. exec 'hi erlangAttribute' . s:fg_blue . s:ft_bold
  1740. exec 'hi erlangRecordDef' . s:fg_blue . s:ft_bold
  1741. exec 'hi erlangRecord' . s:fg_blue
  1742. exec 'hi erlangRightArrow' . s:fg_blue . s:ft_bold
  1743. exec 'hi erlangStringModifier' . s:fg_olive . s:ft_bold
  1744. exec 'hi erlangInclude' . s:fg_blue . s:ft_bold
  1745. exec 'hi erlangKeyword' . s:fg_pink
  1746. exec 'hi erlangGlobalFuncCall' . s:fg_foreground
  1747. " Cucumber Highlighting
  1748. exec 'hi cucumberFeature' . s:fg_blue . s:ft_bold
  1749. exec 'hi cucumberBackground' . s:fg_pink . s:ft_bold
  1750. exec 'hi cucumberScenario' . s:fg_pink . s:ft_bold
  1751. exec 'hi cucumberGiven' . s:fg_orange
  1752. exec 'hi cucumberGivenAnd' . s:fg_blue
  1753. exec 'hi cucumberThen' . s:fg_orange
  1754. exec 'hi cucumberThenAnd' . s:fg_blue
  1755. exec 'hi cucumberWhen' . s:fg_purple . s:ft_bold
  1756. exec 'hi cucumberScenarioOutline' . s:fg_pink . s:ft_bold
  1757. exec 'hi cucumberExamples' . s:fg_aqua
  1758. exec 'hi cucumberTags' . s:fg_aqua
  1759. exec 'hi cucumberPlaceholder' . s:fg_aqua
  1760. " Ada Highlighting
  1761. exec 'hi adaInc' . s:fg_aqua . s:ft_bold
  1762. exec 'hi adaSpecial' . s:fg_aqua . s:ft_bold
  1763. exec 'hi adaKeyword' . s:fg_pink
  1764. exec 'hi adaBegin' . s:fg_pink
  1765. exec 'hi adaEnd' . s:fg_pink
  1766. exec 'hi adaTypedef' . s:fg_navy . s:ft_bold
  1767. exec 'hi adaAssignment' . s:fg_aqua . s:ft_bold
  1768. exec 'hi adaAttribute' . s:fg_green
  1769. " COBOL Highlighting
  1770. exec 'hi cobolMarker' . s:fg_comment . s:bg_cursorline
  1771. exec 'hi cobolLine' . s:fg_foreground
  1772. exec 'hi cobolReserved' . s:fg_blue
  1773. exec 'hi cobolDivision' . s:fg_pink . s:ft_bold
  1774. exec 'hi cobolDivisionName' . s:fg_pink . s:ft_bold
  1775. exec 'hi cobolSection' . s:fg_navy . s:ft_bold
  1776. exec 'hi cobolSectionName' . s:fg_navy . s:ft_bold
  1777. exec 'hi cobolParagraph' . s:fg_purple
  1778. exec 'hi cobolParagraphName' . s:fg_purple
  1779. exec 'hi cobolDeclA' . s:fg_purple
  1780. exec 'hi cobolDecl' . s:fg_green
  1781. exec 'hi cobolCALLs' . s:fg_aqua . s:ft_bold
  1782. exec 'hi cobolEXECs' . s:fg_aqua . s:ft_bold
  1783. " GNU sed highlighting
  1784. exec 'hi sedST' . s:fg_purple . s:ft_bold
  1785. exec 'hi sedFlag' . s:fg_purple . s:ft_bold
  1786. exec 'hi sedRegexp47' . s:fg_pink
  1787. exec 'hi sedRegexpMeta' . s:fg_blue . s:ft_bold
  1788. exec 'hi sedReplacement47' . s:fg_olive
  1789. exec 'hi sedReplaceMeta' . s:fg_orange . s:ft_bold
  1790. exec 'hi sedAddress' . s:fg_pink
  1791. exec 'hi sedFunction' . s:fg_aqua . s:ft_bold
  1792. exec 'hi sedBranch' . s:fg_green . s:ft_bold
  1793. exec 'hi sedLabel' . s:fg_green . s:ft_bold
  1794. " GNU awk highlighting
  1795. exec 'hi awkPatterns' . s:fg_pink . s:ft_bold
  1796. exec 'hi awkSearch' . s:fg_pink
  1797. exec 'hi awkRegExp' . s:fg_blue . s:ft_bold
  1798. exec 'hi awkCharClass' . s:fg_blue . s:ft_bold
  1799. exec 'hi awkFieldVars' . s:fg_green . s:ft_bold
  1800. exec 'hi awkStatement' . s:fg_blue . s:ft_bold
  1801. exec 'hi awkFunction' . s:fg_blue
  1802. exec 'hi awkVariables' . s:fg_green . s:ft_bold
  1803. exec 'hi awkArrayElement' . s:fg_orange
  1804. exec 'hi awkOperator' . s:fg_foreground
  1805. exec 'hi awkBoolLogic' . s:fg_foreground
  1806. exec 'hi awkExpression' . s:fg_foreground
  1807. exec 'hi awkSpecialPrintf' . s:fg_olive . s:ft_bold
  1808. " Elm highlighting
  1809. exec 'hi elmImport' . s:fg_navy
  1810. exec 'hi elmAlias' . s:fg_aqua
  1811. exec 'hi elmType' . s:fg_pink
  1812. exec 'hi elmOperator' . s:fg_aqua . s:ft_bold
  1813. exec 'hi elmBraces' . s:fg_aqua . s:ft_bold
  1814. exec 'hi elmTypedef' . s:fg_blue . s:ft_bold
  1815. exec 'hi elmTopLevelDecl' . s:fg_green . s:ft_bold
  1816. " Purescript highlighting
  1817. exec 'hi purescriptModuleKeyword' . s:fg_navy
  1818. exec 'hi purescriptImportKeyword' . s:fg_navy
  1819. exec 'hi purescriptModuleName' . s:fg_pink
  1820. exec 'hi purescriptOperator' . s:fg_aqua . s:ft_bold
  1821. exec 'hi purescriptType' . s:fg_pink
  1822. exec 'hi purescriptTypeVar' . s:fg_navy
  1823. exec 'hi purescriptStructure' . s:fg_blue . s:ft_bold
  1824. exec 'hi purescriptLet' . s:fg_blue . s:ft_bold
  1825. exec 'hi purescriptFunction' . s:fg_green . s:ft_bold
  1826. exec 'hi purescriptDelimiter' . s:fg_aqua . s:ft_bold
  1827. exec 'hi purescriptStatement' . s:fg_purple . s:ft_bold
  1828. exec 'hi purescriptConstructor' . s:fg_pink
  1829. exec 'hi purescriptWhere' . s:fg_purple . s:ft_bold
  1830. " F# highlighting
  1831. exec 'hi fsharpTypeName' . s:fg_pink
  1832. exec 'hi fsharpCoreClass' . s:fg_pink
  1833. exec 'hi fsharpType' . s:fg_pink
  1834. exec 'hi fsharpKeyword' . s:fg_blue . s:ft_bold
  1835. exec 'hi fsharpOperator' . s:fg_aqua . s:ft_bold
  1836. exec 'hi fsharpBoolean' . s:fg_green . s:ft_bold
  1837. exec 'hi fsharpFormat' . s:fg_foreground
  1838. exec 'hi fsharpLinq' . s:fg_blue
  1839. exec 'hi fsharpKeyChar' . s:fg_aqua . s:ft_bold
  1840. exec 'hi fsharpOption' . s:fg_orange
  1841. exec 'hi fsharpCoreMethod' . s:fg_purple
  1842. exec 'hi fsharpAttrib' . s:fg_orange
  1843. exec 'hi fsharpModifier' . s:fg_aqua
  1844. exec 'hi fsharpOpen' . s:fg_red
  1845. " ASN.1 highlighting
  1846. exec 'hi asnExternal' . s:fg_green . s:ft_bold
  1847. exec 'hi asnTagModifier' . s:fg_purple
  1848. exec 'hi asnBraces' . s:fg_aqua . s:ft_bold
  1849. exec 'hi asnDefinition' . s:fg_foreground
  1850. exec 'hi asnStructure' . s:fg_blue
  1851. exec 'hi asnType' . s:fg_pink
  1852. exec 'hi asnTypeInfo' . s:fg_aqua . s:ft_bold
  1853. exec 'hi asnFieldOption' . s:fg_purple
  1854. " }}}
  1855. " Plugin: Netrw
  1856. exec 'hi netrwVersion' . s:fg_red
  1857. exec 'hi netrwList' . s:fg_pink
  1858. exec 'hi netrwHidePat' . s:fg_olive
  1859. exec 'hi netrwQuickHelp' . s:fg_blue
  1860. exec 'hi netrwHelpCmd' . s:fg_blue
  1861. exec 'hi netrwDir' . s:fg_aqua . s:ft_bold
  1862. exec 'hi netrwClassify' . s:fg_pink
  1863. exec 'hi netrwExe' . s:fg_green
  1864. exec 'hi netrwSuffixes' . s:fg_comment
  1865. exec 'hi netrwTreeBar' . s:fg_linenumber_fg
  1866. " Plugin: NERDTree
  1867. exec 'hi NERDTreeUp' . s:fg_comment
  1868. exec 'hi NERDTreeHelpCommand' . s:fg_pink
  1869. exec 'hi NERDTreeHelpTitle' . s:fg_blue . s:ft_bold
  1870. exec 'hi NERDTreeHelpKey' . s:fg_pink
  1871. exec 'hi NERDTreeHelp' . s:fg_foreground
  1872. exec 'hi NERDTreeToggleOff' . s:fg_red
  1873. exec 'hi NERDTreeToggleOn' . s:fg_green
  1874. exec 'hi NERDTreeDir' . s:fg_blue . s:ft_bold
  1875. exec 'hi NERDTreeDirSlash' . s:fg_pink
  1876. exec 'hi NERDTreeFile' . s:fg_foreground
  1877. exec 'hi NERDTreeExecFile' . s:fg_green
  1878. exec 'hi NERDTreeOpenable' . s:fg_aqua . s:ft_bold
  1879. exec 'hi NERDTreeClosable' . s:fg_pink
  1880. " Plugin: Tagbar
  1881. exec 'hi TagbarHelpTitle' . s:fg_blue . s:ft_bold
  1882. exec 'hi TagbarHelp' . s:fg_foreground
  1883. exec 'hi TagbarKind' . s:fg_pink
  1884. exec 'hi TagbarSignature' . s:fg_aqua
  1885. " Plugin: Vimdiff
  1886. exec 'hi DiffAdd' . s:fg_diffadd_fg . s:bg_diffadd_bg . s:ft_none
  1887. exec 'hi DiffChange' . s:fg_diffchange_fg . s:bg_diffchange_bg . s:ft_none
  1888. exec 'hi DiffDelete' . s:fg_diffdelete_fg . s:bg_diffdelete_bg . s:ft_none
  1889. exec 'hi DiffText' . s:fg_difftext_fg . s:bg_difftext_bg . s:ft_none
  1890. " Plugin: AGit
  1891. exec 'hi agitHead' . s:fg_green . s:ft_bold
  1892. exec 'hi agitHeader' . s:fg_olive
  1893. exec 'hi agitStatAdded' . s:fg_diffadd_fg
  1894. exec 'hi agitStatRemoved' . s:fg_diffdelete_fg
  1895. exec 'hi agitDiffAdd' . s:fg_diffadd_fg
  1896. exec 'hi agitDiffRemove' . s:fg_diffdelete_fg
  1897. exec 'hi agitDiffHeader' . s:fg_pink
  1898. exec 'hi agitDiff' . s:fg_foreground
  1899. exec 'hi agitDiffIndex' . s:fg_purple
  1900. exec 'hi agitDiffFileName' . s:fg_aqua
  1901. exec 'hi agitLog' . s:fg_foreground
  1902. exec 'hi agitAuthorMark' . s:fg_olive
  1903. exec 'hi agitDateMark' . s:fg_comment
  1904. exec 'hi agitHeaderLabel' . s:fg_aqua
  1905. exec 'hi agitDate' . s:fg_aqua
  1906. exec 'hi agitTree' . s:fg_pink
  1907. exec 'hi agitRef' . s:fg_blue . s:ft_bold
  1908. exec 'hi agitRemote' . s:fg_purple . s:ft_bold
  1909. exec 'hi agitTag' . s:fg_orange . s:ft_bold
  1910. " Plugin: Spell Checking
  1911. exec 'hi SpellBad' . s:fg_foreground . s:bg_spellbad
  1912. exec 'hi SpellCap' . s:fg_foreground . s:bg_spellcap
  1913. exec 'hi SpellRare' . s:fg_foreground . s:bg_spellrare
  1914. exec 'hi SpellLocal' . s:fg_foreground . s:bg_spelllocal
  1915. " Plugin: Indent Guides
  1916. exec 'hi IndentGuidesOdd' . s:bg_background
  1917. exec 'hi IndentGuidesEven' . s:bg_cursorline
  1918. " Plugin: Startify
  1919. exec 'hi StartifyFile' . s:fg_blue . s:ft_bold
  1920. exec 'hi StartifyNumber' . s:fg_orange
  1921. exec 'hi StartifyHeader' . s:fg_comment
  1922. exec 'hi StartifySection' . s:fg_pink
  1923. exec 'hi StartifyPath' . s:fg_foreground
  1924. exec 'hi StartifySlash' . s:fg_navy
  1925. exec 'hi StartifyBracket' . s:fg_aqua
  1926. exec 'hi StartifySpecial' . s:fg_aqua
  1927. " Git commit message
  1928. exec 'hi gitcommitSummary' . s:fg_blue
  1929. exec 'hi gitcommitHeader' . s:fg_green . s:ft_bold
  1930. exec 'hi gitcommitSelectedType' . s:fg_blue
  1931. exec 'hi gitcommitSelectedFile' . s:fg_pink
  1932. exec 'hi gitcommitUntrackedFile' . s:fg_diffdelete_fg
  1933. exec 'hi gitcommitBranch' . s:fg_aqua . s:ft_bold
  1934. exec 'hi gitcommitDiscardedType' . s:fg_diffdelete_fg
  1935. exec 'hi gitcommitDiff' . s:fg_comment
  1936. exec 'hi diffFile' . s:fg_blue
  1937. exec 'hi diffSubname' . s:fg_comment
  1938. exec 'hi diffIndexLine' . s:fg_comment
  1939. exec 'hi diffAdded' . s:fg_diffadd_fg
  1940. exec 'hi diffRemoved' . s:fg_diffdelete_fg
  1941. exec 'hi diffLine' . s:fg_orange
  1942. exec 'hi diffBDiffer' . s:fg_orange
  1943. exec 'hi diffNewFile' . s:fg_comment
  1944. endfun
  1945. " }}}
  1946. " ================================== MISC =====================================
  1947. " Command to show theme information {{{
  1948. fun! g:PaperColor()
  1949. echom 'PaperColor Theme Framework'
  1950. echom ' version ' . s:version
  1951. echom ' by Nikyle Nguyen et al.'
  1952. echom ' at https://github.com/NLKNguyen/papercolor-theme/'
  1953. echom ' '
  1954. echom 'Current theme: ' . s:theme_name
  1955. echom ' ' . s:selected_theme['description']
  1956. echom ' by ' . s:selected_theme['maintainer']
  1957. echom ' at ' . s:selected_theme['source']
  1958. " TODO: add diff display for theme color names between 'default' and current
  1959. " theme if it is a custom theme, i.e. child theme.
  1960. endfun
  1961. " @brief command alias for g:PaperColor()
  1962. command! -nargs=0 PaperColor :call g:PaperColor()
  1963. " }}}
  1964. " =============================== MAIN ========================================
  1965. hi clear
  1966. syntax reset
  1967. let g:colors_name = "PaperColor"
  1968. call s:acquire_theme_data()
  1969. call s:identify_color_mode()
  1970. call s:generate_theme_option_variables()
  1971. call s:generate_language_option_variables()
  1972. call s:set_format_attributes()
  1973. call s:set_overriding_colors()
  1974. call s:convert_colors()
  1975. call s:set_color_variables()
  1976. call s:apply_syntax_highlightings()
  1977. " =============================================================================
  1978. " Cheers!
  1979. " vim: fdm=marker ff=unix