Text editor
A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad).[1][2][3] Text editors are provided with operating systems and software development packages, and can be used to change files such as configuration files, documentation files and programming language source code.[4]
For the use of text editors with Wikipedia, see Help:Text editor support.Find and replace – Text editors provide extensive facilities for searching and replacing strings of text, either individually, or groups of files in opened tabs or a selected folder. Advanced editors can use to search and edit text or code. Additional features may include optional case sensitivity, a history of search terms for quick recall and autocompletion, and listing multiple results in one place.[18]
regular expressions
– most text editors provide methods to duplicate and move text within the file, or between files.
Cut, copy, and paste
Ability to handle encoded text.
UTF-8
– Text editors often provide basic visual formatting features like line wrap, auto-indentation, bullet list formatting using ASCII characters, comment formatting, syntax highlighting and so on. These are typically only for display and do not insert formatting codes into the file itself.
Text formatting
– As with word processors, text editors provide a way to undo and redo the last edit, or more. 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.
Undo and redo
Ability to jump to a specified line number.
Macro or procedure definition: to define new commands or features as combinations of prior commands or other macros, perhaps with passed parameters, or with nesting of macros.
Profiles to retain options set by the user between editing session.
Profile macros with names specified in, e.g., environment, profile, executed automatically at the beginning of an edit session or when opening a new file.
Multi-file editing: the ability to edit multiple files during an edit-session, perhaps remembering the current-line cursor of each file, to insert repeated text into each file, copy or move text among files, side-by-side (perhaps with a tiled multiple-document interface), etc.
compare files
Multi-view editors: the ability to display multiple views of the same file, with independent cursor tracking, synchronizing changes among the windows but providing the same facilities as are available for independent files.
Collapse/expand, also called : the ability to temporarily exclude sections of the text from view. This may either be based on a range of line numbers or on some syntactic element, e.g., excluding everything between a BEGIN; and the matching END;.
folding
Column-based editing; the ability to alter or insert data at a particular column, or to shift data to specific columns.
– 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. Also, a case-shifting feature could translate to lowercase or uppercase.
Data transformation
– 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, indenting source code, and so on.
Filtering
– contextually highlights source code, markup languages, config files and other text that appears in an organized or predictable format. 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 and feel of the editor's entire user interface.
Syntax highlighting
Syntax-oriented editors - some editors have support for the syntax of one or more languages, and allow operations in terms of syntactical unit, e.g., insert a new WHEN clause in a SELECT statement.
- a text editor intended for use by programmers must provide some plugin mechanism, or be scriptable, so a programmer can customize the editor with features needed to manage individual software projects, customize functionality or key bindings for specific programming languages or version control systems, or conform to specific coding styles.
Extensibility
navigation may vary across text editors. For example, pressing End twice may navigate to the end of a wrapped line after one press navigated to the end of an on-screen row of text. Block-oriented terminals typically have dedicated cursor movement keys, as do keyboards on personal computers.
Cursor
- some editors, e.g., ISPF, XEDIT, have a dedicated field on the screen for entering commands as opposed to text. Depending on the editor, the user may have to use cursor keys to switch between the command and text fields or the editor may interpret, e.g., specific function keys , as requests to switch.
Command line
Line commands, also known as prefix commands or sequence commands - Some editors treat a file as an array of text lines with associated line numbers or sequence numbers, and have a distinct line number field for each text field. A line command is a string that the user types into a line number field and that the editor recognizes as a command operating on that specific line or block of lines, e.g., LC to translate a line to lower case, ))3 to shift a block right three columns. Some editors also support line macros, also known as prefix macros or sequence macros. Despite the name prefix command, some editors allow the sequence field to appear after the text field.
Text editors, especially , often default to using a monospace font that clearly distinguishes between similar characters (homoglyphs) such as the colon and the semicolon.[19]
source-code editors
are text editors with additional functionality to facilitate the production of source code. These often feature user-programmable syntax highlighting and code navigation functions as well as coding tools or keyboard macros similar to an HTML editor.
Source code editors
. This subclass includes so-called "orthodox editors" that are derivatives of Xedit. Editors that implement folding without programing-specific features are usually called outliners (see below).
Folding editors
(integrated development environments) are designed to manage and streamline large programming projects. They are usually only used for programming as they contain many features unnecessary for simple text editing.
IDEs
authors are offered a variety of HTML editors dedicated to the task of creating web pages. These include: Dreamweaver, KompoZer and E Text Editor. Many offer the option of viewing a work in progress on a built-in HTML rendering engine or standard web browser. However, most web development is done in a dynamic programming language such as Ruby or PHP using a source code editor or IDE. The HTML delivered by all but the simplest static web sites is stored as individual template files that are assembled by the software controlling the site and do not compose a complete HTML document.
World Wide Web
Mathematicians, physicists, and computer scientists often produce articles and books using or LaTeX in plain text files. Such documents are often produced by a standard text editor, but some people use specialized TeX editors.
TeX
. Also called tree-based editors, because they combine a hierarchical outline tree with a text editor. Folding (see above) can be considered a specialized form of outlining.
Outliners
allow multiple users to work on the same document simultaneously from remote locations over a network. The changes made by individual users are tracked and merged into the document automatically to eliminate the possibility of conflicting edits. These editors also typically include an online chat component for discussion among editors.
Collaborative editors
provide a minimalistic 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 without distractions from interface elements like a toolbar or notification area.
Distraction-free editors
Some editors include special features and extra functions, for instance,
Programmable editors can usually be enhanced to perform any or all of these functions, but simpler editors focus on just one, or, like gPHPedit, are targeted at a single programming language.
discusses Xedit and its clones with an emphasis of folding capabilities and programmability