Text Editor Definition

A text editor is a type of computer program that edits plain text. Such programs are sometimes known as «notepad» software, after the name of Windows Notepad.

Text editors have fewer features than a word processor (or word processor) such as Microsoft Word or WordPad.

Text editors are provided with operating systems and software development packages, and can be used to change configuration files (eg .ini), documentation files, and programming source code.

Notepad is an example of a text editor

Plain text (unformatted) vs. rich text

There are important differences between plain text (created and edited by text editors) and rich text (such as those created by word processors or desktop publishing software).

Plain text consists exclusively of character representation. Each character is represented by one, two, or four bytes, depending on character encoding conventions such as ASCII or Unicode.

These conventions define many printable characters, but also non-printable characters that control the flow of text, such as space, line break, and page break, but plain text does not contain any other information about the text itself, not even the text convention. character encoding used.

Plain text is stored in text files, although text files do not store plain text exclusively.

In the early days of computers, plain text was displayed in a monospaced font, so horizontal alignment and column formatting were sometimes done with white space. For compatibility reasons, this tradition did not change.

Rich text, on the other hand, can contain metadata, character formatting data (for example, font, size, weight, and style), paragraph formatting data (for example, indentation, alignment, letter and word layout, and line spacing or other paragraphs) and page specification data (for example, size, margin, and reading direction). Rich text can get very complex.

Rich text can be saved in binary format (for example, DOC), text files that adhere to a markup language (for example, RTF or HTML), or a hybrid form of both (for example, Office Open XML) .

Text editors are intended to open and save text files that contain plain text or anything that can be interpreted as plain text, including markup for rich text or markup for something else (for example, SVG graphics format) .

Typical features of the text editor

– Find and Replace: Text editors offer extensive features to find and replace text, within a text or even in groups of text files. Advanced editors can use regular expressions to search for and edit text or code.

– Cut, copy and paste: most text editors provide methods to duplicate and move text within the file or between text files.

– Ability to handle text encoded in UTF-8.

– Text formatting: Text editors often offer basic formatting features, such as word wrap, auto-indentation, ASCII bullet list formatting, comment formatting, syntax highlighting, etc.

– Undo and redo: As with word processors, some text editors provide a way to undo and redo the last edit. Often, especially with older text editors, only a single level of editing history is remembered, and hitting the Undo command repeatedly will only «toggle» the last change.

Modern or complex editors often provide multi-level history, so repeatedly issuing the undo command will revert the document to successively earlier edits. A separate redo command will cause the modifications to «roll back» to the most recent changes. The number of changes remembered depends on the editor and is often user-configurable.

– Data transformation: read or merge 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 shell.

– Filtering: Some advanced text editors allow the editor to send all sections of the file being edited to another utility and read the result into the file instead of the lines being «filtered». This, for example, is useful for sorting a series of lines alphabetically or numerically, doing mathematical calculations, indenting source code, etc.

– Syntax Highlighting: Contextually highlights programming source code, markup languages, configuration files, and other text that appears in an organized or predictable format or with certain colors. Editors generally allow users to customize the colors or styles used for each language element. Some text editors also allow users to install and use themes to change the look of the entire editor user interface.

– Extensibility: A text editor designed to be used by programmers must provide some plug-in mechanism or be programmable, so that a programmer can customize the editor with the features needed to manage individual software projects, customize features or key bindings for languages. specific programming or version control systems.

History

Before there were text editors, computer text was punched onto cards with key-punching machines. The physical cases of these thin cardboard cards were then inserted into a card reader. Magnetic tape and disk «card-image» files created from such chart cards often had no line separation characters, and assumed fixed-length records of 80 characters. An alternative to cards was a perforated paper tape. They could be created by some teleprinters (such as the Teletype), which used special characters to indicate the ends of records.

The first text editors were «line editors» oriented to typewriter or typewriter type terminals without screens. Commands (often a single keystroke) made edits to a file at an imaginary insertion point called a «cursor.»

Edits were verified by writing a command to print a small section of the file and periodically printing the entire file.

In some line editors, the cursor could be moved by commands that specified the line number in the file, the text strings (context) to search for, and finally the regular expressions.

Line editors were major improvements over punch cards.

When computer terminals with video screens became available, screen-based text editors (sometimes just called «screen editors») became common.

One of the first full-screen editors was O26, which was written for the operator console of the CDC 6000 series computers in 1967.

Another full screen editor was vi. Written in the 1970s, it is still a standard editor on Unix and Linux operating systems, somewhat difficult to use for today’s users accustomed to simpler editors.

Also written in the 1970s was UCSD’s Pascal Screen Oriented Editor, which was optimized for both indented source code and general text.

Emacs, one of the first free and open source software projects, is another full-screen or real-time editor that has been ported to many systems. The ease of use and speed of a full-screen editor (compared to line-based editors) motivated many early purchases of video terminals.

The basic data structure in a text editor is that which manages the string (sequence of characters) or list of records that represents the current state of the file being edited. While the former could be stored in a single consecutive string of consecutive characters, the desire for text editors that could more quickly insert text, delete text, and undo/redo previous edits led to the development of more complicated sequence data structures.

A typical text editor uses a buffer gap, a linked list of lines (like PaperClip), a piece table, as its sequence data structure.

popular text editors

Atom
Notepad: Windows editor (Notepad in English)
Emacs: Unix editor.
Gedit: free editor for Unix and Windows.
jEdit: cross-platform editor.
Kate: editor for Unix.
Elder brother
Notepad++: source code editor for Windows.
Vi, a classic Unix editor, complicated to use by today’s standards.

related terminology

Word processor

memo pad

Doubts? needs more information? Write and we will respond to your email: click here