Replace tabs with spaces in vim

I would like to convert tab to spaces in gVim. I added the following line to my _vimrc:

set tabstop=2

It works to stop at two spaces but it still looks like one tab key is inserted (I tried to use the h key to count spaces afterwards).

I’m not sure what should I do to make gVim convert tabs to spaces?

12 Answers
12

Leave a Comment