memorycolor.vim 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. " Supporting code -------------------------------------------------------------
  2. " Initialisation: {{{
  3. highlight clear
  4. if exists("syntax_on")
  5. syntax reset
  6. endif
  7. let g:colors_name='memorycolor'
  8. " }}}
  9. " Global Settigns: {{{
  10. let s:invert_tabline = 'inverse,'
  11. "}}}
  12. " Setup Emphasis: {{{
  13. let s:bold = 'bold,'
  14. let s:italic = 'italic,'
  15. let s:underline = 'underline,'
  16. let s:undercurl = 'undercurl,'
  17. let s:inverse = 'inverse,'
  18. " }}}
  19. " Setup Colors: {{{
  20. let s:vim_bg = ['bg', 'bg']
  21. let s:vim_fg = ['fg', 'fg']
  22. let s:none = ['NONE', 'NONE']
  23. let s:white = ['#f0f0f0', 234]
  24. let s:bright_gray = ['#c2b19d', 123]
  25. let s:gray = ['#6b8299', 123]
  26. let s:aqua = ['#00b3b3', 123]
  27. let s:blue = ['#66b2ff', 123]
  28. let s:green = ['#00e673', 123]
  29. let s:orange = ['#e6ac74', 234]
  30. let s:bright_pink = ['#ff6666', 234]
  31. let s:pink = ['#ff66ff', 234]
  32. let s:red = ['#e60073', 234]
  33. let s:violet = ['#b366ff', 234]
  34. let s:bright_yellow = ['#f0b16c', 234]
  35. let s:yellow = ['#e6e600', 234]
  36. let s:bg0 = ['#26394d', 123]
  37. let s:bg1 = ['#203040', 123]
  38. let s:bg2 = ['#152535', 123]
  39. let s:tab = ['#b05f5f', 123]
  40. let s:tab2 = ['#a75353', 123]
  41. let s:fg = s:orange
  42. "}}}
  43. " Highlighting Function: {{{
  44. function! s:HL(group, fg, ...)
  45. " Arguments: group, guifg, guibg, gui, guisp
  46. " foreground
  47. let fg = a:fg
  48. " background
  49. if a:0 >= 1
  50. let bg = a:1
  51. else
  52. let bg = s:none
  53. endif
  54. " emphasis
  55. if a:0 >= 2 && strlen(a:2)
  56. let emstr = a:2
  57. else
  58. let emstr = 'NONE,'
  59. endif
  60. " special fallback
  61. if a:0 >= 3
  62. if g:gruvbox_guisp_fallback != 'NONE'
  63. let fg = a:3
  64. endif
  65. " bg fallback mode should invert higlighting
  66. if g:gruvbox_guisp_fallback == 'bg'
  67. let emstr .= 'inverse,'
  68. endif
  69. endif
  70. let histring = [ 'hi', a:group,
  71. \ 'guifg=' . fg[0], 'ctermfg=' . fg[1],
  72. \ 'guibg=' . bg[0], 'ctermbg=' . bg[1],
  73. \ 'gui=' . emstr[:-2], 'cterm=' . emstr[:-2]
  74. \ ]
  75. " special
  76. if a:0 >= 3
  77. call add(histring, 'guisp=' . a:3[0])
  78. endif
  79. execute join(histring, ' ')
  80. endfunction
  81. " }}}
  82. " Common Hi Groups: {{{
  83. "}}}
  84. " Vanilla colorscheme ---------------------------------------------------------
  85. " General UI: {{{
  86. " Normal text
  87. call s:HL('Normal', s:fg, s:bg0)
  88. set background=dark
  89. " Screen line that the cursor is
  90. call s:HL('CursorLine', s:none, s:bg1)
  91. " Screen column that the cursor is
  92. hi! link CursorColumn CursorLine
  93. " Line number of CursorLine
  94. call s:HL('CursorLineNr', s:fg, s:bg2)
  95. " Highlighted screen columns
  96. call s:HL('ColorColumn', s:red, s:bg1)
  97. " Tab pages line filler
  98. call s:HL('TabLineFill', s:gray, s:bg1)
  99. " Not active tab page label
  100. hi! link TabLine TabLineFill
  101. " Active tab page label
  102. call s:HL('TabLineSel', s:fg, s:bg2)
  103. " Match paired bracket under the cursor
  104. call s:HL('MatchParen', s:none, s:bg1, s:bold)
  105. " Concealed element: \lambda → λ
  106. call s:HL('Conceal', s:yellow, s:none)
  107. call s:HL('NonText', s:none, s:bg0)
  108. " Type :set all to see some of them
  109. call s:HL('SpecialKey', s:white, s:none, s:bold)
  110. call s:HL('Visual', s:none, s:bg2)
  111. call s:HL('Search', s:bg2, s:yellow)
  112. call s:HL('IncSearch', s:bg2, s:blue)
  113. " TODO Don't understand, what it is
  114. call s:HL('Underlined', s:blue, s:none, s:underline)
  115. " The column separating vertically split windows
  116. call s:HL('VertSplit', s:gray, s:gray)
  117. call s:HL('StatusLine', s:none, s:bg2)
  118. call s:HL('StatusLineNC', s:none, s:yellow)
  119. " Current match in wildmenu completion
  120. call s:HL('WildMenu', s:none, s:bg2, s:inverse)
  121. " Directory names, special names in listing
  122. call s:HL('Directory', s:none, s:none, s:bold)
  123. " Titles for output from :set all, :autocmd, etc.
  124. call s:HL('Title', s:green, s:none, s:bold)
  125. " Error messages on the command line
  126. call s:HL('ErrorMsg', s:red, s:none, s:bold)
  127. " More prompt: -- More --
  128. call s:HL('MoreMsg', s:yellow, s:none, s:bold)
  129. " Current mode message: -- INSERT --
  130. call s:HL('ModeMsg', s:yellow, s:none, s:bold)
  131. " 'Press enter' prompt and yes/no questions
  132. call s:HL('Question', s:orange, s:none, s:bold)
  133. " Warning messages
  134. call s:HL('WarningMsg', s:red, s:none, s:bold)
  135. "}}}
  136. " Gutter: {{{
  137. " Line number for :number and :# commands
  138. call s:HL('LineNr', s:gray, s:bg2)
  139. " Column where signs are displayed
  140. call s:HL('SignColumn', s:none, s:bg2)
  141. " Line used for closed folds
  142. call s:HL('Folded', s:white, s:bg2, s:italic)
  143. " Column where folds are displayed
  144. call s:HL('FoldColumn', s:gray, s:bg2)
  145. "}}}
  146. " Cursor: {{{
  147. " Character under cursor
  148. call s:HL('Cursor', s:red, s:pink, s:inverse)
  149. " Visual mode cursor, selection
  150. hi! link vCursor Cursor
  151. " Input moder cursor
  152. hi! link iCursor Cursor
  153. " Language mapping cursor
  154. hi! link lCursor Cursor
  155. " }}}
  156. " Syntax Highlighting: {{{
  157. call s:HL('Comment', s:gray)
  158. call s:HL('String', s:green)
  159. call s:HL('Todo', s:bg1, s:orange)
  160. call s:HL('Function', s:violet)
  161. call s:HL('Number', s:red)
  162. call s:HL('Attribute', s:pink)
  163. call s:HL('Operator', s:white)
  164. "}}}
  165. " Completion Menu: {{{
  166. " Popup menu: normal item
  167. call s:HL('Pmenu', s:fg, s:bg0)
  168. " Popup menu: selected item
  169. call s:HL('PmenuSel', s:blue, s:bg2, s:bold)
  170. " Popup menu: scrollbar
  171. call s:HL('PmenuSbar', s:none, s:bg1)
  172. " Popup menu: scrollbar thumb
  173. call s:HL('PmenuThumb', s:none, s:bg2)
  174. " }}}
  175. " Diffs: {{{
  176. call s:HL('DiffDelete', s:red, s:bg0, s:inverse)
  177. call s:HL('DiffAdd', s:green, s:bg0, s:inverse)
  178. call s:HL('DiffChange', s:bg0, s:blue)
  179. call s:HL('DiffText', s:bg0, s:yellow)
  180. " Alternative setting
  181. "call s:HL('DiffChange', s:aqua, s:bg0, s:inverse)
  182. "call s:HL('DiffText', s:yellow, s:bg0, s:inverse)
  183. " }}}
  184. " Plugin specific -------------------------------------------------------------
  185. " GitGutter: {{{
  186. call s:HL('GitGutterAdd', s:green, s:bg2)
  187. call s:HL('GitGutterChange', s:aqua, s:bg2)
  188. call s:HL('GitGutterDelete', s:red, s:bg2)
  189. call s:HL('GitGutterChangeDelete', s:aqua, s:bg2)
  190. " }}}
  191. " NERDTree: {{{
  192. call s:HL('NERDTreeDir', s:none, s:bg0, s:bold)
  193. "call s:HL('NERDTreeSlash', s:blue, s:bg0, s:bold)
  194. call s:HL('NERDTreeOpenable', s:none, s:bg0, s:bold)
  195. call s:HL('NERDTreeClosable', s:blue, s:bg0, s:bold)
  196. call s:HL('NERDTreeFile', s:none, s:bg0)
  197. call s:HL('NERDTreeExecFile', s:yellow, s:bg0)
  198. call s:HL('NERDTreeUp', s:gray, s:bg0)
  199. call s:HL('NERDTreeCMD', s:green, s:bg0)
  200. call s:HL('NERDTreeHelp', s:none, s:bg0)
  201. call s:HL('NERDTreeToggleOn', s:green)
  202. call s:HL('NERDTreeToggleOff', s:red)
  203. " }}}
  204. " Filetype specific
  205. " Vim: {{{
  206. call s:HL('vimCommentTitle', s:blue, s:none, s:italic)
  207. call s:HL('vimHighlight', s:yellow)
  208. call s:HL('vimLet', s:yellow)
  209. call s:HL('vimCommand', s:yellow)
  210. call s:HL('vimHiGroup', s:orange)
  211. call s:HL('vimBracket', s:yellow)
  212. call s:HL('vimNotation', s:yellow)
  213. "}}}
  214. " Python: {{{
  215. call s:HL('pythonBuiltin', s:yellow)
  216. call s:HL('pythonInclude', s:yellow)
  217. call s:HL('pythonException', s:yellow)
  218. "hi! link pythonBuiltinObj GruvboxOrange
  219. "hi! link pythonBuiltinFunc GruvboxOrange
  220. "hi! link pythonDecorator GruvboxRed
  221. "hi! link pythonImport GruvboxBlue
  222. "hi! link pythonRun GruvboxBlue
  223. "hi! link pythonCoding GruvboxBlue
  224. "hi! link pythonOperator GruvboxRed
  225. "hi! link pythonException GruvboxRed
  226. "hi! link pythonExceptions GruvboxPurple
  227. "hi! link pythonBoolean GruvboxPurple
  228. "hi! link pythonDot GruvboxFg3
  229. "hi! link pythonConditional GruvboxRed
  230. "hi! link pythonRepeat GruvboxRed
  231. "hi! link pythonDottedName GruvboxGreenBold
  232. "}}}
  233. " vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker: