Vim Recall繁體中文

]I · Square bracket commands

]I

Example

Normal 0 / 1

Show all lines found in current and included files that contain the word under the cursor, start searching at cursor position.

Prepared source workspace

#define LIMIT 20
int target_later;
int target;
Current
example.c
Include
later.h
Keyword
target

Illustrated windows

example.c Active
Active source
Before & after

Before

Prepared source workspace

#define LIMIT 20
int target_later;
int target;
Current
example.c
Include
later.h
Keyword
target

Illustrated windows

example.c Active
Active source

After

Prepared source workspace

#define LIMIT 20
int target_later;
int target;
Current
example.c
Include
later.h
Keyword
target

Include-search output

later.h:3
int target;

ILLUSTRATION. Prepared example.c includes later.h below the cursor. Use C-style include/define patterns, path=., iskeyword includes underscore, and no comment matches. All sources are illustrated data; the illustration opens no files, while real ]I reads included files. For the ] form, searching continues below the cursor's line, reaching the subsequent include. Prepared command area: cmdheight=4, normal interactive non-silent output, no pending messages, and enough columns for the filename and numbered match row without wrapping. The two output lines fit without a hit-enter prompt; the panel summarizes the matches.

Sample buffer
#define LIMIT 10
int target;
use LIMIT target;
#include "later.h"
Cursor on line 3, column 11
Details & Vim help

Show all lines found in current and included files that contain the word under the cursor, start searching at cursor position.

Show all lines found in current and included files that contain the word under the cursor, start searching at cursor position. Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.