I set the expandtab
option to on, but still I don't get spaces when I click tab, but I get actual tab.
This is how I set it:
set expandtab
set shiftwidth=4
set softtabstop=4
First I thought as this question says that a plugin is override it, but I executed:
:verbose set expandtab?
and indeed I get that last set is the line in my vimrc
how can I solve it?
set paste
in addition to yourvimrc
settings. Thepaste
setting also appliesnoexpandtab
, and can cause this experience, butexpandtab
, if originally set, is restored once youset nopaste
. Check:set paste?
, it could be the answer.