vim tabs to spaces

Add to vimrc file:
set expandtab
inserts spaces when tab key is pressed.

The number is set (to 4 by example) by
set tabwidth=4
and
set shiftwidth=4
sets the number of spaces to use for indentation.

Advertisements