~dricottone/vim-markdown-preview

74a43a81ea4d01d519e0cf8fbc3fcfc084933f1a — Jamshed Vesuna 7 years ago 163a765
Display requirements error message on error
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
@@ 64,6 64,9 @@ function! Vim_Markdown_Preview()
  else
    call system('markdown "' . b:curr_file . '" > /tmp/vim-markdown-preview.html')
  endif
  if v:shell_error
    echo 'Please install the necessary requirements: https://github.com/JamshedVesuna/vim-markdown-preview#requirements'
  endif

  if g:vmp_osname == 'unix'
    let chrome_wid = system("xdotool search --name 'vim-markdown-preview.html - " . g:vim_markdown_preview_browser . "'")


@@ 113,6 116,9 @@ function! Vim_Markdown_Preview_Local()
  else
    call system('markdown "' . b:curr_file . '" > vim-markdown-preview.html')
  endif
  if v:shell_error
    echo 'Please install the necessary requirements: https://github.com/JamshedVesuna/vim-markdown-preview#requirements'
  endif

  if g:vmp_osname == 'unix'
    let chrome_wid = system("xdotool search --name vim-markdown-preview.html - " . g:vim_markdown_preview_browser . "'")