As I have mentioned in Eclipse editor configuration post that space should be used in place of tab and how to configure Eclipse editor for this. Well If you are VIM lover and you are little disappointed by the previous post then this post will help you to configure VIM.
Configuring VIM is really easy, you just have to put desired rules in
.vimrc file. If you don’t find
.vimrc file in your home directory then create one by executing following command.
Once file is created you can open the file using any editor and put these rules.
set smartindent set tabstop=4 set shiftwidth=4 set expandtab
The number of spaces can be configured by changing the
shiftwidth values. You may have noticed here that I have configured 4 spaces for a tab. I have also put rules to enable the smart indentation this comes handy while you are writing long code and don’t want to manually put spaces for every line.
Hope this blog helped you in some way. If you like this blog then please share it. You can also leave your comment below. You can find Facebook page here.