Markup rules

texteditterminalI like to use plain text when I can. Plain text is just text without any formatting, which you edit with an app called a text editor, like Notepad on Windows or TextWrangler on a Mac. It’s pretty much a universal format – it can be opened and edited on pretty much any system or hardware you can think of.

One of the things that makes a simple plain text file useful is the ability to ‘mark up’ text within the document.

Markup languages have been around a long time. Perhaps the most famous one is HTML, one of the foundations of the web. An HTML file in reality is just plain text, with the use of HTML tags to mark up how bits of the document should behave – such as formatting and linking to other pages, for example.

Another example and one I use a lot is Markdown, a simple markup language for use in creating documents of all kinds. By simply using characters such as the hash sign (#), asterisks (*) and so on, a document can be made to include italic and bold text, headings at various sizes and bulleted lists, for example.

The key thing is that the document format can be used on pretty much any device and in any application. It’s just plain text, after all. The use of the markup language however enables that document to do more interesting things.

What’s more, you don’t have to be a developer or anything to start your own markup based project. You just need to define a few rules, and get going.

todotxt-apps_lrgI’ve just started playing with another great example of this. It’s called todo.txt and is a way of managing a todo list in a plain text file.

The rules are straightforward. Each task exists on a single line of text. Markup in that line can add information about the task, so for instance a word following a + sign is the name of the project that task belongs to (allowing you to group tasks by project, for example). You can also add a context to a task by following the @ sign with a word. Priorities can be added to tasks by using (A), (B) and so on to the beginning of the line.

Here’s an example of what a todo list looks like:

(A) Call Mom @Phone +Family
(A) Schedule annual checkup +Health
(B) Outline chapter 5 +Novel @Computer
(C) Add cover sheets @Office +TPSReports
Plan backyard herb garden @Home
Pick up milk @GroceryStore
Research self-publishing services +Novel @Computer
x Download Todo.txt mobile app @Phone

You could just manage your list in the plain text file using an editor – and many people do. However, because of the open nature of the format, other options are possible.

First, saving your todo list text file in a service like Dropbox makes it available across the web, so you can pick it up and edit it across many devices, which is helpful.

Even better, there are apps for mobile devices to help you manage your todo list. These present your todo list as a more traditional task management app would – but all the time they are just updating the text file using the markup rules.

This means all your tasks aren’t locked up in some database you’ll never get access to. You can take your text file todo list away any time you like and manage it in a different way.

As well as being a neat hack, todo.txt makes me wonder what other applications could be based on the simplicity of a plain text file and a few markup rules.

Any suggestions?

The joy of plain text

These days, I write pretty much everything in plain text. This is driven by two main things:

  1. Annoyance
  2. Paranoia

How I write pretty much anything of any length (blog posts, reports, proposals, longer emails) is to write them in a text editor – I’ve settled on WriteRoom – using the Markdown markup language.

I then also preview them in Marked so I have an idea of how they look when published – which I do by either copying the HTML into a WordPress post, or exporting a PDF to send on to someone else.

I’m sure you can get equivalents to these tools on other platforms like Windows or Linux, if you need to.

Using Markdown in a plain text document provides the answer to both of my issues I mention above.

My main annoyance with word processors is the lack of control over what they are doing, particularly with regard to formatting. In most cases, complexity gets in the way. Ever been editing a Word document, and find you can’t change the way a bit of text is formatted?

Maybe you’ve found yourself in the wrong section, or maybe the styles are broken from when someone else edited the document before you. Who knows? It’s annoying.

Far better to be able to see the source of all this formatting, which is what MarkDown provides. Obviously I’d much prefer using WordStar under CP/M but that’s probably not possible these days.

Markdown is a super simple markup language that means you can make words italic or bold just by wrapping them in asterisks, or you can set heading levels by using hash symbols. Even inserting links is an easy process with square brackets and parentheses.

Plus, plain text is a super portable file format – it can be opened on any system in pretty much any editor. This answers my paranoia problem. Nobody can stop me opening or sharing my work!

Adrian Short wrote a nice piece a while ago about plain text and how wonderful it is.

You can write plain text in any text editor or word processor. You can read plain text in any text editor or word processor. There’s no formatting to get screwed up. No-one owns the format. It’s completely interoperable. You can send plain text to anyone knowing that they’ll always be able to read it, no matter what computer they’re using or which software they’ve got installed.