The Life-Changing Magic of Markdown

https://apps.apple.com/us/story/id1498656237

I started using Markdown in 2009, shortly after I became a full-time work-for-hire digital publisher. A large part of publishing is formatting documents. Often, I have to assimilate content from many different sources. And all those different programs bring along formatting gremlins that made my job extremely frustrating. Macs and PCs are notoriously incompatible when it comes to word processors.

Sometimes, the best solution to getting a document properly formatted is to 'go nuclear' and strip out all the formatting using a plain text editor (like notepad). However, notepad is not ideal for large documents and it drove me to find more robust plain text editors (like atom - the most powerful text editor on the planet that is also FREE).

Once you start working in the world of plain text, it won't be long before you'll likely come across markdown. And what you'll love about plain text is the speed at which you can work, unmarred by distraction. I bet the rise of 'distraction-free' editors is where a lot of markdown fans like myself first discovered it.

If you are a writer, and you know about Grammarly - you know that starting without any formatting is the best way to go.

What is markdown?

Markdown is how you format your text for publishing to a static site generator like PubWriter. You can add italics, bold, images, headers, dividers, and more. In case you wondered, the page you are ready right now was created in markdown (and if you are curious what the source txt file looks like click here).

Markdown is a [semantic editor(https://en.wikipedia.org/wiki/Semantic_publishing).

Some helpful (& recommended) tutorials to start with:

PubWriter leverages markdown for the 'semantic formatting' to trigger how the text you write is rendered on your website (in html). The beauty of writing semantically is that your text is 'jailbroken' and compatible with any program you may elect to use in the future. The problem of writing in Word, Pages, Open Office, or any other word processor is that your document will contain proprietary formatting unique to the application you built it with. This means unless the user has the same program as you do, you can't necessarily open it edit it.

Whenever you see .md on a filename, it means it was saved in markdown. There are dozens of markdown editors and more are released every year. They are lightweight applications that run on any OS. The best part is that the .md file you create will be compatible with all of them!

There are some powerful things you can do with Markdown files that simply can't be done with proprietary programs like word or pages.

For example you can...

How to combine multiple .md files into one MD file.

First, copy all the .md files you want to combine into a single directory.

Next, open a Terminal (mac) and find the directory where the .md files you want to combine reside. Tip: use the 'Open Here in Terminal' trick (assumes all the files you want to merge are in the same directory):

Run this command in terminal:

cat *.md >merged.md

If you want to alphabetically sort every line in a new file:

cat *.md | sort > merged1.md

Advanced users

You can use the ls command to confirm all the files you want to combine are in the same directory.

cd = change directory
cd \ = takes you to the top directory
cd .. = goes up one level
cd ~ = takes you to your home directory

Caution! This step will take ALL the md files on your computer and merge them into a single file - not sure why you would ever want to do this!

Use this command to combine all the files into one:

find /temp -name '*.md' -exec cat {} \; > all.md  
find . -name '*.md' -exec cat {} \; > all.md  
find . -name '*.txt' -exec cat {} \; > allTheFiles.txt

The case for open-source text formatting.

The 'app' that worked in the system last year or even last month may not work in that same system today. The reason why it is so expensive to maintain an app (as much as $1mil/year) is because anytime Apple updates their iOS, then app must be updated.

Developers are constantly struggling with compatibility to older iOS versions users may still be running.

Decisions are pre-determined by the programmer who has defined the if/then statement of that program. If [x] happens, then [y] happens. When the program encounters an input that has no if/then statement is written for, it either kicks back an error message or just fails to respond.

Imagine if every time a new input was received upon which we were not programmed to handle, we kicked back an error message or sat idle.

It's not as if we can anticipate every scenario that lies ahead.

We also have to contend with the reality that the apps we run (including our habits) were optimized to run within a particular system. When we go outside that system, the app doesn't function so well.

An example:

A PDF file was designed to work within a particular system - a reader for PDF files. When you try to open that PDF within another system, for example, MS Word, it doesn't work. The data is no longer usable. It's because PDFs are not built on an open system.

Plain text (and Markdown) on the other hand is readable on thousands of devices. It exists as the most basic building blocks of any program. Because of this, text is compatible with far more 'systems' than a PDF file ever can be. Say you want to post something to a new tool. Plain text will always work.

Markdown Blocks

Going Further