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

Open links in external browser #14

Closed
maxkueng opened this issue Feb 15, 2015 · 9 comments · Fixed by #58
Closed

Open links in external browser #14

maxkueng opened this issue Feb 15, 2015 · 9 comments · Fixed by #58

Comments

@maxkueng
Copy link
Collaborator

Some thoughts and opinions on what links inside the rendered markdown document should do.

  • Links to external sites should open in the default desktop browser.
  • Links to sections within the same document (e.g. #my-section-title) should load in the same window.
  • Debatable: Relative links to other markdown documents in (e.g. ./CHANGELOG.md)
  • Debatable: Links to external markdown documents (e.g. github.com/other/project/README.md)
  • Thinkable: How does one get back after opening a link that opens in the same window?

atom-shell has the shell module that could help with this. It also provides shell.openExternal(url).

@yoshuawuyts
Copy link
Owner

I agree with most of your reasoning. I think relative paths could just spawn a new instance of vmd, keeping the original in place. Links to non-local paths should probably just be opened in the browser. What do you think?

@maxkueng
Copy link
Collaborator Author

I think relative paths could just spawn a new instance of vmd, keeping the original in place.

Brilliant!

@aubinlrx
Copy link

I agree it would be great if we can navigate between sections inside vmd and open external sites in the default browser.

I'm not really fan with creation of a new instance. If you write a doc with a table of content you don't want to open a new vmd window.

It could be a parameter at launch vmd --book table-of-content.md

@yoshuawuyts
Copy link
Owner

@aubinlorieux that seems like a fair use case. Think it would make sense to have it be the default behavior since I can't think of any use case where it would be blocking. Maybe adding shift + click to open a new window would be nice. That way vmd also stays consistent with existing browser behavior.

@aubinlrx
Copy link

Maybe adding shift + click to open a new window would be nice.

Yes it would be nice !

@maxkueng
Copy link
Collaborator Author

I agree that it can be weird if relative links to other Markdown documents spawn a new instance / window. But if any links other than same-page-jumps between sections open in the same window there has to be a way to get back to the previous document. Personally I really like that vmd has no buttons and such.

Leveraging Shift + Click, or the middle mouse button may be an option to provide alternative behaviors. Good idea.

@mattdesl
Copy link
Collaborator

You could add global shortcuts to handle back/next buttons without adding any additional UI.

@DeeplyUncertain
Copy link

Just checking to see if there yet exists a feature that works for section links/internal links. I've been trying to make a functional table of contents without having to use a browser, but nothing's really worked yet. I'm rather new to Markdown, though.

@ghost
Copy link

ghost commented Aug 24, 2015

@DeeplyUncertain until a solution is added to vmd consider using shiba which offers internal linking between local markdown documents as well as internal hash links within a single document.

More info in the usage documentation.

Hopefully that helps you.

@maxkueng maxkueng mentioned this issue Dec 31, 2015
7 tasks
maxkueng added a commit that referenced this issue Jan 3, 2016
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

Successfully merging a pull request may close this issue.

5 participants