Summary
Now that you have completed this chapter, you should have a firm understanding of the following:

The vi editor is a simple but powerful text editor that can be used to create system and script files. It is an integral part of all UNIX operating systems. There will be times when a graphical text editor is not available and vi may be your only available tool to perform administrative tasks and troubleshoot problems.

The vi editor has three main modes of operation:

  • Command mode,
  • Entry mode, and
  • Last-line mode.

Command mode is the starting point for the other modes and is used to edit existing text. All commands are entered from command mode. Pressing Escape will always return you to command mode. Entry mode is used for entering new text. Last-line mode is primarily used to save files and exit vi. Understanding the purpose of these modes and knowing how to switch between them is key to working with the vi editor. There are also numerous positioning, editing and other commands available.

The CDE Text editor is a graphical editor that performs a similar function to vi. As with vi, you can create text files that do not have any formatting in them. These can be user environment configuration files, script files, program files or notes. The CDE editor provides mouse support making it easier to work with existing text.