change this. See 'define' for an
example for C++. The string cannot contain an end-of-line, only matches
within a line are found.
When a match is found for a defined macro, the displaying of lines continues
with the next line when a line ends in a backslash.
The commands that start with "[" start searching from the start of the current
file. The commands that start with "]" start at the current cursor position.
The 'include' option is used to define a line that includes another file. The
default is "\^#\s*include", which is for C programs. Note: Vim does not
recognize C syntax, if the 'include' option matches a line inside
"#ifdef/#endif" or inside a comment, it is searched anyway. The 'isfname'
option is used to recognize the file name that comes after the matched
pattern.
The 'path' option is used to find the directory for the include files that
do not have an absolute path.
The 'comments' option is used for the commands that display a single line or
jump to a line. It defines patterns that may start a comment. Those lines
are ignored for the search, unless [!] is used. One exception: When the line
matches the pattern `"^# *define"` it is not considered to be a comment.
If you want to list matches, and then select one to jump to, you could use a
mapping to do that for you. Here is an example: >
:map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " .. nr .. "[\t"<CR>
<
*[i*
[i Display the first line that contains the keyword
under the cursor. The search starts at the beginning
of the file. Lines that look like a comment are
ignored (see 'comments' option). If a count is given,
the count'th matching line is displayed, and comment
lines are not ignored.
*]i*
]i like "[i", but start at the current cursor position.
*:is* *:isearch*
:[range]is[earch][!] [count] [/]pattern[/]
Like "[i" and "]i", but search in [range] lines
(default: whole file).
See |:search-args| for [/] and [!].
*[I*
[I Display all lines that contain the keyword under the
cursor. Filenames and line numbers are displayed
for the found lines. The search starts at the
beginning of the file.
*]I*
]I like "[I", but start at the current cursor position.
*:il* *:ilist*
:[range]il[ist][!] [/]pattern[/]
Like "[I" and "]I", but search in [range] lines
(default: whole file).
See |:search-args| for [/] and [!].
*[_CTRL-I*
[ CTRL-I Jump to the first line that contains the keyword
under the cursor. The search starts at the beginning
of the file. Lines that look like a comment are
ignored (see 'comments' option). If a count is given,
the count'th matching line is jumped to, and comment
lines are not ignored.
*]_CTRL-I*
] CTRL-I like "[ CTRL-I", but start at the current cursor
position.
*:ij* *:ijump*
:[range]ij[ump][!] [count] [/]pattern[/]
Like "[ CTRL-I" and "] CTRL-I", but search in
[range] lines (default: whole file).
See |:search-args| for [/] and [!].
CTRL-W CTRL-I *CTRL-W_CTRL-I* *CTRL-W_i*
CTRL-W i Open a new window, with the cursor on the first line
that contains the keyword under the cursor. The
search starts at the beginning of the file. Lines
that look like a comment line are ignored (see
'comments' option). If a count is given, the count'th
matching line is jumped to, and comment lines are not
ignored.
*:isp* *:isplit*
:[range]isp[lit][!] [count] [/]pattern[/]
Like "CTRL-W i" and "CTRL-W i", but search in
[range] lines (default: whole file).
See |:search-args| for [/] and [!].
*[d*
[d Display the first macro definition that contains the
macro under the cursor. The search starts from the
beginning of the file. If a count is given, the
count'th matching line is displayed.
*[d-default*
Jumps to the previous diagnostic in the current buffer
by default. |vim.diagnostic.jump()| |default-mappings|
*]d*