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.
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
.
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.
If you'd like to paste text from clipboard just use Cmd + V - works well
In my case my clipboard was getting bracketed.
Typing reset
in the terminal window (or Cmd+R) fixed my issue and allowed me to paste in nano with Cmd+V as usual.