Text editor

From Free net encyclopedia

Image:Computer software notepad.png A text editor is a piece of computer software for editing plain text. It is distinguished from a word processor in that it does not manage document formatting or other features commonly used in desktop publishing.

Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code.

Some text editors are small and simple, while others offer a broad and complex range of functionality. For example, Unix and Unix-like operating systems have the vi editor (or a variant), but many also include the Emacs editor. Microsoft Windows systems come with the very simple Notepad, though many people (especially programmers) use a more complete program. Under Apple Macintosh's classic Mac OS, there was the native SimpleText, which was replaced or supplemented by WorldText. Some editors, such as TextEdit and WordStar, have dual operating modes, allowing them to be either a text editor or a word processor.

Contents

History

Before text editors existed, computer text was punched into Hollerith cards with keypunch machines. The text was carried as a physical box of these thin cardboard cards, and read into a card-reader.

The first text editors were line editors oriented on typewriter style terminals and they did not provide a window or screen-oriented display. They usually had very short commands (typewriters were not very reliable) that reproduced the current line. Among them were a command to print a selected section(s) of the file on the typewriter (or printer) in case of necessity. An "edit cursor", an imaginary insertion point, can be moved by special commands that operated with line numbers of specific text strings (context). Later, the context strings were extended to regular expressions. To see the changes, the file needed to be printed on the printer. These "line-based text editors" were considered revolutionary improvements over keypunch machines. In cases typewriter-based terminals were not available, they were adapted to keypunch equipment. In this case the user needed to punch the commands into the separate deck of cards and feed them into the computer in order to edit the file.

When computer terminals with video screens became inexpensive, screen-based text editors became common. One of the earliest "full screen" editors is vi, which is still a standard editor for Unix and Linux operating systems. The productivity of editing using these editors (compared to the line-based editors) motivated many of the early purchases of video terminals.

Types of text editors

Text editors geared for professional computer users place no limit on the size of the file being opened. In particular, they start quickly even when editing large files, and can edit files that are too large to fit the computer's main memory. Simpler text editors often just read files in an array in RAM. On larger files, this is slow, and very large files often do not fit.

The ability to read and write very large files is needed by many professional computer users. For example, system administrators may need to read long log files. Programmers may need to change large source code, or examine naturally large texts, such as an entire dictionary placed in a single file.

Some text editors include specialized computer languages to customize the editor (programmable editors). For example, Emacs can be customized by programming in Lisp. These usually permit the editor to simulate the keystroke combinations and features of other editors, so that users don't have to learn the native command combinations.

Another important class of programmable editors uses REXX as its scripting language. These editors permit entering both commands and REXX statements directly in the command line at the bottom of the screen (can be hidden and activated by a keystroke). This class of editors is usually called "orthodox editors", and most of represenatatives of this class are derivatives of Xedit, IBM's editor for VM/CMS. Among them we can note THE (a high quality open source editor), Kedit, Slickedit, X2, Uni-edit and Sedit. Some vi derivatives like vim also support folding as well as macro language and has a command line at the bottom for entering the commands. They can be considered as another branch of orthodox editors family.

Many text editors for software developers include source code syntax highlighting and automatic completion to make programs easier to read and write. Programming editors often permit one to select the name of a subprogram or variable, and then jump to its definition and back. Often an auxiliary utility, like ctags is used to locate the definitions.

Some editors include special features and extra functions, for instance,

are packages with text editors included, usually with extra functionality.

See also

External links

da:Teksteditor de:Texteditor cs:Textový editor es:Editor de texto eo:Tekstredaktilo fr:Éditeur de texte ko:문서 편집기 it:Editor di testo ms:Penyunting teks nl:Teksteditor ja:テキストエディタ pl:Edytor tekstu pt:Processador de texto ru:Текстовый редактор fi:Tekstieditori sv:Texteditor zh:文本编辑器