This option
is used for the commands "[i", "]I", "[d", etc.
Normally the 'isfname' option is used to recognize the file name that
comes after the matched pattern. But if "\zs" appears in the pattern
then the text matched from "\zs" to the end, or until "\ze" if it
appears, is used as the file name. Use this to include characters
that are not in 'isfname', such as a space. You can then use
'includeexpr' to process the matched text.
See |option-backslash| about including spaces and backslashes.
*'includeexpr'* *'inex'*
'includeexpr' 'inex' string (default "")
local to buffer
Expression to be used to transform the string found with the 'include'
option to a file name. Mostly useful to change "." to "/" for Java: >vim
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
< The "v:fname" variable will be set to the file name that was detected.
Note the double backslash: the `:set` command first halves them, then
one remains in the value, where "\." matches a dot literally. For
simple character replacements `tr()` avoids the need for escaping: >vim
setlocal includeexpr=tr(v:fname,'.','/')
<
Also used for the |gf| command if an unmodified file name can't be
found. Allows doing "gf" on the name after an 'include' statement.
Note: Not used for |<cfile>|.
If the expression starts with s: or |<SID>|, then it is replaced with
the script ID (|local-function|). Example: >vim
setlocal includeexpr=s:MyIncludeExpr()
setlocal includeexpr=<SID>SomeIncludeExpr()
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
It is more efficient if the value is just a function call without
arguments, see |expr-option-function|.
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 'includeexpr' |textlock|.
*'incsearch'* *'is'* *'noincsearch'* *'nois'*
'incsearch' 'is' boolean (default on)
global
While typing a search command, show where the pattern, as it was typed
so far, matches. The matched string is highlighted. If the pattern
is invalid or not found, nothing is shown. The screen will be updated
often, this is only useful on fast terminals.
Note that the match will be shown, but the cursor will return to its
original position when no match is found and when pressing <Esc>. You
still need to finish the search command with <Enter> to move the
cursor to the match.
You can use the CTRL-G and CTRL-T keys to move to the next and
previous match. |c_CTRL-G| |c_CTRL-T|
Vim only searches for about half a second. With a complicated
pattern and/or a lot of text the match may not be found. This is to
avoid that Vim hangs while you are typing the pattern.
The |hl-IncSearch| highlight group determines the highlighting.
When 'hlsearch' is on, all 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