~dricottone/vim-markdown-preview

ref: 6f05ab3cf602ac31a3ece575509a704b32406560 vim-markdown-preview/README.md -rw-r--r-- 1.3 KiB
6f05ab3c — Jamshed Vesuna Added on write to buffer trigger 10 years ago

#Vim Markdown Preview

A Vim plugin for previewing markdown files in a browser. This plugin was designed to maintain focus on vim but use Google Chrome to preview rendered markdown. Thus, everything is done in the background so you never have to leave Vim.

#Installation

  1. With Pathogen: Place vim-markdown-preview/ in .vim/bundle/.

#Requirements

#Usage

When in a *.markdown or *.md file, vim-markdown-preview does the following on a write to the buffer:

  • If you are not previewing the current file:
    • Open an html rendered version of your file in Google Chrome in the background.
  • Otherwise:
    • Refresh your preview of the current markdown file in Google Chrome.

Uncomment the last line in plugin/vim-markdown-preview.vim to map Ctrl-p to the above instead of on write.

#Behind The Scenes

  1. First, vim-markdown-preview renders your markdown as html and creates a temporary file vim-markdown-preview.html in /tmp/.
  2. Next, vim-markdown-preview then either opens the html file or refreshes the Google Chrome tab.
  3. Lastly, vim-markdown-preview removes the temporary file so nothing left behind.