pasting from clipboard in FreeBSD

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pasting from clipboard in FreeBSD

bob self
I usually run the non-gui vim to edit files. I installed vim-lite in
FreeBSD. Sometimes I also firefox in
graphical mode. I open a xterm window and use the non-gui vim. I've read
that you can make vim paste from the
clipboard, but I can't get it to work. I can copy text while in firefox
but I can't paste it in vim (non-gui version).
I've tried "*P and "*+, but that doesn't work. Also :reg does not show
the text. Can this be made to work in vim?

thanks,
Bob

Reply | Threaded
Open this post in threaded view
|

Re: pasting from clipboard in FreeBSD

A.J.Mechelynck
----- Original Message -----
From: "bob self" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, September 17, 2005 3:20 PM
Subject: pasting from clipboard in FreeBSD


>I usually run the non-gui vim to edit files. I installed vim-lite in
>FreeBSD. Sometimes I also firefox in
> graphical mode. I open a xterm window and use the non-gui vim. I've read
> that you can make vim paste from the
> clipboard, but I can't get it to work. I can copy text while in firefox
> but I can't paste it in vim (non-gui version).
> I've tried "*P and "*+, but that doesn't work. Also :reg does not show the
> text. Can this be made to work in vim?
>
> thanks,
> Bob

To paste from the clipboard, or to cut or copy to it, Vim must be aware of
the clipboard. All versions of gvim are, but many versions of console vim
aren't.

A version of Vim is clipboard-aware if the value of has("clipboard") is
non-zero (usually 1), so ':echo has("clipboard")' (with the double quotes
but without the single quotes) will tell you if your Vim has clipboard
access compiled-in.

Even a clipboard-aware Vim, if compiled to access the X11 clipboard, can be
made to disregard it by including -X as a command-line argument. This means
"don't try to check if X11 is started". It is also possible to disable
clipboard access for certain terminals only, by means of the 'clipboard'
option.

Finally, Vim for Unix (or for Unix-like systems), if started in a console
with no access to X11 (e.g., on a machine where X11 hasn't been started, or
on a /dev/tty which has no X11 access even if X11 has been started) will not
be able to access the clipboard regardless of command-line switches, option
settings, or of what was compiled-in.

See
    :help has()
    :help feature-list
    :help +clipboard
    :help clipboard
    :help x11-selection
    :help x11-cut-buffer
    :help -X
    :help 'clipboard'


Best regards,
Tony.