Originally Posted by ethereal1m
Hmm, I guess there are some differences between doing it in terminal emulator and virtual terminal. I want to do copy and paste of plain text files in virtual terminal, terminal emulator, and any Linux command line shell.
Can I use vi editor to do that? Can I do this in Linux command shell: copy some part of A using vi editor, suspend vi for A, open B with another vi editor and paste the copy to the document? Do I need some sort of clipboard in between copy and paste? I'm not familiar with linux clipboard though.
AFAIK any command line shell that you can interact with is going to be running in a terminal so "and any Linux command line shell" doesn't add anything to the requirement.
vi or vim would be a good way to do it. Use command "vi file1 file2" to open both files in vi or vim and then use ...
:n and :e# to switch between files
Buffers to copy and paste. For example "a5yy (including the ") would name buffer a, do 5 times of yanking a line then, where you want to paste the 5 lines, "ap to name buffer a and put its contents after the current line.
Alternatively you may be able to mark text using Shift+left-mouse-drag followed by Shift+Ctrl+C to copy then paste it where you want by going to the place and starting insert mode then pasting by Shift+Ctrl+V. This works for me but the Shift+Ctrl+C and Shift+Ctrl+V maye be part of the terminal emulator and may not work for you.
X copy and paste works by selecting (that's all!) to copy followed by middle mouse button to paste. On mice without a middle button scroll-wheel click or pressing left and right buttons simultaneously can be used to emulate pressing the middle button.