Abbreviating Text


Tired of Typing?

Emacs can abbreviate text for you to be expanded automatically. To setup abbreviations, do this:
  1. place the following into your "~/.emacs" file:
    
    (setq-default abbrev-mode t)
    (cond ((file-exists-p "~/.abbrev_defs")
           (read-abbrev-file "~/.abbrev_defs")))
    (setq save-abbrevs t)
    
    
  2. save the file and re-load it
  3. type the abbreviation you want to use followed by "C-x a i g" to create a global abbreviation ("C-x a i l" for local abbreviations)
  4. type the definition of the abbreviation you want expanded
  5. type "M-x write-abbrev-file"
  6. type "~/.abbrev_defs" when prompted for a name
  7. repeat steps 3 & 4 for each new abbreviation you create later on
  8. now type the abbreviation followed by any punctuation and Emacs will expand that bad boy
Skippy!

Beginning | Previous | Next
Last updated $Date: 1997/04/11 03:45:54 $.