Undo recent changes on a line
U
Example
Normal 0 / 1Normal 1 / 1ne twoCursor on line 1, column 1one twoCursor on line 1, column 1Restore the line where the latest change was made.
Restore the line where the latest change was made
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 line where the latest change was made.
U undoes the latest changes on that one line, not an arbitrary line selected by moving the cursor. U itself counts as a change, so u can undo it and another U can reverse it.