Skip to content
Live preview of markdown documents with grip, in vim.
CSS Vim script
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
plugin vmg: generate toc Jan 23, 2017
LICENSE feature update Jan 22, 2017 vmg: generate toc Jan 23, 2017

Vim Markdown Grip


I wanted an easy way to preview Markdown documents while writing them. I came across grip (that uses GitHub for styles) and also vim-markdown-preview. I combined features from grip with the parts I liked with vim-markdown-preview and the result is this plugin.

Other from that, I also added to possibility to convert a Markdown document to PDF using markdown-pdf. Thanks to the CSS from github-markdown-css the result is quite like how it would've been rendered on GitHub.


  • With Pathogen: Place vim-markdown-grip/ in .vim/bundle/.
  • With Vundle:
    • Add Plugin 'mgor/vim-markdown-grip' to your .vimrc.
    • Launch vim and run :PluginInstall


By default, when opening and saving a .markdown or .md file, grip will automatically start and open the preview in your default browser. When you close the opened file, grip will be stopped. However you'd have to close the preview manually in your browser.

GitHub API rate limit

To get around the GitHub API request limit (for un-authenticated usage), it is highly recommended that you generate an access token for GitHub and creates ~/.grip/

PASSWORD = '<access token>'

Convert to PDF

Convert your markdown document to a PDF by pressing Ctrl + m + p. This will generate a PDF document using markdown-pdf with GitHub markdown styling.

Generate ToC

Insert the notation <!-- toc --> in your document where the table of contents should be placed. Press Ctrl + m + t to generate or update the ToC. This is done by using markdown-toc.



This project was inspired by JamshedVesuna/vim-markdown-preview.

The CSS that is used by markdown-pdf to replicate GitHub markdown style comes from sindresorhus/github-markdown-css.

You can’t perform that action at this time.