I spend a lot of time working in the console window as I manage multiple EC2 instances.
At work I use cygwin and at home I use gold old linux terminal. Depending on the configuration, vim color scheme might not be as terminal color friendly.
Look at the image below.
I could hardly read the comments on this shell script. Luckily vim does provides multiple color schemes to work with.
You can try different color scheme by running “:colorscheme” in vim.
:colorscheme delek
Instead of doing it every time, We can manage the default vim setting by creating a “.vimrc” file on the home directory.
Lets do that:
$ vi ~/.vimrc
Add following lines in the file
syntax on colorscheme delek
I have selected have the syntax highlighting on and selected “delek” color scheme so its easier to read on my terminal.
Now lets look at the same shell script:
And the output is much readable on the dark console.
You can select other color scheme depending on your preference. You can find the installed schemes at
/usr/share/vim/vim72/colors
Some of the default ones you may find are
blue.vim darkblue.vim default.vim delek.vim desert.vim elflord.vim evening.vim koehler.vim morning.vim murphy.vim pablo.vim peachpuff.vim README.txt ron.vim shine.vim slate.vim torte.vim zellner.vim
You can download more online http://www.vimninjas.com/2012/08/26/10-vim-color-schemes-you-need-to-own/.