Here's a little trick - previewing Markdown in your terminal. Odds are if you've tried working on a Markdown doc outside of an editor capable of previewing it, you'll find yourself needing to open it elsewhere to get a sense of what's rendering. After looking around for a solution to this, I found a few little utilities capable of helping out.

Pandoc

Pandoc is a utility for converting Markdown files into other formats. By default, it will render markdown into HTML - which is all we actually need for this. There's a slew of other things Pandoc is capable of doing so I highly recommend you check it out!. Here's how to install:

Ubuntu: sudo apt-get install pandoc Brew: brew install pandoc

Lynx

Lynx is a full web browser baked into your terminal. It's strictly a text based browser, so don't expect any fancy animations to start flying over the screen, but nevertheless a cool project! Lynx can be found at here. Lynx fits the second part of this puzzle by providing a means to render the HTML document generated by Pandoc to our terminal. To install:

Ubuntu: sudo apt-get install lynx Brew: brew install lynx

And finally, putting it altogether into your .bashrc or .zshrc (etc).

export md = pandoc $1 | lynx -stdin

md testing.md

That's it. Pandoc builds the HTML, sends it to lynx reading from stdin. Simple and a little bit nifty from time to time. The rendering isn't perfect (after all there are quite a few markdown flavors out there and everyone seems to render just a little bit differently) but it works.