hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

p^P is Pastie Straight from Vim #

by why in inspect

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.

said on 08 Jul 2006 at 21:55

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

said on 09 Jul 2006 at 06:21

The empire strikes back!

http://pastie.caboo.se/paste/3896

Pastie integration for Emacs in pure Elisp.

said on 09 Jul 2006 at 07:06

Nice stuff, works fine. Except xclip -i isn’t working at all for me… Which has nothing to do with these scripts.

said on 09 Jul 2006 at 07:15

Now with depaste (M-x pastie-get) too:

http://pastie.caboo.se/paste/3899

said on 09 Jul 2006 at 07:19

xclip -selection clipboard

and voila. It works fine now (Ubuntu).

said on 09 Jul 2006 at 08:52

Who needs xclip? vim can yank into the clipboard/selection buffers itself…

:help x11-selection

I use ”* all the time.

said on 09 Jul 2006 at 20:54

Thanks chris2!

said on 10 Jul 2006 at 00:08

_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!

said on 10 Jul 2006 at 10:48

@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.

said on 11 Jul 2006 at 03:39

@jchris: yes, definitely learn the raw power of CLI vim. gVim is for sissies ;)

11 Jul 2010 at 21:28

* do fancy stuff in your comment.

PREVIEW PANE