Undo the last change
u
Example
Normal 0 / 1Normal 1 / 1ne twoCursor on line 1, column 1one twoCursor on line 1, column 1Restore the buffer before the latest undo block.
Restore the buffer before the latest undo block
Before & after
ne twoCursor on line 1, column 1one twoCursor on line 1, column 1Start 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.