Text editor: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
 
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Incomplete}}
== Definition ==
== Definition ==


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


== A word of clarification ==
See also: [[Integrated Development Environment]], [[Web authoring system]], [[XML editor]], [[Authoring environment]].


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 alphetical 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 control codes. A text editor is always supposed to show '''everything''' that is part of file. However:
== A word of clarification for beginners ==
* Most simple text editors can not show so called binary files, e.g. the encoding of a word file
 
* Many 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).
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).


{{quotationbox|A text editor is a type of program used for editing plain text files.
{{quotationbox|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:
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.
* 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.
* 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.}} ([http://en.wikipedia.org/wiki/Text_editor Wikipedia, retrieved 10:33, 29 August 2008 (UTC)}}.
* 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. ([http://en.wikipedia.org/wiki/Text_editor 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 expression]]s)
* 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 ==
== List of text editors ==


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


=== Light-weight editors ===
=== 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 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 editor]]s with support for common formats and scripting languages used to create educational web contents and programs, e.g.
There are lots of nice [[text editor]]s 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 editor]]s or good [[Integrated Development Environment|IDE]]s for programmers.


* [http://en.wikipedia.org/wiki/Notepad%2B%2B Notepad++] (Windows)
Here is a short list of recommended '''free''' editors ([[User:Daniel K. Schneider|Daniel K. Schneider]] 13:36, 10 August 2009 (UTC)):
** Lightweight and easy to use, does good syntax highlightning but no indentation
 
* [http://notepad-plus.sourceforge.net/uk/site.htm 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.
** Has a rather large library of plugins.
** [http://en.wikipedia.org/wiki/Notepad%2B%2B Notepad++] (Wikipedia entry)


* [http://www.pspad.com/ PSPad] (Windows).
* [http://www.pspad.com/ PSPad]
** System: Windows
** Lightweight and easy to use, does syntax highlighting, but no indentation (too bad !)
** 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
** Only thing you need to know is: "CTRL-space" will open a popup for contextual code completion
* [http://www.notetab.com/ NoteTab light]
** System: Windows
** Syntax support, e.g. highlighting and XML/HTML support could be better
** [http://en.wikipedia.org/wiki/NoteTab NoteTab] (Wikipedia entry)
* [http://bluefish.openoffice.nl/ BlueFish]
** System: Linux, Win, Max
** Syntax support
* [http://www.barebones.com/products/textwrangler/index.html TextWrangler]
** This is a light-weight version of the popular commercial BBEdit editor.
** Operating System: Mac OSX
** [http://en.wikipedia.org/wiki/TextWrangler TextWrangler] (Wikipedia entry)
Notes:
* I don't know any good easy editor for Linux, see the "heavier systems" below)
* See also the [http://en.wikipedia.org/wiki/Comparison_of_text_editors comparison of text editors] (Wikipedia).


=== Specialized ===
=== Specialized ===
Line 51: Line 102:
** The favorite editor of [[User:Daniel K. Schneider|Daniel K. Schneider]], but young people have trouble with this.
** The favorite editor of [[User:Daniel K. Schneider|Daniel K. Schneider]], but young people have trouble with this.


Many programmers choose to work with so-called [http://en.wikipedia.org/wiki/Integrated_development_environment Integrated Development Systems] (IDE). These include a text editor, but offer additional functionalities.
Many programmers choose to work with so-called [http://en.wikipedia.org/wiki/Integrated_development_environment 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 ==
== Links ==
Line 60: Line 111:




[[Category: Educational technologies]]
[[Category: Programming]]
[[Category: Programming]]
[[Category: Authoring tools]]
[[Category: Authoring tools]]

Latest revision as of 23:56, 2 February 2014

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