First thing to do if I’m going to use Vim as my default text editor, is to get the colors looking good.

First, I’ve downloaed a theme (for example distinguished.vim) and placed it in my newly created ~/.vim/colors folder.

Next, I created a ~/.vimrc file and entered the following contents:

syntax on
colorscheme distinguished
set t_Co=256

Finally, if I type in tput colors into a terminal window, it tells me I have 8 colors. Even though my themes still appear to work in Vim, an error gets reported upon opening Vim.

To fix this error, I’ve edited my ~/.bashrc file and entered the following line.

export TERM=xterm-256color

Now tput colors reports 256 colors and Vim no longer reports an error when automatically loading my distinguished.vim file.

For those looking for a new Vim color theme, here’s a good place to look and another list of 10 good ones via VimNinjas.

I must admit though… colors still seem to be a bit wacky for me, as they don’t match the theme examples listed on the web page.