Starting with nano version 2.3.5 in July 2014, undo/redo became standard: Alt-U or Option-U or EscU - undo Alt-E or Option-E or EscE - redo