Export HTML option in Sublime Text 3

Post date: Nov 2, 2014 6:47:36 AM

Sometimes we want to just export the syntax highlighted code into HTML so that we can put it into a blog or web format. Sublime text 3 has plugin ExportHtml to do so.

We will install the plugin via Package Control in ST3.

First we need to have Package Control. Here is how we can install it (copied from Package Control):

  1. Click the Preferences > Browse Packages… menu
  2. Browse up a folder and then into the Installed Packages/ folder
  3. Download Package Control.sublime-package and copy it into theInstalled Packages/ directory
  4. Restart Sublime Text

Now that we have Package Control, we will use it to install the package ExportHtml

  1. Cmd+Shift+P to call package manager, look for Package Control: Install Package
  2. Search for ExportHtml and install it
  3. Quit and restart ST3

The ExportHtml package is now installed in ST3, we can use it by

  1. Cmd+Shift+P and look for Export HTML: Show Export Menu
  2. You can choose Browser Print: Color or Browser view: Color to export the code to HTML color. There are so many choices for you to take.

This is not the exact link to the package, but it's very useful: https://sublime.wbond.net/packages/HTML%20Export