Monday, May 12, 2008

Emacs Tip #21: pabbrev (predictive abbreviation expansion)

pabbrev is a yet another package for abbreviation expansion in Emacs. Unlike dabbrev, this one analyzes the contents of the buffers during idle time, and shows potential expansions based on word frequency. This package also shows potential expansions as you are typing. For example if you were typing 'pred', this is what you would see:


A TAB at any time will expand the word to the shown choice. If you do not like what was chosen, you can press TAB again and get a list of possible choices from which to chose.

To use it, download the source, and add this to your .emacs:

(require 'pabbrev "/path/to/package/pabbrev.el")

Documentation can be found in the source file. (I copied the example from the code itself.)

No comments: