How to Undo in Vim?

Press `u` to undo the last change

Press `U` to undo all changes on the current line

Press `Ctrl-r` to redo an undone change

Press `:undo` to undo in command-line mode

Press `:redo` to redo in command-line mode

Press `g-` to go to older text state

Press `g+` to go to newer text state

Suggested for You

Trending Today