Vim Recall繁體中文

Undo the last change

u

Example

Normal 0 / 1
ne two
Cursor on line 1, column 1

Restore the buffer before the latest undo block.

Before & after
Before
ne two
Cursor on line 1, column 1
After
one two
Cursor on line 1, column 1

Start in Normal mode. Before is prepared by deleting the first character with x; the example then demonstrates the displayed command.

Details & Vim help

Example replayed in Vim

Restore the buffer before the latest undo block.

A typed Insert session normally forms one undo block; leaving and re-entering Insert mode usually separates blocks. A count undoes several blocks. Cursor movement and undo break commands can affect grouping.