vim colorschemes not changing background color

后端 未结 11 1828
北恋
北恋 2021-01-30 08:43

I try to apply various color schemes in vim that I have seen on the net. Whatever scheme I choose, the background remains white, even though screenshots of the applied scheme sh

11条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 09:29

    This works for me for switching backgrounds:

    colorscheme hemisu
    function! g:ToggleBackground()
      if &background != 'dark'
        set background=dark
      else
        set background=light
        colorscheme hemisu
      endif
    endfunction
    nnoremap   :call g:ToggleBackground()
    

    Also try setting light background to something like ctermbg=231, so that tmux handles it better.

提交回复
热议问题