I think vim is the most powerful editor running on linux, but if you want to use it efficiently you need to spend some minutes to configure it.

You can configure vim for all users creating a vimrc file in /etc/vim/ and then adding an alias like the following:

alias vim='vim -u /etc/vim/vimrc'

or each user can configure vim creating a .vimrc file in his home directory (~).

Anyway, IMHO, there are some useful configurations that should be present in a vimrc configuration file for a programmer. The following lines show my minimal (and preferred) configuration file:

 

 

~# cat .vimrc

" vim configuration file

" www.xappsoftware.com

 

" the following line sets tabs to 4 spaces.

set ts=4

 

" the following line adds line number to the text.

set nu

 

" the following line activates the syntax highlighting.

syntax on

 

" the following line says to vim to highlight the searched words.

set hlsearch

 

" the following line says to vim to execute incremental search.

set incsearch

 

" the following line enables the use of the mouse.

set mouse=a

 
That's all
Gg1