Begin new undoable edit
Ctrl-g u
Example
Insert 0 / 4Insert 1 / 4Insert 2 / 4Normal 3 / 4Normal 4 / 4abInsertion point on line 1, column 3abInsertion point on line 1, column 3abXInsertion point on line 1, column 4abXCursor on line 1, column 3abCursor on line 1, column 2Begin new undoable edit.
Illustrated undo history
- Current block
typed ab
Close the ab undo block; begin a new change.
Illustrated undo history
- Previous block
typed ab- Current block
new, empty
Insert X in the new undo block.
Illustrated undo history
- Previous block
typed ab- Current block
typed X
Finish insertion.
Illustrated undo history
- Previous block
typed ab- Current block
typed X
One undo removes X while retaining the earlier ab block.
Illustrated undo history
- Current block
typed ab
Before & after
abInsertion point on line 1, column 3Illustrated undo history
- Current block
typed ab
abCursor on line 1, column 2Illustrated undo history
- Current block
typed ab
ILLUSTRATION. Insert mode follows typing ab into an empty line. Ctrl-g u separates the next edit into a new undo block.
Details & Vim help
Begin new undoable edit. Use in Insert mode. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.