Text editor

from Wikipedia, the free encyclopedia
Text editor

A text editor (from Latin textus 'content' and editor for 'publisher' or 'producer') is a computer program for editing texts. The editor loads the text file to be edited and displays its contents on the screen. The data can then be edited through various actions. These actions can include copy, paste, and delete. HTML editors are a special form of editing HTML files .

history

One of the first text editors with extended functions for the IBM PC was the IBM Professional Editor ; at the start a splash screen (still common today) appeared for a few seconds
From today's point of view, an entry screen is unusual . a. the name of the file to be edited has been entered; there were also no combo boxes , which is why the display mode was selected by entering a number
The actual editing screen in the IBM Professional Editor ; there was no menu in today's sense

Text editors emerged from the need to enter source text from computer programs and data into the computer. The forerunners of text editors were therefore punch card punchers who performed this task by preparing punch cards .

The first text editors were line-oriented editors on typewriter-like terminals, on which no display in the form of windows or screens was possible. These programs only allowed individual lines of a text file to be changed. Despite the limited possibilities, line-oriented editors such as EDLIN under DOS or ed under Unix are also part of the standard scope of today's operating systems ; they enable configuration files to be edited during installation or after a system breakdown if no comfortable graphical environment is available.

With the advent of computer terminals , the first screen-oriented text editors emerged. The first programs in this group included the O26 editor written in 1967 on CDC 6000 mainframes and the vi from 1976.

Functions

Good text editors make work easier for the user through extensions:

Search and replace
With the search function , text passages can be found quickly and replaced if necessary . Powerful text editors can make complex, structured changes to the text, often with the flexibility of regular expressions .
Syntax highlighting
Syntax highlighting is the ability to highlight characteristic text patterns.
Macros
Certain regularly repeating functions can be saved as macros .
Code folding
Parts of the text (such as entire instruction blocks in program texts) are folded in with code folding , thus increasing the clarity.
Column mode
Column
mode in Geany
Rectangular blocks can be marked, copied, pasted and edited.
Symbol browser
Functions, classes, structs etc. can be quickly viewed using a symbol browser.
Code completion
Automatic code completion .
Call tips
Display of call parameters for functions and methods.
Integrated programs
Integrated programs allow quick access during development (e.g. terminal emulation , compilation , file manager , FTP clients).
Meta properties
Properties such as character set , line breaks or byte order mark can be viewed and changed.
presentation
Files can be displayed as plain text , with or without line breaks, but also as hexadecimal numbers ( hex editor ).
Automatic indentation
Depending on the indentation style , the indentation of the previous line is also adopted for a new line , and program code can also be reformatted with correct indentations using an often adaptable scheme.
Plugins
Interface for plug-ins .

Differentiation from word processing

In contrast to a word processing system and desktop publishing software (DTP), a text editor usually only offers very limited layout and formatting functions and saves the text as pure ASCII text (or UTF-8 text) without formatting (or . in a simple text format similar to the system platform). A text editor is used, for example, to create notes , change configuration files, and edit source text while programming . So-called IDEs ( Integrated Development Environments ) essentially consist of a text editor component with extended functionalities in order to compile, evaluate or debug the program to be developed with just a few button or mouse clicks or to debug it directly in the development environment . Even Wikipedia uses to create or change of entries a text editor, in the form of a web browser the user is presented with built-in simple text editor component the article as plain text with simple formatting marks.

The files created by a text editor usually have the file name extension “.txt” in DOS and Windows due to a convention , although any other file name extension is also possible. Today the format is mostly a country and system-specific 8-bit extension of the 7-bit ASCII or UTF-8 , rarely EBCDIC (IBM mainframe ). When exchanging text files between different systems, it should be noted that there are different conventions for coding the line end .

application

Unix

Text editor Nano under UNIX

The standardized Unix text editor ed is one of the oldest editors still in use. This works line-oriented and has a powerful editing language.

Later, the visual editor vi appeared as an extension of ed and its extension ex , which made it possible to edit texts with a direct preview. Like ed  - POSIX, this is standardized and normally installed on all UNIX / Linux systems. Like ed , vi has no menus; instead, various key combinations and editing commands are used. To vi are different Nachprogrammierungen ( "clones"), for example. B. Vi Improved ( Vim ), vile , nvi , elvis and others. Vim has been ported to many system platforms, supports graphical interfaces and is one of the most powerful editors.

Another, often used and very powerful editor is GNU Emacs , a freely programmable text editor with a complete (albeit simple) Lisp system inside, on which many extensions and a good part of the editor itself are based. Smaller Emacs-like editors are e.g. B. µemacs (MicroEmacs), jed , jove . XEmacs is an essentially comparable alternative to GNU Emacs, which split off from it years ago. Emacs, XEmacs and µemacs were ported to many system platforms and are now available on Windows, Mac OS and some other systems such as VMS in addition to Unix .

Those who prefer WordStar- compatible commands can use the text editor joe or Jed under Unix . Emacs can also be completely wordstar-modeoperated in.

In addition to the ones presented here, there are many other text editors for Unix systems. The standard editor can be used under these i. d. Can usually be set using the environment variable EDITOR=befehl .

macOS

Due to its Unix core, the usual Unix editors are available on the command line under macOS . The system software also includes the TextEdit editor which, in addition to pure text files, also supports the Rich Text Format (rtf) and which, with limited display of the formatting, makes the content of other file formats accessible, such as Microsoft Word (doc, docx) and the OpenOffice format (odt). TextEdit can deal with numerous character encodings ( UTF-8 is used as the standard ) and automatically converts the various line endings from Unix, Mac OS Classic and Windows. A simple search and replace function is also part of the range of functions.

There are also numerous powerful third-party text editors available, the best known being BBEdit , which has been developed for the Mac since 1992 .

Windows

Every version of the Windows operating system includes a simple text editor called Notepad . However, this editor offers only very limited options and is therefore not very suitable for larger edits.

There are also numerous other, including very powerful, text editors available. In addition to programs ported from other systems, there is an abundance of mostly commercial software. Under Windows NT and its successors, the old DOS editor edlin exists again , which, like ed, provides line-oriented editing using a command language, but does not have the capabilities of its Unix cousin (e.g. it does not offer regular expressions for formulating patterns ).

See also

Web links

Wiktionary: Text editor  - explanations of meanings, word origins, synonyms, translations
Commons : Text editor  - collection of images, videos and audio files