This plugin provides a function which returns the name of the git branch.
:echo gitbranch#name()
You can use this function to integrate with statusline plugins.
For example, in order to show git branch using lightline.vim, configure as follows.
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ },
\ }
See the README.md of lightline for further details.
Install with your favorite plugin manager.
itchyny (https://github.com/itchyny)
This software is released under the MIT License, see LICENSE.