[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: abbreviations
From: |
Ross A. Laird |
Subject: |
Re: abbreviations |
Date: |
Fri, 17 Oct 2008 23:37:12 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Joubert <iamsoooawesome@yahoo.com> writes:
> but I don't see my abbreviations autocompleting or anything at all for
> that matter.
Here's what I do (this may not be the best way to do it...):
I have a file called .abbrev_defs (it can be called anything).
In my .emacs file, I have this:
(setq-default abbrev-mode t)
(read-abbrev-file "~/.abbrev_defs")
I put my abbreviations in this file, eg:
(define-abbrev-table 'global-abbrev-table '( (
("recieving" "receiving" nil 1)
("occurence" "occurrence" nil 1)
("recieves" "receives" nil 1)
("downlaod" "download" nil 1)
("recieve" "receive" nil 2)
("recieved" "received" nil 1)
))
You can also use various keys to add abbreviations (from the info file
for autocomplete):
`C-x a g'
Define an abbrev, using one or more words before point as its
expansion (`add-global-abbrev').
`C-x a l'
Similar, but define an abbrev specific to the current major mode
(`add-mode-abbrev').
`C-x a i g'
Define a word in the buffer as an abbrev
(`inverse-add-global-abbrev').
`C-x a i l'
Define a word in the buffer as a mode-specific abbrev
(`inverse-add-mode-abbrev').
And:
`M-x write-abbrev-file <RET> FILE <RET>'
Write a file FILE describing all defined abbrevs.
`M-x read-abbrev-file <RET> FILE <RET>'
Read the file FILE and define abbrevs as specified therein.
`M-x quietly-read-abbrev-file <RET> FILE <RET>'
Similar but do not display a message about what is going on.
This works well for me.
Cheers.
Ross
--
Ross A. Laird, PhD
www.rosslaird.info
- abbreviations, Joubert, 2008/10/17
- Re: abbreviations,
Ross A. Laird <=