Department of Engineering

IT Services

Abbreviations

There's an Abbrev minor mode (set it using M-x abbrev-mode) which allows automatic expansion of abbreviations. If you find that you are often typing `at this moment in time', you can easily arrange things so that typing `waffle<space>' reproduces the phrase. You can define abbreviations interactively or from a file.

Interactive -
To define a new abbreviation for a word, type the word, then type C-x a g. You'll be prompted for the abbreviation you want to use. If you want to create an abbreviation for a phrase of (say) 3 words, use the standard emacs numerical argument facility. E.g., typing Save our Souls C-u 3 C-x a g sos creates an abbreviation sos.
Use M-x list-abbrevs to list and M-x edit-abbrevs to edit abbreviations. Note that there are mode-specific abbreviations as well as global ones.
Using abbreviation files -
M-x write-abbrev-file will put into a file the currently active abbreviations. M-x read-abbrev-file will read a file of abbreviations.
Dynamic abbreviation -
If you type M-/ emacs will try to complete the word you're on by looking back in the file and finding the first match. This facility is available even if the Abbrev minor mode isn't set.