LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-14-2008, 05:16 AM   #16
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129

Quote:
Originally Posted by grissiom View Post
I forgot to mention that I'm using KDE4.1 testing package from slackware.com. But I think it maybe does not metter. On my box, middle click does not paste the words selected outside but same other words which I don't know where they come from. But Shift+middle click dose the work.

Besides, it's also unconvenience if I can only paste things in but cannot get things out.
In /usr/share/vim/vimrc have you commented set mouse=a ?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-14-2008, 05:16 AM   #17
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
Oh, IMHO, when set mouse=a, drag with left button could trigger visual mode, in which the selected content is handdled by vim internally but not X. So we cannot copy things out when mouse=a. But when set mouse=r, dragging mouse will not trigger visual mode so the selected content is passed to X. So we can copy things out.

Hmm,it's a pity that we cannot copy things out while in visual mode...
 
Old 09-14-2008, 05:29 AM   #18
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
I think you have some conflict, perhaps in a vimrc you added
or something. Not only on 6 boxen on this LAN, but all other
computers where I've installed Slackware (I build and repair
them), commenting set mouse=a in /usr/share/vim/vimrc enables
highlighting with the left button and pasting with the middle
button -- everywhere.
 
Old 09-14-2008, 05:44 AM   #19
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Bruce Hill View Post
I think you have some conflict, perhaps in a vimrc you added
or something. Not only on 6 boxen on this LAN, but all other
computers where I've installed Slackware (I build and repair
them), commenting set mouse=a in /usr/share/vim/vimrc enables
highlighting with the left button and pasting with the middle
button -- everywhere.
Oh, yes. I'm sorry... I set mouse=a in ~/.vimrc ... ;(
 
Old 09-25-2008, 05:31 PM   #20
mohtasham1983
Member
 
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Rep: Reputation: 30
Basically, set mouse=r, will let you copy from vim to X.

However, I rather have set mouse=a, where I can point to anywhere in the file using mouse. I don't copy things from vim to X very often. But if I want to do it, I write :set mouse=r real quick and copy it to the X.

Last edited by mohtasham1983; 09-25-2008 at 05:37 PM.
 
Old 09-25-2008, 07:26 PM   #21
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Somehow my instructions are too complicated, or your
~/.vimrc files are overruling the system wide one, or
I am not understanding your problems or posts ...
Quote:
Why do they have these problems with ViM?

And why don't they comment out set mouse=a in /usr/share/vim/vimrc
and see how well it works?
I wrote that in GViM, and saved it. Then reopened it
and dragged the text with the left mouse button. Then
I copied it into here with the middle mouse button.

That is copying from ViM to X. As stated before, I can
copy and paste to and from ViM and every app in this way,
no matter where I start ViM from, too.

Also, it works for me with USB mouse, USB wireless mouse,
USB wireless mouse/kbd combo, PS/2 mouse, touchpad and
synaptic mouse. Only one I haven't tried it with is the
bluetooth mouse which default Slack kernel doesn't even
detect. When I have time for a custom kernel to get that
rodent working, I'll try it.

Maybe I'm missing something here and you can help me.
 
Old 09-26-2008, 12:48 AM   #22
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Ok ... lets get a few things cleared up ...

we are all talking about Slackware 12.1 stock install - no changes to the vim package ...

from inside xterm (while X is running i.e ) , open vim (thus the question of GPM doesn't arise)
I couldn't copy to-from vim ,

:set mouse=a allowed copy to vim
:set mouse=r allowed copy from vim


This is a pain in ass .. in earlier slackware versions I am pretty sure I could copy in either direction.

I tried recompiling with the --with-x option (by editing Pat's slackbuild .. but there was no difference)

Now ... how did anyone else solve this ?


I don't have a personal .vimrc nor have I touched the main vimrc.
 
Old 09-26-2008, 03:40 AM   #23
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by duryodhan View Post
Now ... how did anyone else solve this ?


I don't have a personal .vimrc nor have I touched the main vimrc.
Once again, might I suggest you "touch" the main vimrc?

Code:
mingdao@silas:~$ cat /etc/slackware-version
Slackware 12.1.0

mingdao@silas:~$ ls /var/log/packages/vim-
vim-7.1.330-i486-1_slack12.1       vim-gvim-7.1.330-i486-1_slack12.1

mingdao@silas:~$ less /usr/share/vim/vimrc | grep mouse
" In many terminal emulators the mouse works just fine, thus enable it.
" set mouse=a

mingdao@silas:~$ ls -l .vimrc
/bin/ls: cannot access .vimrc: No such file or directory
I can't remember if this bad behavior first started in vim
with Slack-12.0, or 12.1 -- however, doing just what you see
above allows me to copy into and out of vim into and out of
any app on my box.

I have installed the new version of these apps from Slack-12.1
patches, but vim-7.1.285-i486-1 worked the same. And it is now
working the same on many other boxen.
 
Old 09-26-2008, 04:18 AM   #24
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Quote:
Once again, might I suggest you "touch" the main vimrc?
doesn't really matter .. if you read the rest of the post .. I have manually done 'set mouse=a' and 'set mouse=r' and shared the results.
 
Old 09-26-2008, 04:55 AM   #25
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Original Poster
Rep: Reputation: 45
OK, I'm using VIM7.2 from current but I think it shouldn't be a problem since there is no changes in copying part as far as I can see.

In my condition:

:set mouse=a allowed copy to vim (via middle-click)
:set mouse=r allowed copy from vim (via drag selection and middle-click in other space) and copy to vim (via middle-click)

I don't think touch /usr/share/vim/vimrc is a good idea because all the work can be done via edit ~/.vimrc. This doesn't hurt the root system.
 
Old 09-26-2008, 09:44 AM   #26
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Whatever ... my vim works.
 
Old 02-19-2010, 01:30 AM   #27
sswam
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Rep: Reputation: 1
for gvim, how to always use the system clipboard

how to fix gvim to use the clipboard directly: read the online help!

according to
:help clipboard

When the "unnamed" string is included in the 'clipboard' option, the unnamed register is the same as the "* register. Thus you can yank to and paste the selection without prepending "* to commands.

So check the output of
:set clipboard?

and add in ,unnamed,

for example, in my .vimrc,

set clipboard=autoselect,unnamed,exclude:cons\|linux

You still need to press yy to yank and p to paste, but it's easier than "*yy and "*p
 
Old 02-19-2010, 04:34 AM   #28
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
set mouse-=a

Another handy thing to add to vimrc is
Code:
set pastetoggle=<F11>
great for pasting if you have autoindent on

Last edited by mRgOBLIN; 02-19-2010 at 04:36 AM.
 
Old 02-19-2010, 09:22 AM   #29
Rupa
Member
 
Registered: Apr 2008
Location: Berlin, Germany
Distribution: Slackware, Debian, NetBSD
Posts: 80

Rep: Reputation: 27
Code:
set mouse=
does work for me on all computers and all vim versions. Either "set mouse=" in ~/.vimrc or type ":set mouse=" while working in vim.
 
Old 02-19-2010, 11:53 AM   #30
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
I use the Slackbuild in /source to rebuild vim with the --with-x flag.
 
  


Reply

Tags
vim


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy-paste in vim proNick Linux - Newbie 5 02-17-2008 07:29 PM
How to copy paste into VIM ? EAD Linux - Software 15 12-12-2006 06:38 PM
Buggy copy n paste with vim in terminal Kovacs Slackware 1 09-05-2006 12:13 AM
Clipboard Manager for quickly copy paste saurya_s Linux - Software 1 09-22-2005 09:33 AM
copy and paste not working (requested clipboard format not available) marie-p Linux - Software 1 01-23-2005 11:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration