Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding compatibility with Firefox Quantum #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions plugin/vim-markdown-preview.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 &')
Expand Down Expand Up @@ -120,7 +125,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
Expand Down