Vim Recall繁體中文

Open GUI dialog for search/replace

:promptrepl

Example

Normal 0 / 2

Open GUI dialog for search/replace.

GUI dialog

Dialog
closed
Before & after

Before

GUI dialog

Dialog
closed

After

Search/Replace dialog

Find what
red
Replace with
State
open; awaiting user action

Subject: :promptrepl. Documentation-backed illustration; assumes Win32, Motif or GTK GUI; the remembered replacement text is empty; not replay-verified. Opens the Search/Replace dialog with red as the initial search string. No Find or Replace button has been pressed, so the text is unchanged.

Sample buffer
red blue red
Cursor on line 1, column 1
Details & Vim help

Open GUI dialog for search/replace. 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 :promptr[epl] 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.