gruvbox.vim 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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: 11 Mar 2014
  7. " -----------------------------------------------------------------------------
  8. function! gruvbox#bg_toggle()
  9. if &background == 'dark'
  10. set background=light
  11. else
  12. set background=dark
  13. endif
  14. colorcheme gruvbox
  15. endfunction
  16. function! gruvbox#invert_signs_toggle()
  17. if g:gruvbox_invert_signs == 0
  18. let g:gruvbox_invert_signs=1
  19. else
  20. let g:gruvbox_invert_signs=0
  21. endif
  22. colorscheme gruvbox
  23. endfunction
  24. " Search Highlighting {{{
  25. function! gruvbox#hls_show()
  26. set hlsearch
  27. call GruvboxHlsShowCursor()
  28. endfunction
  29. function! gruvbox#hls_hide()
  30. set nohlsearch
  31. call GruvboxHlsHideCursor()
  32. endfunction
  33. function! gruvbox#hls_toggle()
  34. if &hlsearch
  35. call gruvbox#hls_hide()
  36. else
  37. call gruvbox#hls_show()
  38. endif
  39. endfunction
  40. " }}}
  41. " vim: set sw=3 ts=3 sts=3 noet tw=80 ft=vim fdm=marker: