You are not logged in.

#1 2013-11-08 12:32:13

unidob
Member
Registered: 2010-07-23
Posts: 9

Clipboard is not working on vim (package gvim)

Hello everybody,

I have installed the gvim package on my Arch but I cannot use X clipboard function. I press "*yy or "+yy and nothing is copied. I set clipboard=unnamed, mouse=a and I have +xterm_clipboard when I write vim --version. I really don't know what is failing. My WM is KDE by the way.

Anyone with the same issues?

Last edited by unidob (2013-11-08 14:21:57)

Offline

#2 2013-11-08 13:30:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Clipboard is not working on vim (package gvim)

Use gvim instead or use ABS and recompile vim with X clipboard enabled.
Sorry.

BRB, let me check if it works for me.
Can you please edit the title so that it says 'gvim' instead of 'vim'?


Edit: I can copy text with "*yy and paste with middle mouse button.

Last edited by karol (2013-11-08 13:39:50)

Offline

#3 2013-11-08 14:21:38

unidob
Member
Registered: 2010-07-23
Posts: 9

Re: Clipboard is not working on vim (package gvim)

karol wrote:

Use gvim instead or use ABS and recompile vim with X clipboard enabled.
Sorry.

BRB, let me check if it works for me.
Can you please edit the title so that it says 'gvim' instead of 'vim'?


Edit: I can copy text with "*yy and paste with middle mouse button.

I didn't probe with gvim, but it works!!. The point here is that I use vim (console mode) in yakuake and with exactly the same configuration it seems it doesn't work.

In vim with set mouse=v, I can select with the mouse and this is automatically copied to the clipboard (middle button); this is it because it is using the "term selection". However if I'm using mouse=a, very useful for split windows, this is using visual vim selection and it is not copied to the clipboard automatically, and with the command "*yy or "+yy either.

Offline

#4 2013-11-08 14:24:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Clipboard is not working on vim (package gvim)

Use gvim instead or use ABS and recompile vim with X clipboard enabled.

Offline

#5 2013-11-08 14:49:32

unidob
Member
Registered: 2010-07-23
Posts: 9

Re: Clipboard is not working on vim (package gvim)

karol wrote:

Use gvim instead or use ABS and recompile vim with X clipboard enabled.

Actually the gvim package it has a vim with X clipboard enabled by default. If I type:

$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep  3 2013 19:58:40)
Included patches: 1-16
Compiled by Arch Linux
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm

You can see that +xterm_clipboard is enabled. I think it should work. It isn't?

Offline

#6 2013-11-08 14:59:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Clipboard is not working on vim (package gvim)

vim from the gvim package does work for me.

In your first post you said you use gvim. gvim is a different package from vim, it uses different configure options.
IIRC https://projects.archlinux.org/svntogit … es/vim#n80

--with-x=no

disables the X clipboard in vim.
Compare it to https://projects.archlinux.org/svntogit … s/vim#n102

--with-x=yes

for gvim.
They both use the same [split] PKGBUILD and vim is also a command in its own right so it's pretty confusing.


The bottom line is: for me, installing gvim package and using either vim or gvim command does the trick. Even if I use 'mouse=a', it still works.

Offline

#7 2013-11-08 16:19:55

unidob
Member
Registered: 2010-07-23
Posts: 9

Re: Clipboard is not working on vim (package gvim)

karol wrote:

vim from the gvim package does work for me.

In your first post you said you use gvim. gvim is a different package from vim, it uses different configure options.
IIRC https://projects.archlinux.org/svntogit … es/vim#n80

--with-x=no

disables the X clipboard in vim.
Compare it to https://projects.archlinux.org/svntogit … s/vim#n102

--with-x=yes

for gvim.
They both use the same [split] PKGBUILD and vim is also a command in its own right so it's pretty confusing.


The bottom line is: for me, installing gvim package and using either vim or gvim command does the trick. Even if I use 'mouse=a', it still works.

First of all, thank you karol to take your time to make me understand this smile

Now it's clear. What I mean is that I use vim binary from gvim package, that was the confusion I think. If your vim works correctly then I have something that is not correct. I'll investigate the issue, if I found something I'll post it. No clue by the moment sad

Offline

Board footer

Powered by FluxBB