XXXX
COPYRIGHT
INDEX

vi(1) Reference Manual Chapter 7

Word Abbreviations

  1. Abbreviations
A feature similar to macros in input mode is word abbreviation. This allows you to type a short word and have it expanded into a longer word or words. The commands are :abbreviate and :unabbreviate (:ab and :una) and have the same syntax as :map. For example:

         :ab eecs Electrical Engineering and Computer Sciences
causes the word `eecs' to always be changed into the phrase `Electrical Engineering and Computer Sciences'. Word abbreviation is different from macros in that only whole words are affected. If `eecs' were typed as part of a larger word, it would be left alone. Also, the partial word is echoed as it is typed. There is no need for an abbreviation to be a single keystroke, as it should be with a macro.

7.1. Abbreviations

The editor has a number of short commands which abbreviate longer commands which we have introduced here. You can find these commands easily on the quick reference card. They often save a bit of typing and you can learn them as convenient.