~dricottone/vim-markdown-preview

ref: 2d5e5346d21a2352515b5ab27439cac3847b848b vim-markdown-preview/README.md -rw-r--r-- 1.2 KiB
2d5e5346 — Jamshed Vesuna Added background tab refreshing. 10 years ago
                                                                                
906c7a8f Jamshed Vesuna
2d5e5346 Jamshed Vesuna
906c7a8f Jamshed Vesuna
2d5e5346 Jamshed Vesuna
906c7a8f Jamshed Vesuna
2d5e5346 Jamshed Vesuna
906c7a8f Jamshed Vesuna
2d5e5346 Jamshed Vesuna
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Vim Markdown Preview
====================

A vim plugin for previewing markdown files in a browser. This plugin was designed to maintan 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
============
* [Markdown](http://daringfireball.net/projects/markdown/)
* [xdotool](https://github.com/jordansissel/xdotool)
* [Google Chrome](https://www.google.com/chrome/browser/)

Usage
=====
When in a *.markdown or *.md file, vim-markdown-preview maps `Ctrl-p` as follows:

* 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.

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.