CodeNaturally, the text editing tool Vim is indispensable. Automatic indentation uses tabs. Even if you delete the tabs and change them to four spaces, the tabs will continue to be used in the next level of indentation, this causes a mix of spaces and tabs.
You can modify the ETC/vimrc information:
Meanings of related variables:
Abbreviation of variable nameDescription
(No) autoindent AIAuto indent: the new line is automatically added with the same indentation as the current row.
(No) cindent CiSimilar to C LanguageProgramIndent
(No) smartindent SiImprovements based on autoindent
Variable nameAbbreviationsDescription
Tabstop = x TSThe number of spaces occupied by a Tab character during editing.
Shiftwidth = x SWNumber of spaces Indented by each layer.
(No) expandtab (NO) etWhether to automatically expand the input tab into spaces. Enter a tab after enabling. CTRL-v <tab> is required.
Softtabstop = X STSAfter et is enabled, the backspace key is used to delete x spaces.
(No) smarttab (NO) staWhen it is enabled, tab at the beginning of the line will add SW spaces, otherwise add ts spaces.