shad / vim-markdown-preview

preview markdown documents in the browser from vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vim-markdown-preview

vim-markdown-preview (abbreviated to VMP) is a Vim plugin to preview markdown documents.

Options

VMP has a few global options which alter its behavior:

  • g:VMPoutputformat
    Default: "html".
    Example:
    let g:VMPoutputformat = 'pdf'
    Note : Only "html" is supported right now.

  • g:VMPoutputdirectory
    Default: "/tmp"
    Example:
    let g:VMPoutputdirectory = '.'

  • g:VMPhtmlreader
    Default: "open"
    Example:
    let g:VMPhtmlreader = 'firefox-bin'

  • g:VMPstylesheet Default: "github.css"
    Example:
    let g:VMPstylesheet "safari-reader.css"
    Note : Only "github.css" and "safari-reader.css" are accepted values.

None of these options were available before and haven't been released yet.
Clone the repo to try them!

Install

Download

  • Option 1
    Cloning this repository is one option, and the master branch should always be in a working state.

  • Option 2
    You can download versioned releases from the downloads page.

Automatic installation
vim-markdown-preview is bundled with an installer script which will install to $HOME/.vim/plugin/

sh install.sh

Usage

Send vim the command :Mm for a preview of your markdown document.
Alternatively, bind :Mm to a key binding: map <leader>p :Mm<CR>

Dependencies

  • vim
  • Ruby support for vim.
  • kramdown (bundled with this package)

OSX

vim-markdown-preview was written to run on OSX, and it will work w/o problems.
I recommend the safari browser because it will not open new tabs needlessly if a document is already loaded in an existing tab/window.

Linux/Others

vim-markdown-preview is tied to the OSX command open.
You will need to replace it with something else - firefox-bin, for example, for it to work on your operating system.

Credit

  • Mathias Billman
    This is an enitrely rewritten version of the vim script originally written by Mathias Billman and found here.

  • moreweb
    Contributor.

  • maba
    Contributor.

Bugs

No known bugs right now. Found a bug?.

Contact

  • IRC
    irc.freenode.net/#flowof.info as 'robgleeson'

  • Mail
    rob [at] flowof.info

About

preview markdown documents in the browser from vim


Languages

Language:Ruby 98.8%Language:Vim Script 1.1%Language:Shell 0.1%