I worked it out finally, this is a known issue with how gvim handles shell commands:
-- https://superuser.com/questions/386646/xdg-open-url-doesnt-open-the-website-in-my-default-browser
In short netrw#BrowseX does invoke a call to xdg-open which command line vim deals with as expected.
In short netrw#BrowseX does invoke a call to xdg-open which command line vim deals with as expected.
It seems that gvim spawns some sort of temporary process which is then killed instantaneously; thus preventing the request from making it to the browser.
On Thursday, 12 March 2020 22:16:05 UTC, Garvin Haslett wrote:
On Thursday, 12 March 2020 22:16:05 UTC, Garvin Haslett wrote:
On Tuesday, 10 March 2020 09:37:06 UTC, Christian Brabandt wrote:
If you don't mind debugging netrw, have a look at `:h netrw-debug`
or try to manually step through the commands using
`:debug :call netrw#BrowseX(...)`
(see for a brief help `:h :debug`)
My guess is, netrw calls xdg-open, which calls a script depending on
your desktop-environment something like `exo-open` or `gnome-open` and
some of those commands returns an error (or is not installed).I don't mind at all. The first step of the process (invoking vim/gvim without other plugins) confirmed that we see the same behaviour outlined in my original message, i.e., vim invoked from the command line successfully sends the URL to chrome while gvim does not.Attached is the Decho output produced by the call using gvim.The key lines seem to be:|s:NetrwExe(a:cmd<sil !xdg-open 'http://github.com/'>/dev/null 2>&1>) {||exe sil !xdg-open 'http://github.com/'>/dev/null 2>&1 ~10||return s:NetrwExe : v:shell_error=0 }which, to my (untrained) eye looks like a successful call.Am I correct?
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/ad49df8c-9859-4005-80f5-32bc5c0ece6e%40googlegroups.com.
No comments:
Post a Comment