[I · Square bracket commands
Example
Normal 0 / 1Normal 1 / 1Show all lines found in current and included files that contain the word under the cursor, start searching at beginning of active file.
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
List all matching source lines.
Prepared source workspace
#define LIMIT 20 int target_later; int target;
- Current
example.c- Include
later.h- Keyword
target
Include-search output
- example.c:2
int target;- example.c:3
use LIMIT target;- later.h:3
int target;
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
- example.c:2
int target;- example.c:3
use LIMIT target;- 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. Search begins at file start. Prepared command area: cmdheight=7, no pending messages, and enough columns for every filename and matching row without wrapping. The five output lines fit without a hit-enter prompt; the panel summarizes the matches.
#define LIMIT 10
int target;
use LIMIT target;
#include "later.h"Cursor on line 3, column 11Details & Vim help
Show all lines found in current and included files that contain the word under the cursor, start searching at beginning of active file.
Show all lines found in current and included files that contain the word under the cursor, start searching at beginning of active file. Use in Normal mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.