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

Add Bitbucket URL support to fugitive.vim's :Gbrowse command

fubitive.vim

Extend fugitive.vim to support Bitbucket URLs in :Gbrowse.

Configuration

The default domain when searching remotes is bitbucket.org. To make this plugin work with a Bitbucket instance under a different domain, simply add the following to your .vimrc (taking care to escape special characters):

let g:fubitive_domain_pattern = 'code\.example\.com'

For Bitbucket instances that are not installed in the root of the domain, for example under code.example.com/bitbucket/, add the following line to your .vimrc.

let g:fubitive_domain_pattern = 'code\.example\.com'
let g:fubitive_domain_context_path = 'bitbucket'

By default, fubitive will assume https:// when building URLs. To change this, set the g:fubitive_default_protocol variable:

let g:fubitive_default_protocol = 'http://'