A basic .vimrc configuration file for vim users
.vimrc
is the configuration file for vim. Upon execution vim will read the contents of this file setting up a customized environment. You have to save this file in your home directory. It is important to notice that the commands should not include the initial colon (:).
Here are some useful commands:
syntax on " syntax highlighing
set number " show line numbers
set ruler " show the cursor position all the time
set ignorecase " ignore case when searching
set hlsearch " highlight searches
set tabstop=4 " number of spaces of tab character
set shiftwidth=4 " number of spaces to (auto)indent
set autoindent " always set auto indenting on
set smartindent " smart indent
set cindent " cindent
If you are using vi instead of vim, then save your configuration to ~/.exrc
Be careful not to leave a final end of line or vi will complain it does not understand the command.
set sm
set number
set ignorecase
set tabstop=4
set shiftwidth=4
set autoindent
set showmatch
set ruler