Here is part of my vim setting:
set tabstop=4
set sts=4
set expandtab
set softtabstop=4
set shiftwidth=4
When I edit a file in /mtp/test, type print('ok') in the first line, and type 1> in ex mode, I get the normal result, character p is in the 5th column. > moves the whole line to the right by 4 whitespaces.
Now I edit a file in another directory /home/debian/mydoc/source/shell/,
sudo -E vim /home/debian/mydoc/source/shell/test.py
print("ok")
When I type 1> in ex mode, I get the strange output:

Character p is in the 4 column. > moves the whole line to the right by 3 whitespaces!
It shocks me!
I find that for all file which ended with .rst the value shiftwidth is 3, how to search which plugin set it with 3?
:set shiftwidth?Also your second command usessudo -E, just to be sure the problem doesn't come from there have you reproduced the issue withoutsudo? – statox Feb 17 '21 at 11:26:verbose set shiftwidthshould give you the answer you're looking for – statox Feb 17 '21 at 12:04