Chapter 17. Text Editing on Mac OS X

Like all Unix systems, Mac OS X is driven by its text files. Between various programs’ text-based configuration and preference files (often rendered in XML), program source code, the Makefiles, and source code of freshly downloaded software, it pays to know your options with opening, editing, and creating text files.

This chapter covers Mac OS X’s attitude toward text files and the many editors it includes to help you create and edit them.

Types of Text Files

By text file, we usually mean a file that contains text characters and nothing else—not even graphics or formatting information. Every byte found in a text file represents either a text character or (with Unicode or other multibyte character encodings) a piece of one.

Mac OS X makes this notion a little fuzzy by its native handling of RTF, which (at least on the Aqua layer, through the Finder) it handles as smoothly as plain text. In fact, many Aqua applications favor using RTF over plain text unless you specifically request otherwise.

.txt files

The Finder recognizes .txt files, associating them with TextEdit by default (see Section 17.3.1, later in this chapter).

unlabeled files

Text files that lack recognizable filename extensions or resource forks fall into this category. The vast majority of text files used by Mac OS X’s Unix layer go unrecognized by the topmost Aqua layer; by default, double-clicking one of these file’s undecorated icons results in the dialog shown in Figure 17-1 ...

Get Mac OS X in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.