A fork of https://gist.github.com/tobias/42308 for Emacs and Vim