[Chapter 30] 30.33 Fixing Typos with vi Abbreviations
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:45:53Z

#

| Chapter 30 vi Tips and Tricks |

## 30.33 Fixing Typos with vi Abbreviations

Abbreviations (30.31) are a handy way to fix common typos. Try a few abbreviations like this:

>     ab teh the
>     ab taht that

in your .exrc (30.6) file.

Any time you find yourself transposing letters or saying, "Darn, I always misspell that word," add an abbreviation to .exrc. (Of course, you do have to worry about performance if the file gets too big.)

You can do the same thing to enforce conventions. For example, we type command names in italics, so creating a list of abbreviations like:

>     ab vi \fIvi\fP

saves us from having to type lots of troff (43.13) codes.

(This abbreviation is not recursive (30.31) because the `vi` is sandwiched between other alphanumeric characters, not standing alone as a word.)

- TOR

30.32 Using vi Abbreviations as Commands (Cut and Paste Between vi's) |  | 30.34 vi Line Commands vs. Character Commands