Ubuntu, vim, and the solarized color palette

Here's my recommendation for things to try:

  1. ensure syntax on is in your .vimrc file
  2. Check what t_Co Vim has picked up from your term emulator (a quick :echo &t_Co). If it's 8, you'll want to se t_Co=16. You might also try se t_Co=256 though without let g:solarized_termcolors=16 this will use the 256 fallback mode, which isn't quite the correct color scheme.

set t_Co=16 and let g:solarized_termcolors=16 did not work for me. This is what worked:

syntax on
let g:solarized_termcolors=256
set t_Co=256 
set background=dark
colorscheme solarized

I found out how do do it from this article.

I wrote the following script to do the gnome-terminal stuff.

gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/palette" --type string "#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "#00002B2B3636"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/foreground_color" --type string "#838394949696"

If you are trying to use Vim with solarized inside of tmux, this is the fix for your issue:

Fix solarized theme in tmux