Yes copying text is a bit strange in nano, and somewhat confusing due to conflicting reports on the webs and lack of clarity (or common sense...) both in the way it was implemented (IMHO) and in the official docs...
Per the docs:
4.3 The Cutbuffer
Text can be cut from a file, a whole line at a time, by using the ’Cut Text’ command (default key binding: ^K). The cut line is stored in the cutbuffer.
Consecutive strokes of ^K will add each cut line to this buffer, but a ^K after any other keystroke will overwrite the entire cutbuffer.
The contents of the cutbuffer can be pasted back into the file with the ’Uncut Text’ command (default key binding: ^U).
A line of text can be copied into the cutbuffer (without cutting it) with the ’Copy Text’ command (default key binding: M-6).
Since basically, you use CTRL+K to cut, CTRL+U to paste, and the cut line stays in the cutbuffer, you can do a quick cut and paste to replace, and then paste again to achieve a "copy."
But I don't like this "workaround"...
The last part of the docs, says how to copy: using ALT+6 (to copy) ad then pasting using CTRL+U to paste.
(Docs actually say "M" key, which means the Meta key, as mook765 said: "the Meta
-key which does not exist"... and is usually just the ALT on modern keyboards.)
You can also select multiple lines using ALT+6 and moving the section with your arrow keys.
Hope this helps.
M-6
) and Alt-^ (akaM-^
) work for me.