Copy and paste text in midnight commander (MC) via putty in Linux
Solution 1
I would do it like this:
- switch to block selection mode by pressing F3
- select a block
- switch off block selection mode with F3
- press Ctrl+F which will open
Save block
dialog - press Enter to save it to the default location
- open the other file in the editor, and navigate to the target location
- press Shift+F5 to open
Insert file
dialog - press Enter to paste from the default file location (which is same as the one in Save block dialog)
NOTE: There are other environment related methods, that could be more conventional nowadays, but the above one does not depend on any desktop environment related clipboard, (terminal emulator features, putty, Xorg, etc.). This is a pure mcedit feature which works everywhere.
Solution 2
To copy: (hold) Shift + Select with mouse
(copies to clipboard)
To paste in windows: Ctrl+V
To paste in another file in PuTTY/MC: Shift + Ins
Midnight Commander tutorial here.
Solution 3
IF you're using putty in either Xorg or Windows (i.e terminal within a gui) , it's possible to use the "conventional" right-click copy/paste behavior while in mc. Hold the shift key while you mark/copy.
Solution 4
- Hold down the Shift key, and drag the mouse through the text you want to copy. The text's background will become dark orange.
- Release the Shift key and press Shift+Ctrl+c (or Ctrl+Insert). The text will be copied.
- Now you can paste the text to anywhere you want by pressing Shift+Ctrl+v, even to the new page in MC.
Solution 5
According to help in MC:
Ctrl+Insert copies to the mcedit.clip, and Shift+Insert pastes from mcedit.clip.
It doesn't work for me, by some reason, but by pressing F9 you get a menu, Edit > Copy to clipfile
- worked fine.
Related videos on Youtube

Admin
Updated on September 18, 2022Comments
-
Admin 8 months
I use Midnight Commander (MC) editor over putty to edit files
I want to know how to copy text from one file, close it then open another file and paste it?
If it is not possible with Midnight Commander, is there another easy way to copy and paste specific text from different files?
-
mcii-1962 almost 7 yearsLOL - did you actually read the other answers? And your answer is incomplete, you should include what to do with the mouse in order to "select by mouse".
-
Piotr Dobrogost about 6 yearsIf you get unwanted indents in what was pasted then while editing file in Midnight Commander press F9 to show top menu and in Options/Generals menu uncheck Return does autoindent option. Yes, I was happy when I found it too :)
-
Lixas about 2 years
Shift + Mouse right click
works as Paste - it even faster if you are working with mouse