nano editor on OS X - How to type M-U for undo?

GreenSaguaro picture GreenSaguaro · Mar 3, 2016 · Viewed 26.9k times · Source

I am using nano 2.5.3 on OS X Yosemite, and I see commands at the bottom such as:

M-U Undo M-E Redo

So far, I have not been able to figure out which key or keys that M is referring to. What would be M on OS X?

Answer

Wing Poon picture Wing Poon · Jan 15, 2017

Hit ESC, then U (i.e. one after another, not together).

Note that UNDO is not supported in the default MacOS provided nano (V2.0.6) -- to get the latest version, simply do

brew install homebrew/dupes/nano