Git branch search using ctrlp.vim.
- Install using your favorite Vim plugin manager. In Vundle, installation looks something like this:
echo "Bundle 'imkmf/ctrlp-branches'" >> ~/.vimrc
vim -c "BundleInstall"
- Add 'branches' to
g:ctrlp_extensions
:
let g:ctrlp_extensions = [
\ 'branches',
\ ]
- Run
:CtrlP
and move to the 'branches' mode, or run:CtrlPBranches
.
Optionally, map CtrlPBranches
to a key:
nmap <C-g> :CtrlPBranches<br>
This was hacked together on a Monday morning in about an hour. Bug reports are very helpful!