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 . 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 :
"parser"
config.abbr
, attr_list
,
def_list
, fenced_code
, footnotes
,
tables
, smart_strong
and toc
markdown
extensions.MathJax support : \(\frac{\pi}{2}\) thanks to @bps10
For all Sublime Text 2/3 users we recommend install via Package Control.
cmd+shift+P
then Package Control: Install
Package
Markdown Preview
and install it.Preferences > Browse Packages…
menuInstalled Packages/
folderMarkdown Preview.sublime-package
and
copy it into the Installed Packages/
directorycmd+shift+P
then Markdown Preview
to show
the follow commands:
{ "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)
Just use Ctrl+B
(Windows/Linux) or cmd+B
(Mac) to
build current file.
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.The code is available at github project under MIT licence.
原文:http://www.cnblogs.com/firstrate/p/3529491.html