Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

SublimeText2 plugin to live preview markup files, supported (not limited to) markup formats are markdown, reStructuredText, WikiCreole and textile.

branch: patch-1
README.md

OmniMarkupPreviewer

OmniMarkupPreviewer is a Sublime Text 2 plugin that preview markups in web browsers. OmniMarkupPreviewer renders markups into htmls and send it to web browser in the backgound, which enables a live preview. Besides, OmniMarkupPreviewer provide support for exporting result to html file as well.

OmniMarkupPreviewer has builtin support following markups:

Installation

With the Package Control plugin

The easiest way to install OmniMarkupPreviewer is through Package Control.

Once you have Package Control installed, restart Sublime Text 2.

  1. Bring up the Command Palette (Ctrl+Shift+P on Windows and Linux. ++P on OS X).
  2. Type "Install" and select "Package Control: Install Package".
  3. Select "OmniMarkupPreviewer" from list.

The advantage of using Package Control is that it will keep OmniMarkupPreviewer up to date automatically.

Manual Install

Without Git: Download the latest source code, and extract to the Packages directory.

With Git: Type the following command in your Sublime Text 2 Packages directory:

git clone git://github.com/timonwong/OmniMarkupPreviewer.git

The "Packages" directory is located at:

  • Windows: %APPDATA%\Sublime Text 2\Packages\
  • Linux: ~/.config/sublime-text-2/Packages/
  • OS X: ~/Library/Application Support/Sublime Text 2/Packages/

Usage

Key Bindings

The default key bindings:

Windows, Linux:

  • Ctrl+Alt+O: Preview current file.
  • Ctrl+Alt+X: Export to html file.

OSX:

  • ++O: Preview current file.
  • ++X: Export to html file.

Command Palette

Available OmniMarkupPreviewer commands in the command palette:

  • OmniMarkupPreviewer: Preview Current File
  • OmniMarkupPreviewer: Export to html File
  • OmniMarkupPreviewer: Sweep Cache (Remove Unused)
  • OmniMarkupPreviewer: Empty Cache

Known Issues

  • RDoc and Pod documents cannot be previewed utils they are saved to disk.

What's New

v1.9 (11/12/2012)

  • Provide support for exporting result to html file, images on disk will be inlined. You can customize the settings of the exporter through the "export_options" option.
  • Fix incorrect code block detecting (due to wrong tab length setting) in markdown renderer.

v1.8 (11/10/2012)

  • OmniMarkupPreview is now able to use user defined browser command for launching web browser, through the "browser_command" option.
  • Unopened file can be previewed correctly in browser without returning "404" error.
  • Update cherrypy module in order to fix a random server crash on startup in Windows (Refer to CherrPy #1016)

v1.7 (11/07/2012)

  • Add option "server_host" for server listening address.
  • Now OmniMarkupPreviewer doesn't require restart on some settings change anymore.
  • On demand downloader for mathjax should work under Linux now (using wget or curl).
  • Unsaved textile documents can now be previewed as well.

v1.6 (11/03/2012)

  • MathJax support is now added (through the "mathjax_enabled" option), you can use $..$ and \(..\) delimiters for inline math, $$..$$ and \[..\] delimiters for display math. MathJax libraries will be downloaded on demand. for more information, visit my blog.
  • Add support to custom the behavior of markdown renderer (through the "renderer_options-MarkdownRenderer" option).
  • Responsive width on browser width change.
  • Much better http server performance (Thanks to the CherryPy project).

v1.5.1 (11/01/2012)

  • Fixed a bug that all renderers wouldn't work if any renderer raised exception while loading.

v1.5 (10/31/2012)

  • Images on local machine can now be displayed corectlly.
  • New "ajax_polling_interval" option.
  • Allow users to use their own templates.

v1.4 (10/28/2012)

v1.3 (10/27/2012)

  • Added syntax highlight support for Markdown, through the CodeHilite Extension.
  • Unsaved buffer can now be previewed without error.
  • Updated github template.

v1.2 (10/16/2012)

  • OmniMarkupPreviewer now can be installed from Package Control under Linux.

v1.1 (10/16/2012)

  • Added support for RDoc (Requires ruby).
  • Added support for Pod (Requires perl).
  • Auto scroll while text added/deleted.

v1.0.1 (10/14/2012)

  • OSX support added to Package Control.
  • Added ability to clean cache.

v1.0 (10/14/2012)

  • First release.

License

This plugin released under MIT License:

Copyright (c) 2012 Timon Wong

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Something went wrong with that request. Please try again.