I've also been using Emacs with YASnippet for a bit now too. YASnippet is a plugin for Emacs that allows you to define a snippet that'll get transformed into something much bigger in your file. It saves you a lot of typing as you can define areas in your snippet where you get prompted to enter text and it'll autofill with your entries. Very handy, let me tell you. There's a screencast on YouTube showing how powerful it is.