07/20/2009
Text Expander In Emacs
TextExpander is a great little OSX utility that reads in all the text you type and based on certain phrases, inserts other phrases.
For example, you could set it up to correct change "teh" to "the." Or you could set it up to take the word "sig" and expand it to be:
Thanks for all the fish, Ted Roden
You get the idea.
The only problem with this software is that it's kind of a hack. It inserts the replacement text by emulating a Command-v (paste). The offically supported solution is to remap M-v to yank. But any self respecting emacs user who would remap page up should just go back to using vi.
So I created a tiny bit of elisp to import your TextExpander snippets as abbreviations in abbrev-mode. This way, you can configure all of your snippets in one place and still have them work in emacs.
Installation is simple:
- Setup TextExpander to "Expand In" "All Applications, except" and check Emacs.
- Download my elisp code.
- Run M-x textexpander-sync
- That's it.
Let me know what you think!