From ad37ca3ef585927b2bbb3c112a9064e235bda9b5 Mon Sep 17 00:00:00 2001 From: Luxed Date: Fri, 23 Mar 2018 14:54:07 -0400 Subject: [PATCH 1/2] Removing the "--smart" option for pandoc seeing as it is deprecated --- plugin/vim-markdown-preview.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index 9b02d79..082c69f 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -66,7 +66,7 @@ function! Vim_Markdown_Preview() 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 --smart --standalone "' . b:curr_file . '" > /tmp/vim-markdown-preview.html') + call system('pandoc --standalone "' . b:curr_file . '" > /tmp/vim-markdown-preview.html') else call system('markdown "' . b:curr_file . '" > /tmp/vim-markdown-preview.html') endif @@ -120,7 +120,7 @@ function! Vim_Markdown_Preview_Local() 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 --smart --standalone "' . b:curr_file . '" > /tmp/vim-markdown-preview.html') + call system('pandoc --standalone "' . b:curr_file . '" > /tmp/vim-markdown-preview.html') else call system('markdown "' . b:curr_file . '" > vim-markdown-preview.html') endif From fe0c3f924da1271136eb83f8c688497b72f7d382 Mon Sep 17 00:00:00 2001 From: Luxed Date: Fri, 23 Mar 2018 17:06:45 -0400 Subject: [PATCH 2/2] Added ability to select "Firefox Quantum" as a browser --- plugin/vim-markdown-preview.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/vim-markdown-preview.vim b/plugin/vim-markdown-preview.vim index 082c69f..c7f881d 100644 --- a/plugin/vim-markdown-preview.vim +++ b/plugin/vim-markdown-preview.vim @@ -75,7 +75,12 @@ function! Vim_Markdown_Preview() endif if g:vmp_osname == 'unix' - let chrome_wid = system("xdotool search --name 'vim-markdown-preview.html - " . g:vim_markdown_preview_browser . "'") + if g:vim_markdown_preview_browser == "Firefox Quantum" + let chrome_wid = system("xdotool search --name '" . expand('%:t:r') . " - Mozilla Firefox'") + else + let chrome_wid = system("xdotool search --name 'vim-markdown-preview.html - " . g:vim_markdown_preview_browser . "'") + endif + if !chrome_wid if g:vim_markdown_preview_use_xdg_open == 1 call system('xdg-open /tmp/vim-markdown-preview.html 1>/dev/null 2>/dev/null &')