GNU screen, vim, and urxvt with 256 colours. gnu

0

1

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.

Sardathrion - against SE abuse

Posted 2011-08-22T15:13:00.050

Reputation: 390

Answers

2

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.

bhinesley

Posted 2011-08-22T15:13:00.050

Reputation: 155

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 - against SE abuse – 2011-08-22T17:45:38.887