vim_hardaway.vim 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. " vim: fdm=marker
  2. "
  3. " Name: Vim Hardaway (Airline theme)
  4. " Author: Evan Turner <ev@evturn.com>
  5. " Maintainer: Evan Turner <ev@evturn.com>
  6. " Repository: https://github.com/evturn/vim-hardaway
  7. " Description: This color palette was based on a novel "Push" by Sapphire.
  8. " License: MIT
  9. " Last Updated: Nov 2018
  10. " Note: Very cool.
  11. " Color variables {{{
  12. " cterm
  13. let s:T000 = 0 " black
  14. let s:T011 = 11 " yellow
  15. let s:T014 = 14 " aqua
  16. let s:T015 = 15 " white
  17. let s:T049 = 49 " mediumspringgreen
  18. let s:T081 = 81 " steelblue1
  19. let s:T145 = 145 " grey69
  20. let s:T190 = 190 " yellow2
  21. let s:T196 = 196 " red1
  22. let s:T198 = 198 " deeppink1
  23. let s:T202 = 202 " orangered1
  24. let s:T233 = 233 " grey7
  25. let s:T235 = 235 " grey15
  26. let s:T236 = 236 " grey19
  27. let s:T234 = 234 " grey11
  28. let s:T237 = 237 " grey23
  29. let s:T240 = 240 " grey35
  30. " gui
  31. let s:G011 = "#ffff00" " yellow
  32. let s:G014 = "#00ffff" " aqua
  33. let s:G015 = "#ffffff" " white
  34. let s:G049 = "#00ffaf" " mediumspringgreen
  35. let s:G081 = "#5fd7ff" " steelblue1
  36. let s:G190 = "#d7ff00" " yellow2
  37. let s:G196 = "#ff0000" " red1
  38. let s:G198 = "#ff0087" " deeppink1
  39. let s:G202 = "#ff5f00" " orangered1
  40. let s:G233 = "#121212" " grey7
  41. let s:G234 = "#1C1C1C" " grey11
  42. let s:G235 = "#262626" " grey15
  43. let s:G236 = "#303030" " grey19
  44. let s:G237 = "#3A3A3A" " grey23
  45. let s:G240 = "#585858" " grey35
  46. " custom
  47. let s:G300 = "#101010" " black
  48. let s:G301 = "#abb2bf" " white
  49. let s:G302 = "#ffee00" " yellow
  50. let s:G303 = "#1a1a1a" " grey
  51. let s:G304 = "#282c34" " grey
  52. " }}}
  53. " Color maps {{{
  54. " Normal mode
  55. let s:N1 = [ s:G300, s:G049, s:T235, s:T049 ]
  56. let s:N2 = [ s:G301, s:G303, s:T015, s:T236 ]
  57. let s:N3 = [ s:G049, s:G304, s:T049, '' ]
  58. " Insert mode
  59. let s:I1 = [ s:G300, s:G302, s:T235, s:T011 ]
  60. let s:I2 = s:N2
  61. let s:I3 = s:N3
  62. " Replace mode
  63. let s:R1 = [ s:G300, s:G198, s:T000, s:T198 ]
  64. let s:R2 = s:N2
  65. let s:R3 = s:N3
  66. " Visual mode
  67. let s:V1 = [ s:G300, s:G081, s:T235, s:T081 ]
  68. let s:V2 = s:N2
  69. let s:V3 = s:N3
  70. " Inactive mode
  71. let s:IA1 = [ s:G240, s:G233, s:T240, s:T233 ]
  72. let s:IA2 = s:IA1
  73. let s:IA3 = s:IA1
  74. " }}}
  75. " Color palette {{{
  76. let g:airline#themes#vim_hardaway#palette = {}
  77. let g:airline#themes#vim_hardaway#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
  78. let g:airline#themes#vim_hardaway#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
  79. let g:airline#themes#vim_hardaway#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
  80. let g:airline#themes#vim_hardaway#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
  81. let g:airline#themes#vim_hardaway#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
  82. let group = airline#themes#get_highlight('vimCommand')
  83. let g:airline#themes#vim_hardaway#palette.normal_modified = { 'airline_c': [ group[0], '', group[2], '', '' ] }
  84. let g:airline#themes#vim_hardaway#palette.insert_modified = g:airline#themes#vim_hardaway#palette.normal_modified
  85. let g:airline#themes#vim_hardaway#palette.replace_modified = g:airline#themes#vim_hardaway#palette.normal_modified
  86. let g:airline#themes#vim_hardaway#palette.visual_modified = g:airline#themes#vim_hardaway#palette.normal_modified
  87. let g:airline#themes#vim_hardaway#palette.inactive_modified = { 'airline_c': [ group[0], '', group[2], '', '' ] }
  88. " Warning
  89. let s:WI = [ s:G233, s:G302, s:T233, s:T190 ]
  90. let g:airline#themes#vim_hardaway#palette.normal.airline_warning = [ s:WI[0], s:WI[1], s:WI[2], s:WI[3] ]
  91. let g:airline#themes#vim_hardaway#palette.normal_modified.airline_warning = g:airline#themes#vim_hardaway#palette.normal.airline_warning
  92. let g:airline#themes#vim_hardaway#palette.insert.airline_warning = g:airline#themes#vim_hardaway#palette.normal.airline_warning
  93. let g:airline#themes#vim_hardaway#palette.insert_modified.airline_warning = g:airline#themes#vim_hardaway#palette.normal.airline_warning
  94. let g:airline#themes#vim_hardaway#palette.visual.airline_warning = g:airline#themes#vim_hardaway#palette.normal.airline_warning
  95. let g:airline#themes#vim_hardaway#palette.visual_modified.airline_warning = g:airline#themes#vim_hardaway#palette.normal.airline_warning
  96. let g:airline#themes#vim_hardaway#palette.replace.airline_warning = g:airline#themes#vim_hardaway#palette.normal.airline_warning
  97. let g:airline#themes#vim_hardaway#palette.replace_modified.airline_warning = g:airline#themes#vim_hardaway#palette.normal.airline_warning
  98. " Error
  99. let s:ER = [ s:G190, s:G196, s:T190, s:T196 ]
  100. let g:airline#themes#vim_hardaway#palette.normal.airline_error = [ s:ER[0], s:ER[1], s:ER[2], s:ER[3] ]
  101. let g:airline#themes#vim_hardaway#palette.normal_modified.airline_error = g:airline#themes#vim_hardaway#palette.normal.airline_error
  102. let g:airline#themes#vim_hardaway#palette.insert.airline_error = g:airline#themes#vim_hardaway#palette.normal.airline_error
  103. let g:airline#themes#vim_hardaway#palette.insert_modified.airline_error = g:airline#themes#vim_hardaway#palette.normal.airline_error
  104. let g:airline#themes#vim_hardaway#palette.visual.airline_error = g:airline#themes#vim_hardaway#palette.normal.airline_error
  105. let g:airline#themes#vim_hardaway#palette.visual_modified.airline_error = g:airline#themes#vim_hardaway#palette.normal.airline_error
  106. let g:airline#themes#vim_hardaway#palette.replace.airline_error = g:airline#themes#vim_hardaway#palette.normal.airline_error
  107. let g:airline#themes#vim_hardaway#palette.replace_modified.airline_error = g:airline#themes#vim_hardaway#palette.normal.airline_error
  108. " Terminal
  109. let s:TE = [ s:G234 , s:G237 , s:T234 , s:T237 , '' ]
  110. let g:airline#themes#vim_hardaway#palette.normal.airline_term = [ s:TE[0], s:TE[1], s:TE[2], s:TE[3] ]
  111. let g:airline#themes#vim_hardaway#palette.insert.airline_term = g:airline#themes#vim_hardaway#palette.normal.airline_term
  112. let g:airline#themes#vim_hardaway#palette.visual.airline_term = g:airline#themes#vim_hardaway#palette.normal.airline_term
  113. let g:airline#themes#vim_hardaway#palette.replace.airline_term = g:airline#themes#vim_hardaway#palette.normal.airline_term
  114. let g:airline#themes#vim_hardaway#palette.accents = { 'red': [ s:G196, '', s:T196, 0 ] }
  115. " }}}