Years ago (2003, it would appear), I was wondering in public if there was a way for an editor to automagically fetch links for me - so that I could type something obvious, like “Flickr”, and hit some keys, and the editor would find the appropriate web site on Google and fill in all the HTML for me.
Danny O’Brien knocked up some code for BBEdit, which I think I tried but lacked the Python-fu to make work properly. So I gave up and carried on doing things manually.
But just this morning, I discovered exactly that functionality buried away in TextMate, which I’ve been using for ages, completely unaware that it was there. It seems you need to be in plain text, HTML or Markdown mode to get it to work.
Type the name of something on the web - something that you’d expect Google’s “I’m feeling lucky” feature to get right - then select it and hit Shift + Control + Command + L. TextMate trundles off to Google on your behalf, and comes back with the URL you need, wrapped up in appropriate HTML. If you root around in the commands for the HTML Bundle, you’ll find it listed under the name Lookup selection on Google and link.
Best of all: when you’re in Markdown mode, TextMate inserts the link as Markdown, not as HTML. Neato. What I like most about this is that it’s likely to make me use links more often; and links are, after all, what makes the web go round.
For all I know this might be old news to a lot of you, but it’s new to me and I thought it was worth a mention for anyone similarly ignorant.