Lably
Skip to content

Text editor

Software for editing plain text documents

  • 13 min read
  • 6 chapters

Related on Lably

Through Software, User (computing) and Editing

As with any software, a text editor can be installed onto a system, but often a relatively simple text editor is included in a default installation of an operating system (OS) since editing text files is a relatively basic need for any system and since a simple text editor can be provided at relatively low cost.

As source code is text, any text editor can be used to edit code, but a source-code editor is designed with features specifically intended for editing code. Some provide integration with software development tools and provide a debugging environment.

Plain text and rich text

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

Plain text exclusively consists of character representation. Each character is represented by a fixed-length sequence of one, two, or four bytes, or as a variable-length sequence of one to four bytes, in accordance to specific character encoding conventions, such as ASCII, ISO/IEC 2022, Shift JIS, UTF-8, or UTF-16. These conventions define many printable characters, but also non-printing characters that control the flow of the text, such as space, line break, and page break. Plain text contains no other information about the text itself, not even the character encoding convention employed. Plain text is stored in text files, although text files do not exclusively store plain text. Since the early days of computers, plain text was (once by necessity and now by convention) generally displayed using a monospaced font, such that horizontal alignment and columnar formatting were sometimes done using whitespace characters.

Rich text, on the other hand, may contain metadata, character formatting data (e.g. typeface, size, weight and style), paragraph formatting data (e.g. indentation, alignment, letter and word distribution, and space between lines or other paragraphs), and page specification data (e.g. size, margin and reading direction). Rich text can be very complex. Rich text can be saved in binary format (e.g. DOC), text files adhering to a markup language (e.g. RTF or HTML), or in a hybrid form of both (e.g. Office Open XML).

Text editors are intended to open and save text files containing either plain text or anything that can be interpreted as plain text, including the markup for rich text or the markup for something else (e.g. SVG).

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Computing and communication