:GBrowse
is giving Netrw not found. Define your own :Browse to use :GBrowse
since netrw
is disabled by telescope.nvim
.
I tried to define :Browse
like this:
:command! -nargs=1 Browse !open <args>
but it does not work properly when using :GBrowse
with ranges like :.GBrowse
or :'<,'>GBrowse
, because the url will contain #
and it will try to expand it to the alternate filename (:h alternate-file
, :h c_#
). The expansion fails with E194: No alternate file name to substitute for '#': !open https://github.com/xxx/yyy#L3
How can I define a :Browse
that works for :GBrowse
in all cases?