pareto.vim 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. " pareto.vim -- Vim color scheme
  2. " Author: fcpg, from ewilazarus's work
  3. " Webpage: https://github.com/fcpg/vim-pareto
  4. " Description: Fork from github.com/ewilazarus/preto
  5. " Reset -------------------------------------------------------------------{{{1
  6. set background=dark
  7. highlight clear
  8. if exists("syntax_on")
  9. syntax reset
  10. endif
  11. let g:colors_name = "pareto"
  12. " Palette ---------------------------------------------------------------- {{{1
  13. let s:palette = {}
  14. let s:palette.black = [16 , "#000000"]
  15. let s:palette.gray01 = [232, "#080808"]
  16. let s:palette.gray02 = [233, "#121212"]
  17. let s:palette.gray03 = [234, "#1c1c1c"]
  18. let s:palette.gray04 = [235, "#262626"]
  19. let s:palette.gray05 = [236, "#303030"]
  20. let s:palette.gray06 = [237, "#3a3a3a"]
  21. let s:palette.gray07 = [238, "#444444"]
  22. let s:palette.gray08 = [239, "#4e4e4e"]
  23. let s:palette.gray09 = [240, "#585858"]
  24. let s:palette.gray10 = [241, "#606060"]
  25. let s:palette.gray11 = [242, "#666666"]
  26. let s:palette.gray12 = [243, "#767676"]
  27. let s:palette.gray13 = [244, "#808080"]
  28. let s:palette.gray14 = [245, "#8a8a8a"]
  29. let s:palette.gray15 = [246, "#949494"]
  30. let s:palette.gray16 = [247, "#9e9e9e"]
  31. let s:palette.gray17 = [248, "#a8a8a8"]
  32. let s:palette.gray18 = [249, "#b2b2b2"]
  33. let s:palette.gray19 = [250, "#bcbcbc"]
  34. let s:palette.gray20 = [251, "#c6c6c6"]
  35. let s:palette.gray21 = [252, "#d0d0d0"]
  36. let s:palette.gray22 = [253, "#dadada"]
  37. let s:palette.gray23 = [254, "#e4e4e4"]
  38. let s:palette.white = [255, "#eeeeee"]
  39. let s:palette.fullwhite = [255, "#ffffff"]
  40. " let s:palette.offwhite = [254, "#e8e1d6"]
  41. let s:palette.offwhite = [254, "#eeeeee"]
  42. let s:palette.darkred = [52 , "#5f0000"]
  43. " Utilities -------------------------------------------------------------- {{{1
  44. function! s:HL(item, fgColor, bgColor, style, ...)
  45. let undesirable_runtimes = a:000
  46. for runtime in undesirable_runtimes
  47. if has(runtime)
  48. return
  49. end
  50. endfor
  51. let target = 'cterm'
  52. let pindex = 0
  53. let has_tgc = (exists('+termguicolors') && &termguicolors)
  54. if has('gui_running') || has_tgc
  55. let target = 'gui'
  56. let pindex = 1
  57. end
  58. let command = 'hi ' . a:item
  59. let command .= ' ' . target . 'fg=' . a:fgColor[pindex]
  60. let command .= ' ' . target . 'bg=' . a:bgColor[pindex]
  61. let command .= ' ' . (has_tgc?'cterm':target) . '=' . a:style
  62. exe command
  63. endfun
  64. " Composition ------------------------------------------------------------ {{{1
  65. " PRIMITIVES
  66. call s:HL('Normal', s:palette.offwhite, s:palette.black, 'none')
  67. call s:HL('Boolean', s:palette.gray16, s:palette.black, 'none')
  68. call s:HL('Character', s:palette.gray16, s:palette.black, 'none')
  69. call s:HL('Constant', s:palette.gray16, s:palette.black, 'bold')
  70. call s:HL('Number', s:palette.gray16, s:palette.black, 'none')
  71. call s:HL('String', s:palette.gray18, s:palette.gray03, 'none')
  72. call s:HL('SpecialChar', s:palette.fullwhite, s:palette.gray01, 'none')
  73. " COMMENTS
  74. call s:HL('Comment', s:palette.gray12, s:palette.black, 'none')
  75. call s:HL('SpecialComment', s:palette.gray14, s:palette.black, 'none')
  76. call s:HL('Title', s:palette.fullwhite, s:palette.black, 'none')
  77. call s:HL('Todo', s:palette.fullwhite, s:palette.black, 'bold')
  78. " LINES, COLUMNS
  79. call s:HL('LineNr', s:palette.gray09, s:palette.black, 'none')
  80. call s:HL('CursorLine', s:palette.white, s:palette.gray03, 'none')
  81. call s:HL('CursorLineNr', s:palette.gray11, s:palette.black, 'none')
  82. call s:HL('ColorColumn', s:palette.white, s:palette.gray03, 'none')
  83. call s:HL('CursorColumn', s:palette.gray16, s:palette.gray03, 'none')
  84. " VISUAL MODE
  85. call s:HL('Visual', s:palette.fullwhite, s:palette.gray05, 'none')
  86. call s:HL('VisualNOS', s:palette.fullwhite, s:palette.gray05, 'none')
  87. " SEARCH
  88. call s:HL('Search', s:palette.black, s:palette.gray16, 'none')
  89. call s:HL('IncSearch', s:palette.white, s:palette.gray08, 'bold')
  90. " SPELLING
  91. call s:HL('SpellBad', s:palette.white, s:palette.gray03, 'bold')
  92. call s:HL('SpellCap', s:palette.white, s:palette.gray03, 'none')
  93. call s:HL('SpellLocal', s:palette.white, s:palette.gray03, 'none')
  94. call s:HL('SpellRare', s:palette.white, s:palette.gray03, 'none')
  95. " ERROR
  96. call s:HL('Error', s:palette.fullwhite, s:palette.gray03, 'bold')
  97. " COMMAND MODE MESSAGES
  98. call s:HL('ErrorMsg', s:palette.fullwhite, s:palette.gray03, 'bold')
  99. call s:HL('WarningMsg', s:palette.fullwhite, s:palette.black, 'none')
  100. call s:HL('ModeMsg', s:palette.white, s:palette.black, 'none')
  101. call s:HL('MoreMsg', s:palette.white, s:palette.black, 'none')
  102. " PREPROCESSOR DIRECTIVES
  103. call s:HL('PreProc', s:palette.white, s:palette.black, 'none')
  104. " BINDINGS
  105. call s:HL('Identifier', s:palette.fullwhite, s:palette.black, 'none')
  106. call s:HL('Function', s:palette.white, s:palette.black, 'none')
  107. call s:HL('Keyword', s:palette.gray16, s:palette.black, 'none')
  108. call s:HL('Operator', s:palette.gray21, s:palette.black, 'none')
  109. " TYPES
  110. call s:HL('Type', s:palette.white, s:palette.black, 'none')
  111. " FLOW CONTROL
  112. call s:HL('Statement', s:palette.white, s:palette.black, 'none')
  113. call s:HL('Label', s:palette.white, s:palette.black, 'none')
  114. " MISC
  115. call s:HL('Cursor', s:palette.white, s:palette.black, 'none', 'gui_macvim')
  116. call s:HL('Underlined', s:palette.gray16, s:palette.gray02, 'none')
  117. call s:HL('SpecialKey', s:palette.white, s:palette.black, 'bold')
  118. call s:HL('NonText', s:palette.darkred, s:palette.black, 'none')
  119. call s:HL('Directory', s:palette.fullwhite, s:palette.gray02, 'none')
  120. " FOLD
  121. call s:HL('FoldColumn', s:palette.gray10, s:palette.black, 'none')
  122. call s:HL('Folded', s:palette.gray10, s:palette.black, 'none')
  123. " SIGN
  124. call s:HL('SignColumn', s:palette.gray10, s:palette.black, 'none')
  125. " PARENTHESIS
  126. call s:HL('MatchParen', s:palette.fullwhite, s:palette.gray02, 'none')
  127. " POPUP
  128. call s:HL('Pmenu', s:palette.white, s:palette.gray09, 'none')
  129. call s:HL('PmenuSbar', s:palette.black, s:palette.gray19, 'none')
  130. call s:HL('PmenuSel', s:palette.black, s:palette.gray19, 'none')
  131. call s:HL('PmenuThumb', s:palette.gray01, s:palette.gray09, 'none')
  132. " SPLITS
  133. call s:HL('VertSplit', s:palette.gray10, s:palette.black, 'none')
  134. " OTHERS
  135. call s:HL('Debug', s:palette.white, s:palette.black, 'none')
  136. call s:HL('Delimiter', s:palette.white, s:palette.black, 'none')
  137. call s:HL('Question', s:palette.white, s:palette.black, 'none')
  138. call s:HL('Special', s:palette.white, s:palette.black, 'none')
  139. call s:HL('StatusLine', s:palette.white, s:palette.black, 'none', 'gui_macvim')
  140. call s:HL('StatusLineNC', s:palette.white, s:palette.black, 'none', 'gui_macvim')
  141. call s:HL('Tag', s:palette.white, s:palette.black, 'none')
  142. call s:HL('WildMenu', s:palette.white, s:palette.black, 'none')
  143. " DIFF
  144. call s:HL('DiffAdd', s:palette.fullwhite, s:palette.gray02, 'bold')
  145. call s:HL('DiffChange', s:palette.white, s:palette.black, 'none')
  146. call s:HL('DiffDelete', s:palette.gray10, s:palette.black, 'none')
  147. call s:HL('DiffText', s:palette.fullwhite, s:palette.gray04, 'bold')
  148. " TABLINE
  149. call s:HL('TabLine', s:palette.gray18, s:palette.gray03, 'none')
  150. call s:HL('TabLineFill', s:palette.white, s:palette.gray03, 'none')
  151. call s:HL('TabLineSel', s:palette.fullwhite, s:palette.gray02, 'none')
  152. " Links ------------------------------------------------------------------ {{{1
  153. hi! link Float Number
  154. hi! link Conditional Statement
  155. hi! link Repeat Statement
  156. hi! link Exception Statement
  157. hi! link Include PreProc
  158. hi! link Define PreProc
  159. hi! link Macro PreProc
  160. hi! link PreCondit PreProc
  161. hi! link StorageClass Type
  162. hi! link Structure Type
  163. hi! link Typedef Type
  164. hi! link StatusLineTerm StatusLine
  165. hi! link StatusLineTermNC StatusLineNC
  166. hi! link QuickFixLine Search
  167. hi! link VimFuncKey VimCommand
  168. hi! link VimSubstPat VimString
  169. hi! link htmlItalic Underlined
  170. hi! link qfLineNr Comment
  171. " Filetype Specific ------------------------------------------------------ {{{1
  172. " MARKDOWN
  173. call s:HL('markdownUrl', s:palette.gray11, s:palette.black, 'none')
  174. call s:HL('markdownCode', s:palette.gray14, s:palette.black, 'none')
  175. " Plugin Specific -------------------------------------------------------- {{{1