You are not logged in.

#1 2009-05-06 05:11:08

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,931

Paste primary selection with mouse is not working with vim [SOLVED]

Since I upgraded to vim from testing, middle click paste of the primary selection no longer works. <Shift><Insert> still works properly though if I'm pasting from outside of vim. Is anyone else seeing this?

Offline

#2 2009-05-06 08:32:16

zodmaner
Member
Registered: 2007-07-11
Posts: 653

Re: Paste primary selection with mouse is not working with vim [SOLVED]

I'm also having the same problem as you described (can't paste into vim using middle click). Using Shift + Insert to paste into Vim still works.

Also, I can't seems to copy text out of Vim and paste it into other apps (Firefox, Urxvt, etc.). Both method of copy and paste (middle click and Shift + Insert) didn't work.


Memento mori

Offline

#3 2009-05-06 16:38:01

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,931

Re: Paste primary selection with mouse is not working with vim [SOLVED]

Thanks for the confirmation zodmaner:

http://bugs.archlinux.org/task/14609

Offline

#4 2009-05-07 05:53:22

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,931

Re: Paste primary selection with mouse is not working with vim [SOLVED]

Reading through the bug report, dolby brought up an interesting point. It looks like it may be a changed configuration option and not a bug. Unfortunately the package from testing doesn't build for me, so I can't confirm it. I guess for now the only option for me is to regress to the version in extra and block any upgrades until something changes.

Offline

#5 2009-05-07 06:26:56

zodmaner
Member
Registered: 2007-07-11
Posts: 653

Re: Paste primary selection with mouse is not working with vim [SOLVED]

I've just rebuilt Vim package with "--with-x=yes", as dolby suggested, and now all copy and paste methods (using middle click, Shift + Insert keys) is now working again. I don't even need to set an additional option to get middle click copy & paste method to work.

So, hopefully, the devs will decide to use "--with-x=yes" as the default option (please? wink). Namcap shows that "--with-x=yes" option only adds libxt to the dependency of Vim, so it shouldn't be that heavy.

Last edited by zodmaner (2009-05-07 08:24:00)


Memento mori

Offline

#6 2009-05-07 08:36:52

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Paste primary selection with mouse is not working with vim [SOLVED]

Everything's fine here with the official package from testing.. Maybe a config issue? I don't have a custom config file in home.

Offline

#7 2009-05-07 09:31:48

zodmaner
Member
Registered: 2007-07-11
Posts: 653

Re: Paste primary selection with mouse is not working with vim [SOLVED]

Thanks Army. I've reinstall Vim package from testing repository and removed both .vimrc and .viminfo to see what will happen.

Removed .vimrc didn't seems to do anything. Both of the copy & paste methods still didn't work.

Interestingly, removed .viminfo make me able to use middle click to paste text into Vim, though I still can't copy text from Vim and paste it to other application using middle click.

Could you try and see if you can copy and paste text from VIm to other app using middle click, Army?


Memento mori

Offline

#8 2009-05-07 15:49:33

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,931

Re: Paste primary selection with mouse is not working with vim [SOLVED]

I've got another strangeness here. It took me five times to build vim with the testing/ABS stuff to get a successful build without changing anything other than --with-x=yes. I kept having different points of failure. It finally built successfully and things work the way they did before.

Offline

#9 2009-05-07 20:06:24

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Paste primary selection with mouse is not working with vim [SOLVED]

skottish wrote:

I've got another strangeness here. It took me five times to build vim with the testing/ABS stuff to get a successful build without changing anything other than --with-x=yes. I kept having different points of failure. It finally built successfully and things work the way they did before.

I would guess the failures were due to an SMP issue (if you have a multi-thread/cpu machine). You could try building it with the !makeflags option to see if it builds right the first try.

Offline

#10 2009-05-10 23:16:04

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

Re: Paste primary selection with mouse is not working with vim [SOLVED]

skottish wrote:

I've got another strangeness here. It took me five times to build vim with the testing/ABS stuff to get a successful build without changing anything other than --with-x=yes. I kept having different points of failure. It finally built successfully and things work the way they did before.

Any particular points of failure? Did they go away by themselves or did you have to tweak sth?

Offline

#11 2009-05-11 01:39:15

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,931

Re: Paste primary selection with mouse is not working with vim [SOLVED]

karol wrote:

Any particular points of failure? Did they go away by themselves or did you have to tweak sth?

Two things happened. As Snowman pointed out, vim doesn't like to be built using multiple threads. It didn't give any of the messages that I'm use to when I saw it happen, so I didn't guess that right away. But, that only happened when vim got to the compile stage. A few of the other tries the server to download the patches just kind of sat there. After about 20 or more minutes waiting for a patch, I just killed the process and started it later.

Offline

#12 2009-05-11 10:35:27

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

Re: Paste primary selection with mouse is not working with vim [SOLVED]

skottish wrote:

vim doesn't like to be built using multiple threads. It didn't give any of the messages that I'm use to when I saw it happen, so I didn't guess that right away

Don't get me wrong, but am I expected to fix things like that myself? It kind of defeats the purpose of specialised labour: having devs and packagers as opposed to, say, people who write the docs, sell T-shirts and so on.

The more I learn about computers and software the more I'm getting scared.

Sorry for writing in a [solved] thread.

Last edited by karol (2009-05-11 10:36:06)

Offline

#13 2009-05-11 17:38:49

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Paste primary selection with mouse is not working with vim [SOLVED]

My answer is a little bit late, but I have to correct my post, I didn't have a config file in home, but for testing I edited the global config file, where I changed

if has('mouse')
  set mouse=a
endif

to

if has('mouse')
  set mouse=r
endif

Offline

#14 2009-05-11 17:55:33

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

Re: Paste primary selection with mouse is not working with vim [SOLVED]

You Archers don't give up, do you? :-)
'set mouse=a' works best for me, because I like line numbers and sometimes it's faster to simply click on the text to put the cursor exactly where I want it then to use vi movements. I'm secretly planning to go CLI for most of the tasks and to X only for Gmail/Firefox. Maybe you know a way to use Google Maps in fb?

For now I'm using "batch mode" - first I edit the file then I copy it to f.e. Gmail. Often I'll just open the file in a FF tab and work that way.

Offline

#15 2009-05-13 16:37:09

zodmaner
Member
Registered: 2007-07-11
Posts: 653

Re: Paste primary selection with mouse is not working with vim [SOLVED]

Well, I've just found another solution to the problem that don't required us to painfully recompile Vim or modify configuration option.

Just install gvim package (around 2MB of download, use around 5MB of harddisk space) and all copy & paste functionalities (especially the copy & paste functionalities between Vim running in terminal and X applications) will be restored.

No need to do any additional config, just install gvim and all of the old copy & paste behaviors will be restored.

Should have realized this sooner... hmm

Last edited by zodmaner (2009-05-13 16:42:45)


Memento mori

Offline

#16 2009-05-13 16:57:20

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

Re: Paste primary selection with mouse is not working with vim [SOLVED]

@zodmaner
Yeah, I've just read the bugtracker news :-)

.virc, .vimrc, .gvimrc ... I've read that the idea was to make vi(m) smaller, not to "force" gvim adoption. If you like the colors, than sure, use gvim, but I only want my rodent to be happy, do I ask for much? ;-)
I'll try a couple other things during the weekend and if they don't work, I may read about PKGBUILD.

Offline

#17 2009-05-31 01:01:41

xenoterracide
Member
From: Detroit Metro, MI, USA
Registered: 2009-04-30
Posts: 7
Website

Re: Paste primary selection with mouse is not working with vim [SOLVED]

I'm not sure why vim may have been compiled without X support. but I opened a bug about vims default including the enabling of mouse=a and I believe it's going to be resolved. currently arch uses the sample .vimrc for its /etc/vimrc which basically sets a lot of things that shouldn't be defaults. I personally like being able to highlight and paste into and out of vim with my mouse. mouse=a prevents this (or at least makes it uniquely different/difficult). obviously using this same example file as your .vimrc will put those settings back. the idea is to get vim closer to 'vim' defaults and more like other distro's.

Offline

Board footer

Powered by FluxBB