Entering Special Characters with Abbrev

As I’ve said before, I do almost all my writing in Org-mode so entering special characters is easy. I can either use the built-in Org characters or drop into TeX input mode. But, of course, I’m not always in Org-mode. Sometimes I want a special character when entering a Git description—most often → but occasionally others—and there are other situations where I need them as well.

My solution—that I learned from Xah Lee—is to use the abbrev system that’s built into Emacs. Thus, I have the abbreviation /ra for →. The other day, I saw this post by The Emacs Cat on using abbrev for inputting special characters anywhere within Emacs. It’s basically the same system that I use except that I depend on hippie expand to resolve my abbreviations rather than having them expand automatically, which I find jarring.

The Emacs Cat begins each of the abbreviation keys with 8 to avoid having accidental expansions. That’s a good solution and one that many may prefer. Regardless of which method you employ, using abbrev-mode to enter special characters that you need frequently is a win. You can always drop back to insert-char, bound to Ctrl+x 8 Return, to enter those that you don’t use often.

Take a look at The Emacs Cat’s post for the details on how to set things up.

This entry was posted in General and tagged . Bookmark the permalink.