Search code examples
vimtransparencyopacitykonsole

Disable background transparency in (neo)vim


I'm running Neovim 0.2.1 in Konsole with i3 and Compton in the back. I'm using a little bit of transparency in Konsole for a more dapper experience, but given that I use vim as my primary editor I'd prefer to not have transparency there as it's a little bit distracting. My colour scheme is vim-monokai.

What's really got me scratching my head is that I have two computers, both running virtually the same setup (Intel integrated graphics, i3, Compton, Konsole, zsh, same neovim version and plugins). One does not have transparency in its terminal, while the other does.


Solution

  • For vim:

    highlight Normal ctermbg=Black
    highlight NonText ctermbg=Black
    

    Your colorschema most likely does not set ctermbg. Replace "Black" with the desired background color.