You are not logged in.
Pages: 1
Often I found myself in trouble to get some text from a file that I'm editing with vim under urxvt to another application, such as emesene and this forum or even another console driven app, the "solution" is normally use cat file | grep -C <lines> <stuff> and copy from there selecting the text and pasting it with "middle mouse key", this is quite uncorfotable because I use a laptop and didn't buy a mouse yet : \ - and I'm not planning to do it also - and take lots of steps, I'm sure there is lots of ways to do that, but I would like a way to exchange the text between the tty and X, ideas? - I'm using ratpoison, and on tty normally I use gnu screen, if anyone already have solutions for this ... -
Offline
Screen has a special copy mode that you can use. (check 'man screen' for details.)
Shift+Insert does the same as middle click, so you don't need a middle mouse button.
And vim has visual mode... etc...
Offline
You could use Vim's registers. Register "+" (plus) is for the X clipboard. Simply yank some text into that register, and then CTRL+V or Middle click wherever to paste.
For example:
"+yw
(Thats a double quote) This will yank one word to the X clipboard. Double quotes, then a letter or symbol, selects a register to yank into.
Also, you can use visual mode (v) or (Shift + v) to highlight a bunch of text, then hit "+y to grab it all.
Conversely, you can paste from the X clipboard with that register. Copy some text in Firefox, then type "+p to paste it into vim
See:
:help registers
to read all about Vim's registers.
Offline
Assuming you are saying console and meaning a terminal emulator like urxvt, try holding shift down when you hilight text, then middle clicking elsewhere. That's what I've got to use to copy things from vim.
Last edited by rson451 (2008-12-20 13:13:53)
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Pages: 1