Posted on May 6, 2020 by admin Changing vim indentation and tab width to 2 spaces
You can add the configuration in the ~/.vimrc file
vim ~/.vimrc
Or add it through a separate plugin file
mkdir -p ~/.vim/plugin vim ~/.vim/plugin/indent.vim
And add the following lines to it
" Set tab width to 2 columns set tabstop=2 " Use 2 columns for indentation set shiftwidth=2 " Use spaces when pressing key set expandtab