Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
What terminal software? What is your $TERM? – Dennis Williamson Sep 21 '10 at 16:49
It's set to xterm-256color – davidu Oct 18 '11 at 1:02
A screenshot could help to better explain the problem. – Chris Page Feb 26 '12 at 11:51

Since the reset command should have reset all terminal settings, including color, I'm thinking that your terminal software is bad, and is therefore also probably responsible for the color bug in the first place.

(This, of course, assumes that your TERM environment variable is set to an appropriate type for your terminal software.)

share|improve this answer
I think a combination of this answer and @Heptite's are about right. The term software (iterm2) has had some major revisions and the issues have all seemed to go away. – davidu Oct 18 '11 at 1:03

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.

share|improve this answer
You can just add au VimLeave * !echo -ne "\033[0m" to your vimrc, without having to create an external script. – Oct 30 '15 at 2:13

Make sure your TERM environmental variable is correct for your terminal emulator software. People often set it to arbitrary values that seem to work without realizing that it can cause them problems.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.