open-browser-github.vim icon indicating copy to clipboard operation
open-browser-github.vim copied to clipboard

Is this plugin the same as rhubarb's GBrowse?

Open TamaMcGlinn opened this issue 4 years ago • 3 comments

With tpope's rhubarb installed, it seems I get the same functionality with these two mappings:

nnoremap <leader>gx :GBrowse<CR>
vnoremap <leader>gx :GBrowse<CR>

Is there any difference?

TamaMcGlinn avatar Jul 15 '21 14:07 TamaMcGlinn

For instance, I generated this link by selecting those lines of my vimrc and pressing <leader>gx.

TamaMcGlinn avatar Jul 15 '21 14:07 TamaMcGlinn

:GBrowse seems has only :OpenGithubFile feature. This plugin provides many accesses to the pages on github.

By the way, I found that :OpenGithubCommit {commit hash} command is missing in README. See full commands for doc

tyru avatar Jul 16 '21 14:07 tyru

No, rhubarb also allows me to open a commit with the same GBrowse command. From a fugitive buffer (e.g. from :Git blame and then enter on some commit hash) which is showing a commit, GBrowse will open the browser on that commit.

It also allows me to name a commit; if I am looking at some file which belongs to a git repo, I can do e.g. :GBrowse master to open master, or :GBrowse vimrc.vim to browse that file (on the master branch).

It also works for gitlab, or even a custom gerrit server, by installing GBrowse handlers.

TamaMcGlinn avatar Jul 17 '21 08:07 TamaMcGlinn