Undo/redo a recent action

If you make a mistake while editing a document in gedit, you can undo the change by pressing Ctrl+Z.

You cannot undo a change after you have closed a gedit file.

To redo the change that was undone, press Ctrl+Shift+Z.