Vim Recall繁體中文

Like ":ijump" but shows match in preview window

:psearch

Example

Normal 0 / 2

Like ":ijump" but shows match in preview window.

Windows

main.c Active
#include "paint.h" Paint();
Before & after

Before

Windows

main.c Active
#include "paint.h" Paint();

After

Windows

paint.h [Preview]
void Paint(void);
main.c Active
#include "paint.h" Paint();

Subject: :psearch. Documentation-backed illustration; assumes +quickfix and +find_in_path, include pattern matching #include, path includes fixture directory, readable paint.h, previewpopup empty, nosplitbelow, splitkeep=cursor, enough height for the preview split, unmapped keys and no interfering callbacks or pending prompts; not replay-verified. Finds Paint through the include search and displays paint.h's declaration in the preview window, retaining main.c focus.

Sample buffer
#include "paint.h"
Paint();
Cursor on line 1, column 1
Details & Vim help

Like ":ijump" but shows match in preview window. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :ps[earch] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.