Ubuntu – Setup vimrc with solarized color theme

vimvimrc

I just started with vim in ubuntu, and have some trouble setting up my .vimrc file. This is what I currently have:

 "============= Solarized color theme  =============                             
 "https://github.com/altercation/vim-colors-solarized                            
 syntax enable                   "Use syntax highlighting                        
 set background=dark             "Use dark color scheme                          
 colorscheme solarized           "Choose solarized                               

 "============= Settings =============                                           
 set nocompatible                "Necesary for cool vim things                   
 set number                      "Line numbers                                   
 set colorcolumn=80              "Have a line after 80 char                      
 set ruler                       "Add ruler at the bottom of vim                 
 set cursorline  

However, when I can't see my cursorline and the colorcolumn with these settings. If I don't use the solarized color syntax, I do see them. Do you guys know what I am doing wrong?

Best Answer

So, check for these:

  1. You should set t_Co=256 in your vimrc. (read here more)

  2. You should edit the colors on your terminal, following a solarized colorscheme. Check this.

  3. I use syntax on but I believe syntax enable should do the work too.

  4. Put the solarized theme in ~/.vim/colors

Let me know if it does work after following all these steps.

Related Question