:help autoindent : Copy indent from current line when starting a new line (typing
in Insert mode or when using the “o” or “O” command). …:help smartindent : Do smart autoindenting when starting a new line. Works for C-like
programs,but can also be used for other languages. …Normally ‘autoindent’ should also be on when using ‘smartindent’.
An indent is automatically inserted:
- After a line ending in ‘{‘.
- After a line starting with a keyword from ‘cinwords’.
Before a line starting with ‘}’ (only with the “O” command).
When typing ‘}’ as the first character in a new line,that line is
given the same indent as the matching ‘{‘. …
smartindent在开始新行时也可以从当前行处理缩进。这意味着autoindent功能是smartindent功能的子集,如果smartindent打开,则不需要autoindent,对吗?为什么要打开autoindent?