Every Irreal blog post begins with some header information that tells org2blog
the title, category, and tags for the post. These get communicated to WordPress when org2blog
exports the post. Those lines look like this:
#+TITLE: Using =yasnippet= to Reduce Blogging Friction #+CATEGORY: Blogging #+TAGS: Emacs
There are 862 posts on Irreal at the moment and everyone of them begins with those 3 header lines. That’s a lot of typing, especially with all the capitalization. (Yes, yes, I know all about upcase-word
and in fact I type them in lower case and then use 【Meta+b Meta+u】 to capitalize them—it’s still a lot of typing.)
I finally reached the end of the rope and decided that it was past time to install yasnippet
so that I could automate that. After some floundering around, I figured out how to get snippets to load with Org Mode and added this snippet:
# -*- mode: snippet -*- # name: header # key: bh # -- #+TITLE: $1 #+CATEGORY: ${2:General} #+TAGS: $3
Now when I start a post, I begin with bh
【Tab】 and the header skeleton is automatically inserted. I know I’m late to the party on this. Everyone else is already using yasnippet
and wondering what took me so long.
All this probably isn’t going to save me huge amounts of time but it does reduce blogging friction a bit so it’s a win. Now that I have yasnippet
installed I’ll be looking for other ways to leverage its power.