[Next] [Previous] [Top] [Contents]

Introduction to Unix

CHAPTER 10 Editors


There are numerous text processing utilities available with Unix, as is noted throughout this document (e.g., ed, ex, sed, awk, the grep family, and the roff family). Among the editors, the standard "visual" (or fullscreen) editor on Unix is vi. It comprises a super-set, so to speak, of ed and ex (the Unix line editors) capabilities.

Vi is a modal editor. This means that it has specific modes that allow text insertion, text deletion, and command entering. You leave the insert mode by typing the <escape> key. This brings you back to command mode. The line editor, ex, is incorporated within vi. You can switch back and forth between full-screen and line mode as desired. In vi mode type Q to go to ex mode. In ex mode at the : prompt type vi to return to vi mode. There is also a read-only mode of vi, which you can invoke as view.

Another editor that is common on Unix systems, especially in college and university environments, is emacs (which stands for "editing macros"). While vi usually comes with the Unix operating system, emacs usually does not. It is distributed by The Free Software Foundation. It is arguably the most powerful editor available for Unix. It is also a very large software system, and is a heavy user of computer system resources.

The Free Software Foundation and the GNU Project (of which emacs is a part) were founded by Richard Stallman and his associates, who believe (as stated in the GNU Manifesto) that sharing software is the "fundamental act of friendship among programmers." Their General Public License guarantees your rights to use, modify, and distribute emacs (including its source code), and was specifically designed to prevent anyone from hoarding or turning a financial profit from emacs or any software obtained through the Free Software Foundation. Most of their software, including emacs, is available at: ftp://prep.ai.mit.edu/pub/gnu.

Both vi and emacs allow you to create start-up files that you can populate with macros to control settings and functions in the editors.

10.1 - Configuring Your vi Session
10.2 - Configuring Your emacs Session
10.3 - vi Quick Reference Guide
10.4 - emacs Quick Reference Guide

Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Top] [Contents]