Local Abbreviations

Abbreviations are a useful Emacs feature. They can do anything from inserting a non-ASCII character to changing “latex” into “LaTeX”. If you do a lot of writing they can be a significant timesaver. If you do any coding, you’re probably familiar with YASnippet, which can also do these things.

Regardless of what system you use, all the existing solutions suffer from being global or, at best, restricted to a given major mode. Sometimes, though, it’s convenient to have a set of abbreviations that are local to a given buffer and hidden when you change focus to another buffer. Chander G has recognized the need for local abbreviations and responded with lam—the Local Abbreviation Manager.

It’s a nice application. It’s simple to use and doesn’t require learning a lot of keybindings. One binding does everything you need and you set that to whatever is convenient for you. It also has the ability to run some Elisp after or instead of making the substitution. There’s an animated GIF at the GitHub site that demonstrates this.

It’s still early days for the project. It’s not yet in MELPA, although it is available for downloading. At the end of the README, there’s a list of additional features that Chander G is considering adding. They all seem reasonable and, most importantly, maintain the simplicity of the package.

If you think local abbreviations would be a win for your workflow, take a look at lam. It’s a single, short file so even without MELPA, it’s easy to install and maintain.

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