tnas wrote:
Hello folks,

I'm a begginer in the use of the vi, and I have a bit question: How can I copy a text between differents windows ?

Thanks in advance.


Yank it in one and put it in the other: e.g., 5yy to yank five lines, Ctrl-W w to switch to the next (split) window, move the cursor to where you want to insert, p to put after the cursor line or P to put before it.

See
        :help change.txt
        :help windows.txt

If by "different window" you mean another program (including a different instance of Vim) you'll have to use the system clipboard, which Vim sees as register + : "+5yy to yank 5 lines into the clipboard, "+p to paste after the cursor, from the system clipboard.

On Unix this means you need both a version of Vim which is aware of the X clipboard, and a terminal which has access to it.

To see if Vim is aware of the clipboard:

        :echo has("clipboard")

zero means no (not compiled with clipboard support) nonzero means yes (clipboard support compiled-in).

A terminal which has access to it means (on Unix) an xterm, konsole, or similar terminal emulator displaying through the X server. The "pure text" /dev/tty console has no access to X.


Best regards,
Tony.

Reply via email to