DEV Community

loading...

Discussion on: From Vim to the system clipboard in one command

Collapse
talha131 profile image
Talha Mansoor

Unfortunately mine don't. I'm on Arch so maybe I should try neovim or vim-gtk.

@aminnairi , does + register work for you without xclip? I have been copying Vim selection system clipboard using + since ages on MacBook without any additional configuration.

Also it is possible that your Vim version is not compiled with X11 clipboard integration. You can check with :version command. I suspect this is the reason * register did not work for you.

Thread Thread
aminnairi profile image
Amin Author

Thanks for your reply @talha131 !

Yes, we arrived at the same conclusion. I've previously been running this command

$ vim --version | grep clipboard

And the output is

-clipboard         +keymap            +postscript        +vartabs
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard

From what I understood, all minuses mean that there is no support for that feature and unfortunately the clipboard feature is not on the Vim installation I have.

I tried the * and the + registers without any luck...

Thread Thread
talha131 profile image
Talha Mansoor

Right. You will either have to look for a Vim package for your Linux distribution that has clipboard support or compile VIm yourself with all the feature set. Been there, done that!

I migrated to NeoVim a couple of years ago to avoid precisely such issues, and haven't looked back to Vim since then. NeoVim provides a consistent experience and features across all the platforms.

Thread Thread
aminnairi profile image
Amin Author

I waited for an event like this and someone like you to convince me to climb the step and use NeoVim. I guess now is the time!