PaperColor.vim 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215
  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 Visual' . s:fg_visual_fg . s:bg_visual_bg
  1004. exec 'hi Directory' . s:fg_blue
  1005. exec 'hi ModeMsg' . s:fg_olive
  1006. exec 'hi MoreMsg' . s:fg_olive
  1007. exec 'hi Question' . s:fg_olive
  1008. exec 'hi WarningMsg' . s:fg_pink
  1009. exec 'hi MatchParen' . s:fg_matchparen_fg . s:bg_matchparen_bg
  1010. exec 'hi Folded' . s:fg_folded_fg . s:bg_folded_bg
  1011. exec 'hi WildMenu' . s:fg_wildmenu_fg . s:bg_wildmenu_bg . s:ft_bold
  1012. if version >= 700
  1013. exec 'hi CursorLine' . s:bg_cursorline . s:ft_none
  1014. if s:mode == s:MODE_16_COLOR
  1015. exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg
  1016. else
  1017. exec 'hi CursorLineNr' . s:fg_cursorlinenr_fg . s:bg_cursorlinenr_bg . s:ft_none
  1018. endif
  1019. exec 'hi CursorColumn' . s:bg_cursorcolumn . s:ft_none
  1020. exec 'hi PMenu' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_none
  1021. exec 'hi PMenuSel' . s:fg_popupmenu_fg . s:bg_popupmenu_bg . s:ft_reverse
  1022. if s:themeOpt_transparent_background
  1023. exec 'hi SignColumn' . s:fg_green . s:ft_none
  1024. else
  1025. exec 'hi SignColumn' . s:fg_green . s:bg_background . s:ft_none
  1026. endif
  1027. end
  1028. if version >= 703
  1029. exec 'hi ColorColumn' . s:bg_cursorcolumn . s:ft_none
  1030. end
  1031. exec 'hi TabLine' . s:fg_tabline_inactive_fg . s:bg_tabline_inactive_bg . s:ft_none
  1032. exec 'hi TabLineFill' . s:fg_tabline_bg . s:bg_tabline_bg . s:ft_none
  1033. exec 'hi TabLineSel' . s:fg_tabline_active_fg . s:bg_tabline_active_bg . s:ft_none
  1034. exec 'hi BufTabLineCurrent' . s:fg_buftabline_current_fg . s:bg_buftabline_current_bg . s:ft_none
  1035. exec 'hi BufTabLineActive' . s:fg_buftabline_active_fg . s:bg_buftabline_active_bg . s:ft_none
  1036. exec 'hi BufTabLineHidden' . s:fg_buftabline_inactive_fg . s:bg_buftabline_inactive_bg . s:ft_none
  1037. exec 'hi BufTabLineFill' . s:bg_buftabline_bg . s:ft_none
  1038. " Standard Group Highlighting:
  1039. exec 'hi Comment' . s:fg_comment . s:ft_italic
  1040. exec 'hi Constant' . s:fg_orange
  1041. exec 'hi String' . s:fg_olive
  1042. exec 'hi Character' . s:fg_olive
  1043. exec 'hi Number' . s:fg_orange
  1044. exec 'hi Boolean' . s:fg_green . s:ft_bold
  1045. exec 'hi Float' . s:fg_orange
  1046. exec 'hi Identifier' . s:fg_navy
  1047. exec 'hi Function' . s:fg_foreground
  1048. exec 'hi Statement' . s:fg_pink . s:ft_none
  1049. exec 'hi Conditional' . s:fg_purple . s:ft_bold
  1050. exec 'hi Repeat' . s:fg_purple . s:ft_bold
  1051. exec 'hi Label' . s:fg_blue
  1052. exec 'hi Operator' . s:fg_aqua . s:ft_none
  1053. exec 'hi Keyword' . s:fg_blue
  1054. exec 'hi Exception' . s:fg_red
  1055. exec 'hi PreProc' . s:fg_blue
  1056. exec 'hi Include' . s:fg_red
  1057. exec 'hi Define' . s:fg_blue
  1058. exec 'hi Macro' . s:fg_blue
  1059. exec 'hi PreCondit' . s:fg_aqua
  1060. exec 'hi Type' . s:fg_pink . s:ft_bold
  1061. exec 'hi StorageClass' . s:fg_navy . s:ft_bold
  1062. exec 'hi Structure' . s:fg_blue . s:ft_bold
  1063. exec 'hi Typedef' . s:fg_pink . s:ft_bold
  1064. exec 'hi Special' . s:fg_foreground
  1065. exec 'hi SpecialChar' . s:fg_foreground
  1066. exec 'hi Tag' . s:fg_green
  1067. exec 'hi Delimiter' . s:fg_aqua
  1068. exec 'hi SpecialComment' . s:fg_comment . s:ft_bold
  1069. exec 'hi Debug' . s:fg_orange
  1070. exec 'hi Error' . s:fg_error_fg . s:bg_error_bg
  1071. exec 'hi Todo' . s:fg_todo_fg . s:bg_todo_bg . s:ft_bold
  1072. exec 'hi Title' . s:fg_comment
  1073. exec 'hi Global' . s:fg_blue
  1074. " Extension {{{
  1075. " VimL Highlighting
  1076. exec 'hi vimCommand' . s:fg_pink
  1077. exec 'hi vimVar' . s:fg_navy
  1078. exec 'hi vimFuncKey' . s:fg_pink
  1079. exec 'hi vimFunction' . s:fg_blue . s:ft_bold
  1080. exec 'hi vimNotFunc' . s:fg_pink
  1081. exec 'hi vimMap' . s:fg_red
  1082. exec 'hi vimAutoEvent' . s:fg_aqua . s:ft_bold
  1083. exec 'hi vimMapModKey' . s:fg_aqua
  1084. exec 'hi vimFuncName' . s:fg_purple
  1085. exec 'hi vimIsCommand' . s:fg_foreground
  1086. exec 'hi vimFuncVar' . s:fg_aqua
  1087. exec 'hi vimLet' . s:fg_red
  1088. exec 'hi vimContinue' . s:fg_aqua
  1089. exec 'hi vimMapRhsExtend' . s:fg_foreground
  1090. exec 'hi vimCommentTitle' . s:fg_comment . s:ft_italic_bold
  1091. exec 'hi vimBracket' . s:fg_aqua
  1092. exec 'hi vimParenSep' . s:fg_aqua
  1093. exec 'hi vimNotation' . s:fg_aqua
  1094. exec 'hi vimOper' . s:fg_foreground
  1095. exec 'hi vimOperParen' . s:fg_foreground
  1096. exec 'hi vimSynType' . s:fg_purple
  1097. exec 'hi vimSynReg' . s:fg_pink . s:ft_none
  1098. exec 'hi vimSynRegion' . s:fg_foreground
  1099. exec 'hi vimSynMtchGrp' . s:fg_pink
  1100. exec 'hi vimSynNextgroup' . s:fg_pink
  1101. exec 'hi vimSynKeyRegion' . s:fg_green
  1102. exec 'hi vimSynRegOpt' . s:fg_blue
  1103. exec 'hi vimSynMtchOpt' . s:fg_blue
  1104. exec 'hi vimSynContains' . s:fg_pink
  1105. exec 'hi vimGroupName' . s:fg_foreground
  1106. exec 'hi vimGroupList' . s:fg_foreground
  1107. exec 'hi vimHiGroup' . s:fg_foreground
  1108. exec 'hi vimGroup' . s:fg_navy . s:ft_bold
  1109. exec 'hi vimOnlyOption' . s:fg_blue
  1110. " Makefile Highlighting
  1111. exec 'hi makeIdent' . s:fg_blue
  1112. exec 'hi makeSpecTarget' . s:fg_olive
  1113. exec 'hi makeTarget' . s:fg_red
  1114. exec 'hi makeStatement' . s:fg_aqua . s:ft_bold
  1115. exec 'hi makeCommands' . s:fg_foreground
  1116. exec 'hi makeSpecial' . s:fg_orange . s:ft_bold
  1117. " CMake Highlighting (Builtin)
  1118. exec 'hi cmakeStatement' . s:fg_blue
  1119. exec 'hi cmakeArguments' . s:fg_foreground
  1120. exec 'hi cmakeVariableValue' . s:fg_pink
  1121. " CMake Highlighting (Plugin: https://github.com/pboettch/vim-cmake-syntax)
  1122. exec 'hi cmakeCommand' . s:fg_blue
  1123. exec 'hi cmakeCommandConditional' . s:fg_purple . s:ft_bold
  1124. exec 'hi cmakeKWset' . s:fg_orange
  1125. exec 'hi cmakeKWvariable_watch' . s:fg_orange
  1126. exec 'hi cmakeKWif' . s:fg_orange
  1127. exec 'hi cmakeArguments' . s:fg_foreground
  1128. exec 'hi cmakeKWproject' . s:fg_pink
  1129. exec 'hi cmakeGeneratorExpressions' . s:fg_orange
  1130. exec 'hi cmakeGeneratorExpression' . s:fg_aqua
  1131. exec 'hi cmakeVariable' . s:fg_pink
  1132. exec 'hi cmakeProperty' . s:fg_aqua
  1133. exec 'hi cmakeKWforeach' . s:fg_aqua
  1134. exec 'hi cmakeKWunset' . s:fg_aqua
  1135. exec 'hi cmakeKWmacro' . s:fg_aqua
  1136. exec 'hi cmakeKWget_property' . s:fg_aqua
  1137. exec 'hi cmakeKWset_tests_properties' . s:fg_aqua
  1138. exec 'hi cmakeKWmessage' . s:fg_aqua
  1139. exec 'hi cmakeKWinstall_targets' . s:fg_orange
  1140. exec 'hi cmakeKWsource_group' . s:fg_orange
  1141. exec 'hi cmakeKWfind_package' . s:fg_aqua
  1142. exec 'hi cmakeKWstring' . s:fg_olive
  1143. exec 'hi cmakeKWinstall' . s:fg_aqua
  1144. exec 'hi cmakeKWtarget_sources' . s:fg_orange
  1145. " C Highlighting
  1146. exec 'hi cType' . s:fg_pink . s:ft_bold
  1147. exec 'hi cFormat' . s:fg_olive
  1148. exec 'hi cStorageClass' . s:fg_navy . s:ft_bold
  1149. exec 'hi cBoolean' . s:fg_green . s:ft_bold
  1150. exec 'hi cCharacter' . s:fg_olive
  1151. exec 'hi cConstant' . s:fg_green . s:ft_bold
  1152. exec 'hi cConditional' . s:fg_purple . s:ft_bold
  1153. exec 'hi cSpecial' . s:fg_olive . s:ft_bold
  1154. exec 'hi cDefine' . s:fg_blue
  1155. exec 'hi cNumber' . s:fg_orange
  1156. exec 'hi cPreCondit' . s:fg_aqua
  1157. exec 'hi cRepeat' . s:fg_purple . s:ft_bold
  1158. exec 'hi cLabel' . s:fg_aqua
  1159. " exec 'hi cAnsiFunction' . s:fg_aqua . s:ft_bold
  1160. " exec 'hi cAnsiName' . s:fg_pink
  1161. exec 'hi cDelimiter' . s:fg_blue
  1162. " exec 'hi cBraces' . s:fg_foreground
  1163. " exec 'hi cIdentifier' . s:fg_blue . s:bg_pink
  1164. " exec 'hi cSemiColon' . s:bg_blue
  1165. exec 'hi cOperator' . s:fg_aqua
  1166. " exec 'hi cStatement' . s:fg_pink
  1167. " exec 'hi cTodo' . s:fg_comment . s:ft_bold
  1168. " exec 'hi cStructure' . s:fg_blue . s:ft_bold
  1169. exec 'hi cCustomParen' . s:fg_foreground
  1170. " exec 'hi cCustomFunc' . s:fg_foreground
  1171. " exec 'hi cUserFunction' . s:fg_blue . s:ft_bold
  1172. exec 'hi cOctalZero' . s:fg_purple . s:ft_bold
  1173. if s:langOpt_c__highlight_builtins == 1
  1174. exec 'hi cFunction' . s:fg_blue
  1175. else
  1176. exec 'hi cFunction' . s:fg_foreground
  1177. endif
  1178. " CPP highlighting
  1179. exec 'hi cppBoolean' . s:fg_green . s:ft_bold
  1180. exec 'hi cppSTLnamespace' . s:fg_purple
  1181. exec 'hi cppSTLexception' . s:fg_pink
  1182. exec 'hi cppSTLfunctional' . s:fg_foreground . s:ft_bold
  1183. exec 'hi cppSTLiterator' . s:fg_foreground . s:ft_bold
  1184. exec 'hi cppExceptions' . s:fg_red
  1185. exec 'hi cppStatement' . s:fg_blue
  1186. exec 'hi cppStorageClass' . s:fg_navy . s:ft_bold
  1187. exec 'hi cppAccess' . s:fg_orange . s:ft_bold
  1188. if s:langOpt_cpp__highlight_standard_library == 1
  1189. exec 'hi cppSTLconstant' . s:fg_green . s:ft_bold
  1190. exec 'hi cppSTLtype' . s:fg_pink . s:ft_bold
  1191. exec 'hi cppSTLfunction' . s:fg_blue
  1192. exec 'hi cppSTLios' . s:fg_olive . s:ft_bold
  1193. else
  1194. exec 'hi cppSTLconstant' . s:fg_foreground
  1195. exec 'hi cppSTLtype' . s:fg_foreground
  1196. exec 'hi cppSTLfunction' . s:fg_foreground
  1197. exec 'hi cppSTLios' . s:fg_foreground
  1198. endif
  1199. " exec 'hi cppSTL' . s:fg_blue
  1200. " Rust highlighting
  1201. exec 'hi rustKeyword' . s:fg_pink
  1202. exec 'hi rustModPath' . s:fg_blue
  1203. exec 'hi rustModPathSep' . s:fg_blue
  1204. exec 'hi rustLifetime' . s:fg_purple
  1205. exec 'hi rustStructure' . s:fg_aqua . s:ft_bold
  1206. exec 'hi rustAttribute' . s:fg_aqua . s:ft_bold
  1207. exec 'hi rustPanic' . s:fg_olive . s:ft_bold
  1208. exec 'hi rustTrait' . s:fg_blue . s:ft_bold
  1209. exec 'hi rustEnum' . s:fg_green . s:ft_bold
  1210. exec 'hi rustEnumVariant' . s:fg_green
  1211. exec 'hi rustSelf' . s:fg_orange
  1212. exec 'hi rustSigil' . s:fg_aqua . s:ft_bold
  1213. exec 'hi rustOperator' . s:fg_aqua . s:ft_bold
  1214. exec 'hi rustMacro' . s:fg_olive . s:ft_bold
  1215. exec 'hi rustMacroVariable' . s:fg_olive
  1216. exec 'hi rustAssert' . s:fg_olive . s:ft_bold
  1217. exec 'hi rustConditional' . s:fg_purple . s:ft_bold
  1218. " Lex highlighting
  1219. exec 'hi lexCFunctions' . s:fg_foreground
  1220. exec 'hi lexAbbrv' . s:fg_purple
  1221. exec 'hi lexAbbrvRegExp' . s:fg_aqua
  1222. exec 'hi lexAbbrvComment' . s:fg_comment
  1223. exec 'hi lexBrace' . s:fg_navy
  1224. exec 'hi lexPat' . s:fg_aqua
  1225. exec 'hi lexPatComment' . s:fg_comment
  1226. exec 'hi lexPatTag' . s:fg_orange
  1227. " exec 'hi lexPatBlock' . s:fg_foreground . s:ft_bold
  1228. exec 'hi lexSlashQuote' . s:fg_foreground
  1229. exec 'hi lexSep' . s:fg_foreground
  1230. exec 'hi lexStartState' . s:fg_orange
  1231. exec 'hi lexPatTagZone' . s:fg_olive . s:ft_bold
  1232. exec 'hi lexMorePat' . s:fg_olive . s:ft_bold
  1233. exec 'hi lexOptions' . s:fg_olive . s:ft_bold
  1234. exec 'hi lexPatString' . s:fg_olive
  1235. " Yacc highlighting
  1236. exec 'hi yaccNonterminal' . s:fg_navy
  1237. exec 'hi yaccDelim' . s:fg_orange
  1238. exec 'hi yaccInitKey' . s:fg_aqua
  1239. exec 'hi yaccInit' . s:fg_navy
  1240. exec 'hi yaccKey' . s:fg_purple
  1241. exec 'hi yaccVar' . s:fg_aqua
  1242. " NASM highlighting
  1243. exec 'hi nasmStdInstruction' . s:fg_navy
  1244. exec 'hi nasmGen08Register' . s:fg_aqua
  1245. exec 'hi nasmGen16Register' . s:fg_aqua
  1246. exec 'hi nasmGen32Register' . s:fg_aqua
  1247. exec 'hi nasmGen64Register' . s:fg_aqua
  1248. exec 'hi nasmHexNumber' . s:fg_purple
  1249. exec 'hi nasmStorage' . s:fg_aqua . s:ft_bold
  1250. exec 'hi nasmLabel' . s:fg_pink
  1251. exec 'hi nasmDirective' . s:fg_blue . s:ft_bold
  1252. exec 'hi nasmLocalLabel' . s:fg_orange
  1253. " GAS highlighting
  1254. exec 'hi gasSymbol' . s:fg_pink
  1255. exec 'hi gasDirective' . s:fg_blue . s:ft_bold
  1256. exec 'hi gasOpcode_386_Base' . s:fg_navy
  1257. exec 'hi gasDecimalNumber' . s:fg_purple
  1258. exec 'hi gasSymbolRef' . s:fg_pink
  1259. exec 'hi gasRegisterX86' . s:fg_blue
  1260. exec 'hi gasOpcode_P6_Base' . s:fg_navy
  1261. exec 'hi gasDirectiveStore' . s:fg_foreground . s:ft_bold
  1262. " MIPS highlighting
  1263. exec 'hi mipsInstruction' . s:fg_pink
  1264. exec 'hi mipsRegister' . s:fg_navy
  1265. exec 'hi mipsLabel' . s:fg_aqua . s:ft_bold
  1266. exec 'hi mipsDirective' . s:fg_purple . s:ft_bold
  1267. " Shell/Bash highlighting
  1268. exec 'hi bashStatement' . s:fg_foreground . s:ft_bold
  1269. exec 'hi shDerefVar' . s:fg_aqua . s:ft_bold
  1270. exec 'hi shDerefSimple' . s:fg_aqua
  1271. exec 'hi shFunction' . s:fg_orange . s:ft_bold
  1272. exec 'hi shStatement' . s:fg_foreground
  1273. exec 'hi shLoop' . s:fg_purple . s:ft_bold
  1274. exec 'hi shQuote' . s:fg_olive
  1275. exec 'hi shCaseEsac' . s:fg_aqua . s:ft_bold
  1276. exec 'hi shSnglCase' . s:fg_purple . s:ft_none
  1277. exec 'hi shFunctionOne' . s:fg_navy
  1278. exec 'hi shCase' . s:fg_navy
  1279. exec 'hi shSetList' . s:fg_navy
  1280. " @see Dockerfile Highlighting section for more sh*
  1281. " PowerShell Highlighting
  1282. exec 'hi ps1Type' . s:fg_green . s:ft_bold
  1283. exec 'hi ps1Variable' . s:fg_navy
  1284. exec 'hi ps1Boolean' . s:fg_navy . s:ft_bold
  1285. exec 'hi ps1FunctionInvocation' . s:fg_pink
  1286. exec 'hi ps1FunctionDeclaration' . s:fg_pink
  1287. exec 'hi ps1Keyword' . s:fg_blue . s:ft_bold
  1288. exec 'hi ps1Exception' . s:fg_red
  1289. exec 'hi ps1Operator' . s:fg_aqua . s:ft_bold
  1290. exec 'hi ps1CommentDoc' . s:fg_purple
  1291. exec 'hi ps1CDocParam' . s:fg_orange
  1292. " HTML Highlighting
  1293. exec 'hi htmlTitle' . s:fg_green . s:ft_bold
  1294. exec 'hi htmlH1' . s:fg_green . s:ft_bold
  1295. exec 'hi htmlH2' . s:fg_aqua . s:ft_bold
  1296. exec 'hi htmlH3' . s:fg_purple . s:ft_bold
  1297. exec 'hi htmlH4' . s:fg_orange . s:ft_bold
  1298. exec 'hi htmlTag' . s:fg_comment
  1299. exec 'hi htmlTagName' . s:fg_wine
  1300. exec 'hi htmlArg' . s:fg_pink
  1301. exec 'hi htmlEndTag' . s:fg_comment
  1302. exec 'hi htmlString' . s:fg_blue
  1303. exec 'hi htmlScriptTag' . s:fg_comment
  1304. exec 'hi htmlBold' . s:fg_foreground . s:ft_bold
  1305. exec 'hi htmlItalic' . s:fg_comment . s:ft_italic
  1306. exec 'hi htmlBoldItalic' . s:fg_navy . s:ft_italic_bold
  1307. " exec 'hi htmlLink' . s:fg_blue . s:ft_bold
  1308. exec 'hi htmlTagN' . s:fg_wine . s:ft_bold
  1309. exec 'hi htmlSpecialTagName' . s:fg_wine
  1310. exec 'hi htmlComment' . s:fg_comment . s:ft_italic
  1311. exec 'hi htmlCommentPart' . s:fg_comment . s:ft_italic
  1312. " CSS Highlighting
  1313. exec 'hi cssIdentifier' . s:fg_pink
  1314. exec 'hi cssPositioningProp' . s:fg_foreground
  1315. exec 'hi cssNoise' . s:fg_foreground
  1316. exec 'hi cssBoxProp' . s:fg_foreground
  1317. exec 'hi cssTableAttr' . s:fg_purple
  1318. exec 'hi cssPositioningAttr' . s:fg_navy
  1319. exec 'hi cssValueLength' . s:fg_orange
  1320. exec 'hi cssFunctionName' . s:fg_blue
  1321. exec 'hi cssUnitDecorators' . s:fg_aqua
  1322. exec 'hi cssColor' . s:fg_blue . s:ft_bold
  1323. exec 'hi cssBraces' . s:fg_pink
  1324. exec 'hi cssBackgroundProp' . s:fg_foreground
  1325. exec 'hi cssTextProp' . s:fg_foreground
  1326. exec 'hi cssDimensionProp' . s:fg_foreground
  1327. exec 'hi cssClassName' . s:fg_pink
  1328. " Markdown Highlighting
  1329. exec 'hi markdownHeadingRule' . s:fg_pink . s:ft_bold
  1330. exec 'hi markdownH1' . s:fg_pink . s:ft_bold
  1331. exec 'hi markdownH2' . s:fg_orange . s:ft_bold
  1332. exec 'hi markdownBlockquote' . s:fg_pink
  1333. exec 'hi markdownCodeBlock' . s:fg_olive
  1334. exec 'hi markdownCode' . s:fg_olive
  1335. exec 'hi markdownLink' . s:fg_blue . s:ft_bold
  1336. exec 'hi markdownUrl' . s:fg_blue
  1337. exec 'hi markdownLinkText' . s:fg_pink
  1338. exec 'hi markdownLinkTextDelimiter' . s:fg_purple
  1339. exec 'hi markdownLinkDelimiter' . s:fg_purple
  1340. exec 'hi markdownCodeDelimiter' . s:fg_blue
  1341. exec 'hi mkdCode' . s:fg_olive
  1342. exec 'hi mkdLink' . s:fg_blue . s:ft_bold
  1343. exec 'hi mkdURL' . s:fg_comment
  1344. exec 'hi mkdString' . s:fg_foreground
  1345. exec 'hi mkdBlockQuote' . s:fg_foreground . s:bg_popupmenu_bg
  1346. exec 'hi mkdLinkTitle' . s:fg_pink
  1347. exec 'hi mkdDelimiter' . s:fg_aqua
  1348. exec 'hi mkdRule' . s:fg_pink
  1349. " reStructuredText Highlighting
  1350. exec 'hi rstSections' . s:fg_pink . s:ft_bold
  1351. exec 'hi rstDelimiter' . s:fg_pink . s:ft_bold
  1352. exec 'hi rstExplicitMarkup' . s:fg_pink . s:ft_bold
  1353. exec 'hi rstDirective' . s:fg_blue
  1354. exec 'hi rstHyperlinkTarget' . s:fg_green
  1355. exec 'hi rstExDirective' . s:fg_foreground
  1356. exec 'hi rstInlineLiteral' . s:fg_olive
  1357. exec 'hi rstInterpretedTextOrHyperlinkReference' . s:fg_blue
  1358. " Python Highlighting
  1359. exec 'hi pythonImport' . s:fg_pink . s:ft_bold
  1360. exec 'hi pythonExceptions' . s:fg_red
  1361. exec 'hi pythonException' . s:fg_purple . s:ft_bold
  1362. exec 'hi pythonInclude' . s:fg_red
  1363. exec 'hi pythonStatement' . s:fg_pink
  1364. exec 'hi pythonConditional' . s:fg_purple . s:ft_bold
  1365. exec 'hi pythonRepeat' . s:fg_purple . s:ft_bold
  1366. exec 'hi pythonFunction' . s:fg_aqua . s:ft_bold
  1367. exec 'hi pythonPreCondit' . s:fg_purple
  1368. exec 'hi pythonExClass' . s:fg_orange
  1369. exec 'hi pythonOperator' . s:fg_purple . s:ft_bold
  1370. exec 'hi pythonBuiltin' . s:fg_foreground
  1371. exec 'hi pythonDecorator' . s:fg_orange
  1372. exec 'hi pythonString' . s:fg_olive
  1373. exec 'hi pythonEscape' . s:fg_olive . s:ft_bold
  1374. exec 'hi pythonStrFormatting' . s:fg_olive . s:ft_bold
  1375. exec 'hi pythonBoolean' . s:fg_green . s:ft_bold
  1376. exec 'hi pythonExClass' . s:fg_red
  1377. exec 'hi pythonBytesEscape' . s:fg_olive . s:ft_bold
  1378. exec 'hi pythonDottedName' . s:fg_purple
  1379. exec 'hi pythonStrFormat' . s:fg_foreground
  1380. if s:langOpt_python__highlight_builtins == 1
  1381. exec 'hi pythonBuiltinFunc' . s:fg_blue
  1382. exec 'hi pythonBuiltinObj' . s:fg_red
  1383. else
  1384. exec 'hi pythonBuiltinFunc' . s:fg_foreground
  1385. exec 'hi pythonBuiltinObj' . s:fg_foreground
  1386. endif
  1387. " Java Highlighting
  1388. exec 'hi javaExternal' . s:fg_pink
  1389. exec 'hi javaAnnotation' . s:fg_orange
  1390. exec 'hi javaTypedef' . s:fg_aqua
  1391. exec 'hi javaClassDecl' . s:fg_aqua . s:ft_bold
  1392. exec 'hi javaScopeDecl' . s:fg_blue . s:ft_bold
  1393. exec 'hi javaStorageClass' . s:fg_navy . s:ft_bold
  1394. exec 'hi javaBoolean' . s:fg_green . s:ft_bold
  1395. exec 'hi javaConstant' . s:fg_blue
  1396. exec 'hi javaCommentTitle' . s:fg_wine
  1397. exec 'hi javaDocTags' . s:fg_aqua
  1398. exec 'hi javaDocComment' . s:fg_comment
  1399. exec 'hi javaDocParam' . s:fg_foreground
  1400. exec 'hi javaStatement' . s:fg_pink
  1401. " JavaScript Highlighting
  1402. exec 'hi javaScriptBraces' . s:fg_blue
  1403. exec 'hi javaScriptParens' . s:fg_blue
  1404. exec 'hi javaScriptIdentifier' . s:fg_pink
  1405. exec 'hi javaScriptFunction' . s:fg_blue . s:ft_bold
  1406. exec 'hi javaScriptConditional' . s:fg_purple . s:ft_bold
  1407. exec 'hi javaScriptRepeat' . s:fg_purple . s:ft_bold
  1408. exec 'hi javaScriptBoolean' . s:fg_green . s:ft_bold
  1409. exec 'hi javaScriptNumber' . s:fg_orange
  1410. exec 'hi javaScriptMember' . s:fg_navy
  1411. exec 'hi javaScriptReserved' . s:fg_navy
  1412. exec 'hi javascriptNull' . s:fg_comment . s:ft_bold
  1413. exec 'hi javascriptGlobal' . s:fg_foreground
  1414. exec 'hi javascriptStatement' . s:fg_pink
  1415. exec 'hi javaScriptMessage' . s:fg_foreground
  1416. exec 'hi javaScriptMember' . s:fg_foreground
  1417. " @target https://github.com/pangloss/vim-javascript
  1418. exec 'hi jsFuncParens' . s:fg_blue
  1419. exec 'hi jsFuncBraces' . s:fg_blue
  1420. exec 'hi jsParens' . s:fg_blue
  1421. exec 'hi jsBraces' . s:fg_blue
  1422. exec 'hi jsNoise' . s:fg_blue
  1423. " Json Highlighting
  1424. " @target https://github.com/elzr/vim-json
  1425. exec 'hi jsonKeyword' . s:fg_blue
  1426. exec 'hi jsonString' . s:fg_olive
  1427. exec 'hi jsonQuote' . s:fg_comment
  1428. exec 'hi jsonNoise' . s:fg_foreground
  1429. exec 'hi jsonKeywordMatch' . s:fg_foreground
  1430. exec 'hi jsonBraces' . s:fg_foreground
  1431. exec 'hi jsonNumber' . s:fg_orange
  1432. exec 'hi jsonNull' . s:fg_purple . s:ft_bold
  1433. exec 'hi jsonBoolean' . s:fg_green . s:ft_bold
  1434. exec 'hi jsonCommentError' . s:fg_pink . s:bg_background
  1435. " Go Highlighting
  1436. exec 'hi goDirective' . s:fg_red
  1437. exec 'hi goDeclaration' . s:fg_blue . s:ft_bold
  1438. exec 'hi goStatement' . s:fg_pink
  1439. exec 'hi goConditional' . s:fg_purple . s:ft_bold
  1440. exec 'hi goConstants' . s:fg_orange
  1441. exec 'hi goFunction' . s:fg_orange
  1442. " exec 'hi goTodo' . s:fg_comment . s:ft_bold
  1443. exec 'hi goDeclType' . s:fg_blue
  1444. exec 'hi goBuiltins' . s:fg_purple
  1445. " Systemtap Highlighting
  1446. " exec 'hi stapBlock' . s:fg_comment . s:ft_none
  1447. exec 'hi stapComment' . s:fg_comment . s:ft_none
  1448. exec 'hi stapProbe' . s:fg_aqua . s:ft_bold
  1449. exec 'hi stapStat' . s:fg_navy . s:ft_bold
  1450. exec 'hi stapFunc' . s:fg_foreground
  1451. exec 'hi stapString' . s:fg_olive
  1452. exec 'hi stapTarget' . s:fg_navy
  1453. exec 'hi stapStatement' . s:fg_pink
  1454. exec 'hi stapType' . s:fg_pink . s:ft_bold
  1455. exec 'hi stapSharpBang' . s:fg_comment
  1456. exec 'hi stapDeclaration' . s:fg_pink
  1457. exec 'hi stapCMacro' . s:fg_blue
  1458. " DTrace Highlighting
  1459. exec 'hi dtraceProbe' . s:fg_blue
  1460. exec 'hi dtracePredicate' . s:fg_purple . s:ft_bold
  1461. exec 'hi dtraceComment' . s:fg_comment
  1462. exec 'hi dtraceFunction' . s:fg_foreground
  1463. exec 'hi dtraceAggregatingFunction' . s:fg_blue . s:ft_bold
  1464. exec 'hi dtraceStatement' . s:fg_navy . s:ft_bold
  1465. exec 'hi dtraceIdentifier' . s:fg_pink
  1466. exec 'hi dtraceOption' . s:fg_pink
  1467. exec 'hi dtraceConstant' . s:fg_orange
  1468. exec 'hi dtraceType' . s:fg_pink . s:ft_bold
  1469. " PlantUML Highlighting
  1470. exec 'hi plantumlPreProc' . s:fg_orange . s:ft_bold
  1471. exec 'hi plantumlDirectedOrVerticalArrowRL' . s:fg_pink
  1472. exec 'hi plantumlDirectedOrVerticalArrowLR' . s:fg_pink
  1473. exec 'hi plantumlString' . s:fg_olive
  1474. exec 'hi plantumlActivityThing' . s:fg_purple
  1475. exec 'hi plantumlText' . s:fg_navy
  1476. exec 'hi plantumlClassPublic' . s:fg_olive . s:ft_bold
  1477. exec 'hi plantumlClassPrivate' . s:fg_red
  1478. exec 'hi plantumlColonLine' . s:fg_orange
  1479. exec 'hi plantumlClass' . s:fg_navy
  1480. exec 'hi plantumlHorizontalArrow' . s:fg_pink
  1481. exec 'hi plantumlTypeKeyword' . s:fg_blue . s:ft_bold
  1482. exec 'hi plantumlKeyword' . s:fg_pink . s:ft_bold
  1483. exec 'hi plantumlType' . s:fg_blue . s:ft_bold
  1484. exec 'hi plantumlBlock' . s:fg_pink . s:ft_bold
  1485. exec 'hi plantumlPreposition' . s:fg_orange
  1486. exec 'hi plantumlLayout' . s:fg_blue . s:ft_bold
  1487. exec 'hi plantumlNote' . s:fg_orange
  1488. exec 'hi plantumlLifecycle' . s:fg_aqua
  1489. exec 'hi plantumlParticipant' . s:fg_foreground . s:ft_bold
  1490. " Haskell Highlighting
  1491. exec 'hi haskellType' . s:fg_aqua . s:ft_bold
  1492. exec 'hi haskellIdentifier' . s:fg_orange . s:ft_bold
  1493. exec 'hi haskellOperators' . s:fg_pink
  1494. exec 'hi haskellWhere' . s:fg_foreground . s:ft_bold
  1495. exec 'hi haskellDelimiter' . s:fg_aqua
  1496. exec 'hi haskellImportKeywords' . s:fg_pink
  1497. exec 'hi haskellStatement' . s:fg_purple . s:ft_bold
  1498. " SQL/MySQL Highlighting
  1499. exec 'hi sqlStatement' . s:fg_pink . s:ft_bold
  1500. exec 'hi sqlType' . s:fg_blue . s:ft_bold
  1501. exec 'hi sqlKeyword' . s:fg_pink
  1502. exec 'hi sqlOperator' . s:fg_aqua
  1503. exec 'hi sqlSpecial' . s:fg_green . s:ft_bold
  1504. exec 'hi mysqlVariable' . s:fg_olive . s:ft_bold
  1505. exec 'hi mysqlType' . s:fg_blue . s:ft_bold
  1506. exec 'hi mysqlKeyword' . s:fg_pink
  1507. exec 'hi mysqlOperator' . s:fg_aqua
  1508. exec 'hi mysqlSpecial' . s:fg_green . s:ft_bold
  1509. " Octave/MATLAB Highlighting
  1510. exec 'hi octaveVariable' . s:fg_foreground
  1511. exec 'hi octaveDelimiter' . s:fg_pink
  1512. exec 'hi octaveQueryVar' . s:fg_foreground
  1513. exec 'hi octaveSemicolon' . s:fg_purple
  1514. exec 'hi octaveFunction' . s:fg_navy
  1515. exec 'hi octaveSetVar' . s:fg_blue
  1516. exec 'hi octaveUserVar' . s:fg_foreground
  1517. exec 'hi octaveArithmeticOperator' . s:fg_aqua
  1518. exec 'hi octaveBeginKeyword' . s:fg_purple . s:ft_bold
  1519. exec 'hi octaveElseKeyword' . s:fg_purple . s:ft_bold
  1520. exec 'hi octaveEndKeyword' . s:fg_purple . s:ft_bold
  1521. exec 'hi octaveStatement' . s:fg_pink
  1522. " Ruby Highlighting
  1523. exec 'hi rubyModule' . s:fg_navy . s:ft_bold
  1524. exec 'hi rubyClass' . s:fg_pink . s:ft_bold
  1525. exec 'hi rubyPseudoVariable' . s:fg_comment . s:ft_bold
  1526. exec 'hi rubyKeyword' . s:fg_pink
  1527. exec 'hi rubyInstanceVariable' . s:fg_purple
  1528. exec 'hi rubyFunction' . s:fg_foreground . s:ft_bold
  1529. exec 'hi rubyDefine' . s:fg_pink
  1530. exec 'hi rubySymbol' . s:fg_aqua
  1531. exec 'hi rubyConstant' . s:fg_blue
  1532. exec 'hi rubyAccess' . s:fg_navy
  1533. exec 'hi rubyAttribute' . s:fg_green
  1534. exec 'hi rubyInclude' . s:fg_red
  1535. exec 'hi rubyLocalVariableOrMethod' . s:fg_orange
  1536. exec 'hi rubyCurlyBlock' . s:fg_foreground
  1537. exec 'hi rubyCurlyBlockDelimiter' . s:fg_aqua
  1538. exec 'hi rubyArrayDelimiter' . s:fg_aqua
  1539. exec 'hi rubyStringDelimiter' . s:fg_olive
  1540. exec 'hi rubyInterpolationDelimiter' . s:fg_orange
  1541. exec 'hi rubyConditional' . s:fg_purple . s:ft_bold
  1542. exec 'hi rubyRepeat' . s:fg_purple . s:ft_bold
  1543. exec 'hi rubyControl' . s:fg_purple . s:ft_bold
  1544. exec 'hi rubyException' . s:fg_purple . s:ft_bold
  1545. exec 'hi rubyExceptional' . s:fg_purple . s:ft_bold
  1546. exec 'hi rubyBoolean' . s:fg_green . s:ft_bold
  1547. " Fortran Highlighting
  1548. exec 'hi fortranUnitHeader' . s:fg_blue . s:ft_bold
  1549. exec 'hi fortranIntrinsic' . s:fg_blue . s:bg_background . s:ft_none
  1550. exec 'hi fortranType' . s:fg_pink . s:ft_bold
  1551. exec 'hi fortranTypeOb' . s:fg_pink . s:ft_bold
  1552. exec 'hi fortranStructure' . s:fg_aqua
  1553. exec 'hi fortranStorageClass' . s:fg_navy . s:ft_bold
  1554. exec 'hi fortranStorageClassR' . s:fg_navy . s:ft_bold
  1555. exec 'hi fortranKeyword' . s:fg_pink
  1556. exec 'hi fortranReadWrite' . s:fg_aqua . s:ft_bold
  1557. exec 'hi fortranIO' . s:fg_navy
  1558. exec 'hi fortranOperator' . s:fg_aqua . s:ft_bold
  1559. exec 'hi fortranCall' . s:fg_aqua . s:ft_bold
  1560. exec 'hi fortranContinueMark' . s:fg_green
  1561. " ALGOL Highlighting (Plugin: https://github.com/sterpe/vim-algol68)
  1562. exec 'hi algol68Statement' . s:fg_blue . s:ft_bold
  1563. exec 'hi algol68Operator' . s:fg_aqua . s:ft_bold
  1564. exec 'hi algol68PreProc' . s:fg_green
  1565. exec 'hi algol68Function' . s:fg_blue
  1566. " R Highlighting
  1567. exec 'hi rType' . s:fg_blue
  1568. exec 'hi rArrow' . s:fg_pink
  1569. exec 'hi rDollar' . s:fg_blue
  1570. " XXD Highlighting
  1571. exec 'hi xxdAddress' . s:fg_navy
  1572. exec 'hi xxdSep' . s:fg_pink
  1573. exec 'hi xxdAscii' . s:fg_pink
  1574. exec 'hi xxdDot' . s:fg_aqua
  1575. " PHP Highlighting
  1576. exec 'hi phpIdentifier' . s:fg_foreground
  1577. exec 'hi phpVarSelector' . s:fg_pink
  1578. exec 'hi phpKeyword' . s:fg_blue
  1579. exec 'hi phpRepeat' . s:fg_purple . s:ft_bold
  1580. exec 'hi phpConditional' . s:fg_purple . s:ft_bold
  1581. exec 'hi phpStatement' . s:fg_pink
  1582. exec 'hi phpAssignByRef' . s:fg_aqua . s:ft_bold
  1583. exec 'hi phpSpecialFunction' . s:fg_blue
  1584. exec 'hi phpFunctions' . s:fg_blue
  1585. exec 'hi phpComparison' . s:fg_aqua
  1586. exec 'hi phpBackslashSequences' . s:fg_olive . s:ft_bold
  1587. exec 'hi phpMemberSelector' . s:fg_blue
  1588. exec 'hi phpStorageClass' . s:fg_purple . s:ft_bold
  1589. exec 'hi phpDefine' . s:fg_navy
  1590. exec 'hi phpIntVar' . s:fg_navy . s:ft_bold
  1591. " Perl Highlighting
  1592. exec 'hi perlFiledescRead' . s:fg_green
  1593. exec 'hi perlMatchStartEnd' . s:fg_pink
  1594. exec 'hi perlStatementFlow' . s:fg_pink
  1595. exec 'hi perlStatementStorage' . s:fg_pink
  1596. exec 'hi perlFunction' . s:fg_pink . s:ft_bold
  1597. exec 'hi perlMethod' . s:fg_foreground
  1598. exec 'hi perlStatementFiledesc' . s:fg_orange
  1599. exec 'hi perlVarPlain' . s:fg_navy
  1600. exec 'hi perlSharpBang' . s:fg_comment
  1601. exec 'hi perlStatementInclude' . s:fg_aqua . s:ft_bold
  1602. exec 'hi perlStatementScalar' . s:fg_purple
  1603. exec 'hi perlSubName' . s:fg_aqua . s:ft_bold
  1604. exec 'hi perlSpecialString' . s:fg_olive . s:ft_bold
  1605. " Pascal Highlighting
  1606. exec 'hi pascalType' . s:fg_pink . s:ft_bold
  1607. exec 'hi pascalStatement' . s:fg_blue . s:ft_bold
  1608. exec 'hi pascalPredefined' . s:fg_pink
  1609. exec 'hi pascalFunction' . s:fg_foreground
  1610. exec 'hi pascalStruct' . s:fg_navy . s:ft_bold
  1611. exec 'hi pascalOperator' . s:fg_aqua . s:ft_bold
  1612. exec 'hi pascalPreProc' . s:fg_green
  1613. exec 'hi pascalAcces' . s:fg_navy . s:ft_bold
  1614. " Lua Highlighting
  1615. exec 'hi luaFunc' . s:fg_foreground
  1616. exec 'hi luaIn' . s:fg_blue . s:ft_bold
  1617. exec 'hi luaFunction' . s:fg_pink
  1618. exec 'hi luaStatement' . s:fg_blue
  1619. exec 'hi luaRepeat' . s:fg_blue . s:ft_bold
  1620. exec 'hi luaCondStart' . s:fg_purple . s:ft_bold
  1621. exec 'hi luaTable' . s:fg_aqua . s:ft_bold
  1622. exec 'hi luaConstant' . s:fg_green . s:ft_bold
  1623. exec 'hi luaElse' . s:fg_purple . s:ft_bold
  1624. exec 'hi luaCondElseif' . s:fg_purple . s:ft_bold
  1625. exec 'hi luaCond' . s:fg_purple . s:ft_bold
  1626. exec 'hi luaCondEnd' . s:fg_purple
  1627. " Clojure highlighting:
  1628. exec 'hi clojureConstant' . s:fg_blue
  1629. exec 'hi clojureBoolean' . s:fg_orange
  1630. exec 'hi clojureCharacter' . s:fg_olive
  1631. exec 'hi clojureKeyword' . s:fg_pink
  1632. exec 'hi clojureNumber' . s:fg_orange
  1633. exec 'hi clojureString' . s:fg_olive
  1634. exec 'hi clojureRegexp' . s:fg_purple
  1635. exec 'hi clojureRegexpEscape' . s:fg_pink
  1636. exec 'hi clojureParen' . s:fg_aqua
  1637. exec 'hi clojureVariable' . s:fg_olive
  1638. exec 'hi clojureCond' . s:fg_blue
  1639. exec 'hi clojureDefine' . s:fg_blue . s:ft_bold
  1640. exec 'hi clojureException' . s:fg_red
  1641. exec 'hi clojureFunc' . s:fg_navy
  1642. exec 'hi clojureMacro' . s:fg_blue
  1643. exec 'hi clojureRepeat' . s:fg_blue
  1644. exec 'hi clojureSpecial' . s:fg_blue . s:ft_bold
  1645. exec 'hi clojureQuote' . s:fg_blue
  1646. exec 'hi clojureUnquote' . s:fg_blue
  1647. exec 'hi clojureMeta' . s:fg_blue
  1648. exec 'hi clojureDeref' . s:fg_blue
  1649. exec 'hi clojureAnonArg' . s:fg_blue
  1650. exec 'hi clojureRepeat' . s:fg_blue
  1651. exec 'hi clojureDispatch' . s:fg_aqua
  1652. " Dockerfile Highlighting
  1653. " @target https://github.com/docker/docker/tree/master/contrib/syntax/vim
  1654. exec 'hi dockerfileKeyword' . s:fg_blue
  1655. exec 'hi shDerefVar' . s:fg_purple . s:ft_bold
  1656. exec 'hi shOperator' . s:fg_aqua
  1657. exec 'hi shOption' . s:fg_navy
  1658. exec 'hi shLine' . s:fg_foreground
  1659. exec 'hi shWrapLineOperator' . s:fg_pink
  1660. " NGINX Highlighting
  1661. " @target https://github.com/evanmiller/nginx-vim-syntax
  1662. exec 'hi ngxDirectiveBlock' . s:fg_pink . s:ft_bold
  1663. exec 'hi ngxDirective' . s:fg_blue . s:ft_none
  1664. exec 'hi ngxDirectiveImportant' . s:fg_blue . s:ft_bold
  1665. exec 'hi ngxString' . s:fg_olive
  1666. exec 'hi ngxVariableString' . s:fg_purple
  1667. exec 'hi ngxVariable' . s:fg_purple . s:ft_none
  1668. " Yaml Highlighting
  1669. exec 'hi yamlBlockMappingKey' . s:fg_blue
  1670. exec 'hi yamlKeyValueDelimiter' . s:fg_pink
  1671. exec 'hi yamlBlockCollectionItemStart' . s:fg_pink
  1672. " Qt QML Highlighting
  1673. exec 'hi qmlObjectLiteralType' . s:fg_pink
  1674. exec 'hi qmlReserved' . s:fg_purple
  1675. exec 'hi qmlBindingProperty' . s:fg_navy
  1676. exec 'hi qmlType' . s:fg_navy
  1677. " Dosini Highlighting
  1678. exec 'hi dosiniHeader' . s:fg_pink
  1679. exec 'hi dosiniLabel' . s:fg_blue
  1680. " Mail highlighting
  1681. exec 'hi mailHeaderKey' . s:fg_blue
  1682. exec 'hi mailHeaderEmail' . s:fg_purple
  1683. exec 'hi mailSubject' . s:fg_pink
  1684. exec 'hi mailHeader' . s:fg_comment
  1685. exec 'hi mailURL' . s:fg_aqua
  1686. exec 'hi mailEmail' . s:fg_purple
  1687. exec 'hi mailQuoted1' . s:fg_olive
  1688. exec 'hi mailQuoted2' . s:fg_navy
  1689. " XML Highlighting
  1690. exec 'hi xmlProcessingDelim' . s:fg_pink
  1691. exec 'hi xmlString' . s:fg_olive
  1692. exec 'hi xmlEqual' . s:fg_orange
  1693. exec 'hi xmlAttrib' . s:fg_navy
  1694. exec 'hi xmlAttribPunct' . s:fg_pink
  1695. exec 'hi xmlTag' . s:fg_blue
  1696. exec 'hi xmlTagName' . s:fg_blue
  1697. exec 'hi xmlEndTag' . s:fg_blue
  1698. exec 'hi xmlNamespace' . s:fg_orange
  1699. " Exlixir Highlighting
  1700. " @target https://github.com/elixir-lang/vim-elixir
  1701. exec 'hi elixirAlias' . s:fg_blue . s:ft_bold
  1702. exec 'hi elixirAtom' . s:fg_navy
  1703. exec 'hi elixirVariable' . s:fg_navy
  1704. exec 'hi elixirUnusedVariable' . s:fg_foreground . s:ft_bold
  1705. exec 'hi elixirInclude' . s:fg_purple
  1706. exec 'hi elixirStringDelimiter' . s:fg_olive
  1707. exec 'hi elixirKeyword' . s:fg_purple . s:ft_bold
  1708. exec 'hi elixirFunctionDeclaration' . s:fg_aqua . s:ft_bold
  1709. exec 'hi elixirBlockDefinition' . s:fg_pink
  1710. exec 'hi elixirDefine' . s:fg_pink
  1711. exec 'hi elixirStructDefine' . s:fg_pink
  1712. exec 'hi elixirPrivateDefine' . s:fg_pink
  1713. exec 'hi elixirModuleDefine' . s:fg_pink
  1714. exec 'hi elixirProtocolDefine' . s:fg_pink
  1715. exec 'hi elixirImplDefine' . s:fg_pink
  1716. exec 'hi elixirModuleDeclaration' . s:fg_aqua . s:ft_bold
  1717. exec 'hi elixirDocString' . s:fg_olive
  1718. exec 'hi elixirDocTest' . s:fg_green . s:ft_bold
  1719. " Erlang Highlighting
  1720. exec 'hi erlangBIF' . s:fg_purple . s:ft_bold
  1721. exec 'hi erlangBracket' . s:fg_pink
  1722. exec 'hi erlangLocalFuncCall' . s:fg_foreground
  1723. exec 'hi erlangVariable' . s:fg_foreground
  1724. exec 'hi erlangAtom' . s:fg_navy
  1725. exec 'hi erlangAttribute' . s:fg_blue . s:ft_bold
  1726. exec 'hi erlangRecordDef' . s:fg_blue . s:ft_bold
  1727. exec 'hi erlangRecord' . s:fg_blue
  1728. exec 'hi erlangRightArrow' . s:fg_blue . s:ft_bold
  1729. exec 'hi erlangStringModifier' . s:fg_olive . s:ft_bold
  1730. exec 'hi erlangInclude' . s:fg_blue . s:ft_bold
  1731. exec 'hi erlangKeyword' . s:fg_pink
  1732. exec 'hi erlangGlobalFuncCall' . s:fg_foreground
  1733. " Cucumber Highlighting
  1734. exec 'hi cucumberFeature' . s:fg_blue . s:ft_bold
  1735. exec 'hi cucumberBackground' . s:fg_pink . s:ft_bold
  1736. exec 'hi cucumberScenario' . s:fg_pink . s:ft_bold
  1737. exec 'hi cucumberGiven' . s:fg_orange
  1738. exec 'hi cucumberGivenAnd' . s:fg_blue
  1739. exec 'hi cucumberThen' . s:fg_orange
  1740. exec 'hi cucumberThenAnd' . s:fg_blue
  1741. exec 'hi cucumberWhen' . s:fg_purple . s:ft_bold
  1742. exec 'hi cucumberScenarioOutline' . s:fg_pink . s:ft_bold
  1743. exec 'hi cucumberExamples' . s:fg_aqua
  1744. exec 'hi cucumberTags' . s:fg_aqua
  1745. exec 'hi cucumberPlaceholder' . s:fg_aqua
  1746. " Ada Highlighting
  1747. exec 'hi adaInc' . s:fg_aqua . s:ft_bold
  1748. exec 'hi adaSpecial' . s:fg_aqua . s:ft_bold
  1749. exec 'hi adaKeyword' . s:fg_pink
  1750. exec 'hi adaBegin' . s:fg_pink
  1751. exec 'hi adaEnd' . s:fg_pink
  1752. exec 'hi adaTypedef' . s:fg_navy . s:ft_bold
  1753. exec 'hi adaAssignment' . s:fg_aqua . s:ft_bold
  1754. exec 'hi adaAttribute' . s:fg_green
  1755. " COBOL Highlighting
  1756. exec 'hi cobolMarker' . s:fg_comment . s:bg_cursorline
  1757. exec 'hi cobolLine' . s:fg_foreground
  1758. exec 'hi cobolReserved' . s:fg_blue
  1759. exec 'hi cobolDivision' . s:fg_pink . s:ft_bold
  1760. exec 'hi cobolDivisionName' . s:fg_pink . s:ft_bold
  1761. exec 'hi cobolSection' . s:fg_navy . s:ft_bold
  1762. exec 'hi cobolSectionName' . s:fg_navy . s:ft_bold
  1763. exec 'hi cobolParagraph' . s:fg_purple
  1764. exec 'hi cobolParagraphName' . s:fg_purple
  1765. exec 'hi cobolDeclA' . s:fg_purple
  1766. exec 'hi cobolDecl' . s:fg_green
  1767. exec 'hi cobolCALLs' . s:fg_aqua . s:ft_bold
  1768. exec 'hi cobolEXECs' . s:fg_aqua . s:ft_bold
  1769. " GNU sed highlighting
  1770. exec 'hi sedST' . s:fg_purple . s:ft_bold
  1771. exec 'hi sedFlag' . s:fg_purple . s:ft_bold
  1772. exec 'hi sedRegexp47' . s:fg_pink
  1773. exec 'hi sedRegexpMeta' . s:fg_blue . s:ft_bold
  1774. exec 'hi sedReplacement47' . s:fg_olive
  1775. exec 'hi sedReplaceMeta' . s:fg_orange . s:ft_bold
  1776. exec 'hi sedAddress' . s:fg_pink
  1777. exec 'hi sedFunction' . s:fg_aqua . s:ft_bold
  1778. exec 'hi sedBranch' . s:fg_green . s:ft_bold
  1779. exec 'hi sedLabel' . s:fg_green . s:ft_bold
  1780. " GNU awk highlighting
  1781. exec 'hi awkPatterns' . s:fg_pink . s:ft_bold
  1782. exec 'hi awkSearch' . s:fg_pink
  1783. exec 'hi awkRegExp' . s:fg_blue . s:ft_bold
  1784. exec 'hi awkCharClass' . s:fg_blue . s:ft_bold
  1785. exec 'hi awkFieldVars' . s:fg_green . s:ft_bold
  1786. exec 'hi awkStatement' . s:fg_blue . s:ft_bold
  1787. exec 'hi awkFunction' . s:fg_blue
  1788. exec 'hi awkVariables' . s:fg_green . s:ft_bold
  1789. exec 'hi awkArrayElement' . s:fg_orange
  1790. exec 'hi awkOperator' . s:fg_foreground
  1791. exec 'hi awkBoolLogic' . s:fg_foreground
  1792. exec 'hi awkExpression' . s:fg_foreground
  1793. exec 'hi awkSpecialPrintf' . s:fg_olive . s:ft_bold
  1794. " Elm highlighting
  1795. exec 'hi elmImport' . s:fg_navy
  1796. exec 'hi elmAlias' . s:fg_aqua
  1797. exec 'hi elmType' . s:fg_pink
  1798. exec 'hi elmOperator' . s:fg_aqua . s:ft_bold
  1799. exec 'hi elmBraces' . s:fg_aqua . s:ft_bold
  1800. exec 'hi elmTypedef' . s:fg_blue . s:ft_bold
  1801. exec 'hi elmTopLevelDecl' . s:fg_green . s:ft_bold
  1802. " Purescript highlighting
  1803. exec 'hi purescriptModuleKeyword' . s:fg_navy
  1804. exec 'hi purescriptImportKeyword' . s:fg_navy
  1805. exec 'hi purescriptModuleName' . s:fg_pink
  1806. exec 'hi purescriptOperator' . s:fg_aqua . s:ft_bold
  1807. exec 'hi purescriptType' . s:fg_pink
  1808. exec 'hi purescriptTypeVar' . s:fg_navy
  1809. exec 'hi purescriptStructure' . s:fg_blue . s:ft_bold
  1810. exec 'hi purescriptLet' . s:fg_blue . s:ft_bold
  1811. exec 'hi purescriptFunction' . s:fg_green . s:ft_bold
  1812. exec 'hi purescriptDelimiter' . s:fg_aqua . s:ft_bold
  1813. exec 'hi purescriptStatement' . s:fg_purple . s:ft_bold
  1814. exec 'hi purescriptConstructor' . s:fg_pink
  1815. exec 'hi purescriptWhere' . s:fg_purple . s:ft_bold
  1816. " F# highlighting
  1817. exec 'hi fsharpTypeName' . s:fg_pink
  1818. exec 'hi fsharpCoreClass' . s:fg_pink
  1819. exec 'hi fsharpType' . s:fg_pink
  1820. exec 'hi fsharpKeyword' . s:fg_blue . s:ft_bold
  1821. exec 'hi fsharpOperator' . s:fg_aqua . s:ft_bold
  1822. exec 'hi fsharpBoolean' . s:fg_green . s:ft_bold
  1823. exec 'hi fsharpFormat' . s:fg_foreground
  1824. exec 'hi fsharpLinq' . s:fg_blue
  1825. exec 'hi fsharpKeyChar' . s:fg_aqua . s:ft_bold
  1826. exec 'hi fsharpOption' . s:fg_orange
  1827. exec 'hi fsharpCoreMethod' . s:fg_purple
  1828. exec 'hi fsharpAttrib' . s:fg_orange
  1829. exec 'hi fsharpModifier' . s:fg_aqua
  1830. exec 'hi fsharpOpen' . s:fg_red
  1831. " ASN.1 highlighting
  1832. exec 'hi asnExternal' . s:fg_green . s:ft_bold
  1833. exec 'hi asnTagModifier' . s:fg_purple
  1834. exec 'hi asnBraces' . s:fg_aqua . s:ft_bold
  1835. exec 'hi asnDefinition' . s:fg_foreground
  1836. exec 'hi asnStructure' . s:fg_blue
  1837. exec 'hi asnType' . s:fg_pink
  1838. exec 'hi asnTypeInfo' . s:fg_aqua . s:ft_bold
  1839. exec 'hi asnFieldOption' . s:fg_purple
  1840. " }}}
  1841. " Plugin: Netrw
  1842. exec 'hi netrwVersion' . s:fg_red
  1843. exec 'hi netrwList' . s:fg_pink
  1844. exec 'hi netrwHidePat' . s:fg_olive
  1845. exec 'hi netrwQuickHelp' . s:fg_blue
  1846. exec 'hi netrwHelpCmd' . s:fg_blue
  1847. exec 'hi netrwDir' . s:fg_aqua . s:ft_bold
  1848. exec 'hi netrwClassify' . s:fg_pink
  1849. exec 'hi netrwExe' . s:fg_green
  1850. exec 'hi netrwSuffixes' . s:fg_comment
  1851. exec 'hi netrwTreeBar' . s:fg_linenumber_fg
  1852. " Plugin: NERDTree
  1853. exec 'hi NERDTreeUp' . s:fg_comment
  1854. exec 'hi NERDTreeHelpCommand' . s:fg_pink
  1855. exec 'hi NERDTreeHelpTitle' . s:fg_blue . s:ft_bold
  1856. exec 'hi NERDTreeHelpKey' . s:fg_pink
  1857. exec 'hi NERDTreeHelp' . s:fg_foreground
  1858. exec 'hi NERDTreeToggleOff' . s:fg_red
  1859. exec 'hi NERDTreeToggleOn' . s:fg_green
  1860. exec 'hi NERDTreeDir' . s:fg_blue . s:ft_bold
  1861. exec 'hi NERDTreeDirSlash' . s:fg_pink
  1862. exec 'hi NERDTreeFile' . s:fg_foreground
  1863. exec 'hi NERDTreeExecFile' . s:fg_green
  1864. exec 'hi NERDTreeOpenable' . s:fg_aqua . s:ft_bold
  1865. exec 'hi NERDTreeClosable' . s:fg_pink
  1866. " Plugin: Tagbar
  1867. exec 'hi TagbarHelpTitle' . s:fg_blue . s:ft_bold
  1868. exec 'hi TagbarHelp' . s:fg_foreground
  1869. exec 'hi TagbarKind' . s:fg_pink
  1870. exec 'hi TagbarSignature' . s:fg_aqua
  1871. " Plugin: Vimdiff
  1872. exec 'hi DiffAdd' . s:fg_diffadd_fg . s:bg_diffadd_bg . s:ft_none
  1873. exec 'hi DiffChange' . s:fg_diffchange_fg . s:bg_diffchange_bg . s:ft_none
  1874. exec 'hi DiffDelete' . s:fg_diffdelete_fg . s:bg_diffdelete_bg . s:ft_none
  1875. exec 'hi DiffText' . s:fg_difftext_fg . s:bg_difftext_bg . s:ft_none
  1876. " Plugin: AGit
  1877. exec 'hi agitHead' . s:fg_green . s:ft_bold
  1878. exec 'hi agitHeader' . s:fg_olive
  1879. exec 'hi agitStatAdded' . s:fg_diffadd_fg
  1880. exec 'hi agitStatRemoved' . s:fg_diffdelete_fg
  1881. exec 'hi agitDiffAdd' . s:fg_diffadd_fg
  1882. exec 'hi agitDiffRemove' . s:fg_diffdelete_fg
  1883. exec 'hi agitDiffHeader' . s:fg_pink
  1884. exec 'hi agitDiff' . s:fg_foreground
  1885. exec 'hi agitDiffIndex' . s:fg_purple
  1886. exec 'hi agitDiffFileName' . s:fg_aqua
  1887. exec 'hi agitLog' . s:fg_foreground
  1888. exec 'hi agitAuthorMark' . s:fg_olive
  1889. exec 'hi agitDateMark' . s:fg_comment
  1890. exec 'hi agitHeaderLabel' . s:fg_aqua
  1891. exec 'hi agitDate' . s:fg_aqua
  1892. exec 'hi agitTree' . s:fg_pink
  1893. exec 'hi agitRef' . s:fg_blue . s:ft_bold
  1894. exec 'hi agitRemote' . s:fg_purple . s:ft_bold
  1895. exec 'hi agitTag' . s:fg_orange . s:ft_bold
  1896. " Plugin: Spell Checking
  1897. exec 'hi SpellBad' . s:fg_foreground . s:bg_spellbad
  1898. exec 'hi SpellCap' . s:fg_foreground . s:bg_spellcap
  1899. exec 'hi SpellRare' . s:fg_foreground . s:bg_spellrare
  1900. exec 'hi SpellLocal' . s:fg_foreground . s:bg_spelllocal
  1901. " Plugin: Indent Guides
  1902. exec 'hi IndentGuidesOdd' . s:bg_background
  1903. exec 'hi IndentGuidesEven' . s:bg_cursorline
  1904. " Plugin: Startify
  1905. exec 'hi StartifyFile' . s:fg_blue . s:ft_bold
  1906. exec 'hi StartifyNumber' . s:fg_orange
  1907. exec 'hi StartifyHeader' . s:fg_comment
  1908. exec 'hi StartifySection' . s:fg_pink
  1909. exec 'hi StartifyPath' . s:fg_foreground
  1910. exec 'hi StartifySlash' . s:fg_navy
  1911. exec 'hi StartifyBracket' . s:fg_aqua
  1912. exec 'hi StartifySpecial' . s:fg_aqua
  1913. " Git commit message
  1914. exec 'hi gitcommitSummary' . s:fg_blue
  1915. exec 'hi gitcommitHeader' . s:fg_green . s:ft_bold
  1916. exec 'hi gitcommitSelectedType' . s:fg_blue
  1917. exec 'hi gitcommitSelectedFile' . s:fg_pink
  1918. exec 'hi gitcommitUntrackedFile' . s:fg_diffdelete_fg
  1919. exec 'hi gitcommitBranch' . s:fg_aqua . s:ft_bold
  1920. exec 'hi gitcommitDiscardedType' . s:fg_diffdelete_fg
  1921. exec 'hi gitcommitDiff' . s:fg_comment
  1922. exec 'hi diffFile' . s:fg_blue
  1923. exec 'hi diffSubname' . s:fg_comment
  1924. exec 'hi diffIndexLine' . s:fg_comment
  1925. exec 'hi diffAdded' . s:fg_diffadd_fg
  1926. exec 'hi diffRemoved' . s:fg_diffdelete_fg
  1927. exec 'hi diffLine' . s:fg_orange
  1928. exec 'hi diffBDiffer' . s:fg_orange
  1929. exec 'hi diffNewFile' . s:fg_comment
  1930. endfun
  1931. " }}}
  1932. " ================================== MISC =====================================
  1933. " Command to show theme information {{{
  1934. fun! g:PaperColor()
  1935. echom 'PaperColor Theme Framework'
  1936. echom ' version ' . s:version
  1937. echom ' by Nikyle Nguyen et al.'
  1938. echom ' at https://github.com/NLKNguyen/papercolor-theme/'
  1939. echom ' '
  1940. echom 'Current theme: ' . s:theme_name
  1941. echom ' ' . s:selected_theme['description']
  1942. echom ' by ' . s:selected_theme['maintainer']
  1943. echom ' at ' . s:selected_theme['source']
  1944. " TODO: add diff display for theme color names between 'default' and current
  1945. " theme if it is a custom theme, i.e. child theme.
  1946. endfun
  1947. " @brief command alias for g:PaperColor()
  1948. command! -nargs=0 PaperColor :call g:PaperColor()
  1949. " }}}
  1950. " =============================== MAIN ========================================
  1951. hi clear
  1952. syntax reset
  1953. let g:colors_name = "PaperColor"
  1954. call s:acquire_theme_data()
  1955. call s:identify_color_mode()
  1956. call s:generate_theme_option_variables()
  1957. call s:generate_language_option_variables()
  1958. call s:set_format_attributes()
  1959. call s:set_overriding_colors()
  1960. call s:convert_colors()
  1961. call s:set_color_variables()
  1962. call s:apply_syntax_highlightings()
  1963. " =============================================================================
  1964. " Cheers!
  1965. " vim: fdm=marker ff=unix