-
Notifications
You must be signed in to change notification settings - Fork 13
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
fails to open external links #116
Comments
Hi Dave, Behind the scenes mkdx uses the Do you have EDIT: I noticed the instructions on this part are not very clear about |
many thanks for coming back on this and for the clarification in README! on linux / ubuntu I need to call
nor
What works for me is
or using the |
Hey @kraxli, hmmn that is quite odd, perhaps it has to do with the way Can you give this a shot? |
Hi @SidOfc many thanks for coming back and the update! I pulled the newest Below a few checks on opening stuff with gx and gf # Test Section
- [Diary](00_Diary.md) -> works with gf / gx :-)
- https://google.com -> works with gf / gx :-)
- [Google](https://google.com) -> works with gf / gx :-)
- [peewee](http://docs.peewee-orm.com/en/2.10.2/index.html) -> works with gf / gx :-)
- peewee database: e.g. [generating-models-from-existing-databases](http://docs.peewee-orm.com/en/2.10.2/peewee/database.html#generating-models-from-existing-databases) -> not working
- http://docs.peewee-orm.com/en/2.10.2/index.html -> not working
- other file format [Doc](./test.doc) -> gf / gx opens the file in Neovim but not in word/libre-office |
Ah nice, glad to hear it's mostly working now. I'll look into the other scenario's as well, cheers for providing examples 👍 |
Hi again @kraxli, I've fixed the issue with the links not working, the reason it didn't work was because they had a subdomain and my regex didn't take that into account. I still have to find a way to make "doc" links open in libreoffice though, I'm going to look into that next. In the meantime you can update mkdx so that at least the links will work :) Will report back when I've found a fix for opening doc / sheet / pdf files using |
Alright @kraxli other "non plain" files should now also open in an external application. Note that the Let me know if everything is working for you 🤞 |
nice - thanks a lot! works pretty nice :-) the only thing which isn't working for me is - peewee database: e.g. [generating-models-from-existing-databases](http://docs.peewee-orm.com/en/2.10.2/peewee/database.html#generating-models-from-existing-databases) -> not working but the web-address may be a bit complicated and hard to parse. For such cases would it be possible to allow for |
Alright, that issue should now also be fixed, this happened because I used this method: exec '!xdg-open' . ' ' . shellescape(destination) But if the exec '!xdg-open' . ' ' . shellescape(substitute(destination, '#', '\\#', 'g')) About adding a visual mode mapping, it can be done of course but it would not actually simplify anything as the normal mode mapping is expected to work just as well. That said though it could be a nice fallback to have when all else fails, and could also be used in non-link references to files and URLs. I've opened a new issue visual mode support since it's not related to this bug but rather a new feature, feel free to comment there if you have suggestions about how it could work! Also, can you confirm once again if the issue with the last non working link is resolved? If so I'll close this issue even though It's not unlikely more issues could pop up with this, but I'll fix them as they come along. |
Thanks @SidOfc - now it is working like a charm 👍 |
Cheers for the compliment @kraxli, always nice to hear :) Let me know if you find more issues / have other ideas, thanks for closing and have a good remainder of the day 👍 |
Hi
I cannot open an external link with
gx
(mapped to<Plug>(mkdx-gx)
) orgf
in e.g. Firefox, Libreoffice, ...OS: Linux Mint 20 Ulyana
Vim: NVIM v0.4.4
Default browser: Mozilla Firefox 79.0
My mkdx-settings
Example
[link to google](https://www.google.com/)
gx
Expected
Google page opens in Firefox
Actual
nothing happens
What do I miss in terms of settings?
Thanks
Dave
The text was updated successfully, but these errors were encountered: