If you are a Linux user, you probably use vim a lot. The “vi” command typically maps to vim. One of the problems with the default setups for most Linux distros is that comments are dark blue and tabs are too large. This post shows a “.vimrc” file that you can simply add to your HOME directory, and then once you use vim, comments will appear in a turquoise (more readable) color and tabs are set to 3 (you can use whatever you like).

To create the .vimrc file simply login to your host and issue the following commands:


cd ~
vi .vimrc

The enter the following code to make the vim changes I describe above:


set encoding=utf-8
set ruler

” Remove distro changes ”
set nocompatible

” Display Line Numbers ”
set number

” Comments color ”
:color desert

” tabs, etc…”
set shiftwidth=3
set softtabstop=3
set expandtab

” Show line end and beginning ”
set listchars=eol:$,tab:>-,trail:.,nbsp:_,extends:+,precedes:+
set list

Advertisements