Vim Recall繁體中文

[D · Square bracket commands

[D

Example

Normal 0 / 1

Show all defines found in current and included files matching 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
LIMIT

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
LIMIT

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
LIMIT

Include-search output

example.c:1
#define LIMIT 10
later.h:1
#define LIMIT 20

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; no file is opened. Search begins at file start. Prepared command area: cmdheight=6, no pending messages, and enough columns for every filename and macro row without wrapping. The four 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 5
Details & Vim help

Show all defines found in current and included files matching the word under the cursor, start searching at beginning of active file.

Show all defines found in current and included files matching 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.