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.

When setting up Ubuntu 12.10 64bit (with gnome-terminal 3.6.0) I noticed that my vim colours mess up in the terminal as soon as the terminal loses focus. Everything is fine when using < C-z> and fg, or switching tabs; I've only seen this issue so far with losing focus. I've installed the plugin CSExact, and calling :CSExactColors fixes things right up, but apparently you can't set autocmd's for FocusGained/FocusLost events in terminal vim.

terminal issue

The strange thing is that I have vim on Ubuntu 12.04 32bit (with gnome-terminal 3.4.1.1) on my other computer, with the exact same settings, and this issue has never shown up before. Any ideas on how I can fix this, or a good workaround? Thanks :)

share|improve this question

migrated from stackoverflow.com Feb 22 '13 at 9:25

This question came from our site for professional and enthusiast programmers.

    
Does this happen with other colorschemes as well ? –  cnicutar Feb 22 '13 at 3:58
    
It does, even with the default colorscheme –  glitchyme Feb 22 '13 at 5:28
    
Just for fun try to make a separate account and see if it happens from there. After all, there could be a glitch (zing!) in a config file. –  cnicutar Feb 22 '13 at 5:48
    
lol like the glitch reference. Its definitely my CSExact plugin for vim, as soon as I removed it the colours stay the same when the focus is lost. However I feel hesitant to blame csexact, since csexact simply changes the colours when loading. This must be an issue with the terminal right? –  glitchyme Feb 22 '13 at 7:10
    
what does :set background? say before and after the loss of focus? –  jens-na Feb 22 '13 at 7:41

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.