Yes, I'm aware of what :h smarttab
says, but I still cannot figure it out.
" My vimrc
set backspace=indent,eol,start
set tabstop=8 " I always keep this 8
set shiftwidth=4
set softtabstop=-1 " To use the width of `shiftwidth`
set expandtab
set smarttab
When on, a
<Tab>
in front of a line inserts blanks according toshiftwidth
.tabstop
orsofttabstop
is used in other places. A<BS>
will delete ashiftwidth
worth of space at the start of the line.When off, a
<Tab>
always inserts blanks according totabstop
orsofttabstop
.shiftwidth
is only used for shifting text left or rightshift-left-right
.
But I observe the same behavior even if smarttab
is off. Pressing the Tab key inserts 4 spaces, and pressing the Backspace deletes 4 spaces. Why does it happen? What is the reason to use smarttab
then?