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 INSERT at the bottom left of the Terminal window.

The following table shows file-handling commands and their descriptions:

image

Keying a number before many of the navigation commands augments their behavior, as described in this table:

image

The following table shows miscellaneous commands and their descriptions:

image

The following table shows how to set various preferences.

image

Keying a number before many of the editing commands augments their behavior:

image

image

Should there be an intro sentence here, too?

Search/Replace

image

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.227.92