Kenny's Blog

18 Jan 2015

Base16 with Gnome Terminal and Vim

For a modern color scheme, it sure took a lot of configuration to get the base16 scheme working properly with gnome-terminal and the console version of vim. I wonder if the color scheme caters mostly to mac users who are using iTerm…

I was using the solarized color scheme for quite a while, but I decided it was time to switch it up a bit. Anyways, there is a bug with gnome-terminal where the base16-gnome-terminal script doesn’t correctly modify the gnome terminal to include all of the colors that are contained in the color scheme. And since not all of the colors are included there, vim ends up looking a little messed up, with either green or blue number line highlighting.

![Slightly off base16 vim colorscheme](/assets/vim_base16_colorerror.png)

The solution (given by henriqueqc), is adding the following lines:

" Set the color scheme
let g:base16_shell_path=base16-builder/output/shell/
let base16colorspace="256"
set t_Co=256
set background=dark
colorscheme base16-eighties

Note that base16_shell_path is the location where you should download the base16-builder script. Make sure you run the base16-builder script before you link things in your .vimrc. Doing this allows us to bypass the base16-gnome-terminal that is preventing us from having pretty colors in gnome-terminal vim.