XEmacsNull Blog

Bi-Day XEmacs Tip Blog

Friday, December 16, 2005

Topic: Make Your Own Abbreviations

So, after all that work for custom key bindings. Now, you tell me about making an abbreviation? . . .

Answer: Well, yes, why? Because, everyone else starts with the easy stuff and goes to the hard stuff. I'd rather have you think a little. Get into deep stuff, relax, take a brake, understand it, if even only half way, then jump back to something refreshing.

= Remember, even though, this can be (and should be) used as a XEmacs tip database. The real goal is a kind of two day gradual learning program. You could call it a class. Only, I don't have pop quizzes or give multiple multiple choice questions. (Yes, Dr. Erickson actually administered such tests in our CS 174 NDSU Computer Science courses. Multiple choice might be easy. However, when each question interactively affects the others and it becomes a patchwork of answers. This isn't your plain Jane MC Exam.)

= Using the abbreviation's feature is one of XEmacs minor modes. You'll have to turn it on, in order to have it expand your definitions.

= Then, we can start defining some word-based abbreviations.

• Turn the mode on: Alt-x, abbrev-mode, enter.
• Create abbreviation for "prging" to programming.

  • Type your expansion: programming
  • Define the abbreviation (globally): Ctrl-x, a, g, ??? (See next item.)
  • Enter your abbreviate word: prging, enter.
Platform: Linux
Level: Amateur
GlR

PS. If you would rather "disable" your abbreviations, for a while? Simple turn the abbreviate mode off. Alt-x abbrev-mode, enter. It toggles, you see.

0 Comments:

Post a Comment

<< Home