set tabs spaces vim code example
Example 1: vim tab 2 spaces
set smartindent
set tabstop=2
set expandtab
set shiftwidth=2
Example 2: linux vim set tab to 4 spaces
syntax enable
set smartindent
set tabstop=2
set expandtab
set shiftwidth=2
syntax enable