Gangmax Blog

自由之思想,独立之精神

Solarized Colorscheme for Vim

| Comments

“Solarized” is the color scheme used by Octopress. You can also set it as your Vim color scheme.

Here is how to make it(from here).

  1. Install Pathogen which is a Vim plugin management program:
1
2
# Create directories, then download the "pathogen.vim" file.
mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Then make sure you have the following lines in your “~/.vimrc” file:

1
2
3
4
execute pathogen#infect()

syntax on
filetype plugin indent on

  1. Install the “vim-colors-solarized” bundle from Github to your local environment:
1
2
cd ~/.vim/bundle
git clone https://github.com/altercation/vim-colors-solarized.git
  1. Modify “.vimrc”:
1
2
3
4
5
6
7
8
# Make sure you have the following lines in your "~/.vimrc" file:
syntax enable
set background=dark
colorscheme solarized
# Or the following lines for "light" backgroud:
syntax enable
set background=light
colorscheme solarized

Now open your vim you can see the new color scheme.

Comments