Skip to content
This repository

markdown preview and build plugin for sublime text 2/3

Octocat-spinner-32 desktop add desktop readme November 08, 2013
Octocat-spinner-32 lib add builtin ssl module for linux for #27 December 19, 2012
Octocat-spinner-32 markdown Create slugify for headerid without unicodedata and better non ascii … April 09, 2014
Octocat-spinner-32 .gitattributes Add a .gitattributes to fix line ending issues December 29, 2012
Octocat-spinner-32 .gitignore add gitignore April 30, 2012
Octocat-spinner-32 CHANGES.md Fixes the messages.json agian. August 27, 2013
Octocat-spinner-32 Default.sublime-commands 1. Add build support (Currently only python markdown) August 25, 2013
Octocat-spinner-32 Main.sublime-menu add settings for custom viewer; fix #29 September 07, 2012
Octocat-spinner-32 Markdown.sublime-build fix #161 February 17, 2014
Octocat-spinner-32 MarkdownPreview.py fixed #182 March 11, 2014
Octocat-spinner-32 MarkdownPreview.sublime-settings fix #162 - add embed_css_for_sublime_output setting February 17, 2014
Octocat-spinner-32 README.md Update README.md February 10, 2014
Octocat-spinner-32 customized-template-sample.html Support customized html template file February 09, 2014
Octocat-spinner-32 github.css Allow for responsive widths February 25, 2014
Octocat-spinner-32 helper.py fix some ST3 incompatibilities January 09, 2014
Octocat-spinner-32 highlight.css added highlight.js support to builtin parser May 16, 2013
Octocat-spinner-32 highlight.js added highlight.js support to builtin parser May 16, 2013
Octocat-spinner-32 markdown.css Fixed padding in code blocks February 19, 2013
Octocat-spinner-32 markdown2.py refix regression fix #28 November 30, 2012
Octocat-spinner-32 mathjax.html fix #94 June 17, 2013
Octocat-spinner-32 messages.json Update messages.json August 27, 2013
Octocat-spinner-32 sample.html 1. Update README.md August 08, 2013
Octocat-spinner-32 sample.md updated TOC example March 31, 2014
README.md

Sublime Text 2/3 Markdown Preview

Preview and build your markdown files quickly in your web browser from sublime text 2/3.

You can use builtin python-markdown parser or use the github markdown API for the conversion.

NOTE: If you choose the GitHub API for conversion (set parser: github in your settings), your code will be sent through https to github for live conversion. You'll have Github flavored markdown, syntax highlighting and EMOJI support for free :heart::octocat::gift:. If you make more than 60 calls a day, be sure to set your GitHub API key in the settings :)

LINUX users: If you want to use GitHub API for conversion, you'll need to have a custom Python install that includes python-ssl as its not built in the Sublime Text 2 Linux package. see @dusteye comment. If you use a custom window manager, also be sure to set a BROWSER environment variable. see @PPvG comments

Features :

  • Markdown preview using the Python-markdown or the Github API just choose select the build commands.
  • Build markdown file using Sublime Text build system. The build parser are config via the "parser" config.
  • Browser preview auto reload on save if you have the ST2 LiveReload plugin installed.
  • Builtin parser : supports abbr, attr_list, def_list, fenced_code, footnotes, tables, smart_strong and toc markdown extensions.
  • CSS search path for local and build-in CSS files (always enabled) and/or CSS overriding if you need
  • YAML support thanks to @tommi
  • Clipboard selection and copy to clipboard thanks to @hexatrope
  • MathJax support : \(\frac{\pi}{2}\) thanks to @bps10
  • HTML template customisation thanks to @hozaka

Installation :

Using Package Control (Recommended)

For all Sublime Text 2/3 users we recommend install via Package Control.

  1. Install Package Control if you haven't yet.
  2. Use cmd+shift+P then Package Control: Install Package
  3. Look for Markdown Preview and install it.

Manual Install

  1. Click the Preferences > Browse Packages… menu
  2. Browse up a folder and then into the Installed Packages/ folder
  3. Download zip package rename it to Markdown Preview.sublime-package and copy it into the Installed Packages/ directory
  4. Restart Sublime Text

Usage :

To preview :

  • optionally select some of your markdown for conversion
  • use cmd+shift+P then Markdown Preview to show the follow commands:
    • Markdown Preview: Python Markdown: Preview in Browser
    • Markdown Preview: Python Markdown: Export HTML in Sublime Text
    • Markdown Preview: Python Markdown: Copy to Clipboard
    • Markdown Preview: Github Flavored Markdown: Preview in Browser
    • Markdown Preview: Github Flavored Markdown: Export HTML in Sublime Text
    • Markdown Preview: Github Flavored Markdown: Copy to Clipboard
    • Markdown Preview: Open Markdown Cheat sheet
  • or bind some key in your user key binding, using a line like this one: { "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} },
  • once converted a first time, the output HTML will be updated on each file save (with LiveReload plugin)

To build :

  • Just use Ctrl+B (Windows/Linux) or cmd+B (Mac) to build current file.

To config :

Using Sublime Text menu: Preferences->Package Settings->Markdown Preview

  • Settings - User is where you change your settings for Markdown Preview.
  • Settings - Default is a good reference with detailed descriptions for each setting.

Support :

  • Any bugs about Markdown Preview please feel free to report here.
  • And you are welcome to fork and submit pullrequests.

License :

The code is available at github project under MIT licence.

Something went wrong with that request. Please try again.