
Advanced Editing
Sometimes, in order to advance, you have to go backward. In this chapter, we are going to demonstrate how you can improve your text-editing skills by understanding how line editors work. This doesn’t mean you’ll have to abandon full-screen editing. The vi editor was constructed on top of a line editor named ex, which was an improved version of another line editor named ed. So in one sense we’ll be looking at the ancestors of vi. We’ll look at many of the ways line editors attack certain problems and how that applies to those of us who use full-screen editors.
Line editors came into existence for use on “paper terminals,” which were basically printers. This was before the time of video display terminals. A programmer, or some other person of great patience, worked somewhat interactively on a printer. Typically, you saw a line of your file by printing it out on paper; you entered commands that would affect just that line; then you printed out the edited line again. Line editors were designed for this kind of process, editing one line at a time.
People rarely edit files on paper terminals any more, but there are diehards who still prefer line editors. For one thing, it imposes less of a burden on the computer. Line editors display the current line; they don’t update the entire screen.
On some occasions, a line editor is simpler and faster than a full-screen editor. ...