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

I have defined

urxvt*color0:      #000000
urxvt*color8:      #777777

in my $HOME/.Xdefault. Using vim (console not gvim), this gives me a light grey for strings in bash scripts when I use urxvt. Now, if I start GNU screen and edit the same file with vim, all strings are now black. This is a problem since I use revese video (white text on black background for my terminal). The TERM is the same in both instances (xterm).

Is this a vim or screen issue? More importantly, how do I solve it?

After bhinesley reply put me on the right tracks, the solution was to add

set t_Co=256

to my $HOME/.vimrc. Also, I have the following set for my TERM variable:


for screen and urxvt console.

share|improve this question
up vote 2 down vote accepted

Download and run from here:

If it doesn't look like the screenshot on the site, then you know that your problem is screen. If it looks fine, you can test Vim using :runtime syntax/colortest.vim.

share|improve this answer
AHA, thanks. This has pointed me in the right direction. It was neither screen (worked fine) nor vim (worked fine) but my own broken colour theme. I shall fix that. Thanks. – Sardathrion Aug 22 '11 at 17:45

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.