home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 30.32 Using vi Abbreviations as Commands (Cut and Paste Between vi's) Chapter 30
vi Tips and Tricks
Next: 30.34 vi Line Commands vs. Character Commands
 

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


Previous: 30.32 Using vi Abbreviations as Commands (Cut and Paste Between vi's) UNIX Power Tools Next: 30.34 vi Line Commands vs. Character Commands
30.32 Using vi Abbreviations as Commands (Cut and Paste Between vi's) Book Index 30.34 vi Line Commands vs. Character Commands

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System