Appendix A. vi Reference

This is a quick reference to the command-line editor, vi. It is not required that you use vi; you can use any way possible to edit flat text file, such as one of the two other command-line editors that come with Mac OS X, emacs, or pico. The goal when editing command-line files is to not have a file extension on the end. GUI applications such as BBEdit and SubEthaEdit will also permit you to save files without an extension.

vi Editor

The vi editor has two modes:

• Command mode, which is used for entering commands

• Edit mode, which is used to type text

The a, A, i, I, o, O, c, C, and R commands put vi into edit mode. To return to command mode from edit mode, press Escape. When you are in edit mode, you will see the word ...

Get Apple Training Series: Mac OS X System Administration Reference, Volume 1 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.