I would like to copy and paste multiple lines in the command line text editor nano on OSX Mountain Lion 10.8.5

Alt-6 and Ctrl-U do not work as on other platforms.


The problem is that in Mac Terminal, the alt key doesn't work unless you change the Terminal Preferences to enable Use Option as Meta key. Then alt+6 will work properly to copy.

Another choice is to use the ESC key instead of alt. So do ESC+6.

| improve this answer | |

You may be able to cut multiple lines into a buffer using Ctrl-K, and paste them back in using Ctrl-U.

Note that this does not copy the text onto your OS X clipboard, but uses a buffer inside of nano (or the shell?) to perform the actions.

| improve this answer | |

If you'd like to paste text from clipboard just use Cmd + V - works well

| improve this answer | |
  • Welcome to Ask Different! That works for current versions of macOS, would it work for OS X Lion as requested by the OP? – Glorfindel Nov 24 '19 at 9:06
  • My macOS version is Catalina – Alexey Mironov Jun 4 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .