Copy and paste text in midnight commander (MC) via putty in Linux

by Den   Last Updated June 28, 2017 18:01 PM

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?



Answers 5


I would do it like this:

  1. switch to block selection mode by pressing F3
  2. select a block
  3. switch off block selection mode with F3
  4. press Ctrl+F which will open Save block dialog
  5. press Enter to save it to the default location
  6. open the other file in the editor, and navigate to the target location
  7. press Shift+F5 to open Insert file dialog
  8. press Enter to paste from the default file location (which is same as the one in Save block dialog)
szkj
szkj
March 12, 2015 22:40 PM

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.

mcii-1962
mcii-1962
May 26, 2015 13:17 PM

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

Other hotkeys here.

Midnight Commander tutorial here.

Andrey
Andrey
April 28, 2016 08:13 AM

Putty has ability to copy-paste. In mcedit, hold Shift and select by mouse

xoid
xoid
June 06, 2016 06:37 AM

  1. Hold down the Shift key, and drag the mouse through the text you want to copy. The text's background will become dark orange.
  2. Release the Shift key and press Shift+Ctrl+c. The text will be copied.
  3. Now you can paste the text to anywhere you want by pressing Shift+Ctrl+v, even to the new page in MC.
Eden
Eden
February 15, 2017 04:09 AM

Related Questions


How to right-click to paste in mcedit

Updated July 05, 2017 03:01 AM