All Topics  
Text editor

 

   Email Print
   Bookmark   Link






 

Text editor



 
 
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 line . A text file exists within a computer file system. The end of a text file is often denoted by placing one or more special characters, known as an end-of-file marker, after the last line in a text file....
s.

Text editors are often provided with operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
s or software development packages, and can be used to change configuration file
Configuration file

In computing, configuration Computer files, or config files, are used to configure the initial settings for some computer programs. They are used for user application software, Server and operating system settings....
s and programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 source code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
.

e are important differences between plain text files created by a text editor, and document
Document

A document is a bounded physical representation of body of information designed with the capacity to communication. A document may manifest symbolic, diagrammatic or sensory-representational information....
 files created by word processor
Word processor

A word processor is a computer Application software used for the production of any sort of printable material.Word processor may also refer to an obsolete type of stand-alone office machine, popular in the 1970s and 80s, combining the keyboard text-entry and printing functions of an electric typewriter with a dedicated computer for th...
s such as Microsoft Word
Microsoft Word

Microsoft Word is Microsoft's word processor computer software. It was first released in 1983 under the name Multi-Tool Word for Xenix systems....
, WordPerfect
WordPerfect

WordPerfect is a proprietary software word processing application, now owned by Corel. Bruce Bastian, a Brigham Young University graduate student and BYU computer science professor Dr....
, or OpenOffice.org
OpenOffice.org

OpenOffice.org , commonly known simply as OpenOffice, is an office application suite available for a number of different computer operating systems....
.






Discussion
Ask a question about 'Text editor'
Start a new discussion about 'Text editor'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Vim
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 line . A text file exists within a computer file system. The end of a text file is often denoted by placing one or more special characters, known as an end-of-file marker, after the last line in a text file....
s.

Text editors are often provided with operating system
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
s or software development packages, and can be used to change configuration file
Configuration file

In computing, configuration Computer files, or config files, are used to configure the initial settings for some computer programs. They are used for user application software, Server and operating system settings....
s and programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 source code
Source code

In computer science, source code is any collection of statements or declarations written in some human-readable computer programming language....
.

Plain text files vs. word processor files

There are important differences between plain text files created by a text editor, and document
Document

A document is a bounded physical representation of body of information designed with the capacity to communication. A document may manifest symbolic, diagrammatic or sensory-representational information....
 files created by word processor
Word processor

A word processor is a computer Application software used for the production of any sort of printable material.Word processor may also refer to an obsolete type of stand-alone office machine, popular in the 1970s and 80s, combining the keyboard text-entry and printing functions of an electric typewriter with a dedicated computer for th...
s such as Microsoft Word
Microsoft Word

Microsoft Word is Microsoft's word processor computer software. It was first released in 1983 under the name Multi-Tool Word for Xenix systems....
, WordPerfect
WordPerfect

WordPerfect is a proprietary software word processing application, now owned by Corel. Bruce Bastian, a Brigham Young University graduate student and BYU computer science professor Dr....
, or OpenOffice.org
OpenOffice.org

OpenOffice.org , commonly known simply as OpenOffice, is an office application suite available for a number of different computer operating systems....
. 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 Grapheme or non-printing character is a code point in a character encoding, that does not in itself represent a written symbol....
    s of the used character set; in practice this is newline, tab and formfeed. The most commonly used character set is ASCII
    ASCII

    American Standard Code for Information Interchange , is a coding standard that can be used for interchanging information, if the information is expressed mainly by the written form of English words....
    , especially recently, as plain text files are more used for programming and configuration and less frequently used for documentation than in the past.
  • Documents created by a word processor generally contain fileformat-specific "control character
    Control character

    In computing and telecommunication, a control Grapheme or non-printing character is a code point in a character encoding, that does not in itself represent a written symbol....
    s" beyond what is defined in the character set. These 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 combines a personal computer and WYSIWYG page layout software to create publication documents on a computer for either Publishing or small scale local Multifunction printer output and distribution....
     but are now commonplace in the simplest word processor.
  • Word processors can usually edit a plain text file and save in the plain text file format. However one must take care to tell the program that this is what is wanted. This is especially important in cases such as source code, HTML, and configuration and control files. Otherwise 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

Punchcarddecks
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
Typewriter

A typewriter is a Machine or electromechanical device with a set of "keys" that, when pressed, cause Typeface to be printed on a medium, usually paper....
 style terminals and they 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

File:Lexmark X5100 Series.jpgIn computing, a printer is a peripheral which produces a hard copy of documents stored in computer file form, usually on physical print media such as paper or Transparency ....
) 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 computer programming and some branches of mathematics, a string is an ordered sequence of symbols. These symbols are chosen from a predetermined set or alphabet....
 (context). Later, the context strings were extended to regular expression
Regular expression

In computing, regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters....
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 computer 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 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 Keypunch#IBM_024.2C_026.The editor could be run on the CDC 6000 series, and later CDC Cyber operator consoles....
 - 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 family of screen-oriented text editors which share common characteristics, such as methods of invocation from the operating system command interpreter, and characteristic user interface features....
. Written in the 1970s, vi is still a standard editor for Unix
Unix

Unix is a computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
 and Linux
Linux

Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
 operating 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 computer operating system originally developed in 1969 by a group of American Telephone & Telegraph employees at Bell Labs, including Ken Thompson , Dennis Ritchie, Douglas McIlroy, and Joe Ossanna....
 and Unix-like operating systems have the vi
Vi

vi is a family of screen-oriented text editors which share common characteristics, such as methods of invocation from the operating system command interpreter, and characteristic user interface features....
 editor (or a variant), but many also include the Emacs
Emacs

Emacs is a class of feature-rich text editors, usually characterized by their extensibility. Emacs has, perhaps, more editing commands than any other editor or word processor, numbering over 1,000....
 editor. Microsoft Windows
Microsoft Windows

Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
 systems come with the very simple Notepad
Notepad

Notepad is a simple text editor included in all versions of Microsoft Windows since Windows 1.0 in 1985....
, 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 the trademarked name for a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems....
 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 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 was 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....
, 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 any collection of statements or declarations written in some human-readable computer programming language....
 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 language programming language which was developed at IBM. It is a structured high-level programming language which 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-oriented terminal IBM 3270 Text terminals.It is much more line-oriented than modern PC and Unix editors....
, 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 . For more than ten years it has been written and maintained by Mark Hessling, who along with being the original author of THE is also a maintainer of Regina, an open source REXX interpreter that has been ported to most Unix platforms....
, Kedit, SlickEdit
SlickEdit

SlickEdit is a cross-platform source code editor by SlickEdit, Inc. SlickEdit provides syntax highlighting, code navigation and customizable keyboard shortcuts....
, X2, Uni-edit, UltraEdit
UltraEdit

UltraEdit is a commercial text editor for Microsoft Windows created in 1994 by Ian D. Mead. The editor contains tools for programmers, including Macro , configurable syntax highlighting, code folding, file type conversions, project management, regular expressions for search-and-replace, a column-edit mode, remote editing of files via File Tra...
, and Sedit. Some vi derivatives such as Vim
Vim (text editor)

Vim is a text editor first released by Bram Moolenaar in 1991 for the Amiga computer. The name "Vim" is an acronym for "Vi IMproved" because Vim was created as an extended version of the vi editor, with many additional features designed to be helpful in editing program source code....
 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 displays text—especially source code—in different colors and typefaces according to the category of terms....
 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,...
 is used to locate the definitions.

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 also known as integrated design environment or integrated debugging 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 very large set of interlinked hypertext documents accessed via the Internet. With a Web browser, one can view Web pages that may contain writing, s, videos, and other multimedia and navigate between them using hyperlinks....
     programmers are offered a variety of text editors dedicated to the task of web development
    Web development

    Web development is a broad term for any activity related to developing a web site for the World Wide Web or an intranet. This can include e-commerce business development, web design, web content development, Client-side scripting/server-side scripting programming, and web server configuration....
    . These create the plain text files that deliver web pages. HTML editor
    HTML editor

    An HTML editor is a application software 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....
    s include: Dreamweaver, E (text editor), Frontpage, 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 WYSIWYG interface....
    , Homesite, Nvu
    Nvu

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

    BBEdit is a Proprietary software text editor made by Bare Bones Software. It was originally developed for Apple Macintosh System Software 6 and is now available for Mac OS X....
    . Many offer the option of viewing a work in progress on a built-in web browser.
  • 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. Together with the METAFONT language for font description and the Computer Modern typefaces, it was designed with two main goals in mind: to allow anybody to produce high-quality books using a reasonable amount of effort, and to provide a system that would give the exact...
     or LaTeX
    LaTeX

    LaTeX is a document markup language and Word processor for the TeX typesetting program. Within the typesetting system, its name is styled as ....
     in plain text files. Such documents are often produced by a standard text editor, but some people use specialized TeX editors
    TeX

    TeX is a typesetting system designed and mostly written by Donald Knuth. Together with the METAFONT language for font description and the Computer Modern typefaces, it was designed with two main goals in mind: to allow anybody to produce high-quality books using a reasonable amount of effort, and to provide a system that would give the exact...
    .
  • Outliner
    Outliner

    An outliner is a computer program that allows one to organize text into discrete sections that are related in a tree data structure or hierarchy....
    s. Also called tree-based editors, because they combine a hierarchical outline tree with an text editor. Folding (see above) can generally be considered a generalized form of outlining.


Typical features of text editors


Search and replace
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 string are found within a larger string or text....

The process of searching for a word or string in a text file and optionally replacing the 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....
, 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 Graphics software, 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.

Importing
Data transformation

In metadata, 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)

In computing, a shell is a piece of software that provides an Interface for users. Typically, the term refers to an operating system shell which provides access to the services of a kernel ....
.

Filtering
Filter (software)

A filter is a computer program to process a data stream. Some operating systems such as Filter are rich with filter programs. Even Microsoft Windows has some simple filters built in to its command shell, most of which have significant enhancements relative to the similar filter commands that were available in MS-DOS....

Some advanced text editors allow you 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.

See also

  • 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....
  • List of text editors
    List of text editors

    The following is a list of text editors. For a list of outliners, see that article's external links....
  • Comparison of text editors
    Comparison of text editors

    This article provides a basic feature comparison for several text editors. Additional feature details are available from the :Category:Text editor features and from the individual products' articles....
  • Collaborative editor
    Collaborative editor

    A collaborative editor is a software application that allows several people to edit a computer file using different computers. There are two types of collaborative editors, real-time and non-real-time....
  • File viewer
    File viewer

    A file viewer is application software that displays data stored in a computer file in a human-friendly form. The file contents are displayed on the display device, or they may be computer printer....
     - 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 Binary file computer files. Hex editors that were designed to edit Disk sector, or parse, data from floppy disk or hard disks were sometimes called sector editors or disk editors....
     - used for editing binary files


External links

  • Discusses Xedit and its clones with an emphasis of folding capabilities and programmability.