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.

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:

screen-256color
xterm-256color

for screen and urxvt console.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Download and run 256colors2.pl from here: http://www.frexx.de/xterm-256-notes/

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
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.