gruvbox.vim 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  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: 9 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. let s:is_dark=(&background == 'dark')
  59. " }}}
  60. " Palette: {{{
  61. let s:gb = {}
  62. if s:is_dark
  63. let s:gb.dark0 = ['282828', 235] " 40-40-40
  64. let s:gb.dark1 = ['3c3836', 237] " 60-56-54
  65. let s:gb.dark2 = ['504945', 239] " 80-73-69
  66. let s:gb.dark3 = ['665c54', 241] " 102-92-84
  67. let s:gb.dark4 = ['7c6f64', 243] " 124-111-100
  68. let s:gb.medium = ['928374', 245] " 146-131-116
  69. let s:gb.light0 = ['fdf4c1', 229] " 253-244-193
  70. let s:gb.light1 = ['ebdbb2', 223] " 235-219-178
  71. let s:gb.light2 = ['d5c4a1', 250] " 213-196-161
  72. let s:gb.light3 = ['bdae93', 248] " 189-174-147
  73. let s:gb.light4 = ['a89984', 246] " 168-153-132
  74. let s:gb.light4_256 = ['a89984', 246] " 168-153-132
  75. let s:gb.red = ['fb4934', 167] " 251-73-52
  76. let s:gb.green = ['b8bb26', 142] " 184-187-38
  77. let s:gb.yellow = ['fabd2f', 214] " 250-189-47
  78. let s:gb.blue = ['83a598', 109] " 131-165-152
  79. let s:gb.purple = ['d3869b', 175] " 211-134-155
  80. let s:gb.aqua = ['8ec07c', 108] " 142-192-124
  81. let s:gb.orange = ['fe8019', 208] " 254-128-25
  82. if g:gruvbox_termcolors == 16
  83. let s:gb.dark0 = ['282828', 0]
  84. let s:gb.light4 = ['a89984', 7]
  85. let s:gb.medium = ['928374', 8]
  86. let s:gb.red = ['fb4934', 9]
  87. let s:gb.green = ['b8bb26', 10]
  88. let s:gb.yellow = ['fabd2f', 11]
  89. let s:gb.blue = ['83a598', 12]
  90. let s:gb.purple = ['d3869b', 13]
  91. let s:gb.aqua = ['8ec07c', 14]
  92. let s:gb.light1 = ['ebdbb2', 15]
  93. endif
  94. else
  95. let s:gb.dark0 = ['fdf4c1', 229] " 253-244-193
  96. let s:gb.dark1 = ['ebdbb2', 223] " 235-219-178
  97. let s:gb.dark2 = ['d5c4a1', 250] " 213-196-161
  98. let s:gb.dark3 = ['bdae93', 248] " 189-174-147
  99. let s:gb.dark4 = ['a89984', 246] " 168-153-132
  100. let s:gb.medium = ['928374', 244] " 146-131-116
  101. let s:gb.light0 = ['282828', 235] " 40-40-40
  102. let s:gb.light1 = ['3c3836', 237] " 60-56-54
  103. let s:gb.light2 = ['504945', 239] " 80-73-69
  104. let s:gb.light3 = ['665c54', 241] " 102-92-84
  105. let s:gb.light4 = ['7c6f64', 243] " 124-111-100
  106. let s:gb.light4_256 = ['7c6f64', 243] " 124-111-100
  107. let s:gb.red = ['9d0006', 88] " 157-0-6
  108. let s:gb.green = ['79740e', 100] " 121-116-14
  109. let s:gb.yellow = ['b57614', 136] " 181-118-20
  110. let s:gb.blue = ['076678', 24] " 7-102-120
  111. let s:gb.purple = ['8f3f71', 96] " 143-63-113
  112. let s:gb.aqua = ['427b58', 66] " 66-123-88
  113. let s:gb.orange = ['af3a03', 130] " 175-58-3
  114. if g:gruvbox_termcolors == 16
  115. let s:gb.dark0 = ['fdf4c1', 0]
  116. let s:gb.light4 = ['7c6f64', 7]
  117. let s:gb.medium = ['928374', 8]
  118. let s:gb.red = ['9d0006', 9]
  119. let s:gb.green = ['79740e', 10]
  120. let s:gb.yellow = ['b57614', 11]
  121. let s:gb.blue = ['076678', 12]
  122. let s:gb.purple = ['8f3f71', 13]
  123. let s:gb.aqua = ['427b58', 14]
  124. let s:gb.light1 = ['3c3836', 15]
  125. endif
  126. endif
  127. " }}}
  128. " Highlighting Function: {{{
  129. function! s:HL(group, fg, ...)
  130. " Arguments: group, guifg, guibg, gui, guisp
  131. let histring = 'hi ' . a:group . ' '
  132. if strlen(a:fg)
  133. if a:fg == 'fg'
  134. let histring .= 'guifg=fg ctermfg=fg '
  135. elseif a:fg == 'bg'
  136. let histring .= 'guifg=bg ctermfg=bg '
  137. elseif a:fg == 'none'
  138. let histring .= 'guifg=NONE ctermfg=NONE '
  139. else
  140. let c = get(s:gb, a:fg)
  141. let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
  142. endif
  143. endif
  144. if a:0 >= 1 && strlen(a:1)
  145. if a:1 == 'bg'
  146. let histring .= 'guibg=bg ctermbg=bg '
  147. elseif a:fg == 'fg'
  148. let histring .= 'guibg=fg ctermbg=fg '
  149. elseif a:1 == 'none'
  150. let histring .= 'guibg=NONE ctermbg=NONE '
  151. else
  152. let c = get(s:gb, a:1)
  153. let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
  154. endif
  155. else
  156. let histring .= 'guibg=NONE ctermbg=NONE '
  157. endif
  158. if a:0 >= 2 && strlen(a:2)
  159. if a:2 == 'none'
  160. let histring .= 'gui=NONE cterm=NONE '
  161. elseif a:2 == 'italic' && g:gruvbox_italic == 0
  162. let histring .= 'gui=NONE cterm=NONE '
  163. elseif a:2 == 'bold' && g:gruvbox_bold == 0
  164. let histring .= 'gui=NONE cterm=NONE '
  165. elseif a:2 == 'bold,inverse' && g:gruvbox_bold == 0
  166. let histring .= 'gui=inverse cterm=inverse '
  167. elseif a:2 == 'undercurl' && g:gruvbox_undercurl == 0
  168. let histring .= 'gui=NONE cterm=NONE '
  169. elseif a:2 == 'underline' && g:gruvbox_underline == 0
  170. let histring .= 'gui=NONE cterm=NONE '
  171. elseif a:2 == 'bold,italic'
  172. if g:gruvbox_italic == 0 && g:gruvbox_bold == 0
  173. let histring .= 'gui=NONE cterm=NONE '
  174. elseif g:gruvbox_italic == 0
  175. let histring .= 'gui=bold cterm=bold '
  176. elseif g:gruvbox_bold == 0
  177. let histring .= 'gui=italic cterm=italic '
  178. else
  179. let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
  180. endif
  181. else
  182. let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
  183. endif
  184. else
  185. let histring .= 'gui=NONE cterm=NONE '
  186. endif
  187. if a:0 >= 3 && strlen(a:3)
  188. if a:3 == 'none'
  189. let histring .= 'guisp=NONE '
  190. else
  191. let c = get(s:gb, a:3)
  192. let histring .= 'guisp=#' . c[0] . ' '
  193. endif
  194. endif
  195. execute histring
  196. endfunction
  197. " }}}
  198. " Vanilla colorscheme ---------------------------------------------------------
  199. " General UI: {{{
  200. " Normal text
  201. call s:HL('Normal', 'light1', 'dark0')
  202. " Correct background (see issue #7):
  203. " --- Problem with changing between dark and light on 256 color terminal
  204. " --- https://github.com/morhetz/gruvbox/issues/7
  205. if s:is_dark
  206. set background=dark
  207. else
  208. set background=light
  209. endif
  210. if version >= 700
  211. " Screen line that the cursor is
  212. call s:HL('CursorLine', 'none', 'dark1')
  213. " Screen column that the cursor is
  214. call s:HL('CursorColumn', 'none', 'dark1')
  215. " Tab pages line filler
  216. call s:HL('TabLineFill', 'dark4', 'bg')
  217. " Active tab page label
  218. call s:HL('TabLineSel', 'bg', 'dark4', 'bold')
  219. " Not active tab page label
  220. call s:HL('TabLine', 'dark4', 'bg')
  221. " Match paired bracket under the cursor
  222. call s:HL('MatchParen', 'none', 'dark3', 'bold')
  223. endif
  224. if version >= 703
  225. " Highlighted screen columns
  226. call s:HL('ColorColumn', 'none', 'dark1')
  227. " Concealed element: \lambda → λ
  228. call s:HL('Conceal', 'blue', 'none')
  229. " Line number of CursorLine
  230. call s:HL('CursorLineNr', 'yellow', 'dark1')
  231. endif
  232. call s:HL('NonText', 'dark2')
  233. call s:HL('SpecialKey', 'dark2')
  234. if g:gruvbox_invert_selection == 0
  235. call s:HL('Visual', 'none', 'dark2')
  236. call s:HL('VisualNOS', 'none', 'dark2')
  237. else
  238. call s:HL('Visual', 'none', 'dark3', 'inverse')
  239. call s:HL('VisualNOS', 'none', 'dark3', 'inverse')
  240. endif
  241. call s:HL('Search', 'dark0', 'yellow')
  242. call s:HL('IncSearch', 'dark0', g:gruvbox_hls_cursor)
  243. call s:HL('Underlined', 'blue', 'none', 'underline')
  244. call s:HL('StatusLine', 'dark4', 'dark0', 'bold,inverse')
  245. call s:HL('StatusLineNC', 'dark2', 'light4', 'bold,inverse')
  246. " The column separating vertically split windows
  247. call s:HL('VertSplit', 'light4', 'dark2')
  248. " Current match in wildmenu completion
  249. call s:HL('WildMenu', 'blue', 'dark2', 'bold')
  250. " Directory names, special names in listing
  251. call s:HL('Directory', 'green', 'none', 'bold')
  252. " Titles for output from :set all, :autocmd, etc.
  253. call s:HL('Title', 'green', 'none', 'bold')
  254. " Error messages on the command line
  255. call s:HL('ErrorMsg', 'bg', 'red', 'bold')
  256. " More prompt: -- More --
  257. call s:HL('MoreMsg', 'yellow', 'none', 'bold')
  258. " Current mode message: -- INSERT --
  259. call s:HL('ModeMsg', 'yellow', 'none', 'bold')
  260. " 'Press enter' prompt and yes/no questions
  261. call s:HL('Question', 'orange', 'none', 'bold')
  262. " Warning messages
  263. call s:HL('WarningMsg', 'red', 'none', 'bold')
  264. " }}}
  265. " Gutter: {{{
  266. " Line number for :number and :# commands
  267. call s:HL('LineNr', 'dark4')
  268. " Column where signs are displayed
  269. call s:HL('SignColumn', 'none', g:gruvbox_sign_column)
  270. " Line used for closed folds
  271. call s:HL('Folded', 'medium', 'dark1', 'italic')
  272. " Column where folds are displayed
  273. call s:HL('FoldColumn', 'medium', 'dark1')
  274. " }}}
  275. " Cursor: {{{
  276. " Character under cursor
  277. call s:HL('Cursor', 'none', 'none', 'inverse')
  278. " Visual mode cursor, selection
  279. call s:HL('vCursor', 'none', 'none', 'inverse')
  280. " Input moder cursor
  281. call s:HL('iCursor', 'none', 'none', 'inverse')
  282. " Language mapping cursor
  283. call s:HL('lCursor', 'none', 'none', 'inverse')
  284. " }}}
  285. " Syntax Highlighting: {{{
  286. call s:HL('Special', 'orange')
  287. if g:gruvbox_italicize_comments == 0
  288. call s:HL('Comment', 'medium', 'none')
  289. else
  290. call s:HL('Comment', 'medium', 'none', 'italic')
  291. endif
  292. call s:HL('Todo', 'fg', 'bg', 'bold')
  293. call s:HL('Error', 'bg', 'red', 'bold')
  294. " Generic statement
  295. call s:HL('Statement', 'red')
  296. " if, then, else, endif, swicth, etc.
  297. call s:HL('Conditional', 'red')
  298. " for, do, while, etc.
  299. call s:HL('Repeat', 'red')
  300. " case, default, etc.
  301. call s:HL('Label', 'red')
  302. " try, catch, throw
  303. call s:HL('Exception', 'red')
  304. " sizeof, "+", "*", etc.
  305. hi! def link Operator Normal
  306. " Any other keyword
  307. call s:HL('Keyword', 'red')
  308. " Variable name
  309. call s:HL('Identifier', 'blue')
  310. " Function name
  311. call s:HL('Function', 'green', 'none', 'bold')
  312. " Generic preprocessor
  313. call s:HL('PreProc', 'aqua')
  314. " Preprocessor #include
  315. call s:HL('Include', 'aqua')
  316. " Preprocessor #define
  317. call s:HL('Define', 'aqua')
  318. " Same as Define
  319. call s:HL('Macro', 'aqua')
  320. " Preprocessor #if, #else, #endif, etc.
  321. call s:HL('PreCondit', 'aqua')
  322. " Generic constant
  323. call s:HL('Constant', 'purple')
  324. " Character constant: 'c', '/n'
  325. call s:HL('Character', 'purple')
  326. " String constant: "this is a string"
  327. if g:gruvbox_italicize_strings == 0
  328. call s:HL('String', 'green')
  329. else
  330. call s:HL('String', 'green', 'none', 'italic')
  331. endif
  332. " Boolean constant: TRUE, false
  333. call s:HL('Boolean', 'purple')
  334. " Number constant: 234, 0xff
  335. call s:HL('Number', 'purple')
  336. " Floating point constant: 2.3e10
  337. call s:HL('Float', 'purple')
  338. " Generic type
  339. call s:HL('Type', 'yellow')
  340. " static, register, volatile, etc
  341. call s:HL('StorageClass', 'orange')
  342. " struct, union, enum, etc.
  343. call s:HL('Structure', 'aqua')
  344. " typedef
  345. call s:HL('Typedef', 'yellow')
  346. " }}}
  347. " Completion Menu: {{{
  348. if version >= 700
  349. " Popup menu: normal item
  350. call s:HL('Pmenu', 'light1', 'dark2')
  351. " Popup menu: selected item
  352. call s:HL('PmenuSel', 'dark2', 'blue', 'bold')
  353. " Popup menu: scrollbar
  354. call s:HL('PmenuSbar', 'none', 'dark2')
  355. " Popup menu: scrollbar thumb
  356. call s:HL('PmenuThumb', 'none', 'dark4')
  357. endif
  358. " }}}
  359. " Diffs: {{{
  360. call s:HL('DiffDelete', 'dark0', 'red')
  361. call s:HL('DiffAdd', 'dark0', 'green')
  362. "call s:HL('DiffChange', 'dark0', 'blue')
  363. "call s:HL('DiffText', 'dark0', 'yellow')
  364. " Alternative setting
  365. call s:HL('DiffChange', 'dark0', 'aqua')
  366. call s:HL('DiffText', 'dark0', 'yellow')
  367. " }}}
  368. " Spelling: {{{
  369. if has("spell")
  370. " Not capitalised word
  371. call s:HL('SpellCap', 'none', 'none', 'undercurl', 'red')
  372. " Not recognized word
  373. call s:HL('SpellBad', 'none', 'none', 'undercurl', 'blue')
  374. " Wrong spelling for selected region
  375. call s:HL('SpellLocal', 'none', 'none', 'undercurl', 'aqua')
  376. " Rare word
  377. call s:HL('SpellRare', 'none', 'none', 'undercurl', 'purple')
  378. endif
  379. " }}}
  380. " Plugin specific -------------------------------------------------------------
  381. " EasyMotion: {{{
  382. hi! def link EasyMotionTarget Search
  383. hi! def link EasyMotionShade Comment
  384. " }}}
  385. " Indent Guides: {{{
  386. let g:indent_guides_auto_colors = 0
  387. if g:gruvbox_invert_indent_guides == 0
  388. call s:HL('IndentGuidesOdd', 'bg', 'dark2')
  389. call s:HL('IndentGuidesEven', 'bg', 'dark1')
  390. else
  391. call s:HL('IndentGuidesOdd', 'bg', 'dark2', 'inverse')
  392. call s:HL('IndentGuidesEven', 'bg', 'dark3', 'inverse')
  393. endif
  394. " }}}
  395. " Better Rainbow Parentheses: {{{
  396. let g:rbpt_colorpairs = [
  397. \ ['brown', '#458588'],
  398. \ ['Darkblue', '#b16286'],
  399. \ ['darkgray', '#cc241d'],
  400. \ ['darkgreen', '#d65d0e'],
  401. \ ['darkcyan', '#458588'],
  402. \ ['darkred', '#b16286'],
  403. \ ['darkmagenta', '#cc241d'],
  404. \ ['brown', '#d65d0e'],
  405. \ ['gray', '#458588'],
  406. \ ['black', '#b16286'],
  407. \ ['darkmagenta', '#cc241d'],
  408. \ ['Darkblue', '#d65d0e'],
  409. \ ['darkgreen', '#458588'],
  410. \ ['darkcyan', '#b16286'],
  411. \ ['darkred', '#cc241d'],
  412. \ ['red', '#d65d0e'],
  413. \ ]
  414. "}}}
  415. " Airline: {{{
  416. if !exists('g:airline_theme_map')
  417. let g:airline_theme_map = { 'gruvbox.*': 'tomorrow' }
  418. else
  419. let g:airline_theme_map['gruvbox.*'] = 'tomorrow'
  420. endif
  421. " }}}
  422. " GitGutter: {{{
  423. if g:gruvbox_invert_signs == 0
  424. call s:HL('GitGutterAdd', 'green', g:gruvbox_sign_column)
  425. call s:HL('GitGutterChange', 'aqua', g:gruvbox_sign_column)
  426. call s:HL('GitGutterDelete', 'red', g:gruvbox_sign_column)
  427. call s:HL('GitGutterChangeDelete', 'aqua', g:gruvbox_sign_column)
  428. else
  429. call s:HL('GitGutterAdd', 'green', g:gruvbox_sign_column, 'inverse')
  430. call s:HL('GitGutterChange', 'aqua', g:gruvbox_sign_column, 'inverse')
  431. call s:HL('GitGutterDelete', 'red', g:gruvbox_sign_column, 'inverse')
  432. call s:HL('GitGutterChangeDelete', 'aqua', g:gruvbox_sign_column, 'inverse')
  433. endif
  434. " }}}
  435. " Syntastic: {{{
  436. call s:HL('SyntasticError', 'none', 'none', 'undercurl', 'red')
  437. call s:HL('SyntasticWarning', 'none', 'none', 'undercurl', 'yellow')
  438. if g:gruvbox_invert_signs == 0
  439. call s:HL('SyntasticErrorSign', 'red', g:gruvbox_sign_column)
  440. call s:HL('SyntasticWarningSign', 'yellow', g:gruvbox_sign_column)
  441. else
  442. call s:HL('SyntasticErrorSign', 'red', g:gruvbox_sign_column, 'inverse')
  443. call s:HL('SyntasticWarningSign', 'yellow', g:gruvbox_sign_column, 'inverse')
  444. endif
  445. " }}}
  446. " Filetype specific -----------------------------------------------------------
  447. " Diff: {{{
  448. call s:HL('diffAdded', 'green')
  449. call s:HL('diffRemoved', 'red')
  450. call s:HL('diffChanged', 'aqua')
  451. call s:HL('diffFile', 'orange')
  452. call s:HL('diffNewFile', 'yellow')
  453. call s:HL('diffLine', 'blue')
  454. " }}}
  455. " Html: {{{
  456. call s:HL('htmlTag', 'blue')
  457. call s:HL('htmlEndTag', 'blue')
  458. call s:HL('htmlTagName', 'aqua', 'none', 'bold')
  459. call s:HL('htmlArg', 'aqua')
  460. call s:HL('htmlScriptTag', 'purple')
  461. call s:HL('htmlTagN', 'light1')
  462. call s:HL('htmlSpecialTagName', 'aqua', 'none', 'bold')
  463. call s:HL('htmlLink', 'light4', 'none', 'underline')
  464. call s:HL('htmlSpecialChar', 'orange')
  465. " }}}
  466. " Vim: {{{
  467. if g:gruvbox_italicize_comments == 0
  468. call s:HL('vimCommentTitle', 'light4_256', 'none', 'bold')
  469. else
  470. call s:HL('vimCommentTitle', 'light4_256', 'none', 'bold,italic')
  471. endif
  472. "hi! def link vimVar Identifier
  473. "hi! def link vimFunc Function
  474. "hi! def link vimUserFunc Function
  475. "call s:HL('vimUserFunc', 'green', 'none', 'bold')
  476. "call s:HL('vimFunction', 'green', 'none', 'bold')
  477. "call s:HL('vimFunc', 'blue')
  478. "call s:HL('vimFuncName', 'blue')
  479. "call s:HL('vimVar', 'purple')
  480. "call s:HL('vimIsCommand', 'purple')
  481. "call s:HL('vimMapMod', 'purple', 'none', 'bold,italic')
  482. "call s:HL('vimMapModKey', 'purple', 'none', 'bold,italic')
  483. "call s:HL('vimFunction', 'purple')
  484. "call s:HL('vimUserFunc', 'purple')
  485. "call s:HL('vimUserFunc', 'purple')
  486. "hi! def link vimFunc Function
  487. "hi! def link vimUserFunc Function
  488. " }}}
  489. " Clojure: {{{
  490. call s:HL('clojureKeyword', 'blue')
  491. call s:HL('clojureCond', 'orange')
  492. call s:HL('clojureSpecial', 'orange')
  493. call s:HL('clojureDefine', 'orange')
  494. call s:HL('clojureFunc', 'yellow')
  495. call s:HL('clojureRepeat', 'yellow')
  496. call s:HL('clojureCharacter', 'aqua')
  497. call s:HL('clojureStringEscape', 'aqua')
  498. call s:HL('clojureException', 'red')
  499. call s:HL('clojureRegexp', 'aqua')
  500. call s:HL('clojureRegexpEscape', 'aqua')
  501. call s:HL('clojureRegexpCharClass', 'light3', 'none', 'bold')
  502. call s:HL('clojureRegexpMod', 'light3', 'none', 'bold')
  503. call s:HL('clojureRegexpQuantifier', 'light3', 'none', 'bold')
  504. call s:HL('clojureParen', 'light3')
  505. call s:HL('clojureAnonArg', 'yellow')
  506. call s:HL('clojureVariable', 'blue')
  507. call s:HL('clojureMacro', 'orange')
  508. call s:HL('clojureMeta', 'yellow')
  509. call s:HL('clojureDeref', 'yellow')
  510. call s:HL('clojureQuote', 'yellow')
  511. call s:HL('clojureUnquote', 'yellow')
  512. " }}}
  513. " Functions -------------------------------------------------------------------
  514. " Search Highlighting {{{
  515. function! gruvbox#hls_show()
  516. set hlsearch
  517. call s:HL('Cursor', 'dark0', g:gruvbox_hls_cursor)
  518. call s:HL('vCursor', 'dark0', g:gruvbox_hls_cursor)
  519. call s:HL('iCursor', 'dark0', g:gruvbox_hls_cursor)
  520. call s:HL('lCursor', 'dark0', g:gruvbox_hls_cursor)
  521. endfunction
  522. function! gruvbox#hls_hide()
  523. set nohlsearch
  524. call s:HL('Cursor', 'none', 'none', 'inverse')
  525. call s:HL('vCursor', 'none', 'none', 'inverse')
  526. call s:HL('iCursor', 'none', 'none', 'inverse')
  527. call s:HL('lCursor', 'none', 'none', 'inverse')
  528. endfunction
  529. function! gruvbox#hls_toggle()
  530. if &hlsearch
  531. call gruvbox#hls_hide()
  532. else
  533. call gruvbox#hls_show()
  534. endif
  535. endfunction
  536. " }}}