Vim Recall繁體中文

Save undo information to a file

:wundo

Example

Normal 0 / 2

Save undo information to a file.

Undo fixture

notes.undo
absent

Undo history

Current text
blue
Available undo
red
Before & after

Before

Undo fixture

notes.undo
absent

Undo history

Current text
blue
Available undo
red

After

Undo fixture

notes.undo
saved undo history for blue: undo restores red

Undo history

Current text
blue
Available undo
red

Subject: :wundo. Documentation-backed illustration; assumes +persistent_undo and writable absent file; not replay-verified. Saves the existing red → blue undo history to notes.undo; buffer text is unchanged.

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

Save undo information to a file. 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 :wu[ndo] 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.