shime / vim-livedown

Vim plugin for Livedown.
493 stars 19 forks source link

Doesn't recognize Google Chrome #27

Closed Casinelli closed 5 years ago

Casinelli commented 7 years ago

Tried to switch to Google Chrome using:

let g:livedown_browser = "chrome"

And variations ("Chrome", "Google Chrome", "google chrome", etc.), but none works.

If I keep safari it works perfectly.

Is it a problem or am I doing something wrong?

shime commented 7 years ago

Did you try google-chrome?

What OS are you using?

Casinelli commented 7 years ago

@shime Tried now, doesn't work.

shime commented 7 years ago

What OS are you using?

Casinelli commented 7 years ago

MacOS Sierra version 10.12.5. Chrome version 60.

shime commented 7 years ago

Try with 'Google Chrome'.

let g:livedown_browser = "'Google Chrome'"

This opens google chrome on a Mac:

$ livedown start README.md --browser "'Google Chrome'" --open
Casinelli commented 7 years ago

The console command works. But still not working in VIM. Tried both :LivedownToggle and :LivedownPreview, nothing.

wallevy commented 7 years ago

@Casinelli you can set the chrome as the default browser, then you no need to set the g:livedown_browser

hitochan777 commented 6 years ago

'google-chrome' worked for me, though livedown-autorun and livedown_open are not working, so I have to call :LivedownPreview manually. Btw, I am using ubuntu 16.04.

frm commented 5 years ago

This is fixed in #31 , if you're still having issues @Casinelli

Since you're running Ubuntu, can you check @hitochan777 my version? To be sure it works in Linux before a fix is merged. Thanks!

shime commented 5 years ago

@hitochan777 please let me know if you still have issues with Chrome in Linux so I can reopen the issue if you do.

hitochan777 commented 5 years ago

@justmendes @shime On Ubuntu, now google-chrome (not 'google-chrome') works! Thank you for your work! Regarding livedown-autorun and livedown_open issue, it was due to the setting of vim package manager that I use.

By the way, it is a bit confusing to set different values depending on the OS (e.g., chrome and google-chrome). It might be useful to mention the difference in the documentation.

shime commented 5 years ago

@hitochan777 great, thanks for the info.

Since Livedown uses opn for opening a browser, looks like you have an issue with that library. It looks like it uses some new version of xdg-open on Linux, so maybe that's the problem.

frm commented 5 years ago

@shime do you want me to change it to have a uniform option? Right now it's google-chrome on one OS, chrome on the other, which might be confusing.

shime commented 5 years ago

@justmendes yeah, go ahead. That would be great.