Tuesday, December 12, 2006

Vim: The Beauty

I have always been searching for new editors and have been a fan of VIM, though i was not using it very often. I have used it for editing Ruby and Java with features like intellisense, which is available from version 7.0. But now i feel that its also very easy to customize and beautify the editor to your needs.
I tried a new color scheme and font for VIM 7.0 from this site: http://iamphet.nm.ru/vim/index.html

Then i setup the default look of the editor by editing the "Startup Settings" in the Edit menu.





1
2 set nocompatible
3 source $VIMRUNTIME/vimrc_example.vim
4 source $VIMRUNTIME/mswin.vim
5 behave mswin
6 set nobackup
7 set nu!
8 :colors northsky
9 set guifont=ke9x15
10 set diffexpr=MyDiff()
11 function MyDiff()
12 let opt = ''
13 if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
14 if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
15 silent execute '\"!e:\Program Files\vim\diff\" -a ' . opt . v:fname_in . ' ' . v:fname_new . ' > ' . v:fname_out
16 endfunction
17

Before that i installed the font kex.fon from the "Fonts" window through control panel.
To customize VIM, the best resource would be VIM user's guide.


Happy Vimming!

No comments: