On 2009-11-25, Peter Berntsen wrote:
> Hi,
> I'm running slackware 13 with Xfce or KDE desktop.
> 
> I doesn't work to paste text to and from one Vim into another separate
> Vim, terminal or Firefox.
> Basically I can't reproduce what is discussed in the help section;
> Making GUI Selections *clipboard*.
> 
> If Shift + marking text works from Vim to gVim but NOT Vim to Vim.
> Found the Shift workaround here:
> http://www.linuxquestions.org/questions/showthread.php?t=712129&referrerid=499545
> 
> I want to use Vim and not gVim. In Ubuntu with GNOME it worked.
> 
> Any suggestions on how to come around this?

Copying and pasting with the mouse between vim instances depends on
at least three factors:

1.  the features with which vim was compiled;
2.  the setting of certain vim options; and
3.  the terminal.

To find out which features your vim has, execute

    :version

and see

    :help :version

for an explanation.

I'm not sure exactly which features are needed for copy and paste to
work in an X terminal, but I think you need

    +clipboard
    +mouse
    +mouse_xterm
    +X11
    +xterm_clipboard

Some distributions (e.g., Red Hat Enterprise), compile vim without
any GUI or clipboard support.  That's my guess at what's happening
here.  If so, and if you also have gvim, then try running gvim as
"gvim -v".  That will force gvim to run as vim, i.e., in the
terminal.  If that fixes the problem, then you could create an
alias, e.g.,

    alias vim="gvim -v"

or a symlink, e.g.,

    ln -s /usr/X11R6/bin/gvim ~/bin/vim

so that executing vim will actually execute gvim in a terminal.

You may need to "set mouse=a" to get this all to work as well.

When you hold the shift key to copy and paste, you're actually
copying and pasting to and from the terminal, not vim.

There are other possibilities, but I have to rush off at the moment.
I will say one more thing:  that forum is a prime example of why I
don't like web forums--they receive a lot of replies from people
who have absolutely no idea what they're talking about.

HTH,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to