Daniel Mustieles
daniel.mustieles@gmail.com 2011-2020
Jorge González
jorgegonz@svn.gnome.org 2006-2011
María Majadas
maria.majadas@hispalinux.es 2005b

# Introducción a los editores de texto en general

# No es un procesador de textos

Un editor de texto se debe diferenciar de un procesador de textos.

Un ejemplo de procesador de textos es LibreOffice Writer, que se publica como software libre y de código abierto.

Un procesador de textos permite crear distintos tipos de documentos (informes, cartas, libros, etc.), con la posibilidad de insertar imágenes, tablas y otros elementos.

Un editor de texto como gedit se utiliza para crear y editar archivos de texto. Los archivos guardados por gedit y almacenados en el disco sólo contienen texto.

# Formatos de archivos de texto

Con un editor de texto, puedes escribir notas sencillas como texto libre. Sin embargo, el texto también puede seguir un formato específico.

Other programs take text files as input, read the text in it, and produce a result. For example, web browsers can read text files that follow the HTML format and renders them as pages.

A text file format specifies how the content needs to be structured in order to be understood by the other programs.

# Ejemplos

## Writing documents

It is interesting to note that, with a simple text editor and text files, it is possible to write documents such as produced by a word processor.

To take our earlier example with HTML, to insert an image, it is done by referring to an external image file (for example stored on disk in the same directory). Although the image file is not part of the HTML file, a web browser knows that it needs to embed it in the page.

## Source code

Text files are not restricted to write notes or documents, another area is writing source code, to develop a piece of software with a programming or scripting language.

# Resaltado de sintaxis

When writing text in a certain format (or “language”), it is very useful to visually distinguish the different kinds of elements, when a portion of text has a special meaning. The special meanings depend on the syntax of the language, i.e., how things should be structured.

This is done by adding colors to the text (or other highlighting means: bold, italic, underline, etc).

It is important to note that these colors are not saved into the file; instead, it is the text editor application that presents the text to the user that way.