how to set vim tabs to 3 spaces code example
Example 1: vim replace tabs with spaces
" Vi:
" To replace tabs with spaces whilst typing
set tabstop=4 shiftwidth=4 expandtab
Example 2: vim tab 2 spaces
set smartindent
set tabstop=2
set expandtab
set shiftwidth=2