Skip to content

Instantly share code, notes, and snippets.

@dvhthomas
Created May 3, 2011 22:58
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save dvhthomas/954436 to your computer and use it in GitHub Desktop.
Save dvhthomas/954436 to your computer and use it in GitHub Desktop.
Pandoc powered Sublime Text 2 build provider for Markdown files: HTML the easy way

Using the build provider

  • Install Pandoc on your system. I'm assuming that you have the pandoc.exe on your PATH on Windows.

  • Save the Markdown.sublime-build file to your Packages folder. On my Windows 7 system this is:

    C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\Markdown

  • Open a Mardown file (with *.md file extension) and hit F7.

{
"cmd": ["pandoc.exe", "--to=html", "--output=$file.html", "$file"],
"selector": "source.md"
}
@dchymko
Copy link

dchymko commented Mar 26, 2012

add (windows):
"cmd":["C:\Users\Username\AppData\Local\Google\Chrome\Application\chrome.exe","$file.html"],
or (Mac)
"cmd": ["open", "-a", "Google Chrome", "$file.html"]
to have it launch the file in the browser

@bwl21
Copy link

bwl21 commented Jan 20, 2013

I am trying this on mac with pdf output. But pandoc claims that it does not find pdflatex.
pdflatex is available in a terminal window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment