What I want is converting tab key to space in vim editor. For example if I enter [tab] key, then it converts to 4 spaces.
I added the following setting in .vimrc
set tabstop=4
set expandtab
set shiftwidth=4
When I enter the first tab, it moves the cursor to position 5 not position 4. But from the second tab, cursor moves to the position 9, 13, 17 and so on.
Only the case of the first tab seems not correct. What did I do wrong?