I recently used vundle to install the solarized theme for vim on my Arch Linux machine. Whenever I open vim, the theme is applied, but it stays applied to my terminal window after I close it. I can get rid of the colorscheme with some commands, like ls, but not others, like clear. Anyone know why this is happening? How do I fix it?

*When vim is open

After closing and typing ls

2 Answers 2


Seems vim doesn't send the correct reset sequences when you quit. ls colors parts of its output, so it resets to default when it's finished.

You can reset the terminal by sending the proper escape sequence - printf '\e[0m' is probably the easiest way to do this.

  • Ok, cool, thanks. I put that after a VimLeave statement and it worked. It told me it wasn't a valid editor command when I opened vim, though. Do you know where that command should be? Right now there's a "VimLeave printf '\e[0m'" line at the bottom of my .vimrc
    – Loktopus
    Jul 19, 2015 at 20:34
  • Try au VimLeave printf.... instead of VimLeave printf... Jul 19, 2015 at 20:46
  • When I add that I have the same problem I did initially; it doesn't clear the colorscheme.
    – Loktopus
    Jul 19, 2015 at 20:55
  • After adding an asterisk after VimLeave on that last line, it worked. The sourceforge vim documentation is down, so I don't know exactly what's happening here. If you do and could explain that to me as well, I'd appreciate it. Either way, thanks for the help.
    – Loktopus
    Jul 20, 2015 at 0:15
  • The most common reason Vim doesn't handle the terminal properly (as in this case) is that the TERM environmental variable is not being properly set.
    – Heptite
    Jul 22, 2015 at 17:25

To add to Guntram's answer, set t_te="^[[H^[[2J," in your .vimrc should insure it happens when you exit and might inadvertently be the issue. It's often set to blank because the default also repaints the screen and many people don't like that. This isn't an issue if not using color, but obviously is if you do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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