Here's a quick tip on how to convert the tab key in vim to spaces instead of the tab character. Put the following in your ~/.vimrc
:
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
Or the following command when the editor is open:
:set et sw=2 ts=2 sts=2
Head over to this article to read up more on each setting/option specified above.
Top comments (0)