skip to main bit
a man slumped on his desk, from 'The Sleep of Reason Produces
      Monsters'

Oblomovka

Currently:

vim, google and overenthusiastic hyperlinking

Writing huge swathes of text on Webpages without putting in hyperlinks looks – I dunno, somehow a bit impolite. So I wrote a vim/python macro that lets me wrap selected text with its corresponding URL, pulled from Google’s top entry. So I can write A Mighty Wind, select it, hit “,g” and – voila – it becomes A Mighty Wind. You can also hit “,g” in normal mode and it’ll wrap the word the cursor is sitting on. Here’s my hack – you’ll also need Mark Pilgrim‘s pygoogle code.

In your .vimrc, add these lines:

Now put this program somewhere in your PATH, saved as “ghref”

It’s just a fiddled-around recorded macro. I imagine there’s bugs – I fixed a couple just copying this out. But maybe it’ll inspire someone else to write a better version.

Comments are closed.