When you stare at a display full of code for hours at a time, a nice looking color scheme is worth the time it takes to set up.
Enter Solarized, a great option for improving your overall text-editing life.
My officemate Kevin has been evangelizing Solarized for a while, so today I took the plunge and set it up, and man do I wish I had done this a while ago. Much of the content described below is straight from his setup - I definitely owe him.
The set of software I’m currently using with Solarized is:
- iTerm2 (since in my experience it handles Solarized better than Terminal.app)
- The command-line vim that ships with OSX (since MacVIM appears to have weird problems with :shell)
- pathogen.vim (for easy installation of vim plugins)
- The Solarized config files for iTerm2 and vim
- NERDTree (a tree explorer for vim)
The results look fairly nice, IMO.
For future reference, here’s how I set everything up:
- Download the stable version of iTerm2:
- Download and unzip the latest version of the Solarized .zip file (it contains the iTerm2 preset files you’ll need):
- In iTerm2, open “iTerm2 > Preferences > Profiles > Colors”, and click “Load Presets…” to load the Solarized color schemes (light and dark) that are found in the .zip in “solarized/iterm2-colors-solarized/”
For more info see the iTerm2 README from solarized.zip - the path to it in the zip file is:
- Use these instructions from the pathogen github README to install it - pathogen will be used further down to install solarized.vim and NERDTree:
- Install solarized.vim using pathogen:
(For more info see http://ethanschoonover.com/solarized/vim-colors-solarized)
$ cd ~/.vim/bundleIn the parent directory of vim-colors-solarized:
$ git clone git://github.com/altercation/vim-colors-solarized.git
$ mv vim-colors-solarized ~/.vim/bundle/
- Install NERDTree:
(See also http://programming34m0.blogspot.com/2011/04/nerd-tree-file-explorer-with-mac-vim.html)
git clone git://github.com/scrooloose/nerdtree.git
- Set up your .vimrc appropriately - here’s mine:
filetype plugin indent on
" Solarized stuff
let g:solarized_termtrans = 1
- OPTIONAL: A nice choice for a terminal font is Inconsolata-dz - you can download it here, and configure iTerm2 to use it: