[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Avoid trailing space when setting abbrev
From: |
Harry Putnam |
Subject: |
Avoid trailing space when setting abbrev |
Date: |
Wed, 05 Jul 2017 08:46:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
I usually just edit the abbrev file with `M-x edit-abbrev' to set
temporary or permanent abbrevs ... rarely use the interactive form.
So when seting an abbrev... in cperl mode I might call M-x edit-abbrev
and insert something like:
"ffd" 0 "$File::Find::dir" (then press C-c C-c)
------- ------- ---=--- ------- -------
The part above the line was already posted accidentally... when I
started to type after the words `(then press)' instead of typing out
`(then press C-c C-c)' I actually pressed those and of course, since
I'm using gnus to post,that sent the message inadvertently.
So to conclude: When I use the new abbrev like:
`ffd<spc>' it inserts `$File::Find::dir<spc>' Most often that is just
what you want. But not always... I think I would find it more useful
more often to leave out the space.
Finally the question: Short of writing a `define-skeleton'
thingy.. and then associating that to the abbrevs, or calling it
directly, is there a quicker way to get an abbrev that doesn't include
the trialing space.
I realize hitting <RET> instead of <SPC> will have that effect, but
that is only rarely what I want.
(Not the beginning of an editor thread I hope)
If anyone is familiar with the `iab' insert mechanism used in vim, I'm
thinking something along that line where you can instruct the editor
to back up a space after inserting your abbrev with only two or at
least only a few key strokes in the writing of the `iab'.
Is there a notation that can be used in creating an abbrev that
inserts emacs to either delete the space or back up a space?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Avoid trailing space when setting abbrev,
Harry Putnam <=