vim-flog icon indicating copy to clipboard operation
vim-flog copied to clipboard

Feature Request: support open current commit in web page by vim-fugitive ":Gbrowse" just like "GV"

Open linjiX opened this issue 4 years ago • 3 comments

gv.vim supports using shortcut gb to open the current commit in web by calling :Gbrowse of vim-fugitive. Is that possible to add this feature to vim-flog?

linjiX avatar May 03 '21 14:05 linjiX

Brilliant idea; it's very easy, just add this to your vimrc:

augroup flog
  autocmd FileType floggraph nno <buffer> gb :<C-U>call flog#run_command("GBrowse %(h)")<CR>
augroup END

However, gb overwrites the current git bisect view option toggler. In my opinion this is fine because I am much more likely to use GBrowse than bisect.

TamaMcGlinn avatar May 03 '21 14:05 TamaMcGlinn

Thanks for your fast reply~ And the command you offered is exactly what I want!

linjiX avatar May 03 '21 15:05 linjiX

I like gbrowse myself, but I don't think I'll add this by default if the solution is sufficient. I'm getting worried about poluting the keybindings and needing to resolve keybinding later with Fugitive if they add equivalent or conflicting keybindings, since I try to keep it fairly consistent. I'll leave this open though in case it becomes a better idea in the future, like if fugitive adds its own Gbrowse binding.

rbong avatar May 03 '21 15:05 rbong