Wednesday, November 30, 2011

Re: Installing vim 7.3 as a user - can't copy to/from system clipboard

On 30/11/11 11:48, ACR wrote:
> Hi,
>
> I am trying to install vim 7.3 locally on a red hat machine in which
> I have a user account. I downloaded the source code from vim.org and
> ran the following commands.
>
> ./configure --prefix=/home/<username>/.local --enable-gui --with-x --
> with-features=normal
> make install DESTDIR=/home/<username>/.local
>
> Now, I am unable to copy the data to/from the system clipboard. I
> googled to find out that that this happens when vim is compiled
> without X/gui support. Hence, I tried the options (given above) while
> compiling, again with the same results. Can someone help me out?
>
> Given below are the version details (obtained by entering :version
> from vim)
> --------------------------------------------------------------------------------------------------------------------------------
> Normal version with X11-Motif GUI. Features included (+) or not (-):
> -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset
> +cindent
> +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
----------------^^^^^^^^^^
> +comments
[...]

This Vim version should be able to use the system clipboard, as long as
it is running in a terminal with an X connection. So:

- running Vim in the linux console (Ctrl-Alt-F1 to Ctrl-Alt-F6) or
invoking it with -X on the command-line, prevents communication with the
clipboard.

- In gvim or in Vim-in-xterm you should be able to use the + register
which is what most programs use with Edit → Paste, Edit → Copy, Edit →
Cut, or the * register which is what most programs use for a selection
or for MiddleMouse pasting. Unlike what happens on Windows, on X11
systems these two registers are distinct.

- In gvim, you can also use Edit → Paste, Edit → Copy, Edit → Cut

- The Visual area is normally not automatically copied into "* -- if you
want it (which I don't recommend) you can use

:set clipboard+=autoselect guioptions+=a

- In gvim, or in terminals where Vim can access both the mouse and the
clipboard, you can use <MiddleMouse> to paste the * register.

- About downloading the source code: you are aware, aren't you, that as
of this writing there have been 356 bugfixes since Vim 7.3 was released?
See http://vim.wikia.com/wiki/Getting_the_Vim_source_with_Mercurial
about how to get the latest sources.

Best regards,
Tony.
--
"Gosh that takes me back ... or forward. That's the trouble with time
travel, you never can tell."
-- Dr. Who

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment