Writing in Markdown

Estimated reading time: 6 minutes, 6 seconds

The weirdest thing to get used to in Grav is the experience of writing in Markdown. It's this odd hybrid of modern technology and ancient word processing. But it's not weird because it's hard to get used to. It's weird because of how quickly it makes you realize that WYSIWYG editing isn't actually as easy as we've all convinced ourselves that it is.

Back in the early-to-mid 1980s, when the first PCs began making their way into the offices I worked in, we had a popular word processing program called Wordstar. Since we were all working on monochrome screens that used a single font, and had no way of bold facing or italicing text, we had to type odd little print commands that denoted how we wanted the text to be printed. For example, in Wordstar, you might write the following:

Make text ^Bbold^B or ^Yitalic^Y

to get:

Make text bold or italic

when the document printed.

And the formatting commands appeared on the screen right in your text. When Windows and Macs came along, we got WYSIWYG interfaces that made text bold or italic, or whatever, right there on the screen, so you could see the document as it was supposed to print. It seemed wonderful to be able to see our formatting before we printed the document, and being able to proofread without the interference of seeing all the formatting commands in the text.

Markdown, in some ways, is like returning to those inline commands. To make text bold, for example, you use two aterisks on either side of the bold text, e.g. (**bold**). A single asterisk or an underscore on each side of the text italicizes, and so on. If you don't like the markdown codes, by the way, you can simply type HTML because markdown will properly translate HTML into formatted text. Using the little markdown commands is far easier than typing HTML, but I really expected it to require an adjustment away from the WYSIWYG world, at first.

To make it a bit easier, most markdown editors have an editing screen that shows two panes. One pane displays the actual markdown text, while the other displays the formatted version of the text. This enables you to see the way your document will look on screen when it's displayed, as you type.

The StackEdit Editor
The StackEdit Markdown editor is pretty darn good, and does spell checking

As it turns out, the adjustment is not a big deal at all. After years of using a WYSIWYG editor, I thought that having to remember to type the little formatting markers would be a pain to remember and type. But, once you start typing in Markdown, you realize two things,

First, you don't actually use formatting all that much. Most of the time, you're just typing plain old text, so the amazing ability you have in Word to use bold, underline, etc., goes largely unused, except for an occasional word here and there.

Second, it makes you realize how difficult a WYSIWYG editor is to actually use. For instance, let's say you want to make a line of text a header. You have to stop typing, take your hand off the keyboard, use the mouse to move the cursor to the H1 button and click on it, then move your hand back to the keyboard. In Markdown, you simply type a pound sign as the first character of the line, so that

#Header 1

becomes

Header 1

when the document formats. Similarly ## creates Heading 2, ### formats to Heading 3 and so on. What you don't do is take your fingers off the keyboard, ever. Of course, for simple formatting like boldface, it's no more inconvenient to type two asterisks than it is to type [CTRL]+B in Word. But for more complex formatting, like doing an indented block quote, it's way easier in markdown to type the single ">" at the beginning of a quoted section than it is to use the mouse to pick the block quote style from the formatting toolbar in Word. By the way here's and example of block quotes in Markdown, where the syntax

> This is a block quote

renders as

This is a block quote

Finally, typing in markdown does one other weird thing: It actually makes you focus on just writing. I can spend hours in Word postponing doing any writing at all by fiddling around with font, paragraph, and header styles to make things look the way I want them. Sure, it looks pretty, but it can take a lot of time; time that you aren't spending, you know, writing. When you start writing in Markdown, you write stuff, instead of fiddling with stuff.

I thought it would take more getting used to, but, as it turns out, it's a simpler way to write than I thought it would be. This especially true if you've ever used the WYSIWYG editor in Wordpress or Movable Type. You're constantly having to go to the mouse and click the little formatting button of their WYSIWYG toolbar to add text formatting, and, while it doesn't seem like much effort, it actually does break up your concentration on the words you're putting on the page to go into mental formatting mode for a few seconds, then have to go back to writing mode. In Markdown, switching back and forth from keyboard to mouse is generally unnecessary. You just keep typing.

If you don't know the Markdown syntax, most Markdown editors, like the StackEdit screenshot above, have a formatting toolbar so you can, if you want, highlight some text and then click on the formatting button with your mouse to add the appropriate formatting. So, that's always there if you need it. But, once you've learned the basic syntax, it's generally superfluous. In fact, I've typed this whole article without using the toolbar once. I've done the whole thing without my fingers ever leaving the keyboard.

One more advantage occurs to me. Writing in markdown is just writing a plain old text file. I had years worth of content that I wrote in a word processing program called Lotus Ami Pro in the 90s, for example, that's gone forever, because I have no way to read it. Lotus Ami Pro no longer exists.

Markdown files, on the other hand, are just ASCII text. You can open them with any text editor. ASCII hasn't changed in my lifetime, and probably never will. Writing in plain text is future proof. I wish I had thought about that--I wish we'd all thought about that back when the flashy attraction of proprietary WYSIWYG word processing programs seduced us with their slick charm and pretty displays.

Oh, and by the way, as you can see from the screen shot, I wrote this using StackEdit on my iPad. You can write in Markdown on any device, and any device will read it, because it's just text. That's more universal compatibility than Word will ever have.

The bottom line is that I'm liking the writing process Markdown far better than I thought I would. It turns out that it's not a step back into the past. It's protecting my content from the future. It's actually one of the things I really am starting to like about using Grav.

Now, if Grav would only do spell checking like StackEdit does...

Blog Comments powered by Disqus.