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

vim_markdown_preview_browser has no effect #41

Closed
jonashaag opened this issue May 18, 2016 · 7 comments
Closed

vim_markdown_preview_browser has no effect #41

jonashaag opened this issue May 18, 2016 · 7 comments

Comments

@jonashaag
Copy link

jonashaag commented May 18, 2016

let vim_markdown_preview_browser='Safari'

Preview is still opened in Google Chrome (default browser)

@JamshedVesuna
Copy link
Owner

What operating system are you using?

@jonashaag
Copy link
Author

OS X

@JamshedVesuna
Copy link
Owner

Is Safari your default web browser? If not, then this won't work. If so, can you provide me more details about your system and vim version?

This plugin assumes if you aren't using Google Chrome, then your default browser is the one you specify in vim_markdown_preview_browser. See this.

I'm happy to accept a PR that fixes this issue 😄

@jonashaag
Copy link
Author

Default browser is Google Chrome, but I'd like to use Safari for Markdown preview because it annoys me that the preview window is always opened in a new tab in the existing Google Chrome window rather than a new window entirely.

@JamshedVesuna
Copy link
Owner

As of now, you'd have to change your default browser to Safari in order for VMP to work as you describe. This is because it's tricky to open a specific browser and refresh a specific page in the background on the cli (this would require browser specific commands, rather than simply opening the html file).

I'm more than happy to accept a PR that has browser specific functionality!

always opened in a new tab

This sounds like a bug. If you set your default browser to Google Chrome (and remove the vim_markdown_preview_browser you set), currently an AppleScript finds the tab that has the markdown preview and refreshes that. Can you provide more details about your system, browser, and Vim version?

@jonashaag
Copy link
Author

No, what I want is that this plugin opens a new window for preview and does not use the window where I have all my usual tabs going on, because I always browse in full screen but want the preview to be non full screen.

@JamshedVesuna
Copy link
Owner

If you'd like, you can modify the AppleScript to open a new window and refresh that. Unfortunately, this sounds like a specific use case, so it won't be supported unless you make a PR with a flag to support this. Closing this out for now, but feel free to reopen.

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

2 participants