Markdown Preview.vim

Alternatives To Markdown Preview.vim
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Markdown It16,04536,7987,4203 days ago76May 03, 202245mitJavaScript
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
Mkdocs Material15,58883914 hours ago331July 27, 202327mitHTML
Documentation that simply works
Grav14,0322214 days ago275July 18, 2023421mitPHP
Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
React Markdown11,2003,6282,3102 days ago90April 12, 20234mitJavaScript
Markdown component for React
4 months ago109mitHTML
The last Markdown editor, ever.
Remark6,6893,2962,19012 days ago19June 25, 20225mitJavaScript
markdown processor powered by plugins part of the @unifiedjs collective
Remarkable5,5617,473636a month ago23May 25, 2020131mitJavaScript
Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use for HTML-to-markdown conversion. Use to generate a table of contents.
Bytemd4,18437a month ago71March 30, 202331mitTypeScript
Hackable Markdown Editor and Viewer
Wintersmith3,493956903 years ago49November 19, 201813mitCoffeeScript
A flexible static site generator
Zotero Better Notes3,435
5 days ago23agpl-3.0TypeScript
Everything about note management. All in Zotero.
Alternatives To Markdown Preview.vim
Select To Compare

Alternative Project Comparisons


Join the chat at


Using the markdown-preview.vim plugin, you can preview Markdown in real-time with a web browser.

This plugin needs your Vim to support Python 2 / Python 3 features. Tested on Windows / Ubuntu 14 / Mac OS X.

Note: PLEASE USE markdown-preview.nvim INSTEAD


Markdown preview


Typeset math



With vim-plug:

Add Plug 'iamcco/markdown-preview.vim' to the vimrc or init.vim file and type :PlugInstall.

Or with MathJax support for typesetting math:

Plug 'iamcco/mathjax-support-for-mkdp'
Plug 'iamcco/markdown-preview.vim'



    " Open preview window in markdown buffer

    " Close the preview window and server

When MarkdownPreview command can't open the preview window, you can use the MarkdownPreviewStop command before using MarkdownPreview command.

Default Setting:

    let g:mkdp_path_to_chrome = ""
    " Path to the chrome or the command to open chrome (or other modern browsers).
    " If set, g:mkdp_browserfunc would be ignored.

    let g:mkdp_browserfunc = 'MKDP_browserfunc_default'
    " Callback Vim function to open browser, the only parameter is the url to open.

    let g:mkdp_auto_start = 0
    " Set to 1, Vim will open the preview window on entering the Markdown
    " buffer.

    let g:mkdp_auto_open = 0
    " Set to 1, Vim will automatically open the preview window when you edit a
    " Markdown file.

    let g:mkdp_auto_close = 1
    " Set to 1, Vim will automatically close the current preview window when
    " switching from one Markdown buffer to another.

    let g:mkdp_refresh_slow = 0
    " Set to 1, Vim will just refresh Markdown when saving the buffer or
    " leaving from insert mode. With default 0, it will automatically refresh
    " Markdown as you edit or move the cursor.

    let g:mkdp_command_for_global = 0
    " Set to 1, the MarkdownPreview command can be used for all files,
    " by default it can only be used in Markdown files.

    let g:mkdp_open_to_the_world = 0
    " Set to 1, the preview server will be available to others in your network.
    " By default, the server only listens on localhost (

Key Mapping:

By default this plugin has no mapping: if you want to have your own mappings, you can map the keys to <Plug>MarkdownPreview for opening the Markdown preview window and map keys to <Plug>StopMarkdownPreview for closing the preview window.

Examples for mapping the F8 key to open Markdown preview window and F9 key to close preview window:

" for normal mode
nmap <silent> <F8> <Plug>MarkdownPreview
" for insert mode
imap <silent> <F8> <Plug>MarkdownPreview
" for normal mode
nmap <silent> <F9> <Plug>StopMarkdownPreview
" for insert mode
imap <silent> <F9> <Plug>StopMarkdownPreview

For OS X users, you can set the g:mkdp_path_to_chrome as below (if you use Chrome):

let g:mkdp_path_to_chrome = "open -a Google\\ Chrome"
" or
let g:mkdp_path_to_chrome = "/Applications/Google\\\\ Chrome"

See issue #1 for details.


Q: The Firefox preview window didn't close when leaving the Markdown file in Vim.

A: If you want the plugin to auto-close the preview window in Firefox, you have to do some configuration:

  1. Open Firefox.
  2. Type about:config in the address bar and press the Enter key.
  3. Search for dom.allow_scripts_to_close_windows and set its value to true.

You have to know what will happen when you make the above changes.


  • 2017/07/16: Add g:mkdp_open_to_the_world option.
  • 2016/11/19: MathJax support with mathjax-support-for-mkdp plugin.
  • 2016/08/28: Set the title of preview page with filename.
  • 2016/05/18: Support key mapping and new g:mkdp_command_for_global option item.
  • 2016/03/12: New Github-like Markdown styles markdown.css and support task list.
  • 2016/01/24: Support to display the local picture in Markdown.

Buy Me A Coffee ☕️


Popular Plugin Projects
Popular Markdown Projects
Popular Libraries Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.