How to write in plain text
The first, and probably most important, thing to remember about writing in plain text is that spaces matter. And by spaces we mean the space between words, between lines, before words, the start of a new line etc. We will discuss each of these now, but know first of all that the consequence of all this is that, in its own way, plain text files are WYSIWYG – what you put in now is reliably what you get the next time you open that file.
Sentences and lines
In traditional prose we count lines and sentences as follows:
This is the first sentence and it is on the first line. This is the second sentence ‘wrapping’ onto the second, third or fourth line, depending on what device you are reading this on. Finally, this is a paragraph made up of three sentences and anywhere from five to nine lines.
The reason for this is that traditional prose is written on a pretend sheet of paper. Think of your favourite word processor. It has a fixed width and a screen that resembles a crisp white sheet of paper. The reason for this is that your text was, more often than not, destined to be printed.
Plain text is a bit more powerful. Sure, you can print it too, but you can also turn it into a webpage, or lay it out like a book, or make it a business card, or turn it into an e-book. because it can be so many things, it does not make sense to have plain text look like any single output.
Plain text abstracts the content away from the form. It reduces the content from words on an A4 sheet of paper to just words.
A consequence of this is that the text becomes more predictable in its layout but also a bit unusual if you are not used to it; and some concepts conflate in their meaning, such as lines and paragraphs. Here is the paragraph from earlier in plain text:
This is the first sentence and it is on the first line. This is the second sentence ‘wrapping’ onto the second, third or fourth line, depending on what device you are reading this on. Finally, this is a paragraph made up of three sentences and anywhere from five to nine lines.
This time it is still a set of three sentences, but it has just one line. And that one line is also one paragraph.
Line breaks
What you are reading is a plain text file. Like the words on this page, this, too, is an example of a plain text file:
This is a plain text file.
Of course you can now add a space and continue that sentence:
This is a plain text file. And this is a sentence.
When we write prose, we tend to break paragraphs by idea, theme, logical break or style. But you can do something more in a plain text file: you can break a line for your convenience. This could be to read more easily, because breaking it up that way helps you think better, or for any number of other reasons. Consider the same example as before:
This is a plain text file.
And this is a sentence.
In plain text, these are two ‘lines’. You can keep them this way if you choose to break paragraphs using empty lines:
This is a plain text file.
And this is a sentence.
This is a new paragraph.
Why? Because it follows a blank line.
We say ‘if you choose to’ because there are no strict rules in a plain text file. You write in a manner that makes sense to you. If you feel like every new line is, in spirit, a new paragraph, you can do just that. If seeing a blank line, as in our example above, helps you, you can practise that instead.
The only time your choices do matter is when you have to communicate some content from your plain text file to an external programme. In that case, a simple line break will likely not be treated as a paragraph, and a blank line alone will be treated as one.
You can follow whatever convention you like if you are writing entirely in plain text and reading in plain text as well. We recommend, however, that you practice leaving blank lines for paragraphs and using line breaks if you need to for structuring.
Text wrapping
There is another case for line breaks: text wrapping. In a ‘normal’ word processor, you are used to writing on a digital-equivalent of a ‘page’ so you can tell when a line ends due to the width of the page and continues from the next line onwards.
In a plain text file, this concept does not exist because you are writing on a computer, not a mock sheet of paper. So your lines can be, seemingly, infinitely long. Consider this:
Libero vivamus hac interdum convallis nisl neque morbi quam dis. Purus imperdiet praesent sociosqu pretium nascetur ultrices est ex, finibus hendrerit semper nostra a condimentum parturient natoque nullam eu, primis pulvinar per dui orci mollis sollicitudin felis.
Commodo egestas iaculis nunc varius mus dolor nam senectus consectetur, tristique taciti dapibus maecenas congue turpis dictum ac natoque, metus convallis risus lectus consequat semper parturient ipsum, sapien facilisi morbi magnis habitant aliquet mauris nisl.
Technically these are just two ‘lines’ on a screen because there is no concept of a fixed width on a screen that can simply scroll left and right, the line never wraps. Also note that by our previous convention of leaving a blank line space, you also have two paragraphs here. In other words, two really long
---