In most cases, the TAB key width is set to 4 spaces, this can be based on their
Code style, but when you submit code for a different language, Python
and C when there is a difference. C Words are generally tab-key indentation, while Python commits the code
The time is a space, this time need to tab key to replace the relative also that the space.
Vim Configuration file Modification
After adding the following code to the. VIMRC, restart Vim to create 4 spaces by pressing TAB:
Set ts=4 (Note: TS is the abbreviation for TabStop, set tab width 4 spaces)
Set Expandtab
For a saved file, you can use the following method to replace the Space and tab:
tab is replaced with a space:
: Set ts=4
: Set Expandtab
:%retab!
Space is replaced with tab:
: Set ts=4
: Set Noexpandtab
:%retab!
Note : Add! is the tab that is used to process non-whitespace characters, that is, all tabs, if not added!, only the tab at the beginning of the line is processed
Set tab under VIM