Text editor

Revision as of 02:48, 10 April 2021 by Daniel K. Schneider (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Definition

A text editor is a software used to edit plain text files, such as HTML or XML formats or programming code.

See also: Integrated Development Environment, Web authoring system, XML editor, Authoring environment.

A word of clarification for beginners

It is important to understand that by plain text files we do not refer to text as in a letter or a book. "Plain text file" refers to the explicit contents of a computer file that use alphabetical characters, numbers and various punctuation signs and other special characters. Such a file may just contain words and end of line characters but it also may include programming code, markup code or control codes. A text editor is always supposed to show everything that is part of file. However:

  • Most simple text editors can not show so called binary files, e.g. the encoding of a binary MS Word file.
  • Many editors have problems with certain character encoding systems. We suggest that you make sure that your text editor can handle both ISO-8859-1 (or whatever older coding system is used for your native language) and UTF-8 (a system that can handle most characters of most languages).


A text editor is a type of program used for editing plain text files. There are important differences between plain text files created by a text editor, and document files created by word processors such as Microsoft Word, WordPerfect, or OpenOffice.org. 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 characters of the used character set; in practice this is newline, tab and formfeed. The most commonly used character set is ASCII, 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 characters" 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 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. (Wikipedia, retrieved 10:41, 29 August 2008 (UTC)

How to choose an editor

If you just want to type a few lines any notetab-like editor can do. Otherwise, it is important that a text editor assists with code writing in various ways. In our opinion, the most important features are related to writing correct code, i.e. features like syntax highlighting, indentation/prettifying, and help with inserting code elements at the right place.

Here a list of features that you absolutely must have in your editor:

  • Syntax coloring for different data formats (such as XML, HTML, Mediawiki syntax, etc.) and computer programming languages (such as JavaScript, PHP, etc.). Displays text in different colors and fonts according to the category of terms
  • Automatic indentation of code and prettifying. This should be format/language dependant.
  • Parenthesis / bracket matching that takes into account nesting.
  • Multiplatform (if you work on several types of OS, like Windows ,MacOs , Unixes,..
  • Be able to work on several documents and in two or more places of the same document.
  • Support for several types of character encoding, at least UTF-8 and the appropriate ISO-XXXX scheme for your working language.
  • Multiple undo/redo

Things you probably should have too:

  • Advanced find / replace (e.g. regular expressions)
  • Spell checking
  • Syntax checking (at least some)
  • Support for code insertion and auto completion, e.g.
    • HTML/XML tags (DTD/Schema aware if possible, i.e. only legal tags will be shown.
    • Programming constructs and built-in unctions for programming languages
  • Integration with other tools, e.g. be able to compile ActionScript code (via the SDK).
  • Support for macros. E.g. it should be easy to define a button that will execute a series of action or even simple insertion of a string.
  • Support for remote file access, e.g. FTP or WebDAV
  • A database of user-defined symbols, e.g. you should be able to find a function definition you made.

List of text editors

(Note: There are many more, the list below only includes software that Daniel K. Schneider is using for himself or with educational technology or computer applications students !)

Light-weight editors

The most well know very light-weight editor is Window's Notepad. We do not recommend it's use unless for really small tasks. Also, it has trouble displaying files produce with Unix systems (that contain only a single end of line character, i.e. ^J). The Linux equivalents (e.g. GEdit on Ubuntu) are more reliable and useful.

There are lots of nice text editors with support for common formats and scripting languages used to create educational web contents and programs. However they all(?) share the problem that syntax support is based on templates and not really on formal schemas (e.g. these editor will happily let you insert code in wrong locations, unlike a good XML editors or good IDEs for programmers.

Here is a short list of recommended free editors (Daniel K. Schneider 13:36, 10 August 2009 (UTC)):

  • Notepad++ (at sourceforge)
    • Operating System: Windows
    • Lightweight and easy to use, does good syntax highlighting, but no indentation support
    • Has a rather large library of plugins.
    • Notepad++ (Wikipedia entry)
  • PSPad
    • System: Windows
    • Lightweight and easy to use, does syntax highlighting, but no indentation (too bad !)
    • Only thing you need to know is: "CTRL-space" will open a popup for contextual code completion
  • NoteTab light
    • System: Windows
    • Syntax support, e.g. highlighting and XML/HTML support could be better
    • NoteTab (Wikipedia entry)
  • BlueFish
    • System: Linux, Win, Max
    • Syntax support
  • TextWrangler
    • This is a light-weight version of the popular commercial BBEdit editor.
    • Operating System: Mac OSX
    • TextWrangler (Wikipedia entry)

Notes:

  • I don't know any good easy editor for Linux, see the "heavier systems" below)
  • See also the comparison of text editors (Wikipedia).

Specialized

Heavier systems

  • JEdit (Most systems)
    • This is a more complex editor than PSPad or similar, ok for programmers.

Many programmers choose to work with so-called Integrated Development Environments (IDE). These include a text editor, but offer additional functionalities (e.g. code compilation) and they usually include a sophisticated plugin architecture. It is not always easier to distinguish a sophisticated editor like Emacs from an IDE. Emacs with the right extensions/plugins can be an IDE for some languages ...

Links

Warning-noto.svg

Content of this article has been taken from EduTechWiki (en) or EduTechWiki (fr) at the date indicated in the history. DKS was the main founder and main contributor of EduTechWiki. If you cite this page you also must cite and credit EduTechWiki, according to the CC BY-NC-SA license. View the pageinfo-toolboxlink for this article.