colorscheme-statusline.vim 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. " Comment this out to use proper solarized colours, after the terminal emulator
  11. " palette is properly set up.
  12. let g:solarized_termcolors=256
  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. command! Dark set background=dark
  19. \| colorscheme solarized
  20. \| call SetTheme('powerlineish')
  21. \| highlight SignColumn ctermbg=235
  22. command! Light set background=light
  23. \| colorscheme solarized
  24. \| call SetTheme('powerlineish')
  25. command! Neon set background=light
  26. \| colorscheme neonwave
  27. \| call SetTheme('surarken')
  28. function! SetTheme(name)
  29. " Airline functions are not available at vim start.
  30. if exists(':AirlineTheme')
  31. execute 'AirlineTheme' a:name
  32. else
  33. let g:airline_theme = a:name
  34. endif
  35. endfunction
  36. " General Colorscheme overrides
  37. autocmd ColorScheme * call CustomHighlights()
  38. function! CustomHighlights()
  39. highlight ExtraWhitespace ctermbg=red guibg=red
  40. " Mute spellcheck highlighting
  41. " Highlights must be cleared first, or `link` will fail.
  42. highlight clear SpellBad | highlight SpellBad cterm=underline
  43. highlight clear SpellCap | highlight link SpellCap SpellBad
  44. highlight clear SpellLocal | highlight link SpellLocal SpellBad
  45. highlight clear SpellRare | highlight link SpellRare SpellBad
  46. endfunction
  47. " Set starting colorscheme
  48. Dark