Simple Markdown viewer for Ubuntu (standalone program, not something that requires usage of an internet browser)

I am looking for a Markdown viewer. It should:

• run locally on Ubuntu - be a normal program, not a browser addon, webapp or anything else that requires usage of an internet browser*

Preferable:

• simple and lightweight
• open source

Viewer as in "view formatted content", Markdown as in CommonMark.

See https://stackoverflow.com/questions/9331281/how-can-i-test-what-my-readme-md-file-will-look-like-before-committing-to-github for wider version of this question.

*I give an exception to browsers running in terminal in text mode

Though not strictly being a viewer, I can recommend ReText here – which I'm using myself on Ubuntu, and am pretty satisfied.

• runs locally on Linux: Yes (also on Windows and Mac)
• normal program, not a browser addon: Yes. Written in Python, and easy to deal with.
• simple and lightweight: Yes. On its own, it comes with the basics – and you can add more (like support for specific Markdown dialects as Markdown Extra or MathJax if you need.
• open source: Yes (using GPLv2)

ReText with Live Preview (source: ReText; click image for larger variant)

As I said to start with, it's not strictly a viewer – but an editor including a viewer and a "Live Preview". You can call it from the command line, passing the file as parameter. Unfortunately, there seems to be no way to start it directly in the viewer mode – but a work-around to at least have the "Live Preview" triggered:

• start it once with a file open
• press Ctrl-L (or use the menu: Edit › Live Preview) to switch on the "Live Preview" mode
• using the menu, go to Edit › Preferences, and check "Restore live preview state" under "Behavior"

Now, when opened the next time, the "Live Preview" is switched on automatically. Alternatively, you can open the "real preview" (without the editor pane) by either clicking the "Preview" button, or using the keyboard-shortcut Ctrl-E.

For more details, also see my answers here and here.

• You can even export to html pdf etc through Retext – Aditya ultra Jun 13 '15 at 9:53
• On Ubuntu 16, a simple apt-get install retext will do the trick (then just invoke retext from the shell). – DavidJ Nov 16 '16 at 19:34
• Same for Mint 18. But usually, the repos of distris often don't have the latest version (while currently the PPA still lacks the "xenial" branch ;) – Izzy Nov 16 '16 at 19:44
• Installation: pip3 install retext --user. On Ubuntu 18.04, don't do the installation with apt-get; it doesn't work: I can open the file, but the preview does not show up. Instead, I get warnings due to missing python packages. This doesn't happen when installed via pip. – Martin Thoma Jan 10 '19 at 12:11
• I tried enabling Github-style syntax highlighting in code-blocks, following this section of the wiki: github.com/retext-project/retext/wiki/…. Unfortunately I wasn't able to make it work. – Elouan Keryell-Even Jun 14 '19 at 11:21

Grip

I have been using this for a year and it is my goto Markdown render-er. Here are its features:

• Markdown? Github Flavored
• Linux? Yes
• Normal? Yes
• It is a command line tool
• Offline? No
• Simple/Lightweight? Yes
• It is a command line tool
• Open source? Yes

Bonus

• Export to PDF/HTML
• Host locally as a webpage/wiki

Here is an example of the HTML output.

• I thought it works offline, because it starts a service on a local port, but this service inside connects remotely - I checked by taking the eth cable out ;) – nuoritoveri Feb 7 '17 at 10:46
• A perfect example of "I can't believe this is not The answer"-syndrome that plagues SE sites. – Arnaud Meuret Mar 31 '18 at 9:58
• grip requires use of a browser. So this is not the right answer. – The Gripmaster Jun 30 at 1:52

Following is copy of https://stackoverflow.com/questions/9331281/how-can-i-test-what-my-readme-md-file-will-look-like-before-committing-to-github#40696607 by Brian Burns

Atom works nicely out of the box - just open the Markdown file and hit Ctrl+Shift+M to toggle the Markdown preview panel next to it. It handles HTML and images also.

Though note that performance of Atom is ridiculously poor and that development of that software appears to be stopping - see https://github.com/atom/atom/graphs/contributors (probably as it makes no sense to Microsoft to maintain two text editors in the same niche)

• The only disadvantage is Atom can be heavy if you want to edit/view Markdown files only. – Jaime M. Sep 13 '18 at 7:22
• I'll add that this plugin - atom.io/packages/markdown-preview-enhanced - is an excellent, full feature markdown addition that includes themes and link resolution, which the default markdown-preview doesn't currently support. – Stephan Jul 2 at 15:49

What I generally do is run the markdown perl script and save the resulting html in a temporary file that can be browsed using Firefox. For example:

Markdown.pl index.md > index.html

I find Retext fine as is answered but I do have digged out a few MD editors for linux that are more or less better than the solution suggested.

If more they have additional features, and less so they are fast.

• Haroopad This is more feature-filled than Remarkable, and looks like a dev tool.(The dev version of this app is also coming soon)

• Springseed If you needed a note taker This one does the job Beautifully.

pandoc -s filename.md | lynx -stdin


This doesn't meet the requirement of "... or anything else that requires usage of browser", but the browser runs in a terminal in text mode.

https://pandoc.org/

• I modified the question to allow in-terminal text mode browsers. – reducing activity May 9 '19 at 9:15

Features:

Brackets.io

Brackets is an open-source free-of-cost text editor sponsored by Adobe. See Wikipedia.

Live preview of HTML+CSS is built-in.

Markdown Preview extension

➠ For live preview of Markdown, use the Markdown Preview extension by gruehle.

This question was asked in 2015. Meanwhile Visual Studio Code has become quite popular. It is available also on Linux.

VS Code has good Markdown support built-in, and since 2017 or so it has a Preview-Mode for Markdown (sync'ed split windows). For screenshots, scroll down on the page I've linked to.

Markdown support can also be enriched with many extensions, e.g. "markdownlint".

• Would it be OK if I would add a screenshot? – reducing activity Dec 15 '18 at 6:40
• yes, go ahead, good idea. – knb Dec 15 '18 at 10:19

mdless

I found this one quite handy. It is a ruby gem, that allows CLI viewing of Markdown files.

if you are using Ubuntu:

sudo apt install ruby
sudo gem install mdless


https://brettterpstra.com/2015/08/21/mdless-better-markdown-in-terminal/

1. Simple Note:

is a note taking and its accepting MarkDown

https://simplenote.com

1. Boostnote:

Another alternative and its what i am using.

https://boostnote.io/

Both are Totally Free..

ghostwriter

In Ubuntu 20.04, install from the bundled apt repos:

sudo apt install ghostwriter


Pros:

Markdown Viewer can be installed from Ubuntu Software.

The project site: https://github.com/mapitman/mdview

It is a command line tool that generates a temporary HTML file and open it in the browser.

• See "not a browser addon, webapp or anything else that requires usage of browser" part of the question. – reducing activity May 9 '19 at 9:13

Microsoft VSCode

At the command line, for instance, just enter "code " and, once opened, just Ctrl+Shift+V.