Tabs in vi

:set expandtab To insert spaces whenever tab key is pressed.

:set tabstop=n Changes the number of spaces a tab is replaced with

:retab Changes tab to match new settings

:set shiftwidth=n Changes the number of spaces for indentation

My options:

:set tabstop=4
:set shiftwidth=4
:set expandtab
:retab
:set ai