Home Explore Blog CI



neovim

52th chunk of `runtime/doc/options.txt`
bf62227836bc901c8992e57fa632866664637fbef79c4a810000000100000fa5
 matched strings are highlighted too while
	typing a search command. See also: 'hlsearch'.
	If you don't want to turn 'hlsearch' on, but want to highlight all
	matches while searching, you can turn on and off 'hlsearch' with
	autocmd.  Example: >vim
		augroup vimrc-incsearch-highlight
		  autocmd!
		  autocmd CmdlineEnter /,\? :set hlsearch
		  autocmd CmdlineLeave /,\? :set nohlsearch
		augroup END
<
	CTRL-L can be used to add one character from after the current match
	to the command line.  If 'ignorecase' and 'smartcase' are set and the
	command line has no uppercase characters, the added character is
	converted to lowercase.
	CTRL-R CTRL-W can be used to add the word at the end of the current
	match, excluding the characters that were already typed.

						*'indentexpr'* *'inde'*
'indentexpr' 'inde'	string	(default "")
			local to buffer
	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
	only used when 'lispoptions' contains "expr:1".
	The expression is evaluated with |v:lnum| set to the line number for
	which the indent is to be computed.  The cursor is also in this line
	when the expression is evaluated (but it may be moved around).

	If the expression starts with s: or |<SID>|, then it is replaced with
	the script ID (|local-function|). Example: >vim
		set indentexpr=s:MyIndentExpr()
		set indentexpr=<SID>SomeIndentExpr()
<	Otherwise, the expression is evaluated in the context of the script
	where the option was set, thus script-local items are available.

	The advantage of using a function call without arguments is that it is
	faster, see |expr-option-function|.

	The expression must return the number of spaces worth of indent.  It
	can return "-1" to keep the current indent (this means 'autoindent' is
	used for the indent).
	Functions useful for computing the indent are |indent()|, |cindent()|
	and |lispindent()|.
	The evaluation of the expression must not have side effects!  It must
	not change the text, jump to another window, etc.  Afterwards the
	cursor position is always restored, thus the cursor may be moved.
	Normally this option would be set to call a function: >vim
		set indentexpr=GetMyIndent()
<	Error messages will be suppressed, unless the 'debug' option contains
	"msg".
	See |indent-expression|.

	The expression will be evaluated in the |sandbox| when set from a
	modeline, see |sandbox-option|.
	This option cannot be set in a modeline when 'modelineexpr' is off.

	It is not allowed to change text or jump to another window while
	evaluating 'indentexpr' |textlock|.

						*'indentkeys'* *'indk'*
'indentkeys' 'indk'	string	(default "0{,0},0),0],:,0#,!^F,o,O,e")
			local to buffer
	A list of keys that, when typed in Insert mode, cause reindenting of
	the current line.  Only happens if 'indentexpr' isn't empty.
	The format is identical to 'cinkeys', see |indentkeys-format|.
	See |C-indenting| and |indent-expression|.

			*'infercase'* *'inf'* *'noinfercase'* *'noinf'*
'infercase' 'inf'	boolean	(default off)
			local to buffer
	When doing keyword completion in insert mode |ins-completion|, and
	'ignorecase' is also on, the case of the match is adjusted depending
	on the typed text.  If the typed text contains a lowercase letter
	where the match has an upper case letter, the completed part is made
	lowercase.  If the typed text has no lowercase letters and the match
	has a lowercase letter where the typed text has an uppercase letter,
	and there is a letter before it, the completed part is made uppercase.
	With 'noinfercase' the match is used as-is.

						*'isexpand'* *'ise'*
'isexpand' 'ise'	string	(default "")
			global or local to buffer |global-local|
	Defines characters and patterns for completion in insert mode.  Used
	by the |complete_match()|

Title: Options 'indentexpr', 'indentkeys', and 'infercase'
Summary
This section describes the 'indentexpr' option, an expression that determines line indentation, overruling 'cindent' and 'smartindent'. It covers its usage, local functions, return values, restrictions, and sandbox environment. The 'indentkeys' option defines keys that trigger reindenting when typed in Insert mode if 'indentexpr' is enabled. The 'infercase' option adjusts the case of keyword completion matches based on typed text when 'ignorecase' is on.