Vim: re-compile to use system clipboard

I have opensuse Leap 42.3 installed. Vim 7.4.326, in an xterm, is my editor of choice. Vim is not compiled with the clipboard or xterm_clipboard feature.

I would like to re-compile vim to use the system clipboard.

I downloaded the rpm file containing the source, vim-7.4.326-12.1.src.rpm, and extracted the source files. I then ran configure, then make and checked the output executable in the src directory:
vim –version, it still lacked the clipboard and xterm_clipboard features.

Do I need additional libraries? Or is there a switch to set on configure?

Why re-compile xterm?
Personally, I leave that alone so that I have a bare bones, back-to-basics terminal.

You can choose among the many consoles already enhanced by openSUSE (and there are others) like

And, there are probably many more even I haven’t run into yet…
IIRC long ago I think I installed a vim plugin to enable clipboard sharing, but I can’t remember for sure… There are numerous results if you Google this…


What do you think is missing?

I’m using “vim” in an “xterm” as my editor of choice. And the clipboard seems to be working fine for me.

As far as I know, when I run “vim” that way it is “xterm” which actually handles the clipboard.

I’d have to play around with my vim to verify,
By default,
IIRC the clipboard works fine <within> the vim application, but I’ve also found that it’s not a clipboard shared with other applications or the Desktop.
At least, by default. As I described, I seem to remember I installed a plugin (among many to enhance vim) but from a Google search it looks like it might be possible to also make a simple config change.


To answer the question, why am I using xterrm: It’s an old habit, I’ve used xterm for 20+ years.

I’m trying to re-compile vim. When I run vim --version to the list of features vime has been compiled with, I get:
vim --version | gr ep clipboard

I would like to copy snippets of text from a browser to a file that I have open in vim. For example:

  1. select the text via ctrl-c
  2. paste the text into the file opened in vim, "+p or "*p. Whichever works.

I do that often. It works fine.

For example:

  1. select the text via ctrl-c
  2. paste the text into the file opened in vim, "+p or "*p. Whichever works.

I don’t know about that. I just select the text by selecting the text (no ctrl-c needed).
I paste with middle-click while vi is in insert mode. And “middle-click” is just clicking with the scroll wheel.

I’ve been doing that since forever, though sometimes with “vi”. And before the scroll wheel was invented, it was usually the middle button of a 3-button mouse. But sometimes it was the simultaneous click of left/right buttons with a two button mouse (middle-click emulation).

Thanks. Middle-click works. At a recent job, I had been using "+p to paste…