Sublime Markdown



  1. Sublime Markdown Plugin
  2. Markdown Subtext
  3. Sublime Markdown Table
  4. Sublime Markdown Preview Side By Side

Freshly installed, Sublime Text doesn't offer any specific Markdown support—no syntax highlighting, no special italic or bold formatting, no keyboard shortcuts, and no HTML preview or output. Sublime comes with excellent support for diverse types of selection (line, word, paragraph, etc), but one that stands out for Markdown writers is Scope: place your cursor inside parentheses or brackets containing a link, hit CMD+Shift+Space, and see what happens. You can also use the variant Expand Selection to Brackets; Scope, however, also.

In the previous post I described the minimum requirements to be able to achieve a text-only workflow using Markdown and Pandoc.

I mentioned that there is a “Super easy setup” option using Rstudio as your only tool to achieve this (specially useful if you use R), but I also promised to show a more general approach using Sublime Text 3 along with some extensions to automatize the process.

  • Pandoc
  • TeX distribution (only for PDF)
  • Sublime Text 3 (ST3)
Table

Sublime Markdown Plugin

and some Extensions for ST3 which can be installed following the links below, but I strongly recommend installing everything in ST3 using Package control

These Markdown extensions should work out-of-the-box, but Pandoc and CiteBibtex need some configuration.

I assume you have already installed Pandoc and TeX in your computer, if you haven’t go to my previous post and do it.

Sublime Text 3

Now install ST3, visit http://www.sublimetext.com/3 and download the version that matches your OS. After installation proceed to activate package control following this instructions.

ST3 Extensions

When package control is installed you just invoke the Command pallete with the key combination Shift + Ctrl + P (Shift + Command + P in OS X), now start writing “insta…” and from the drop-down list select the Command “Package Control: Install Package”. It will take a second to show you the available packages, once it does, start typing the name of the package and use the arrows to select the one that you want and press Enter to proceed with the installation.

Sublime markdown pdfSublime markdown

Markdown Extended

Markdown

Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter.

This is currently the most complete Markdown syntax highlighter for ST3 since it supports almost all Markdown specific syntax (with the exception of <!--html comments--> and ~~strikethrough~~ text) along with other languages when they are included in fenced blocks, like the following screenshot:

CiteBibtex

Effortlessly insert citations from BibTeX into texts written in Pandoc or LaTeX

This extension has two functions. When you press F10 you will be able to search and insert a citation from a central BibTeX file.

Before that you have to configure the CiteBibtex.sublime-settings file with the path to your BibTeX file. You access this file through the menu Preferences > Package settings > CiteBibtex > Settings - User.

The second feature of this extension is the ability to extract the citations in your current document and generate a new BibTeX file with the same name as your document within the same folder. You do this by invoking the Command pallete and choosing “CiteBibtex: extract citations in current file”.

Pandoc

A Sublime Text plugin that uses Pandoc to convert text from one markup format into another. Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, OPML, or Haddock markup to XHTML, HTML5, HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides, Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML, EPUB version 2 or 3, FictionBook2, DocBook, GNU TexInfo, Groff man pages, Haddock markup, OPML, LaTeX, ConTeXt, LaTeX Beamer slides, PDF via LaTeX, Markdown, reStructuredText, AsciiDoc, MediaWiki markup, Emacs Org-Mode, Textile, or custom writers can be written in lua.

Finally, we arrived to the most useful extension. After you finish the configuration you will be able to summon Pandoc from the Command pallete and choose what kind of document you want to convert your markdown file to.

Sublime markdown mathjax

Markdown Subtext

You access the configuration file through the menu Preferences > Package settings > Pandoc > Settings - User. I recommend the following configuration to be able to export to HTML, PDF and DOCX, it works perfectly on a Mac and fine in my Debian Laptop. You have to tweak the paths to make it work on windows.

Note that both '--latex-engine=/usr/texbin/pdflatex' and '--filter', '/usr/local/bin/pandoc-citeproc' have to be specified with the full path.

This post shows you how to work without leaving ST3 for the preparation of manuscripts, the setup takes some time but after you are done, everything will be so much faster.

Sublime Markdown Table

I hope you enjoy it.

Sublime Markdown Preview Side By Side

Share this: