sponsor Vim development Vim logo Vim Book Ad

markdown-preview.vim : yet another markdown preview plugin

 script karma  Rating 81/23, Downloaded by 1646  Comments, bugs, improvements  Vim wiki

created by
Dongxin Tang
 
script type
ftplugin
 
description
FOR MORE INFO: please visit https://github.com/MikeCoder/markdown-preview.vim

Why you need this

    It's easy to install with vundle or bundle
    No complex config steps
    Code Hightlight
    Easy to custom your own css style
    TODO: Code custom style hightlight


Usage

    edit your markdown doc normally
    when you want to preview it in html you just use :MarkdownPreview defult to show your doc in your browser
    if you want to change your style. you just use :MarkdownPreview GitHub in github style markdown view
    you can also use map <leader>m :MarkdownPreview GitHub to have more fun

Custom

this theme is in the css folder, if you want to change it to your favorite theme. follow the steps:

    go into your .vim folder
    find MarkDownRes folder and you will find default.css and GitHub.css here
    add your custom css file here, such as exmaple.css
    use vim open your markdown doc and :MarkdownPreview example
    and you will see your doc preview in your browser with example.css

Advanced Usage

    use :MarkdownPreviewWithCustomCodeStyle css-style code-style instead
    you can use custom css style and code hightlight style
    the following code styles are you can use:
        github
        solarized_dark
        solarized_light
        default
        color-brewer
        railscasts
        tomorrow
        zenburn
        mono
        monokai_sublime
    these code css files are in your ~/.vim/MarkDownRes/code-styles folder
    for example, you use :MarkdownPreviewWithCustomCodeStyleCodeStyle Github zenburn, when edit the TEST.md
 
install details
Recommand Bundle or Vundle
Vundle

    you can see how to install vundle here
    after you install your vundle, make sure your plugins folder is ~/.vim/bundle
    then you can write this plugin url into your .vimrc file, like Plugin 'MikeCoder/markdown-preview.vim'
    then use PluginInstall to install the plugin

Recommand:k-vim

    add Bundle 'MikeCoder/markdown-preview.vim' to your vimrc.bundle file
    and exec BundleInstall to install the plugin

Usual Install

    this is not a good choice, make sure every step is right
    use cd ~/.vim into your vim folder
    download this tar package and unpack it in your .vim folder
    use mv markdown-preview.vim/* . && rm -rf markdown-preview.vim
    use cp resources MarkDownRes to copy the resources
    then you can open your vim and type MarkdownPreview Github to check whether it is ok
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
markdown-preview.vim.tar.gz 2.1.1 2016-02-24 7.2 Dongxin Tang fix bugs on windows
markdown-preview.vim.zip 1.1.0 2015-11-02 7.2 Dongxin Tang add code style custom
markdown-preview.vim.tar.gz 1.0.2 2015-10-13 7.2 Dongxin Tang fix bugs when your vim not support python

you can see more info by visiting:https://github.com/MikeCoder/markdown-preview.vim
ip used for rating: 3.15.6.77

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github