Chapter 5: Text Editing


Overview

Most computer users spend more time creating and modifying text than anything else. Writing memoranda, letters, books, and programs, and creating text files of many kinds, takes a lot of effort. All of the popular UNIX variants (e.g., Linux, Solaris, HP-UX, AIX, Mac OS) separate this effort into two activities. Creating and modifying text is done by editors, while formatting the text for display and final presentation is done by formatters. The rationale behind this is one of having flexible programs that focus on doing one thing well. When you are creating text, it’s helpful to focus on getting the substance of what you want to say into a computer file. Once you have some material, then you can concentrate on how that material will be formatted. Most UNIX users depend on one of two screen editors: vi (visual editor) and emacs. vi is a part of most flavors of UNIX. emacs is included in many UNIX variants, including the most popular Linux distributions, and is available as a separate add-on program for almost all the other variants of UNIX. Note that because of the popularity of these two editors, command editing under the Korn shell can be done with either vi or emacs commands. Linux users also may use the vim or the pico editor. While there are a number of other UNIX-based text editors, these four are the most popular ones. vi has been available to UNIX System users for years and was enhanced to support international time and date formats and to work with multibyte characters needed for representation of non-English alphabets. vim is a superset of vi and includes not only the complete vi environment but additional features such as editing in colors and autocompletion of commands. pico is used primarily in the academic world, but really anyone who has access to the PINE e-mail system can have access to pico as well.

In this chapter you will learn:

  • The basic capabilities and commands of the vi and emacs editors

  • Advanced features of vi and emacs

  • How to customize vi to your working style, making it even easier to work with

  • How to write combinations of simple commands into vi macros

  • Comparisons between the vim editor and the vi editor

  • About the pico editor and its uses, both stand-alone and as an editor in PINE e-mail




UNIX. The Complete Reference
UNIX: The Complete Reference, Second Edition (Complete Reference Series)
ISBN: 0072263369
EAN: 2147483647
Year: 2006
Pages: 316

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net