On Tue, Nov 07, 2000 at 09:19:16AM +0200, Johann Spies wrote: > I am an emacs user trying out vim. On the console the font > highlighting looks good. > > But on X11 I get a white background an then it looks ugly and I can > not read most of the syntax highlighting. > > I have the following in my .vimrc > """"""""""""""""""" Colour support and syntax highlighting """"""""""""""""""" > if $COLORTERM == "rxvt" > set term=rxvt > endif > if &term == "rxvt" > set t_Co=8 > set ttyfast > endif > > " Colours suitable for a dark background, which is what my Linux console, > " xterms and rxvts are configured to have. > set background=dark > syntax on > > """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > How can I get readable syntax highlighting in both cases? > > Johann
Try this in your .vimrc if $COLORTERM == "rxvt" set term=rxvt endif if &term == "rxvt" set t_Co=8 set ttyfast set background=dark endif if &term != "rxvt" set background=light endif This way, you'll get colors suitable for dark background with your rxvt and light background with all other terms. Its not perfect, but it works. HTH, -- rob