2010年10月28日 星期四

How to change color scheme of vim?

I have been bothered by the color shown of vim when editing a configuration file of Linux with putty as the picture presented below.

image

The darkblue part just make eyes hard to see clearly.

Luckly, we can change the color shown in Vim by change its settings. The Vim settings are written in a file called .vimrc or vimrc. My CentOS has it located in /etc/vimrc.

Just add, colorscheme desert, in the vimrc, save and quit.

image

Isn't it better?

You can choose other color schemes, below is the list of color schemes of my vim from /usr/share/vim/vim70/colors

blue.vim      delek.vim    evening.vim  murphy.vim     README.txt  slate.vim
darkblue.vim  desert.vim   koehler.vim  pablo.vim      ron.vim     torte.vim
default.vim   elflord.vim  morning.vim  peachpuff.vim  shine.vim   zellner.vim

沒有留言: