Text editor
Encyclopedia
A text editor is a type of program used for editing plain text file
Text file
A text file is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists within a computer file system...

s.

Text editors are often provided with operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s or software development packages, and can be used to change configuration file
Configuration file
In computing, configuration files, or config files configure the initial settings for some computer programs. They are used for user applications, server processes and operating system settings. The files are often written in ASCII and line-oriented, with lines terminated by a newline or carriage...

s and programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

.

Plain text files vs. word processor files

There are important differences between plain text files created by a text editor, and document
Document
The term document has multiple meanings in ordinary language and in scholarship. WordNet 3.1. lists four meanings :* document, written document, papers...

 files created by word processor
Word processor
A word processor is a computer application used for the production of any sort of printable material....

s such as Microsoft Word
Microsoft Word
Microsoft Word is a word processor designed by Microsoft. It was first released in 1983 under the name Multi-Tool Word for Xenix systems. Subsequent versions were later written for several other platforms including IBM PCs running DOS , the Apple Macintosh , the AT&T Unix PC , Atari ST , SCO UNIX,...

, WordPerfect
WordPerfect
WordPerfect is a word processing application, now owned by Corel.Bruce Bastian, a Brigham Young University graduate student, and BYU computer science professor Dr. Alan Ashton joined forces to design a word processing system for the city of Orem's Data General Corp. minicomputer system in 1979...

, or OpenOffice.org
OpenOffice.org
OpenOffice.org, commonly known as OOo or OpenOffice, is an open-source application suite whose main components are for word processing, spreadsheets, presentations, graphics, and databases. OpenOffice is available for a number of different computer operating systems, is distributed as free software...

. Briefly:
  • A plain text file is represented and edited by showing all the characters as they are present in the file. The only characters usable for 'mark-up' are the control character
    Control character
    In computing and telecommunication, a control character or non-printing character is a code point in a character set, that does not in itself represent a written symbol.It is in-band signaling in the context of character encoding....

    s of the used character set; in practice this is newline, tab and formfeed. The most commonly used character set is ASCII
    ASCII
    The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

    , especially recently, as plain text files are more often being used for programming and configuration, and less frequently for documentation (e.g. detailed instructions, user guides) than in the past.
  • Documents created by a word processor generally contain application-specific "control character
    Control character
    In computing and telecommunication, a control character or non-printing character is a code point in a character set, that does not in itself represent a written symbol.It is in-band signaling in the context of character encoding....

    s" beyond what is defined in the character set. They enable functions like bold, italic, fonts, columns, tables, etc. These and other common page formatting symbols were once associated only with desktop publishing
    Desktop publishing
    Desktop publishing is the creation of documents using page layout software on a personal computer.The term has been used for publishing at all levels, from small-circulation documents such as local newsletters to books, magazines and newspapers...

    , but are now commonplace in the simplest word processor.
  • Word processor programs can usually edit a plain text file and save it back in the plain text file format. However, one must take care to tell the program that this is what is wanted. Specifying the save format is especially important in cases such as source code, HTML, and configuration and control files. If left to the program's default, the file will contain those "special characters" unique to the word processor's file format, and will not be handled correctly by the utility the files were intended for.

History

Before text editors existed, computer text was punched into punched cards with keypunch machines. The text was carried as a physical box of these thin cardboard cards, and read into a card-reader. Magnetic tape or disk "card-image" files created from such card decks often had no line-separation characters at all, commonly assuming fixed-length 80-character records. An alternative to cards was punched paper tape, generated by teletype (TTY) machines; these did need special characters to indicate ends of records.

The first text editors were line editors oriented to teletype- or typewriter
Typewriter
A typewriter is a mechanical or electromechanical device with keys that, when pressed, cause characters to be printed on a medium, usually paper. Typically one character is printed per keypress, and the machine prints the characters by making ink impressions of type elements similar to the pieces...

- style terminals, which did not provide a window or screen-oriented display. They usually had very short commands (to minimize typing) that reproduced the current line. Among them were a command to print a selected section(s) of the file on the typewriter (or printer
Computer printer
In computing, a printer is a peripheral which produces a text or graphics of documents stored in electronic form, usually on physical print media such as paper or transparencies. Many printers are primarily used as local peripherals, and are attached by a printer cable or, in most new printers, a...

) in case of necessity. An "edit cursor", an imaginary insertion point, could be moved by special commands that operated with line numbers of specific text strings
String (computer science)
In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet....

 (context). Later, the context strings were extended to regular expression
Regular expression
In computing, a regular expression provides a concise and flexible means for "matching" strings of text, such as particular characters, words, or patterns of characters. Abbreviations for "regular expression" include "regex" and "regexp"...

s. 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 case 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 terminal
Computer terminal
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system...

s with video screens became available, screen-based text editors
Visual editor
Visual editors or full screen editors are editing programs which display the text being edited on the screen as it is being edited, as opposed to line-oriented editors ....

 (sometimes termed just "screen editors") became common. One of the earliest "full screen" editors was O26
O26 (text editor)
O26, a full screen editor, was named after the IBM model 026 keypunch....

 - which was written for the operator console of the CDC 6000 series
CDC 6000 series
The CDC 6000 series was a family of mainframe computers manufactured by Control Data Corporation in the 1960s. It consisted of CDC 6400, CDC 6500, CDC 6600 and CDC 6700 computers, which all were extremely rapid and efficient for their time...

 machines in 1967. Another early full screen editor is vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

. Written in the 1970s, vi is still a standard editor for Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 and Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 operating systems. Vi and Emacs
Emacs
Emacs is a class of text editors, usually characterized by their extensibility. GNU Emacs has over 1,000 commands. It also allows the user to combine these commands into macros to automate work.Development began in the mid-1970s and continues actively...

 are popular editors on these systems. The productivity of editing using full-screen editors (compared to the line-based editors) motivated many of the early purchases of video terminals.

Types of text editors

Some text editors are small and simple, while others offer a broad and complex range of functionality. For example, Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 and Unix-like operating systems have the vi
Vi
vi is a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by the Single Unix Specification and POSIX.The original code for vi...

 editor (or a variant), but many also include the Emacs editor. Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 systems come with the very simple Notepad, though many people—especially programmers—prefer to use one of many other Windows text editors with more features. Under Apple Macintosh's classic Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

 there was the native SimpleText
SimpleText
SimpleText is the native text editor for the Classic Mac OS. SimpleText allows editing including text formatting , fonts, and sizes. It can be considered similar to Windows' WordPad application...

, which was replaced under Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 by TextEdit
TextEdit
TextEdit is a simple, open source word processor and text editor, first featured in NeXT's NEXTSTEP and OPENSTEP. It is now distributed with Mac OS X since Apple Inc.'s acquisition of NeXT, and available as a GNUstep application for other Unix-compatible operating systems such as Linux...

. Some editors, such as WordStar
WordStar
WordStar is a word processor application, published by MicroPro International, originally written for the CP/M operating system but later ported to DOS, that enjoyed a dominant market share during the early to mid-1980s. Although Seymour I...

, have dual operating modes allowing them to be either a text editor or a word processor.

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 are capable of editing files that are too large to fit the computer's main memory. Simpler text editors often just read files into an array in RAM. On larger files this is a slow process, 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
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 files, or examine unusually 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 do not have to learn the native command combinations.

Another important group of programmable editors use REXX
REXX
REXX is an interpreted programming language that was developed at IBM. It is a structured high-level programming language that was designed to be both easy to learn and easy to read...

 as their 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). These editors are usually referred to as "orthodox editors", and most representatives of this class are derivatives of XEDIT
XEDIT
XEDIT is a visual editor for VM/CMS using block mode IBM 3270 terminals.It is much more line-oriented than modern PC and Unix editors. For example, it supports automatic line numbers, and many of the commands operate on blocks of lines. One of the features is a command line which allows the user to...

, IBM's editor for VM/CMS. Among them are THE
The Hessling Editor
The Hessling Editor is one of the older open source text editor projects...

, Kedit, SlickEdit
SlickEdit
SlickEdit, previously known as Visual SlickEdit, is a cross-platform commercial source code editor by SlickEdit, Inc. SlickEdit provides syntax highlighting, code navigation and customizable keyboard shortcuts. Versions from 2007 and later also support programmable code...

, X2, Uni-edit, UltraEdit
UltraEdit
UltraEdit is a commercial text editor for Microsoft Windows, Linux and created in 1994 by Ian D. Mead. The editor contains tools for programmers, including macros, configurable syntax highlighting, code folding, file type conversions, project management, regular expressions for search-and-replace,...

, and Sedit. Some vi derivatives such as Vim
Vim (text editor)
Vim is a text editor written by Bram Moolenaar and first released publicly in 1991. Based on the vi editor common to Unix-like systems, Vim is designed for use both from a command line interface and as a standalone application in a graphical user interface...

 also support folding as well as macro languages, and have a command line at the bottom for entering commands. They can be considered another branch of the family of orthodox editors.

Many text editors for software developers include source code syntax highlighting
Syntax highlighting
Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and...

 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
Ctags
Ctags is a program that generates an index file of names found in source and header files of various programming languages.Depending on the language,functions,variables,class members,macros and so onmay be indexed....

 is used to locate the definitions.

Typical features

  • String searching algorithm
    String searching algorithm
    String searching algorithms, sometimes called string matching algorithms, are an important class of string algorithms that try to find a place where one or several strings are found within a larger string or text....

     – search string with a replacement string. Different methods are employed, Global(ly) Search And Replace, Conditional Search and Replace, Unconditional Search and Replace.
  • Cut, copy, and paste – most text editors provide methods to duplicate and move text within the file, or between files.
  • Text formatting – Text editors often provide basic formatting features like line wrap, auto-indentation, bullet list formatting, comment formatting
    Comment (computer programming)
    In computer programming, a comment is a programming language construct used to embed programmer-readable annotations in the source code of a computer program. Those annotations are potentially significant to programmers but typically ignorable to compilers and interpreters. Comments are usually...

    , and so on.
  • Undo and redo
    Undo
    Undo is a command in many computer programs. It erases the last change done to the document reverting it to an older state. In some more advanced programs such as graphic processing, undo will negate the last command done to the file being edited....

     – As with word processors, text editors will provide a way to undo and redo the last edit. Often—especially with older text editors—there is only one level of edit history remembered and successively issuing the undo command will only "toggle" the last change. Modern or more complex editors usually provide a multiple level history such that issuing the undo command repeatedly will revert the document to successively older edits. A separate redo command will cycle the edits "forward" toward the most recent changes. The number of changes remembered depends upon the editor and is often configurable by the user.
  • Data transformation
    Data transformation
    In metadata and data warehouse, a data transformation converts data from a source data format into destination data.Data transformation can be divided into two steps:...

     – Reading or merging the contents of another text file into the file currently being edited. Some text editors provide a way to insert the output of a command issued to the operating system's shell
    Shell (computing)
    A shell is a piece of software that provides an interface for users of an operating system which provides access to the services of a kernel. However, the term is also applied very loosely to applications and may include any software that is "built around" a particular component, such as web...

    .
  • Ability to handle UTF-8
    UTF-8
    UTF-8 is a multibyte character encoding for Unicode. Like UTF-16 and UTF-32, UTF-8 can represent every character in the Unicode character set. Unlike them, it is backward-compatible with ASCII and avoids the complications of endianness and byte order marks...

     encoded text.
  • Filtering
    Filter (software)
    A filter is a computer program to process a data stream. Some operating systems such as Unix are rich with filter programs. Even Windows has some simple filters built into its command shell, most of which have significant enhancements relative to the similar filter commands that were available in...

     – Some advanced text editors allow the editor to send all or sections of the file being edited to another utility and read the result back into the file in place of the lines being "filtered". This, for example, is useful for sorting a series of lines alphabetically or numerically, doing mathematical computations, and so on.
  • Syntax highlighting
    Syntax highlighting
    Syntax highlighting is a feature of some text editors that display text—especially source code—in different colors and fonts according to the category of terms. This feature eases writing in a structured language such as a programming language or a markup language as both structures and...

     – contextually highlights software code and other text that appears in an organized or predictable format.

Specialised editors

Some editors include special features and extra functions, for instance,
  • Source code editor
    Source code editor
    A source code editor is a text editor program designed specifically for editing source code of computer programs by programmers. It may be a standalone application or it may be built into an integrated development environment ....

    s are text editors with additional functionality to facilitate the production of source code. These often feature user-programmable syntax highlighting, and coding tools or keyboard macros similar to an HTML editor (see below).
  • Folding editor
    Folding editor
    A folding editor is a text editor which supports text folding or code folding, a mechanism allowing the user to hide and reveal blocks of text—usually named...

    s. This subclass includes so-called "orthodox editors" that are derivatives of Xedit. The specialized version of folding is usually called outlining (see below).
  • IDE
    Integrated development environment
    An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

    s (integrated development environments) are designed to manage and streamline larger programming projects. They are usually only used for programming as they contain many features unnecessary for simple text editing.
  • World Wide Web
    World Wide Web
    The World Wide Web is a system of interlinked hypertext documents accessed via the Internet...

     programmers are offered a variety of text editors dedicated to the task of web development
    Web development
    Web development is a broad term for the work involved in developing a web site for the Internet or an intranet . This can include web design, web content development, client liaison, client-side/server-side scripting, web server and network security configuration, and e-commerce development...

    . These create the plain text files that deliver web pages. HTML editor
    HTML editor
    An HTML editor is a software application for creating web pages. Although the HTML markup of a web page can be written with any text editor, specialized HTML editors can offer convenience and added functionality. For example, many HTML editors work not only with HTML, but also with related...

    s include: Dreamweaver, E Text Editor, Microsoft FrontPage
    Microsoft FrontPage
    Microsoft FrontPage was a WYSIWYG HTML editor and web site administration tool from Microsoft for the Microsoft Windows line of operating systems. It was branded as part of the Microsoft Office suite from 1997 to 2003...

    , HotDog
    HotDog
    HotDog is the name of the HTML web editing tool developed by Sausage Software in the mid-1990s. At the time of its development, there were only a small number of HTML editors available on the market and HotDog gathered significant interest from web users due to its ease of use and "What you see...

    , Homesite, Nvu
    Nvu
    Nvu is a WYSIWYG HTML editor, based on the Composer component of Mozilla Application Suite and Gecko 1.7. It is a common WYSIWYG editor for Linux, Microsoft Windows and Macintosh, intended to be an open source equivalent to proprietary software like Microsoft Expression Web and Adobe Dreamweaver...

    , Tidy, and GoLive. Many offer the option of viewing a work in progress on a built-in web browser
    Web browser
    A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...

    . XML editor
    XML editor
    An XML editor is a markup language editor with added functionality to facilitate the editing of XML. This can be done using a plain text editor, with all the code visible, but XML editors have added facilities like tag completion and menus and buttons for tasks that are common in XML editing, based...

    s share many traits.
  • Mathematicians, physicists, and computer scientists often produce articles and books using TeX
    TeX
    TeX is a typesetting system designed and mostly written by Donald Knuth and released in 1978. Within the typesetting system, its name is formatted as ....

     or LaTeX
    LaTeX
    LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

     in plain text files. Such documents are often produced by a standard text editor, but some people use specialized TeX editors.
  • Outliner
    Outliner
    An outliner is a computer program that allows text to be organized into discrete sections that are related in a tree structure or hierarchy. Text may be collapsed into a node, or expanded and edited....

    s. Also called tree-based editors, because they combine a hierarchical outline tree with a text editor. Folding (see above) can generally be considered a generalized form of outlining.
  • Simultaneous editing is a technique in End-user development research to edit all items in a multiple selection. It allows the user to manipulate all the selected items at once through direct manipulation. The Lapis text editor
    Lapis (text editor)
    Lapis is an experimental text editor allowing multiple simultaneous edits of text in a multiple selection.Lapis is an instance of Programming by example...

     and the multi edit plugin for gedit
    Gedit
    gedit is a text editor for the GNOME desktop environment, Mac OS X and Microsoft Windows. Designed as a general purpose text editor, gedit emphasizes simplicity and ease of use...

     are examples of this technique. The Lapis editor can also create an automatic multiple selection based on an example item.
  • Distraction-free editors provide a minimalistic
    Computing minimalism
    In computing, minimalism refers to the application of minimalist philosophies and principles in hardware and software design and usage.-History:...

     interface with the purpose of isolating the writer from the rest of the applications and operating system, thus being able to focus on the writing alone.

See also

  • Collaborative editor
    Collaborative editor
    A collaborative editor is a form of collaborative software application that allows several people to edit a computer file using different computers. There are two types of collaborative editing: real-time and non-real-time...

  • Comparison of text editors
    Comparison of text editors
    This article provides basic comparisons for common text editors. More feature details for text editors are available from the Category of text editor features and from the individual products' articles...

  • Editor war
    Editor war
    Editor war is the common name for the rivalry between users of the vi and Emacs text editors. The rivalry has become a lasting part of hacker culture and the free software community....

  • File viewer
    File viewer
    A file viewer is application software that presents the data stored in a computer file in a human-friendly form. The file contents are generally displayed on the screen, or they may be printed...

     – does not change file, faster for very large files
  • Hex editor
    Hex editor
    A hex editor is a type of computer program that allows a user to manipulate the fundamental binary data that makes up computer files. Note that computer files can be very small to very large...

     – used for editing binary files
  • Stream editor
    Sed
    sed is a Unix utility that parses text and implements a programming language which can apply transformations to such text. It reads input line by line , applying the operation which has been specified via the command line , and then outputs the line. It was developed from 1973 to 1974 as a Unix...

     – used for non-interactive editing
  • List of text editors

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK