标签:des style os io for ar art sp line
Copy indent from current line when starting a new line (typing
in Insert mode or when using the “o” or “O” command). If you do not
type anything on the new line except or CTRL-D and then type
, CTRL-O or , the indent is deleted again.
简单来讲就是产生的新行的缩进值与上一行保持一致。
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 ‘{‘.
在autoindent的基础上更加smart了:对编程中{}的相关缩进做了较好的支持。
Enables automatic C program indenting.
对C程序适配的自动缩进。并且与“cinkeys”、“cinwords”、“cinoptions”配合产生效果。
Expression which is evaluated to obtain the proper indent for a line.
It is used when a new line is created, for the |=| operator and
in Insert mode as specified with the ‘indentkeys‘ option.
When this option is not empty, it overrules the ‘cindent‘ and
‘smartindent‘ indenting. When ‘lisp‘ is set, this option is
overridden by the Lisp indentation algorithm.
更加个性化的指定缩进的设置。还可以用Lisp的缩进设置哦~
There are in fact four main methods available for indentation, each one
overrides the previous if it is enabled, or non-empty for ‘indentexpr‘:
‘autoindent‘ uses the indent from the previous line.
‘smartindent‘ is like ‘autoindent‘ but also recognizes some C syntax to increase/reduce the indent where appropriate.
‘cindent‘ Works more cleverly than the other two and is configurable to different indenting styles.
‘indentexpr‘ The most flexible of all: Evaluates an expression to compute the indent of a line. When non-empty this method overrides the other ones. See |indent-expression|.
标签:des style os io for ar art sp line
原文地址:http://my.oschina.net/u/1864567/blog/307058