August 31st, 2012 at 9:50 pm by Dr. Drang
It’s been a busy week at work, and what little evening time I had I spent avoiding thought. I’m still not ready to write a real post, but I thought it worth sharing this little TextExpander tip.
A couple of days ago, Michael Schechter tweeted about using his blog as sort of a personal journal.
@macdrifter @ttscoff I’ve taken up Brett’s philosophy. My site is essentially an online log, but instead of code its self-improvement.
— Michael Schechter (@MSchechter) Wed Aug 29 2012 3:30 PM
Brett Terpstra replied,
@MSchechter the “online log” is a common thread through @drdrang, @macdrifter, @Veritrope and more… seems to work :).
— Brett Terpstra (@ttscoff) Wed Aug 29 2012 3:33 PM
as did Gabe Weatherhead,
@ttscoff @MSchechter @drdrang @Veritrope That’s why I rebuilt my search engine? I search my site more than anyone. It’s my public brain
— macdrifter (@macdrifter) Wed Aug 29 2012 3:34 PM
By the time I started looking through my timeline Wednesday night, the conversation was long since over, and I didn’t try to revive it. But Brett’s exactly right: I do use ANIAT to record both the tricks and scripts I come up with and the reasoning and motivations behind them. And like Gabe, I expect this public resource to be far more useful to me than to anyone else. The reasons I make it public are:
- I have a healthy enough ego to think that what interests me will interest others.
- I’ve learned a lot for free from the blog posts and web pages of others and want to return the favor.
- Writing an explanation for others to read is the best way to ensure that I’ll understand it later.
For a long time, I searched through my old posts by using the built-in WordPress search tool—the same tool you can use over in the sidebar. But in recent months, I’ve been using Google.
You know how to do a site-specific search in Google, right? You just add
to the list of search terms and the search is restricted to that site. The same addition works for DuckDuckGo and Bing, too.
For a week or so, I searched ANIAT this way, typing in the site-specific restriction and, often as not, making a typo along the way. The obvious improvement was to make that into a TextExpander snippet,
and now I just type
;lean after1 the other search terms to search this site only.
There’s nothing clever about this, but it’s easy (for me, at least) to forget that TextExpander can be used outside of “documents.” Any place text can go, TextExpander can go, too.
And while I use this to speed up searches of my blog, the same idea could be used to speed up searches of any domain. A snippet for
site:docs.python.org, for example, would be a great way to search through Python’s language and module documentation.2
site:term doesn’t have to be after the other terms, but that’s the habit I’ve developed, and I don’t see any reason to change. ↩
I know DuckDuckGo has a bang search for Python, but I think this is better. The bang search uses python.org’s internal search tool, which isn’t nearly as good as the native searches in Google or DuckDuckGo. ↩