For converting tabs to spaces while editing the source codes
1) To insert space characters whenever the tab key is pressed.
2) To control the number of space characters that will be inserted when the tab key is pressed, set the 'tabstop' option.
To insert 4 spaces for a tab, you have to type the below command
1) To insert space characters whenever the tab key is pressed.
:set expandtab
2) To control the number of space characters that will be inserted when the tab key is pressed, set the 'tabstop' option.
To insert 4 spaces for a tab, you have to type the below command
:set tabstop=4