GNU screen changes vim syntax highlighting colors
I'd look at TERM
environment variable. When you run screen, it should be screen-256color
. So, try running this command:
$ TERM=screen-256color vim
If that does help, then you probably should change your screen
settings in order to make it set correct TERM
for you automatically. (I'm not sure about screen
configuration, I use tmux
and I had similar issues that were solved by setting correct TERM
)
I had similar symptoms, except that it happened for all programs not just vim. The resolution for me was to install a newer version of screen (I was using GNU screen as the backend for byobu.) I installed screen using Macports "port install screen" but I assume any method would suffice.
On my system, /usr/bin/screen --version
reported 4.00.03 (FAU) 23-Oct-06
. But the new screen reports 4.02.01 (GNU) 28-Apr-14
. I cannot confirm whether the version upgrade was the key step, or whether the Macports screen is somehow configured differently.