You are not logged in.

#1 2009-04-12 13:50:10

LiteHacker
Member
Registered: 2008-11-27
Posts: 38
Website

Copying and Pasting with VIM in a tiling window manager

I like the idea of a tiling window manager as it should (at least in theory) increase productivity. So far I have found the ability to view a couple of windows at once to be useful.
Usually I am using vi for coding something, and using a web browser as a reference for whatever I code.
And so, it is not unusual for me to need to copy and paste something from the browser to the terminal, and vice versa.
Unfortunately the terminal doesn't handle "CTRL+V" "CTRL+C" very well.. instead I usually use "CTRL+INSERT" and "SHIFT+INSERT" ...however VIM sometimes has problems with those keys as well. Do you know of a better way?
One of the major advantages of using a tiling window manager is the absence of a mouse. Unfortunately when copying and pasting something between a browser and a terminal, I am forced to select text with the mouse. Is there any way you guys found around this?
A major problem with VIM, is that it is built to "copy" and "paste" to itself using its own personal clipboard that cannot be shared with other programs. This copy and paste scheme does not rely on the mouse, but it is useless when dealing with a browser. Is there some way you found to get around this problem?

Thank you,
LiteHacker

Offline

#2 2009-04-12 13:59:52

twin
Member
From: Greece
Registered: 2008-12-23
Posts: 47

Re: Copying and Pasting with VIM in a tiling window manager

I find the middle mouse button way to paste very satisfactory!

[edit] you know, select what you want to copy, and then just click the middle mouse button on vim, where you want it to be pasted.

I'm a big fun of tiling wm's myself, and/but I don't think it's wise to try to get rid of the rodent completely.:lol:

Last edited by twin (2009-04-12 14:03:53)

Offline

#3 2009-04-12 14:04:46

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Copying and Pasting with VIM in a tiling window manager

Or, if you would like to do it with keyboard only, you might find something useful here:
http://snarfed.org/space/synchronizing% … 0selection


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#4 2009-04-12 14:16:24

b3n
Member
Registered: 2008-11-12
Posts: 20

Re: Copying and Pasting with VIM in a tiling window manager

Use Vim's + register, e.g. "+p. See :help *copy-move* for more information.

Last edited by b3n (2009-04-12 14:20:11)

Offline

#5 2009-04-12 16:39:47

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: Copying and Pasting with VIM in a tiling window manager

I put this in my ~/.vimrc:

set clipboard=unnamed

when I 'p', it pastes the X selection buffer, and when I 'y', it yanks to the X selection buffer (to be middle-clicked or shift-Insert'ed elsewhere). I don't know the technical details, so I have no idea if this will work for you. I got this tip from another thread.

Offline

Board footer

Powered by FluxBB