Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

nano

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?

like image 925
GreenSaguaro Avatar asked Mar 03 '16 20:03

GreenSaguaro


People also ask

How do I undo in nano text editor?

To undo these changes, simply press Alt + U on your keyboard. The -u option should provide you with the necessary permissions to edit the file.

How do I undo in sudo nano?

Nano's undo code is experimental. As you'll see from the nano manual (type " man nano " in a Terminal to read that), you'll need to start nano with the -u option (so " nano -u somefile. txt "), and then you can use Alt-U to undo.

How do you select all and delete in nano?

Now when all the text has been selected, just press Ctrl+ K key combination to delete the selected text.


1 Answers

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 
like image 67
Wing Poon Avatar answered Sep 28 '22 10:09

Wing Poon