A basic .vimrc configuration file for vi users

.vimrc is the configuration file for vi. Whenever executed, vi will read this file’s contents setting up a customized environment. In order to work, you have to save it 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

Leave a Reply