gruvbox.vim 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. " -----------------------------------------------------------------------------
  2. " File: gruvbox.vim
  3. " Description: Retro groove color scheme for Vim
  4. " Author: morhetz <morhetz@gmail.com>
  5. " Source: https://github.com/morhetz/gruvbox
  6. " Last Modified: 16 Dec 2013
  7. " -----------------------------------------------------------------------------
  8. " Supporting code -------------------------------------------------------------
  9. " Initialisation: {{{
  10. if version > 580
  11. hi clear
  12. if exists("syntax_on")
  13. syntax reset
  14. endif
  15. endif
  16. let g:colors_name='gruvbox'
  17. if !has('gui_running') && &t_Co != 256
  18. finish
  19. endif
  20. " }}}
  21. " Global settings: {{{
  22. if !exists('g:gruvbox_bold')
  23. let g:gruvbox_bold=1
  24. endif
  25. if !exists('g:gruvbox_italic')
  26. let g:gruvbox_italic=1
  27. endif
  28. if !exists('g:gruvbox_undercurl')
  29. let g:gruvbox_undercurl=1
  30. endif
  31. if !exists('g:gruvbox_underline')
  32. let g:gruvbox_underline=1
  33. endif
  34. if !exists('g:gruvbox_italicize_comments')
  35. let g:gruvbox_italicize_comments=1
  36. endif
  37. if !exists('g:gruvbox_italicize_strings')
  38. let g:gruvbox_italicize_strings=0
  39. endif
  40. if !exists('g:gruvbox_termcolors')
  41. let g:gruvbox_termcolors=256
  42. endif
  43. if !exists('g:gruvbox_invert_indent_guides')
  44. let g:gruvbox_invert_indent_guides=0
  45. endif
  46. if !exists('g:gruvbox_hls_cursor')
  47. let g:gruvbox_hls_cursor='orange'
  48. endif
  49. if !exists('g:gruvbox_sign_column')
  50. let g:gruvbox_sign_column='dark1'
  51. endif
  52. if !exists('g:gruvbox_invert_signs')
  53. let g:gruvbox_invert_signs=0
  54. endif
  55. if !exists('g:gruvbox_invert_selection')
  56. let g:gruvbox_invert_selection=1
  57. endif
  58. if !exists('g:gruvbox_contrast')
  59. let g:gruvbox_contrast='medium'
  60. endif
  61. let s:is_dark=(&background == 'dark')
  62. " }}}
  63. " Palette: {{{
  64. let s:gb = {}
  65. if s:is_dark
  66. let s:gb.dark0 = ['282828', 235] " 40-40-40
  67. let s:gb.dark1 = ['3c3836', 237] " 60-56-54
  68. let s:gb.dark2 = ['504945', 239] " 80-73-69
  69. let s:gb.dark3 = ['665c54', 241] " 102-92-84
  70. let s:gb.dark4 = ['7c6f64', 243] " 124-111-100
  71. let s:gb.medium = ['928374', 245] " 146-131-116
  72. let s:gb.light0 = ['fdf4c1', 229] " 253-244-193
  73. let s:gb.light1 = ['ebdbb2', 223] " 235-219-178
  74. let s:gb.light2 = ['d5c4a1', 250] " 213-196-161
  75. let s:gb.light3 = ['bdae93', 248] " 189-174-147
  76. let s:gb.light4 = ['a89984', 246] " 168-153-132
  77. let s:gb.light4_256 = ['a89984', 246] " 168-153-132
  78. let s:gb.red = ['fb4934', 167] " 251-73-52
  79. let s:gb.green = ['b8bb26', 142] " 184-187-38
  80. let s:gb.yellow = ['fabd2f', 214] " 250-189-47
  81. let s:gb.blue = ['83a598', 109] " 131-165-152
  82. let s:gb.purple = ['d3869b', 175] " 211-134-155
  83. let s:gb.aqua = ['8ec07c', 108] " 142-192-124
  84. let s:gb.orange = ['fe8019', 208] " 254-128-25
  85. if g:gruvbox_termcolors == 16
  86. let s:gb.dark0 = ['282828', 0]
  87. let s:gb.light4 = ['a89984', 7]
  88. let s:gb.medium = ['928374', 8]
  89. let s:gb.red = ['fb4934', 9]
  90. let s:gb.green = ['b8bb26', 10]
  91. let s:gb.yellow = ['fabd2f', 11]
  92. let s:gb.blue = ['83a598', 12]
  93. let s:gb.purple = ['d3869b', 13]
  94. let s:gb.aqua = ['8ec07c', 14]
  95. let s:gb.light1 = ['ebdbb2', 15]
  96. endif
  97. if g:gruvbox_contrast == 'soft'
  98. let s:gb.dark0 = ['32302f', 236] " 50-48-47
  99. endif
  100. if g:gruvbox_contrast == 'hard'
  101. let s:gb.dark0 = ['1d2021', 234] " 29-32-33
  102. endif
  103. else
  104. let s:gb.dark0 = ['fdf4c1', 229] " 253-244-193
  105. let s:gb.dark1 = ['ebdbb2', 223] " 235-219-178
  106. let s:gb.dark2 = ['d5c4a1', 250] " 213-196-161
  107. let s:gb.dark3 = ['bdae93', 248] " 189-174-147
  108. let s:gb.dark4 = ['a89984', 246] " 168-153-132
  109. let s:gb.medium = ['928374', 244] " 146-131-116
  110. let s:gb.light0 = ['282828', 235] " 40-40-40
  111. let s:gb.light1 = ['3c3836', 237] " 60-56-54
  112. let s:gb.light2 = ['504945', 239] " 80-73-69
  113. let s:gb.light3 = ['665c54', 241] " 102-92-84
  114. let s:gb.light4 = ['7c6f64', 243] " 124-111-100
  115. let s:gb.light4_256 = ['7c6f64', 243] " 124-111-100
  116. let s:gb.red = ['9d0006', 88] " 157-0-6
  117. let s:gb.green = ['79740e', 100] " 121-116-14
  118. let s:gb.yellow = ['b57614', 136] " 181-118-20
  119. let s:gb.blue = ['076678', 24] " 7-102-120
  120. let s:gb.purple = ['8f3f71', 96] " 143-63-113
  121. let s:gb.aqua = ['427b58', 66] " 66-123-88
  122. let s:gb.orange = ['af3a03', 130] " 175-58-3
  123. if g:gruvbox_termcolors == 16
  124. let s:gb.dark0 = ['fdf4c1', 0]
  125. let s:gb.light4 = ['7c6f64', 7]
  126. let s:gb.medium = ['928374', 8]
  127. let s:gb.red = ['9d0006', 9]
  128. let s:gb.green = ['79740e', 10]
  129. let s:gb.yellow = ['b57614', 11]
  130. let s:gb.blue = ['076678', 12]
  131. let s:gb.purple = ['8f3f71', 13]
  132. let s:gb.aqua = ['427b58', 14]
  133. let s:gb.light1 = ['3c3836', 15]
  134. endif
  135. if g:gruvbox_contrast == 'soft'
  136. let s:gb.dark0 = ['f4e8ba', 228] " 244-232-186
  137. endif
  138. if g:gruvbox_contrast == 'hard'
  139. let s:gb.dark0 = ['ffffc8', 230] " 255-255-200
  140. endif
  141. endif
  142. " }}}
  143. " Highlighting Function: {{{
  144. function! s:HL(group, fg, ...)
  145. " Arguments: group, guifg, guibg, gui, guisp
  146. let histring = 'hi ' . a:group . ' '
  147. if strlen(a:fg)
  148. if a:fg == 'fg'
  149. let histring .= 'guifg=fg ctermfg=fg '
  150. elseif a:fg == 'bg'
  151. let histring .= 'guifg=bg ctermfg=bg '
  152. elseif a:fg == 'none'
  153. let histring .= 'guifg=NONE ctermfg=NONE '
  154. else
  155. let c = get(s:gb, a:fg)
  156. let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
  157. endif
  158. endif
  159. if a:0 >= 1 && strlen(a:1)
  160. if a:1 == 'bg'
  161. let histring .= 'guibg=bg ctermbg=bg '
  162. elseif a:fg == 'fg'
  163. let histring .= 'guibg=fg ctermbg=fg '
  164. elseif a:1 == 'none'
  165. let histring .= 'guibg=NONE ctermbg=NONE '
  166. else
  167. let c = get(s:gb, a:1)
  168. let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
  169. endif
  170. else
  171. let histring .= 'guibg=NONE ctermbg=NONE '
  172. endif
  173. if a:0 >= 2 && strlen(a:2)
  174. if a:2 == 'none'
  175. let histring .= 'gui=NONE cterm=NONE '
  176. elseif a:2 == 'italic' && g:gruvbox_italic == 0
  177. let histring .= 'gui=NONE cterm=NONE '
  178. elseif a:2 == 'bold' && g:gruvbox_bold == 0
  179. let histring .= 'gui=NONE cterm=NONE '
  180. elseif a:2 == 'bold,inverse' && g:gruvbox_bold == 0
  181. let histring .= 'gui=inverse cterm=inverse '
  182. elseif a:2 == 'undercurl' && g:gruvbox_undercurl == 0
  183. let histring .= 'gui=NONE cterm=NONE '
  184. elseif a:2 == 'underline' && g:gruvbox_underline == 0
  185. let histring .= 'gui=NONE cterm=NONE '
  186. elseif a:2 == 'bold,italic'
  187. if g:gruvbox_italic == 0 && g:gruvbox_bold == 0
  188. let histring .= 'gui=NONE cterm=NONE '
  189. elseif g:gruvbox_italic == 0
  190. let histring .= 'gui=bold cterm=bold '
  191. elseif g:gruvbox_bold == 0
  192. let histring .= 'gui=italic cterm=italic '
  193. else
  194. let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
  195. endif
  196. else
  197. let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
  198. endif
  199. else
  200. let histring .= 'gui=NONE cterm=NONE '
  201. endif
  202. if a:0 >= 3 && strlen(a:3)
  203. if a:3 == 'none'
  204. let histring .= 'guisp=NONE '
  205. else
  206. let c = get(s:gb, a:3)
  207. let histring .= 'guisp=#' . c[0] . ' '
  208. endif
  209. endif
  210. execute histring
  211. endfunction
  212. " }}}
  213. " Vanilla colorscheme ---------------------------------------------------------
  214. " General UI: {{{
  215. " Normal text
  216. call s:HL('Normal', 'light1', 'dark0')
  217. " Correct background (see issue #7):
  218. " --- Problem with changing between dark and light on 256 color terminal
  219. " --- https://github.com/morhetz/gruvbox/issues/7
  220. if s:is_dark
  221. set background=dark
  222. else
  223. set background=light
  224. endif
  225. if version >= 700
  226. " Screen line that the cursor is
  227. call s:HL('CursorLine', 'none', 'dark1')
  228. " Screen column that the cursor is
  229. call s:HL('CursorColumn', 'none', 'dark1')
  230. " Tab pages line filler
  231. call s:HL('TabLineFill', 'dark4', 'bg')
  232. " Active tab page label
  233. call s:HL('TabLineSel', 'bg', 'dark4', 'bold')
  234. " Not active tab page label
  235. call s:HL('TabLine', 'dark4', 'bg')
  236. " Match paired bracket under the cursor
  237. call s:HL('MatchParen', 'none', 'dark3', 'bold')
  238. endif
  239. if version >= 703
  240. " Highlighted screen columns
  241. call s:HL('ColorColumn', 'none', 'dark1')
  242. " Concealed element: \lambda → λ
  243. call s:HL('Conceal', 'blue', 'none')
  244. " Line number of CursorLine
  245. call s:HL('CursorLineNr', 'yellow', 'dark1')
  246. endif
  247. call s:HL('NonText', 'dark2')
  248. call s:HL('SpecialKey', 'dark2')
  249. if g:gruvbox_invert_selection == 0
  250. call s:HL('Visual', 'none', 'dark2')
  251. call s:HL('VisualNOS', 'none', 'dark2')
  252. else
  253. call s:HL('Visual', 'none', 'dark3', 'inverse')
  254. call s:HL('VisualNOS', 'none', 'dark3', 'inverse')
  255. endif
  256. call s:HL('Search', 'dark0', 'yellow')
  257. call s:HL('IncSearch', 'dark0', g:gruvbox_hls_cursor)
  258. call s:HL('Underlined', 'blue', 'none', 'underline')
  259. call s:HL('StatusLine', 'dark4', 'dark0', 'bold,inverse')
  260. call s:HL('StatusLineNC', 'dark2', 'light4', 'bold,inverse')
  261. " The column separating vertically split windows
  262. call s:HL('VertSplit', 'light4', 'dark2')
  263. " Current match in wildmenu completion
  264. call s:HL('WildMenu', 'blue', 'dark2', 'bold')
  265. " Directory names, special names in listing
  266. call s:HL('Directory', 'green', 'none', 'bold')
  267. " Titles for output from :set all, :autocmd, etc.
  268. call s:HL('Title', 'green', 'none', 'bold')
  269. " Error messages on the command line
  270. call s:HL('ErrorMsg', 'bg', 'red', 'bold')
  271. " More prompt: -- More --
  272. call s:HL('MoreMsg', 'yellow', 'none', 'bold')
  273. " Current mode message: -- INSERT --
  274. call s:HL('ModeMsg', 'yellow', 'none', 'bold')
  275. " 'Press enter' prompt and yes/no questions
  276. call s:HL('Question', 'orange', 'none', 'bold')
  277. " Warning messages
  278. call s:HL('WarningMsg', 'red', 'none', 'bold')
  279. " }}}
  280. " Gutter: {{{
  281. " Line number for :number and :# commands
  282. call s:HL('LineNr', 'dark4')
  283. " Column where signs are displayed
  284. call s:HL('SignColumn', 'none', g:gruvbox_sign_column)
  285. " Line used for closed folds
  286. call s:HL('Folded', 'medium', 'dark1', 'italic')
  287. " Column where folds are displayed
  288. call s:HL('FoldColumn', 'medium', 'dark1')
  289. " }}}
  290. " Cursor: {{{
  291. " Character under cursor
  292. call s:HL('Cursor', 'none', 'none', 'inverse')
  293. " Visual mode cursor, selection
  294. call s:HL('vCursor', 'none', 'none', 'inverse')
  295. " Input moder cursor
  296. call s:HL('iCursor', 'none', 'none', 'inverse')
  297. " Language mapping cursor
  298. call s:HL('lCursor', 'none', 'none', 'inverse')
  299. " }}}
  300. " Syntax Highlighting: {{{
  301. call s:HL('Special', 'orange')
  302. if g:gruvbox_italicize_comments == 0
  303. call s:HL('Comment', 'medium', 'none')
  304. else
  305. call s:HL('Comment', 'medium', 'none', 'italic')
  306. endif
  307. call s:HL('Todo', 'fg', 'bg', 'bold')
  308. call s:HL('Error', 'bg', 'red', 'bold')
  309. " Generic statement
  310. call s:HL('Statement', 'red')
  311. " if, then, else, endif, swicth, etc.
  312. call s:HL('Conditional', 'red')
  313. " for, do, while, etc.
  314. call s:HL('Repeat', 'red')
  315. " case, default, etc.
  316. call s:HL('Label', 'red')
  317. " try, catch, throw
  318. call s:HL('Exception', 'red')
  319. " sizeof, "+", "*", etc.
  320. hi! link Operator Normal
  321. " Any other keyword
  322. call s:HL('Keyword', 'red')
  323. " Variable name
  324. call s:HL('Identifier', 'blue')
  325. " Function name
  326. call s:HL('Function', 'green', 'none', 'bold')
  327. " Generic preprocessor
  328. call s:HL('PreProc', 'aqua')
  329. " Preprocessor #include
  330. call s:HL('Include', 'aqua')
  331. " Preprocessor #define
  332. call s:HL('Define', 'aqua')
  333. " Same as Define
  334. call s:HL('Macro', 'aqua')
  335. " Preprocessor #if, #else, #endif, etc.
  336. call s:HL('PreCondit', 'aqua')
  337. " Generic constant
  338. call s:HL('Constant', 'purple')
  339. " Character constant: 'c', '/n'
  340. call s:HL('Character', 'purple')
  341. " String constant: "this is a string"
  342. if g:gruvbox_italicize_strings == 0
  343. call s:HL('String', 'green')
  344. else
  345. call s:HL('String', 'green', 'none', 'italic')
  346. endif
  347. " Boolean constant: TRUE, false
  348. call s:HL('Boolean', 'purple')
  349. " Number constant: 234, 0xff
  350. call s:HL('Number', 'purple')
  351. " Floating point constant: 2.3e10
  352. call s:HL('Float', 'purple')
  353. " Generic type
  354. call s:HL('Type', 'yellow')
  355. " static, register, volatile, etc
  356. call s:HL('StorageClass', 'orange')
  357. " struct, union, enum, etc.
  358. call s:HL('Structure', 'aqua')
  359. " typedef
  360. call s:HL('Typedef', 'yellow')
  361. " }}}
  362. " Completion Menu: {{{
  363. if version >= 700
  364. " Popup menu: normal item
  365. call s:HL('Pmenu', 'light1', 'dark2')
  366. " Popup menu: selected item
  367. call s:HL('PmenuSel', 'dark2', 'blue', 'bold')
  368. " Popup menu: scrollbar
  369. call s:HL('PmenuSbar', 'none', 'dark2')
  370. " Popup menu: scrollbar thumb
  371. call s:HL('PmenuThumb', 'none', 'dark4')
  372. endif
  373. " }}}
  374. " Diffs: {{{
  375. call s:HL('DiffDelete', 'dark0', 'red')
  376. call s:HL('DiffAdd', 'dark0', 'green')
  377. "call s:HL('DiffChange', 'dark0', 'blue')
  378. "call s:HL('DiffText', 'dark0', 'yellow')
  379. " Alternative setting
  380. call s:HL('DiffChange', 'dark0', 'aqua')
  381. call s:HL('DiffText', 'dark0', 'yellow')
  382. " }}}
  383. " Spelling: {{{
  384. if has("spell")
  385. " Not capitalised word
  386. call s:HL('SpellCap', 'none', 'none', 'undercurl', 'red')
  387. " Not recognized word
  388. call s:HL('SpellBad', 'none', 'none', 'undercurl', 'blue')
  389. " Wrong spelling for selected region
  390. call s:HL('SpellLocal', 'none', 'none', 'undercurl', 'aqua')
  391. " Rare word
  392. call s:HL('SpellRare', 'none', 'none', 'undercurl', 'purple')
  393. endif
  394. " }}}
  395. " Plugin specific -------------------------------------------------------------
  396. " EasyMotion: {{{
  397. hi! link EasyMotionTarget Search
  398. hi! link EasyMotionShade Comment
  399. " }}}
  400. " Sneak: {{{
  401. hi! link SneakPluginTarget Search
  402. hi! link SneakStreakTarget Search
  403. call s:HL('SneakStreakMask', 'yellow', 'yellow')
  404. hi! link SneakStreakStatusLine Search
  405. " }}}
  406. " Indent Guides: {{{
  407. let g:indent_guides_auto_colors = 0
  408. if g:gruvbox_invert_indent_guides == 0
  409. call s:HL('IndentGuidesOdd', 'bg', 'dark2')
  410. call s:HL('IndentGuidesEven', 'bg', 'dark1')
  411. else
  412. call s:HL('IndentGuidesOdd', 'bg', 'dark2', 'inverse')
  413. call s:HL('IndentGuidesEven', 'bg', 'dark3', 'inverse')
  414. endif
  415. " }}}
  416. " IndentLine: {{{
  417. let g:indentLine_color_term = s:gb.dark2[1]
  418. let g:indentLine_color_gui = '#' . s:gb.dark2[0]
  419. " }}}
  420. " Rainbow Parentheses: {{{
  421. let g:rbpt_colorpairs = [
  422. \ ['brown', '#458588'], ['Darkblue', '#b16286'],
  423. \ ['darkgray', '#cc241d'], ['darkgreen', '#d65d0e'],
  424. \ ['darkcyan', '#458588'], ['darkred', '#b16286'],
  425. \ ['darkmagenta', '#cc241d'], ['brown', '#d65d0e'],
  426. \ ['gray', '#458588'], ['black', '#b16286'],
  427. \ ['darkmagenta', '#cc241d'], ['Darkblue', '#d65d0e'],
  428. \ ['darkgreen', '#458588'], ['darkcyan', '#b16286'],
  429. \ ['darkred', '#cc241d'], ['red', '#d65d0e'],
  430. \ ]
  431. let g:rainbow_guifgs = [
  432. \ '#458588', '#b16286', '#cc241d', '#d65d0e',
  433. \ '#458588', '#b16286', '#cc241d', '#d65d0e',
  434. \ '#458588', '#b16286', '#cc241d', '#d65d0e',
  435. \ '#458588', '#b16286', '#cc241d', '#d65d0e',
  436. \ ]
  437. let g:rainbow_ctermfgs = [
  438. \ 'brown', 'Darkblue', 'darkgray', 'darkgreen',
  439. \ 'darkcyan', 'darkred', 'darkmagenta', 'brown',
  440. \ 'gray', 'black', 'darkmagenta', 'Darkblue',
  441. \ 'darkgreen', 'darkcyan', 'darkred', 'red',
  442. \ ]
  443. "}}}
  444. " Airline: {{{
  445. if !exists('g:airline_theme_map')
  446. let g:airline_theme_map = { 'gruvbox.*': 'tomorrow' }
  447. else
  448. let g:airline_theme_map['gruvbox.*'] = 'tomorrow'
  449. endif
  450. " }}}
  451. " GitGutter: {{{
  452. if g:gruvbox_invert_signs == 0
  453. call s:HL('GitGutterAdd', 'green', g:gruvbox_sign_column)
  454. call s:HL('GitGutterChange', 'aqua', g:gruvbox_sign_column)
  455. call s:HL('GitGutterDelete', 'red', g:gruvbox_sign_column)
  456. call s:HL('GitGutterChangeDelete', 'aqua', g:gruvbox_sign_column)
  457. else
  458. call s:HL('GitGutterAdd', 'green', g:gruvbox_sign_column, 'inverse')
  459. call s:HL('GitGutterChange', 'aqua', g:gruvbox_sign_column, 'inverse')
  460. call s:HL('GitGutterDelete', 'red', g:gruvbox_sign_column, 'inverse')
  461. call s:HL('GitGutterChangeDelete', 'aqua', g:gruvbox_sign_column, 'inverse')
  462. endif
  463. " }}}
  464. " Signify: {{{
  465. if g:gruvbox_invert_signs == 0
  466. call s:HL('SignifySignAdd', 'green', g:gruvbox_sign_column)
  467. call s:HL('SignifySignChange ', 'aqua', g:gruvbox_sign_column)
  468. call s:HL('SignifySignDelete', 'red', g:gruvbox_sign_column)
  469. else
  470. call s:HL('SignifySignAdd', 'green', g:gruvbox_sign_column, 'inverse')
  471. call s:HL('SignifySignChange ', 'aqua', g:gruvbox_sign_column, 'inverse')
  472. call s:HL('SignifySignDelete', 'red', g:gruvbox_sign_column, 'inverse')
  473. endif
  474. " }}}
  475. " Syntastic: {{{
  476. call s:HL('SyntasticError', 'none', 'none', 'undercurl', 'red')
  477. call s:HL('SyntasticWarning', 'none', 'none', 'undercurl', 'yellow')
  478. if g:gruvbox_invert_signs == 0
  479. call s:HL('SyntasticErrorSign', 'red', g:gruvbox_sign_column)
  480. call s:HL('SyntasticWarningSign', 'yellow', g:gruvbox_sign_column)
  481. else
  482. call s:HL('SyntasticErrorSign', 'red', g:gruvbox_sign_column, 'inverse')
  483. call s:HL('SyntasticWarningSign', 'yellow', g:gruvbox_sign_column, 'inverse')
  484. endif
  485. " }}}
  486. " Signature: {{{
  487. if g:gruvbox_invert_signs == 0
  488. call s:HL('SignatureMarkerText', 'purple', g:gruvbox_sign_column)
  489. call s:HL('SignatureMarkText', 'blue', g:gruvbox_sign_column)
  490. else
  491. call s:HL('SignatureMarkerText', 'purple', g:gruvbox_sign_column, 'inverse')
  492. call s:HL('SignatureMarkText', 'blue', g:gruvbox_sign_column, 'inverse')
  493. endif
  494. let g:SignatureMarkerTextHL='SignatureMarkerText'
  495. let g:SignatureMarkTextHL='SignatureMarkText'
  496. " }}}
  497. " ShowMarks: {{{
  498. if g:gruvbox_invert_signs == 0
  499. call s:HL('ShowMarksHLl', 'blue', g:gruvbox_sign_column)
  500. call s:HL('ShowMarksHLu', 'blue', g:gruvbox_sign_column)
  501. call s:HL('ShowMarksHLo', 'blue', g:gruvbox_sign_column)
  502. call s:HL('ShowMarksHLm', 'blue', g:gruvbox_sign_column)
  503. else
  504. call s:HL('ShowMarksHLl', 'blue', g:gruvbox_sign_column, 'inverse')
  505. call s:HL('ShowMarksHLu', 'blue', g:gruvbox_sign_column, 'inverse')
  506. call s:HL('ShowMarksHLo', 'blue', g:gruvbox_sign_column, 'inverse')
  507. call s:HL('ShowMarksHLm', 'blue', g:gruvbox_sign_column, 'inverse')
  508. endif
  509. " }}}
  510. " Filetype specific -----------------------------------------------------------
  511. " Diff: {{{
  512. call s:HL('diffAdded', 'green')
  513. call s:HL('diffRemoved', 'red')
  514. call s:HL('diffChanged', 'aqua')
  515. call s:HL('diffFile', 'orange')
  516. call s:HL('diffNewFile', 'yellow')
  517. call s:HL('diffLine', 'blue')
  518. " }}}
  519. " Html: {{{
  520. call s:HL('htmlTag', 'blue')
  521. call s:HL('htmlEndTag', 'blue')
  522. call s:HL('htmlTagName', 'aqua', 'none', 'bold')
  523. call s:HL('htmlArg', 'aqua')
  524. call s:HL('htmlScriptTag', 'purple')
  525. call s:HL('htmlTagN', 'light1')
  526. call s:HL('htmlSpecialTagName', 'aqua', 'none', 'bold')
  527. call s:HL('htmlLink', 'light4', 'none', 'underline')
  528. call s:HL('htmlSpecialChar', 'orange')
  529. " }}}
  530. " Vim: {{{
  531. if g:gruvbox_italicize_comments == 0
  532. call s:HL('vimCommentTitle', 'light4_256', 'none', 'bold')
  533. else
  534. call s:HL('vimCommentTitle', 'light4_256', 'none', 'bold,italic')
  535. endif
  536. " }}}
  537. " Clojure: {{{
  538. call s:HL('clojureKeyword', 'blue')
  539. call s:HL('clojureCond', 'orange')
  540. call s:HL('clojureSpecial', 'orange')
  541. call s:HL('clojureDefine', 'orange')
  542. call s:HL('clojureFunc', 'yellow')
  543. call s:HL('clojureRepeat', 'yellow')
  544. call s:HL('clojureCharacter', 'aqua')
  545. call s:HL('clojureStringEscape', 'aqua')
  546. call s:HL('clojureException', 'red')
  547. call s:HL('clojureRegexp', 'aqua')
  548. call s:HL('clojureRegexpEscape', 'aqua')
  549. call s:HL('clojureRegexpCharClass', 'light3', 'none', 'bold')
  550. call s:HL('clojureRegexpMod', 'light3', 'none', 'bold')
  551. call s:HL('clojureRegexpQuantifier', 'light3', 'none', 'bold')
  552. call s:HL('clojureParen', 'light3')
  553. call s:HL('clojureAnonArg', 'yellow')
  554. call s:HL('clojureVariable', 'blue')
  555. call s:HL('clojureMacro', 'orange')
  556. call s:HL('clojureMeta', 'yellow')
  557. call s:HL('clojureDeref', 'yellow')
  558. call s:HL('clojureQuote', 'yellow')
  559. call s:HL('clojureUnquote', 'yellow')
  560. " }}}
  561. " C: {{{
  562. call s:HL('cOperator', 'purple')
  563. call s:HL('cStructure', 'orange')
  564. " }}}
  565. " Python: {{{
  566. call s:HL('pythonBuiltin', 'orange')
  567. call s:HL('pythonBuiltinObj', 'orange')
  568. call s:HL('pythonBuiltinFunc', 'orange')
  569. call s:HL('pythonFunction', 'aqua')
  570. call s:HL('pythonDecorator', 'red')
  571. call s:HL('pythonInclude', 'blue')
  572. call s:HL('pythonImport', 'blue')
  573. call s:HL('pythonRun', 'blue')
  574. call s:HL('pythonCoding', 'blue')
  575. call s:HL('pythonOperator', 'red')
  576. call s:HL('pythonExceptions', 'purple')
  577. call s:HL('pythonBoolean', 'purple')
  578. call s:HL('pythonDot', 'orange')
  579. " }}}
  580. " CSS: {{{
  581. call s:HL('cssBraces', 'blue')
  582. call s:HL('cssFunctionName', 'yellow')
  583. call s:HL('cssIdentifier', 'orange')
  584. call s:HL('cssClassName', 'green')
  585. call s:HL('cssColor', 'blue')
  586. call s:HL('cssSelectorOp', 'blue')
  587. call s:HL('cssSelectorOp2', 'blue')
  588. call s:HL('cssImportant', 'green')
  589. call s:HL('cssTextProp', 'aqua')
  590. call s:HL('cssAnimationProp', 'aqua')
  591. call s:HL('cssUIProp', 'yellow')
  592. call s:HL('cssTransformProp', 'aqua')
  593. call s:HL('cssTransitionProp', 'aqua')
  594. call s:HL('cssPrintProp', 'aqua')
  595. call s:HL('cssPositioningProp', 'yellow')
  596. call s:HL('cssBoxProp', 'aqua')
  597. call s:HL('cssFontDescriptorProp', 'aqua')
  598. call s:HL('cssFlexibleBoxProp', 'aqua')
  599. call s:HL('cssBorderOutlineProp', 'aqua')
  600. call s:HL('cssBackgroundProp', 'aqua')
  601. call s:HL('cssMarginProp', 'aqua')
  602. call s:HL('cssListProp', 'aqua')
  603. call s:HL('cssTableProp', 'aqua')
  604. call s:HL('cssFontProp', 'aqua')
  605. call s:HL('cssPaddingProp', 'aqua')
  606. call s:HL('cssDimensionProp', 'aqua')
  607. call s:HL('cssRenderProp', 'aqua')
  608. call s:HL('cssColorProp', 'aqua')
  609. call s:HL('cssGeneratedContentProp', 'aqua')
  610. " }}}
  611. " JavaScript: {{{
  612. call s:HL('javaScriptBraces', 'orange')
  613. call s:HL('javaScriptFunction', 'aqua')
  614. call s:HL('javaScriptIdentifier', 'red')
  615. call s:HL('javaScriptMember', 'blue')
  616. call s:HL('javaScriptNumber', 'purple')
  617. call s:HL('javaScriptNull', 'purple')
  618. " }}}
  619. " Ruby: {{{
  620. call s:HL('rubyStringDelimiter', 'green')
  621. call s:HL('rubyInterpolationDelimiter', 'aqua')
  622. " }}}
  623. " ObjectiveC: {{{
  624. call s:HL('objcTypeModifier', 'red')
  625. call s:HL('objcDirective', 'blue')
  626. " }}}
  627. " Go: {{{
  628. call s:HL('goDirective', 'aqua')
  629. call s:HL('goConstants', 'purple')
  630. call s:HL('goDeclaration', 'red')
  631. call s:HL('goDeclType', 'blue')
  632. call s:HL('goBuiltins', 'orange')
  633. " }}}
  634. " Functions -------------------------------------------------------------------
  635. " Search Highlighting {{{
  636. function! gruvbox#hls_show()
  637. set hlsearch
  638. call gruvbox#hls_show_cursor()
  639. endfunction
  640. function! gruvbox#hls_show_cursor()
  641. call s:HL('Cursor', 'dark0', g:gruvbox_hls_cursor)
  642. call s:HL('vCursor', 'dark0', g:gruvbox_hls_cursor)
  643. call s:HL('iCursor', 'dark0', g:gruvbox_hls_cursor)
  644. call s:HL('lCursor', 'dark0', g:gruvbox_hls_cursor)
  645. endfunction
  646. function! gruvbox#hls_hide()
  647. set nohlsearch
  648. call gruvbox#hls_hide_cursor()
  649. endfunction
  650. function! gruvbox#hls_hide_cursor()
  651. call s:HL('Cursor', 'none', 'none', 'inverse')
  652. call s:HL('vCursor', 'none', 'none', 'inverse')
  653. call s:HL('iCursor', 'none', 'none', 'inverse')
  654. call s:HL('lCursor', 'none', 'none', 'inverse')
  655. endfunction
  656. function! gruvbox#hls_toggle()
  657. if &hlsearch
  658. call gruvbox#hls_hide()
  659. else
  660. call gruvbox#hls_show()
  661. endif
  662. endfunction
  663. " }}}