You are not logged in.

#1 2010-01-27 09:21:21

kismet010
Member
Registered: 2009-09-02
Posts: 137

[SOLVED] copy+paste from firefox to vim in urxvt

hi, this is a really newbie question

i'm a dwm+vimperator+urxvt+vim user

i don't know how to copy selected text in firefox and paste it to vim
i yank (y) the text in the navigator and go to vim visual mode and press 'p' but nothing happen

in leafpad ,ie, text is copied.

Last edited by kismet010 (2010-02-08 05:50:37)

Offline

#2 2010-01-27 09:42:59

measure
Member
Registered: 2009-07-17
Posts: 62

Re: [SOLVED] copy+paste from firefox to vim in urxvt

If you highlight text in firefox, then go to urxvt and press shift + insert, it will paste the text

Offline

#3 2010-01-27 09:43:26

hume's doona
Member
Registered: 2009-12-11
Posts: 206

Re: [SOLVED] copy+paste from firefox to vim in urxvt

try middle mouse click or shift+middle mouse, if you have mouse enabled in your xterrm and .vimrc

Offline

#4 2010-01-27 10:58:03

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: [SOLVED] copy+paste from firefox to vim in urxvt

:set paste
pp/PP

Offline

#5 2010-01-27 12:13:11

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] copy+paste from firefox to vim in urxvt

Install gvim and use the * and + buffer. See :h quoteplus


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2010-01-27 14:10:03

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: [SOLVED] copy+paste from firefox to vim in urxvt

you can copy from anywhere with control-c, and then paste to vim with

"+gP

as usual with vim, there are a 1000 ways to skin this cat.

Last edited by Cyrusm (2010-01-27 14:10:35)


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#7 2010-01-27 15:09:23

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [SOLVED] copy+paste from firefox to vim in urxvt

Mr.Elendig wrote:

Install gvim and use the * and + buffer. See :h quoteplus

Just to be clear, you don't need to actually be using the gvim binary. You can use vim inside urxvt. But you do need to have vim built with the "--with-x=yes" flag, which if I remember right is done by the gvim package but not by the vim package. (I build vim myself, so I'm not entirely sure what the standard packages do.)

The shift-insert technique doesn't require any cooperation from vim, that just works through urxvt. There are multiple parallel clipboards in X nowadays, so it's easy to get confused. Again if I remember right, shift-insert in urxvt will insert whatever is _selected_ in other X windows. It matters not what you typed ctrl-C on in Firefox, if something else is selected in Firefox or another X window, that's what will be inserted.

The text is inserted as though it had been typed. So you'll want to first be sure that vim is insert mode, else the text will be interpreted as a bunch of commands. It helps also to do ":set paste" before inserting any complex text, and ":set nopaste" after.

The "*p technique also works good.

Offline

#8 2010-01-27 23:50:15

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: [SOLVED] copy+paste from firefox to vim in urxvt

Yeah, if you want vim to work with X, you need to install gvim, which replaces the stripped down vim with one that supports yanking and deleting to the system buffers (*,+).

Offline

#9 2010-02-08 05:19:37

kismet010
Member
Registered: 2009-09-02
Posts: 137

Re: [SOLVED] copy+paste from firefox to vim in urxvt

wow i forgot i wrote this post xD

thanks all

Offline

#10 2010-02-08 09:02:40

Roline
Member
From: Netherlands
Registered: 2009-12-05
Posts: 207
Website

Re: [SOLVED] copy+paste from firefox to vim in urxvt

How to copy from rxvt-unicode to firefox?


Bitbucket - DeviantART - Userstyles
*Currently Not Using Arch

Offline

#11 2010-02-08 09:08:54

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: [SOLVED] copy+paste from firefox to vim in urxvt

Roline wrote:

How to copy from rxvt-unicode to firefox?

ls|xclip + shift+insert

Offline

#12 2010-02-08 14:19:46

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] copy+paste from firefox to vim in urxvt

Mark the text in urxvt with the mouse, middle click in FF (or shift-insert) to paste.  This works in nearly all apps running in X.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#13 2010-02-08 14:42:01

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: [SOLVED] copy+paste from firefox to vim in urxvt

Mr.Elendig wrote:

Mark the text in urxvt with the mouse, middle click in FF (or shift-insert) to paste.  This works in nearly all apps running in X.

shift+insert doesn't work in firefox as far as i can remember, middle click does though.

Offline

Board footer

Powered by FluxBB