~dricottone/vim-markdown-preview

a992ce6b17e691dc949186cbc8d468195c865fd6 — Thomas Hodgson 7 years ago 74a43a8
Added pandoc support
1 files changed, 6 insertions(+), 0 deletions(-)

M plugin/vim-markdown-preview.vim
M plugin/vim-markdown-preview.vim => plugin/vim-markdown-preview.vim +6 -0
@@ 46,6 46,10 @@ if !exists("g:vim_markdown_preview_perl")
  let g:vim_markdown_preview_perl = 0
endif

if !exists("g:vim_markdown_preview_pandoc")
  let g:vim_markdown_preview_pandoc = 0
endif

if !exists("g:vim_markdown_preview_use_xdg_open")
    let g:vim_markdown_preview_use_xdg_open = 0
endif


@@ 61,6 65,8 @@ function! Vim_Markdown_Preview()
    call system('grip "' . b:curr_file . '" --export /tmp/vim-markdown-preview.html --title vim-markdown-preview.html')
  elseif g:vim_markdown_preview_perl == 1
    call system('Markdown.pl "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
  elseif g:vim_markdown_preview_pandoc == 1
    call system('pandoc "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
  else
    call system('markdown "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
  endif