Reset terminal after quitting VIM — colors all messed up


Whenever I quit VIM my terminal colors are all messed up. Manually running reset on the command line doesn't seem to fix it either.

I'm using the Mustang VIM theme. I think I basically need to tell VIM to reset all colors or something before it quits.

Any ideas?

Best Answer

I was having a similar problem with Vim + GNU Screen + Here was my solution:

Create a script called resetcolor:


echo -ne "\033[0m"

Put this script in your PATH.

Then within ~/.vimrc, add the following:

au VimLeave * !resetcolor

Based on this answer.