colorscheme-statusline.vim 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. " Colour Scheme & Status Line
  2. "
  3. " Available colour schemes:
  4. " - flattened (solarized clone)
  5. " - neonwave
  6. " Fix wrong background colour in tmux, when using 256 colours, and when vim
  7. " changes the background colour.
  8. " http://sunaku.github.io/vim-256color-bce.html
  9. set t_ut=
  10. " Uncomment this to use proper solarized colours, after the terminal emulator
  11. " palette is properly set up.
  12. "set t_Co=16
  13. " Status line defaults.
  14. let g:airline_powerline_fonts = 1
  15. set laststatus=2 " always show the status line.
  16. set noshowmode " hide modes e.g. --INSERT-- with themed status lines.
  17. set showcmd " display partial commands on the last line
  18. function! Dark()
  19. colorscheme flattened_dark
  20. call SetTheme('powerlineish')
  21. highlight SignColumn ctermbg=235
  22. endfunction
  23. function! Light()
  24. colorscheme flattened_light
  25. call SetTheme('powerlineish')
  26. endfunction
  27. function! Neon()
  28. colorscheme neonwave
  29. call SetTheme('surarken')
  30. endfunction
  31. function! SetTheme(name)
  32. " Airline functions are not available at vim start.
  33. if exists(':AirlineTheme')
  34. execute 'AirlineTheme' a:name
  35. else
  36. let g:airline_theme = a:name
  37. endif
  38. endfunction
  39. function! MuteSpellCheckHighlights()
  40. hi clear SpellBad | hi SpellBad cterm=underline
  41. " Highlights must be cleared first, or linking will fail.
  42. hi clear SpellCap | hi link SpellCap SpellBad
  43. hi clear SpellLocal | hi link SpellLocal SpellBad
  44. hi clear SpellRare | hi link SpellRare SpellBad
  45. endfunction
  46. call Dark()