Results 1 to 7 of 7

Thread: Vim: re-compile to use system clipboard

  1. #1

    Default 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?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,603
    Blog Entries
    1

    Default Re: Vim: re-compile to use system clipboard

    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
    Konsole
    Qterm
    LXterm
    Terminator

    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...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    11,995
    Blog Entries
    3

    Default Re: Vim: re-compile to use system clipboard

    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.
    openSUSE Leap 15.1; KDE Plasma 5;

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,603
    Blog Entries
    1

    Default Re: Vim: re-compile to use system clipboard

    Quote Originally Posted by nrickert View Post
    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.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5

    Default Re: Vim: re-compile to use system clipboard

    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
    -clipboard
    -xterm_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.


  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    11,995
    Blog Entries
    3

    Default Re: Vim: re-compile to use system clipboard

    Quote Originally Posted by alton View Post
    I would like to copy snippets of text from a browser to a file that I have open in vim.

    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).
    openSUSE Leap 15.1; KDE Plasma 5;

  7. #7

    Default Re: Vim: re-compile to use system clipboard

    Quote Originally Posted by nrickert View Post
    I do that often. It works fine.


    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •