The bleeding terminal background inside Vim + Tmux problem

2014-09-09

I need to document this as a reminder for myself and as a saviour blog post to any person out there in the internet that uses Vim and Tmux.

Read the following blog post. That is all I'm going to say.

http://sunaku.github.io/vim-256color-bce.html

Solved a problem I've had for years in Vim. Thank you random internet person.

Hopefully this helps you as well, random internet person.

EDIT:

Thought I should probably post the solution as well:

if &term =~ '256color'
    " disable Background Color Erase (BCE) so that color schemes
    " render properly when inside 256-color tmux and GNU screen.
    " see also http://sunaku.github.io/vim-256color-bce.html
    set t_ut=
endif"