Unfortunately I haven't come across a system yet where the + buffers
were enabled. That's why I had to jump through all these hoops with
/dev/clipboard with Cygwin, and xclip on the Linux machines that used
X11.

or map it to the Middle Mouse:
map <MiddleMouse> iz<Esc>mz:execute "normal a".system("xclip -o")[:-2]<CR>`zx

Apparently when I execute a command, it puts it on the next line, but
this "normal a".system, passing it a system command pasted it right
where I want. Well, almost, because if I pasted it at the beginning
of the line, it pasted *after* the first character, which was
annoying. So I did another hack using marks to paste.

Ctrl+insert is a good idea if you don't want to overwrite the ctrl+v,
which is used to print out an escape character. That's why I was made
the key mappings for normal mode only, not visual or command mode.

Thanks,
Ven

>
> and lately, if i want to quit an app i am copying from before
> i paste i make sure and start klipper beforehand
>
> sc
>

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Alexander Dietz

Hi, I am not sure if I correctly understood these tips. There were some ideas of using crtl+v and crtl+insert for copy/pasting text, but this is not what I

Message 3 of 8
, Oct 4, 2010

0 Attachment

Hi,

I am not sure if I correctly understood these tips. There were some ideas of using crtl+v and crtl+insert for copy/pasting text, but this is not what I want.

I want to copy a text to the clipboard by just marking the text in vim, and the using the middle-button of the mouse to paste it into my vim session (currently, I can paste text from the clipboard from somewhere else using shift-middle-button, which is just quite ok). I tried the tips given here (i.e. the long list of xmap instructions and the following:map <MiddleMouse> iz<Esc>mz:execute "normal a".system("xclip -o")[:-2]<CR>`zx)

but still I cannot paste text in vim which I have selected before in vim. I have the following .vimrc:

The following is a list of items that work, and which I want to work later as well:1. I can use the mouse to left-click, to put the cursor to another place2. I can paste text in (by using shift - middle-mouse-button) from some other application

But the following items do NOT work:A. I cannot mark text in vim to copy it to the clipboard. I cannot paste text from vim to vim or some other application.

So my question: Is it possible to configure vim in that way so that marking as text will put it into the clipboard (so that a subsequent middle-click of the mouse will paste it to somewhere else) WITHOUT loosing the first two currently working abilities...? Is that possible at all without having to install something different (which I had to do on ~10 other computers as non-root...).

Unfortunately I haven't come across a system yet where the + buffers
were enabled. That's why I had to jump through all these hoops with
/dev/clipboard with Cygwin, and xclip on the Linux machines that used
X11.

or map it to the Middle Mouse:
map <MiddleMouse> iz<Esc>mz:execute "normal a".system("xclip -o")[:-2]<CR>`zx

Apparently when I execute a command, it puts it on the next line, but
this "normal a".system, passing it a system command pasted it right
where I want. Well, almost, because if I pasted it at the beginning
of the line, it pasted *after* the first character, which was
annoying. So I did another hack using marks to paste.

Ctrl+insert is a good idea if you don't want to overwrite the ctrl+v,
which is used to print out an escape character. That's why I was made
the key mappings for normal mode only, not visual or command mode.

Thanks,Ven

>
> and lately, if i want to quit an app i am copying from before
> i paste i make sure and start klipper beforehand
>
> sc
>

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Your message has been successfully submitted and would be delivered to recipients shortly.