FS#14609 - [vim] Copy and paste no longer working properly

Attached to Project: Arch Linux
Opened by Skottish (skottish) - Wednesday, 06 May 2009, 16:37 GMT
Last edited by Tobias Kieslich (tobias) - Sunday, 13 September 2009, 22:37 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Tobias Kieslich (tobias)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description:

Copy and paste from primary selection is not functioning properly with vim from testing. This thread says it all:

http://bbs.archlinux.org/viewtopic.php?id=71619

Steps to reproduce:

Just try various copy and paste operations with middle click or <Shift><Insert>
This task depends upon

Closed by  Tobias Kieslich (tobias)
Sunday, 13 September 2009, 22:37 GMT
Reason for closing:  Won't fix
Additional comments about closing:  In order to have a cleaner layout, the system wide settings for vim are left to a bare minimum and we do not interfere with the mouse settings anymore. Any behaviour of vim is straight out of the box.
Comment by Greg (dolby) - Wednesday, 06 May 2009, 18:31 GMT
I think that is because the package has this option --with-x=no.
Vim is now much closer to what vi was until recently.
Comment by Kirk (mkfort) - Wednesday, 06 May 2009, 19:30 GMT
does it work when you shift-middleclick?
Comment by Jan de Groot (JGC) - Wednesday, 06 May 2009, 19:42 GMT
:set mouse=v

This has been broken for a long time with the upstream default settings (I use chroots so my $DISPLAY isn't set then, giving the same effects as compiling without X support).
Comment by Greg (dolby) - Wednesday, 06 May 2009, 19:52 GMT
":set mouse=v"

But that is the case with Vim in extra too. The report talks about some kind of "new behaviour".
Comment by Jan de Groot (JGC) - Wednesday, 06 May 2009, 20:05 GMT
The "new behaviour" already existed in the old package version in case $DISPLAY wasn't set. Personally, not having mouse=v in the default preferences, is a regression. The defaults must have been changed in some upstream release, but I haven't seen a distro other than Archlinux that has mouse=a as default setting.
Comment by Skottish (skottish) - Thursday, 07 May 2009, 04:31 GMT
This is new behavior for me since the version from testing was installed. It does not happen with the version from extra. I'm testing it right now and the two versions behave differently.
Comment by Skottish (skottish) - Thursday, 07 May 2009, 05:04 GMT
Egads! I just noticed dolby's post. If this option prevents users from using the X clipboard, then it's silly and is going to generate a ton of complaints amongst Arch users. I'm trying to test it and am currently waiting for the bazillion patches for vim to download.
Comment by Skottish (skottish) - Thursday, 07 May 2009, 05:30 GMT
I can't even build the version from testing. If this is a configuration issue, then it's not a bug and this report should be closed. On the other hand, it's ridiculous to not have the primary clipboard as a way to share information between vim and every other program that runs under X.
Comment by Smith Dhumbumroong (zodmaner) - Thursday, 07 May 2009, 06:01 GMT
Thanks guys. I can confirm that enable ":set mouse=v" option restores ability to copy and paste with middle mouse button, although I still can't copy text from Vim and paste it into other X applications using Shift + Insert keys (it used to work fine in version 7.2.65-1).

The Shift + Insert method of copy and paste seems to works just fine when I copy and paste between Vim and terminal applications (or just terminal).

I'll rebuild the package with "--with-x=yes" option and see if it will change anything.
Comment by Smith Dhumbumroong (zodmaner) - Thursday, 07 May 2009, 06:22 GMT
I've just rebuilt the Vim package from testing repository with "--with-x=yes" option and all of copy & paste methods (using middle click, Shift + Insert keys) is now working again. I can even copy and paste using middle click without having to first set ":set mouse=v" option.

So, could we have "--with-x=yes" as a default option again? I've use namcap to check the package and the only dependency "--with-x=yes" option added is libxt. Maybe we could even add libxt as an optional dependency if the package built just fine without it?
Comment by Skottish (skottish) - Thursday, 07 May 2009, 16:28 GMT
I can also confirm what dolby and zodmaner said. It took a bunch of tries for vim to build, but that has nothing to do with this.
Comment by Jake (Spewns) - Wednesday, 13 May 2009, 15:18 GMT
I can also confirm that copy/pasting with the vim in testing is broken, so I reverted back to the version in extra. If "--with-x=yes" fixes it, please add it to the build.
Comment by Smith Dhumbumroong (zodmaner) - Wednesday, 13 May 2009, 16:09 GMT
Silly me, I've just figured this out:

Install gvim _also_ restored all of the old copy & paste functionalities to Vim running in terminal (obviously, since gvim is compiled with "--with-x=yes").

So, people who use Vim and want the old copy & paste behavior (especially the copy & paste functionalities between Vim in terminal and X applications) can just install gvim package and be done with it.

So, yeah... :-P
Comment by Jake (Spewns) - Wednesday, 13 May 2009, 16:53 GMT
Thanks, that's a good thing to point out. It's a workaround and doesn't address the issue though. It'd be nice to know why --with-x was changed - whether or not there's an actual, practical reason that's worth breaking a most rudimentary and expected functionality - copy/pasting with a text editor of all things.
Comment by Tobias Kieslich (tobias) - Sunday, 31 May 2009, 19:18 GMT
That is actually the intention of it. vim is supposed to be sparse, gvim is fully featured. After installing gvim, calling "vim" actually invokes a different binary, that is way more capable(but heavier, takes more memory etc.) Also note that vim has only Perl support, Python and Ruby come only after installing gvim.
Comment by Tobias Kieslich (tobias) - Thursday, 25 June 2009, 16:34 GMT
for "testing": people can set their preferred behaviour in /etc/vimrc now, I will never overwrite this file. The satndard now does not set any mousebeehaviour explicitely

Loading...