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

Support for Brave Browser #104

Open
mrolli opened this issue Oct 8, 2021 · 3 comments
Open

Support for Brave Browser #104

mrolli opened this issue Oct 8, 2021 · 3 comments

Comments

@mrolli
Copy link

mrolli commented Oct 8, 2021

I am on vmp_osname == 'mac' and switched from "Google Chrome" to "Brave Browser", which is technically the same.

While it works be taking the open -a branch in the plugin code, I face the fact that on every preview a new tab is opened. I was used to have it resued. So I started fiddling...

Change made:

   if g:vmp_osname == 'mac'
-    if g:vim_markdown_preview_browser == "Google Chrome"
+    if g:vim_markdown_preview_browser == "Google Chrome" || g:vim_markdown_preview_browser == "Brave Browser"
       let b:vmp_preview_in_browser = system('osascript "' . g:vmp_search_script . '"')

On next invocation of the preview function I was faced with the app chooser window of macOS (Can't find Google-Chrome, point me to the app, ...). I selected "Brave Browser.app" and since then I'm good to go and it works as expected. The question now is, how could we achieve an out-of-the-box-all-ok experience for Brave users?

  • Would be a README entry enough?
  • Should the above change be implemented and we let the user make the same selection as I did?
  • After inspecting the two applescripts I see, that "Brave Browser" is now hardcoded in the files after selecting it in the app chooser. Apparently this got updated somehow?
  • One could wrapt the two applescript with a shell script and call it tem with an application argument, see example of mine talking to Music.app.

I'd like to hear in what direction you'd like to go and I would be happy to prepare a PR thereafter.

@PezCoder
Copy link

PezCoder commented Jul 5, 2022

I was looking for a similar requirement, where I want to rather open these previews specifically in the brave browser, even though I also have chrome installed.

@Dave-Lindberg
Copy link

An out-of-the-box-all-ok experience for Brave users would be awesome.

@mrolli
Copy link
Author

mrolli commented Jul 18, 2022

Sorry, guys, but the owner of this project never replied nor merged my other PR. Its safe to say that development here is stalled.

Meanwhile I switched from Vim to Neovim. In terms of previewing markdown, I switched over to iamcco/markdown-preview.nvim. The latter works with Vim or Neovim and works out of the box with many more features. Best part: the scroll position and the changes you make in markdown are instantly reflected in the preview! Give it a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants