@@ 1,50 1,31 @@
-Vim Markdown Preview
-====================
-
-- [Intro](#intro)
-- [Installation](#installation)
-- [Usage](#usage)
-- [Requirements](#requirements)
- - [Mac OS X](#mac-os-x)
- - [Unix](#unix)
-- [Options](#options)
- - [Image rendering & save on buffer write](#toggle)
- - [Hotkey](#hotkey)
- - [Browser](#browser)
- - [Temp File](#temp)
- - [Github Flavoured Markdown](#github)
- - [Markdown.pl](#perl)
- - [Pandoc](#pandoc)
- - [Use xdg-open](#xdg)
-- [Behind the Scenes](#behind-the-scenes)
-
-Intro
------
+# Vim Markdown Preview
+
+
+## Intro
+
A small Vim plugin for previewing markdown files in a browser.
The aim of this plugin is to be light weight with minimal dependencies. Thus, there is *no* polling engine or webserver involved.
-![Screenshot](http://i.imgur.com/1hvnXwA.gif?raw=true "Preview on buffer write using Unix")
+I forked this from [JamshedVesuna/vim-markdown-preview](https://github.com/JamshedVesuna/vim-markdown-preview) to fit my usecase. The upstream project is essentially abandoned anyway.
+
-Installation
-------------
+## Installation
* With [Pathogen](https://github.com/tpope/vim-pathogen): Place `vim-markdown-preview/` in `.vim/bundle/`.
* With [Vundle](https://github.com/VundleVim/Vundle.vim):
* Add `Plugin 'JamshedVesuna/vim-markdown-preview'` to your `.vimrc`.
* Launch `vim` and run `:PluginInstall`
-See more [Options](#options).
-Usage
------
+## Usage
By default, when in a `.markdown` or `.md` file, and `Ctrl-p` is pressed, this plugin will either open a preview in your browser, or refresh your current preview (can be remapped, see [Options](#options)).
Your cursor will remain in Vim.
-Requirements
-------------
+
+## Requirements
### Mac OS X:
@@ 61,12 42,12 @@ Requirements
It is recommended to use grip when rendering Unicode characters.
-Options
--------
+
+## Options
+
All options have default values and work out of the box. If you prefer to change these, just add the following lines to your [.vimrc](http://vim.wikia.com/wiki/Open_vimrc_file) file.
Note that after changing an option, you have to restart Vim for the change to take effect.
-<a name='toggle'></a>
### The `vim_markdown_preview_toggle` option
This option does two things (to be fixed by [#17](https://github.com/JamshedVesuna/vim-markdown-preview/issues/17)):
@@ 93,7 74,6 @@ Example: To disregard images and still automatically preview on buffer write.
let vim_markdown_preview_toggle=3
```
-<a name='hotkey'></a>
### The `vim_markdown_preview_hotkey` option
By default, this plugin maps `<C-p>` (Control p) to activate the preview. To remap Control p to a different hotkey, change the binding. Don't forget to add the single quotation marks.
@@ 105,7 85,6 @@ Example: Mapping Control M.
let vim_markdown_preview_hotkey='<C-m>'
```
-<a name='browser'></a>
### The `vim_markdown_preview_browser` option
By default, if you are using Unix, [Google Chrome](https://www.google.com/chrome/) is the default browser. If you are on Mac OS X, [Safari](https://www.apple.com/safari/) is the default.
@@ 118,7 97,6 @@ Example: Using Google Chrome.
let vim_markdown_preview_browser='Google Chrome'
```
-<a name='temp'></a>
### The `vim_markdown_preview_temp_file` option
By default, this plugin keeps the rendered `.html` file. If you would automatically like to remove the html file after opening it in a browser, set this option to `1`. Note that removing the rendered html file with a slow browser may err.
@@ 130,7 108,6 @@ Example: Remove the rendered preview.
let vim_markdown_preview_temp_file=1
```
-<a name='github'></a>
### The `vim_markdown_preview_github` option
If you prefer [GitHub flavoured markdown](https://help.github.com/articles/github-flavored-markdown/) you need to install [Python grip](https://github.com/joeyespo/grip). Note that this makes a request to [GitHub's API](https://developer.github.com/v3/markdown/) (causing latencies) and may require [authentication](https://github.com/joeyespo/grip#access). This option also requires a network connection.
@@ 142,7 119,6 @@ Example: Use GitHub flavoured markdown.
let vim_markdown_preview_github=1
```
-<a name='perl'></a>
### The `vim_markdown_preview_perl` option
If you prefer to use John Gruber's [Markdown.pl](https://daringfireball.net/projects/markdown/) to render HTML, set the following flag:
@@ 153,7 129,6 @@ Example: Use Markdown.pl to render HTML.
let vim_markdown_preview_perl=1
```
-<a name='pandoc'></a>
### The `vim_markdown_preview_pandoc` option
If you prefer to use John MacFarlane's [Pandoc](http://pandoc.org/) to render HTML, set the following flag:
@@ 164,7 139,6 @@ Example: Use Pandoc to render HTML.
let vim_markdown_preview_pandoc=1
```
-<a name='xdg'></a>
### The `vim_markdown_preview_use_xdg_open` option
If your system does not come with `see`, and you would like to use `xdg-open` to view your rendered html in the browser, set the following flag:
@@ 176,8 150,7 @@ Example: Use `xdg-open`.
let vim_markdown_preview_use_xdg_open=1
```
-Behind The Scenes
------------------
+## Behind The Scenes
1. First, this plugin renders your markdown as html and creates a temporary html file.
* If [image rendering](#toggle) is on, the html file will be in your [working directory](https://en.wikipedia.org/wiki/Working_directory).
@@ 185,3 158,4 @@ Behind The Scenes
2. Next, this plugin either opens the html file or refreshes the Google Chrome or Safari tab.
* If you are using GitHub flavoured markdown, `grip` will make a call to the GitHub API and retrieve the html.
3. Lastly, if you choose, this plugin will remove the temporary file.
+