The default tab of Vim editor is 8 spaces, but for pythoner, it must be adjusted to 4 spaces.
Methods as below:
Add the following settings to the ~/.vimrc file:
1 set ts= 4 #Set tabstop to 4 spaces 2 set expandtab
Re-open vim and you can tab happily~