Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers

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
add comment

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
add comment

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

Create a script called resetcolor:

#!/bin/bash

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
add comment

Your Answer

 
discard

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.