How to set php auto indent to 4 spaces in VIM. The code is naturally indispensable to the text editing tool vim. 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 makes the code indispensable to text editing tool vim. Automatic indentation uses TABs. even if you delete the tabs and change them to four spaces, the tabs will 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 ciIndentation similar to C language programs
(No) smartindent siImprovements based on autoindent
Variable name
AbbreviationsDescription
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 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.
...