From 74a43a81ea4d01d519e0cf8fbc3fcfc084933f1a Mon Sep 17 00:00:00 2001 From: Jamshed Vesuna Date: Wed, 12 Apr 2017 12:12:06 -0700 Subject: [PATCH] Display requirements error message on error --- plugin/vim-markdown-preview.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index ad5a399..b0d33fa 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -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 . "'") -- 2.45.2