(mar)kdown (v)im: markdown html and pdf previews
marv relies on pandoc to render html and pdf. follow the installation instructions for your os.
use git or your plugin manager of choice to install marv.
MarvHTML
: renders the current markdown buffer to a html tempfile and opens the tempfile with the system default web browser.MarvPDF
: renders the current markdown buffer to a pdf tempfile and opens the tempfile with the system default pdf viewer.
add the following to your vim configuration to preview markdown in html and pdf, respectively:
" marv {{{
nnoremap <silent><Leader>h :execute 'MarvHTML'<CR>
nnoremap <silent><Leader>p :execute 'MarvPDF'<CR>
" }}}
- the pandoc contributors and maintainers.
- steve losh's book, learn vimscript the hard way, was a great and useful read.