vimrc tab size code example
Example 1: vim change tab size
set tabstop=4
Example 2: vim set tab size
:set tabstop=2 shiftwidth=2 expandtab
:retab
# tabstop -> Indentation width in spaces
# shiftwidth -> Autoindentation width in spaces
# expandtab -> Use actual spaces instead of tabs
# retab -> Convert existing tabs to spaces
Example 3: set tab length vim
set shiftwidth=0
set tabstop=4