Quote:
|
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... |
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. |
Quote:
|
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. |
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:
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. |
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. |
Quote:
Code:
mingdao@silas:~$ cat /etc/slackware-version 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. |
Quote:
|
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. |
Whatever ... my vim works. :D
|
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 |
set mouse-=a
Another handy thing to add to vimrc is Code:
set pastetoggle=<F11> |
Code:
set mouse= |
I use the Slackbuild in /source to rebuild vim with the --with-x flag.
|
All times are GMT -5. The time now is 06:09 AM. |