Pasting from vim in terminal to Google Docs (Firefox + Vimperator) - need to understand
Posted
by
LIttle Ancient Forest Kami
on Ask Ubuntu
See other posts from Ask Ubuntu
or by LIttle Ancient Forest Kami
Published on 2012-09-21T09:44:44Z
Indexed on
2012/09/21
9:50 UTC
Read the original article
Hit count: 263
I had some trouble with copy-pasting text from vim in terminal to Google Docs (aka Drive) document (hereafter GDd) in FF browser (with Vimperator).
Note:
- I have a file opened in Vim 7.2 in terminal
:version
displays both+clipboard
and+xterm-clipboard
- I'm on Ubuntu 10.04 LTS, so I don't think that's Unity-related
- I want to use Vim, not GVim, nor gedit...
- I'm avid fan of mouseless navigation, so solution with mouse was not what I wanted.
- I have the solution, but I need understanding.
What I tried and where it gets me:
- Yanking whole file text via:
ggvGy
allows me to:- paste it via mouse middle button, NOT with
Ctrl+v
orShift+Insert
- here, in text area for entering question text
- in gedit
- but NOT in GDd where I want it pasted, even if I switch Vimperator to pass-through mode with
Insert
- does NOT show in XClip after
xclip -o
- From gedit, I can copy-paste the text into GDd (Vimperator's pass-through mode not required).
- paste it via mouse middle button, NOT with
:%! !xclip -i
(or:first, last
)- reports whole file (all lines, to be precise) as filtered, though shell returns 1
- `xclip -o' returns nothing (is empty) or returns previously copied value
- with 2. no surprise, but I can't paste at all not only to GDd but also to gedit or here
- setting clipboard (
:set clipboard=unnamed
) to unnamed doesn't help - using
"+y
or"*y
on whole file text actually does the trick
So, the question (it's actually three, say "split" and I will):
- why middle mouse button pastes different things than Ctrl+v and how to know what will be pasted with each?
- why just yanking (without registers) works with mouse but not with keyboard / XClip?
- why didn't unnamed register help? After setting, it should make
unnamed
and*
registers same?
© Ask Ubuntu or respective owner