Keystroke: ⌘ + Z
This feature allows you to reverse or "take back" various editing operations, such as Search & Replace, as well as erasing recent passages of text.
Notes:
(1) Undo only works during the current open session of the document. Once you close a document, regardless of whether or not you have saved it, Undo is not available.
(2) Undo is limited to the last 100 editing operations. (Fortunately, "Replace All" counts as one operation.)