p^P is Pastie Straight from Vim #
Sensational: You just select the text you want in vim, then hit p^P
and (if you’ve got xclip
installed and Vim is --with-ruby
) it’ll give you back the URL in the clipboard. Not that middle-click or ^c^v
is so hard, but still a finefine use of rubyonvim. Hip hip for snip no. 606.
FlashHater
0.0 this is a cool little snippet. I’ll have to go back and compile ruby in.
Is this reversable, like :depaste 606 ? It should be
chris2
The empire strikes back!
http://pastie.caboo.se/paste/3896
Pastie integration for Emacs in pure Elisp.
rixxon
Nice stuff, works fine. Except xclip -i isn’t working at all for me… Which has nothing to do with these scripts.
chris2
Now with depaste (M-x pastie-get) too:
http://pastie.caboo.se/paste/3899
rixxon
xclip -selection clipboard
and voila. It works fine now (Ubuntu).
mfp
Who needs xclip? vim can yank into the clipboard/selection buffers itself…
:help x11-selection
I use ”* all the time.
technomancy
Thanks chris2!
jchris
_why, or anyone else, for that matter—I’ve recently been stung with the linux-bug, but I just can’t get gvim to treat me right. At least not as well as Textmate. Maybe someone knows a good link to a vim for ruby tutorial / resources… ah, lazyweb!
lukfugl
@jchris: try
vimtutor
(on the command line). This won’t open in gvim, but rather in console vim, but it is indispensible for learning the basics of vim that will get you productive in this powerful editor.Hank
@jchris: yes, definitely learn the raw power of CLI vim. gVim is for sissies ;)