Text documents include many file types and can be simply described as any file that stores an ASCII character set (as opposed to binary data), which is the most common format for the English language. These text files can include text documents of prose, code, or some combination of both.
The simplest and most common text document is a “text file”, which will bare the .txt
extension. This generic document type contains only ASCII characters. These are the common characters you use for writing and reading (A-Z, a-z, 0-9), and special characters (such as #, %, !, ., etc.). These files also include carriage returns (new line), tabs, spaces, and an end-of-file (eof) designation that lets a program know where the file finishes. This last group, of course, contains characters that are there but that are not displayed in basic text editors.
You might be tempted to say Microsoft Word Document files (.doc
or .docx
) are text files. However, these are actually containers of many smaller files that are ZIP-compressed together into the .docx
file. This complex file that Microsoft uses allows them to store images, objects, text, and complex formatting instructions all in a single file, which can then be easy saved, shared, or sent between users of the Microsoft productivity applications. The downside to this format though is that you cannot open this file in a basic text editor to change it. This below image shows a Microsoft Word Document (.docx
) opened in the Atom text editor. As you can see, this file does not present itself in a way that offers you much understanding of its contents.
Well, as you might guess, most computer languages are saved as plain text or ASCII files. However, they often have different extensions. These extensions provide information to the computer, as well as to the user as to ‘how’ the file may be used or compiled.
In this class, we will be using the following text file types;
.md
.html
.css
.js
This Topic, we’ll look at the first type, Markdown or .md
files, using a text editor.
At it’s end, we’ll even begin looking at .html
files and beginning structure.
Text files can be created and edited using a “Text Editor”, which is any application for editing ASCII text documents. This includes both prose or code documents.
The default application on Mac and Windows are the following, respectively; textEdit.app and Notepad.exe. However, specialty applications exist which can ease the type of work you will be undertaking this semester. These applications are designed to speed up the writing process and are specially designed to display text documents in a way that makes identifying errors more easy.
There are many types of text editors, each optimized for specific types of tasks. This Wikipedia page on text editors will familiarize yourself with some of the specifics and differences. Pay particular attentions to the “Typical Features” section.
For this class, we need a text editor that is optimized for web development and code. You are welcome to use whatever text editor you like for this course, however, we will be using GitHub’s open-source Atom for our videos and tutorials, and it may behoove you to use it as well (especially beginners).
Most text editors allow you to download additional packages created by the community which extend their functionality and can make them more suited to your particular needs. For Atom and this course, these would be very beneficial:
Themes customize the look and feel of the editor.
"Newbound-dark-syntax" provides colorization for a number of languages, including markdown.
Packages add functionality to your editor.
More can be found on the scotch websites discussion of Atom if you’re interested.