3
On Archlinux, using Vim 7.4 (installed with pacman), I tried to use the lucius color scheme. However, the moment I turned it on, all color went away. This happened in the Xfce Terminal emulator under XFCE (black on white, since that was the color scheme of the emulator), or before even starting X11 (then, white on black). Going back to the default coloring scheme turned colors back on.
Using Vim under uxterm
did not have this problem.
On Ubuntu 12.04, using Vim 7.4 (compiled from source) with the exact same .vimrc
and .vim
contents, on the same Xfce terminal emulator, under XFCE, did not have this problem.
I did manage to get it to work on Archlinux for Xfce terminal and command line: I added the following to the top of my .vimrc
:
set t_Co=256
This suggestion came from here.
What was wrong with my setup before that? What is the correct way to get this to work?
The same setup (as close as it gets) but on Ubuntu 12.04 did not have this problem (see the edit). The
.vimrc
on the Ubuntu installation did not have theset t_Co=256
either, but the colors showed perfectly fine. So I guess there must be something more to it? – XXX – 2015-05-21T18:18:56.980Yes. Some Colorschemes set this option by them self in their configuration such that the user doesn't have to. – ap0 – 2015-05-21T18:19:37.533
Yes, but it was the same colorscheme, the same
.vimrc
, and (as far as I am aware) the same.vim
contents.... – XXX – 2015-05-21T18:20:43.6131Have you checked wether that option was already set by default on ubuntu? Either in
/.vimrc
or/etc/vimrc
? – ap0 – 2015-05-21T18:24:53.160Good point. The Ubuntu installation is my work computer: I will check it when I get there tomorrow. Thank you for your help. – XXX – 2015-05-21T18:26:49.673
1It also depends on the terminal database. Vim might automatically detect 256 colors on your Ubuntu;
:set t_Co?
will tell. – Ingo Karkat – 2015-05-21T18:51:20.237