Sublime Text 2/3 Markdown Preview
Preview your markdown files quickly in you 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 ❤️ :octocat: 🎁. 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 environnement variable. see @PPvG comments
Features :
- Markdown preivew 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_strongandtocmarkdown 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
Installation :
Using Package Control (Recommanded)
For all Sublime Text 2/3 users we recommand installe via Package Control.
- Install Package Control if you haven't yet.
- Use
cmd+shift+PthenPackage Control: Install Package - Look for
Markdown Previewand install it.
Manual Install
- Click the
Preferences > Browse Packages…menu - Browse up a folder and then into the
Installed Packages/folder - Download zip package rename it to
Markdown Preview.sublime-packageand copy it into theInstalled Packages/directory - Restart Sublime Text
Usage :
To preivew :
- optionnaly select some of your markdown for conversion
- use
cmd+shift+PthenMarkdown Previewto 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) orcmd+B(Mac) to build current file.
To config :
Using Sublime Text menu: Preferences->Package Settings->Markdown Preivew
Settings - Useris where you change your serrings for Markdown Preview.Settings - Defaultis a good reference with detail description for each setting.
Support :
- Any bugs about Markdown Preview please fell free to report here.
- And you are welcome to fork and submit pullrequests.
Licence :
The code is available at github project under MIT licence.