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.
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:
Keying a number before many of the navigation commands augments their behavior, as described in this table:
The following table shows miscellaneous commands and their descriptions:
The following table shows how to set various preferences.
Keying a number before many of the editing commands augments their behavior:
Should there be an intro sentence here, too?
18.188.227.92