Is there any way to copy all lines from open file to clipboard in VI editor. I tried yG but it's not using clipboard to store those lines.
So is it possible?
Is there any way to copy all lines from open file to clipboard in VI editor. I tried yG but it's not using clipboard to store those lines.
So is it possible?
(in reply to @rshdev, and to avoid having to recompile vim with +xterm_clipboard per @nelstrom in comments on OP)
there's a program called xclip that works like putclip on Ubuntu 11:
it's not installed by default. to install, use:
I tried a few of the commands that people have mentioned above. None worked. Then I got hold of the simplest of them all.
Step 1:
vi <filename>
Step 2: Right click on the title bar of the Putty window
Step 3: Select "Clear scrollback" (to avoid copying the rest of your SSH session)
Step 4: Right click again and select "Copy all to clipboard".
You can use "cat" command to open file and use mouse to copy
Do copy the whole file inside the vim or its tabs
then move to a tab and paste by
and to cut the whole file use